I am having a lot of problem with making my report displaying only n number lines in my two subreports and would be so grateful if anyone can please shed some light.
My scenario is I can have one or more report index. For each report index I can have multiple detail invoice. If I have got 15 invoice lines for one report index, I want to print 10 lines on page one and the other 5 lines on page 2 for each subreport.
The invoice details section has been designed using sub report and I have got 2 detail section on my report i.e details a, details b. They both will print the same information. Detail a will be the copy for the firm and detail b will be the copy for the client.
So on my Main report, I have got:
- report header
- page header
- group header (for the report index)
- detail a (which contain the first subreport )
- detail b (which contain second subreport)
- detail c (which will contain the cheque, this is not got a subreport)
In my subreport a, I have created a formula to count the number of lines in the subreport i.e.
WhilePrintingRecords;
Shared NumberVar LineCounter ;
LineCounter := LineCounter + 1 ;
what I want to do is tell CR to stop printing when the lineCounter reaches 10 in detail a. But to continue to print the 10 invoice lines in detail b for the client section and also print the cheque in detail c. Then do a page break, then continue the next 5 lines on the next page 2.
Please help anyone....
|