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

Crystal, sub report and csv export

Status
Not open for further replies.

rickybcs

MIS
Oct 13, 2009
1
ZA
I'm using Crystal Reports ver. 11 and trying to export to a csv file.

The Main report has two subreports. The subreport information is not going into the csv export.

I saw a proposed work-around using shared variables. What I did here was create a shared variable on the sub report , entered this field onto the sub report and suppressed all sections. I then created the formula on the main report to retrieve this variable and entered the formual onto the report. What I noticed than is that it repeats the data in that field until there is a record with new information ( so these records may have blank info)
I have tried just placing the sub report with no formula and exporting to excel 1st but it creates a line between each record..

I am declaring the shared variable in the report group header section. I have suppressed all details. The subreport is in GH1a and I have a formula there that also declares the shared variable. I am displaying the value of the shared variable in GH1b.

Would appreciate someone explaining to me how to overcome this



Thank you
Ricky

 
Add another group header section and add a reset formula in GH_a, with the sub in GH_b and the referenced variable in Gh_c:

//{@resetforGHa}:
whileprintingrecords;
shared numbervar x;
if not inrepeatedgroupheader then
x := 0;

-LB
 
Exporting to CSV has Crystal make lots of assumptions about structure and format. You can use our Grid UFL to build a CSV file with exactly the structure you want.
Trail version is available from our web site

Editor and Publisher of Crystal Clear
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top