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!

Header info lost in Custom Cross Tab

Status
Not open for further replies.

cmetters

Programmer
Oct 30, 2001
9
0
0
GB
Hi there.

I have a custom cross-tab report that displays a date in the Page Header using an inserted formula field.

The date is retrieved from within the Details section, stored in a variable and the header formula prints the variable value.

This works fine in the first report where I am only using one Group.

But when I introduce a second group into the report, the date does not display. I can move the formula field into any Group Header, Group Footer or the Report Footer and the date appears, but not in the Page Header.

Does anybody know of a workaround?

Thanks in anticipation,

Chris
 
What is the formula of the formula field. Ken Hamady, On-site Custom Crystal Reports Training & Consulting
Public classes and individual training.
Guide to using Crystal in VB
tek@kenhamady.com
 
Hi Ken.

This formula in the Details section is

************************
WhilePrintingRecords;

NumberVar YearAgoCount;
StringVar Header13;


If {spCrystalDecisions#1;1.a_monthno} = 13
Then (YearAgoCount := YearAgoCount + 1;
Header13 := {spCrystalDecisions#1;1.a_reportingperiod});
************************

The 'Header13' variable holds the date string.


In the header the formula is

************************
WhilePrintingRecords;

StringVar Header13;

Header13;
************************

Actually, I just checked and I seem to be getting the heading on page 2, but that's still not ideal!

Regards.


 
Your variable is WhilePrinting.
So each page header is telling you what happend on the prior page. The first page header won't have a prior page. Ken Hamady, On-site Custom Crystal Reports Training & Consulting
Public classes and individual training.
Guide to using Crystal in VB
tek@kenhamady.com
 
Thanks for the lead, Ken.

By using the WhileReadingRecords function instead it's appeared to have solved the problem.

 
I am surprised that your running total works the same WhileReading, but I don't argue with success. Ken Hamady, On-site Custom Crystal Reports Training & Consulting
Public classes and individual training.
Guide to using Crystal in VB
tek@kenhamady.com
 
I actually put a seperate formula in the details section exclusively for the purposes of getting the header.

**************
WhileReadingRecords;

StringVar Header13;

If {spCrystalDecisions#1;1.a_monthno} = 13
Then Header13 := {spCrystalDecisions#1;1.a_reportingperiod};
**************

The formula to calculate totals exists seperately and still uses the WhilePrinting function. This seemed to do the trick!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top