Invoice Report

gdeivekisgdeivekis Member Posts: 5
i would like to ask 2 things about invoice reports.
1) I try to set up a maximum detail lines of printing in its invoice page and then printing in next page as continued....

I TRIED TO put in maxiteration 15 in data item Sales Invoice Line but did not create a second page with the rest of invoice

2) also i want to put the old balance and new balance of the customer. I know how to find new Balance (LCY) but how to find "old balance (LCY)"

i would apreciate any help.

george #-o

Comments

  • SavatageSavatage Member Posts: 7,142
    I believe the number of sales lines you can fit on an invoice really depends on the sizes of your sections - not MaxIteration.

    Are you putting spaces between sales lines?
    is your header huge?

    that kind of stuff.
    I know how to find new Balance (LCY) but how to find "old balance (LCY)"
    Wouldn't old balance = Balance (LCY) minus that invoice total.

    But in the future if you need to reprint that invoice those totals will be different.

    The best thing to do is save a copy of the Sales Invoice Report to a new number & play around with that one.
  • tguptatgupta Member Posts: 86
    Hi gdeivekis,
    To put max lines of priniting do something like this .
    Define a intvar such as MaxLines and on the
    Report - OnInitReport()
    MaxLines := 15;
    after that define another intvar such as LineCounter and on the following trigger put like this
    Sales Invoice Line - OnPreDataItem()
    LineCounter := 0;

    after that go to the trigger abd put the following code
    Sales Invoice Line - OnAfterGetRecord()
    LineCounter += 1;
    IF LineCounter > MaxLines THEN BEGIN
    CurrReport.NEWPAGE;
    LineCounter := 0;
    END;

    Hope it will work for ya

    Cheers,
    Tarun
  • gdeivekisgdeivekis Member Posts: 5
    thanks a lot guys for your help.

    i tried this the page brake goes well in the case of the detail lines BUT when i run it it produce first a blank page and in the second one it duplicates the "sales invoice line header"!!!! do you have any idea about that!!!

    thans in advance

    george
  • tguptatgupta Member Posts: 86
    Check for the property of sales invoice header and look for new page per record should be set to yes .and it shu dbe no in sales invoice line .If that is correct make sure u putting the code which i mentioned on the trigger specifieds and it shud be at the end of that particular trigger after the base code .One more thing is this the problem with all sales orders or just few sales orders and if its only with 2-3 sales orders whats the diff in those sales orders .


    Hopefully it shud solve ur problem .If not put ur code structure as it is hard to imagine whats going wrong in ur code. :)

    Cheers,
    Tarun
Sign In or Register to comment.