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

Exporting issue

Status
Not open for further replies.
Mar 31, 2004
113
0
0
US
Hi, i've designed a report showing some basic data with a cross tab at the bottom. some staff will simply print the last page to use, others will export the data to use in other reports/spreadsheets etc.

the issue i have is that if i suppress the page header on my last page where the cross tab is using formula pagenumber = totalpagecount then the column headers dont export to excel.

any thought to the way round this, the page header on the cross tab page looks awful for the people just using/printing that page if i dont suppress!!!

thanks in advance

carl





Using Crystal v10
 
You could try using a formula method like this. Create two formulas, place them as noted, and suppress them:

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

//{@true} to be placed in the report footer containing the crosstab:
whileprintingrecords;
booleanvar flag := true;

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

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

-LB




 
lbass, once again you've helped me out as you have many times over the years. however i was wondering if you could explain what its doing and why this works and my suppress formula doesnt. the reason being is that in 10 years writing crystal reports i've always worked stand alone so when i've gotten help off you in the past i havent had to explain to anyone which helps because you're far better at this than i am, however this report is my first as part of a new team im joining in the states as my company has been taken over by an american one. im due out there on monday and me and a guy from out there were discussing how to fix this yesterday and i'd like to at least be able to say this is what its doing.

thanks again

carl


Using Crystal v10
 
My guess is that when exported to Excel, the report is treated as one page--therefore Page 1 = totalpagecount and the heading is suppressed.

With my suggestion, the page header picks up the value in the section immediately following it ("true" for the report footer), so it is not dependent upon the page number.

-LB
 
thanks LB. using your logic i tried 'if totalpagecount > 1 then pagenumber = totalpagecount' in the supress x-2 and that worked too

thanks again

carl

Using Crystal v10
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top