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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Crystal XI Export 2 reports to same file?

Status
Not open for further replies.

BernieBeattie

Programmer
Nov 29, 2002
22
0
0
GB
Is it possible to export 2 consecutive reports to the same file rather than the second report overwriting the file the first one created? I'm looking for an append option but can't find it.

Regards,

Bernie Beattie
 
Please provide more info: background info, data, export format, reason...?

Cheers,
- Ido

Visual CUT & DataLink Viewer:
view, e-mail, export, burst, distribute, and schedule Crystal Reports.
 
Hi,
I do not believe so ( it is actually a file system issue, since, by default, any new file with the same name replaces the existing one)..

You could export to some text based format in 2 files and use the OS's methods to concatenate them..( Or export to excel and then combine the worksheets)

Another method might be to make the second report an unlinked subreport and place it in the first report's Report Footer so it would run after the main one.

[profile]

To Paraphrase:"The Help you get is proportional to the Help you give.."
 
Much of this would depend on what format you're exporting to, and the version of Crystal, the database/connectivity used, etc.

You might consider just placing the second report into the Report Footer as a subreport of the first report and then exporting as well.

Other options might be to base the reports off of a stored procedure and letting the database export the data within the stored procedure.

-k
 
I had tried to have the second report as a sub-report in the footer but the results weren't very nice. I ended up with the heading of the first report followed by the heading of the sub-report and the same with the report footers. Is there a way of supressing the main report heading/footer when running the sub-report? I wasn't sure how to do this.

Thanks for any help,

Bernie Beattie
 
If you have fields in the report footer of the main report, then insert a second report footer and place the subreport there. In the section expert, you should format RF_b to "new page before". Then create two formulas in the main report:

//{@false} to be placed in the report header:
whileprintingrecords;
booleanvar flag := false;

//{@true} to be placed in RF_b:
whileprintingrecords;
booleanvar flag := true;

Then go to the section expert->page header->suppress->x+2 and enter:

whileprintingrecords;
booleanvar flag;
flag = true; //note no colon

Place the same formula in the suppression formula area for the page footer.

This will suppress the main report page headers and footers on those pages where the subreport is executing.

-LB
 
Thanks very much for that. I'll give it a try as it seems like the perfect solution.

Regards,

Bernie Beattie
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top