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!

2 page report

Status
Not open for further replies.

kschennai

Programmer
Oct 15, 2003
1
MY
Hi,

I am using crystal report 8. I need to design a report which is a 2 page report. In the first page customer information and other details will appear. Some of the details are fetched from database. some are constat messages or column labels. In the second page remarks will be appear. This remarks is a database field (oracle 8 - varchar2(1500).

Here is my question :

1. How to design a 2 page report?


In some cases, the remarks is not that much lengthy. i.e. <1500 (maybe within 200 characters). If remarks is within 200 characters i want the remarks should appear in the first page itself.
If remarks is more than 200 characters, i need a 2 page report and remarks should appear separately in the second page.


Thanks in advance.

Saravanan
 
If you place those detail you want in a seperate detail section for instance. then format that section to insert a new page before.

To get both these options in design mode, right click the gray section bar and select insert section below. Or choose format section.

 
The following would work in Crystal 8.5, and probably for you also
a) Check the field lenght:
length({your.field})
b) Test this in the 'New Page After' formula of the relevant section.

Madawc Williams
East Anglia, Great Britain
 
You're probably not going to be able to check the length of this field in CR 8 without using a SQL Expression as it likely exceeds Crystal 8.5 and belows maximum length of 254 for a field to be used in a formula.

A shame you didn't post your database type and connectivity used or I would have provided the exact answer.

The best solution might be to create a SQL Expression on the database (Insert->Field Object->Right click SQL Expressions and select New). Under the Function->String middle pane above select the length function, and then type in the name of your table.field in the appropriate area, as in:

{fn LENGTH(table.`field`)}

Note the type of quotation marks used.

Or if you know the real SQL for your database, you may use it to provide the length.

Now you can use this number in the New Page After formula.

-k
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top