Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to set the Page Line control? 1

Status
Not open for further replies.

maulae

IS-IT--Management
Feb 7, 2006
34
US

I am using Crystal 11 with xp and Windows 2003.
My company’s account department wants to print electronic cheque in the following format,

They need to divide each letter size page (11x8.5”) in three equal sections horizontally (row wise). I have grouping on cheque number.

1. In first section they want to print headers and maximum 16 lines of financial transactions, and their totals.
2. In second section they want to print the real cheque of total amount calculated in first section.
3. In third section they want to print the copy of transactions of the first section, I mean detail transaction of 16 lines.

I think 2nd part I can do in report group footer and 3rd part I can do with subreport, but I am having difficulty in setting first section of the page.
I will appreciate if somebody help me.
Thanks.
 
It is unclear what the problem is. Do you have cases where there are more than 16 lines? If so, where are the extra lines supposed to go? Or is the issue that you sometimes have less than 16 lines and you need to maintain the space?

-LB
 
Thanks Ibass, I will check with related person and let you know accordingly.
 
Thanks for response, Yes I do have the cases of more than 16 lines, and extra lines should move to next page, I don't have any problem with less than 16 lines.

Here is detail about the output of the report.
As I mentioned earlier this report should be divided in three parts,
1. Transaction details for their respective amounts
2. Print the cheque for the total of all transactions
3. Print the copy of first part (all transaction details).

I have created a report that works fine for less than 16 lines (maximum capacity of the first part of the page) , In order to control less than 16 lines I have inserted extra blank lines and put conditional suppression on each line. And bottom Part I created with subreport linked with main report group (Cheque Number) and that works also fine with less than 16 lines. But problem comes when more than 16 lines of transaction. That pushes everything down and 3rd part information (from subreport) move to next page.
If my total transactions are 21 then my requirement is,
1. Cheque Form should print only 16 invoices in the Top section,
2. Cheque form be voided,
3. then repeat the 16 again on the bottom half.
4. The other 5 to be printed on the top section of next page.
5. Cheque face value for all 21 invoices,
6. and the 5 again repeated on the bottom section.
7. Net result is 2 Cheques, 1st with 16 invoices and a voided Cheque, then second Cheque with the remain 5 invoices and a Cheque in the amount of the entire 21 invoices.
Thanks again for the help.
 
Crystal is written to handle the page changing and lines itself, with limited controls. You'll need to do some sort of work-round, probably a count that resets for each page header.

The following is something I got working and that you should be able to adapt. In the page header, clear away values from the previous page:
WhilePrintingRecords;
NumberVar LineCount :=0;

Include a 'line count' in each header and detail section; make your own estimate of how many lines that section it is equivalent to
WhilePrintingRecords;
NumberVar LineCount := LineCount + 2;

Check the value of the variable in a Formula field, {@Lines_Done}
WhilePrintingRecords;
NumberVar LineCount;

Check for the Page Before option, so as to move to a new page when there will not be enough room. E.g.
{@Lines_Done} > 50

[yinyang] Madawc Williams (East Anglia, UK). Using Windows XP & Crystal 10 [yinyang]
 
Thanks Madawc, I did with kind of same logic and it worked.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top