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!

Problem exporting subreport from VB

Status
Not open for further replies.

MarcusHemy

Programmer
Nov 23, 2001
14
GB
Background:
I am using CR 8.5 with VB6 to export a report with a subreport. A central user needs to create and email a report to a list of users. Each user will get different data on the report. The central user previews the report which contains the data for all the users. When the report is exported, the ExportButtonClicked event is trapped to display a custom export form. Before the report is exported, the RecordSelectionFormula is updated so that different data appears on each report. In effect, one report with all the data is previewed but many reports with different data are created when exported.

The problem:
The export does not always create the data. For example, 5 reports are exported to PDF, reports 1, 2 and 4 are fine but 3 and 5 only have column headings. Export the same report to Excel and reports 1, 3 and 4 are fine but 2 and 5 are not. It's the same for all export formats. If the subreport is removed, all reports are created OK.

I have added DoEvents to the VB code in case it's synchronisation.

Any thoughts or suggestions?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top