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!

Report Exporting

Status
Not open for further replies.

greg52

Technical User
Feb 16, 2005
18
0
0
US
I've written a CR (v11.5) to produce a flatfile. All of the fields have been placed in a single text object. After the report runs, the results are exported to a CSV disk file. Before exporting, the file extention is changed to TXT instead of CSV. On the Separated Values Export Options dialog box, I blank out the Delimiter and Separator values. I Do Not Export Report, Page, or Group Sections. I check the Isolate Report/Page Sections and Isolate Group Sections boxes. The output is successfully exported. I need to run this report against a MS SQL db and a Pervasive db. The 2 reports I've written for each db both run and are exported successfully individually. All is Ok up to now.

Here's the problem

Since I want to avoid having the support staff run each report individually and manually combining the output into a single text file, I created a 3rd report using the 1st two reports as subreports. The 3rd report runs successfully against each db. The problem is exporting. Repeating the process used earlier to export to a text file is not working. A 0 byte text file is produced. If I double click on the preview window and then try to export, the export is successful but only for the subreport that I'm physically in the preview window of. The other subreport is not exported. Is there a way to export the results of the 2 subreports to a single text file? I am planning on having this run on an Edge server with the output automatically emailed to support staff. Can the manual combining of the outputs be avoided? Thanks.
 
I don't think your subreports approach would work.

One solution is to link to both data sources (from SQL Server or from MS Access) and do a UNION query to hand over the combined result set to a Crystal report.

Another solution is to consider using a 3rd-party tool. At least one of the 3rd-party Report Managers listed at can automate the exporting of two reports to text so that the 2nd export gets appended to the text exported by the first.

That same tool can also append exports through ODBC to existing tables so, assuming you plan to import the TEXT file into a third database, the process can directly achieve that without the text file step.

- Ido

view, email, export, burst, distribute, and schedule Crystal Reports.
 
Thanks for your suggestions.

I've used Union joins in the past when I had multiple db's of the same type (MS SQL). The situation now is a MS SQL db and a Pervasive db. I don't see how a Union would work here since the database field names are different.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top