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

How do I reset page footers?

Status
Not open for further replies.

rickbgenius

Programmer
Jun 2, 2005
4
US
I'm using Crystal Reports 7. I'm trying to print a legend in the page footer consisting of only those status items that appear on the page on which the footer will print.

I have data fed to me in an ado object from a sql database via a c program. In the group, I set a status variable (BooleanVar statusType) to true if the line contains that status, then in the page footer, if the statusType is set to true, I print the status and what it means in english (I don't care about localization). Works great on the first page, but the footer doesn't get cleared for the next page and the status prints there as well (even though this particular status doesn't appear on this page). Is there a way to make the page footer reset for every page?
 
Dear rickbgenius,

It would help if you printed formulas you are using now ...

However, generally you would need three formulas:

1 to act as an initialze or reset. You place that where you want the value reset.

1 to evaluate ... you place that where the values are that you need to evaluate.

1 to display. You place that where you want to display the value.

This is referred to as the Three Formula Manual Running Total method.

Hope that helps,

ro

Rosemary Lieberman
rosemary-at-microflo.com, Microflo provides expert consulting on MagicTSD and Crystal Reports.

You will get answers more quickly if you read this before posting: faq149-3762
 
Specifically, try putting the following in the page header:

BooleanVar statusType := false;

-LB
 
Thanks Rosemary. I've only just started using Crystal Reports (Tuesday last). I believe I have met your requirements, but in two formulas.

1> In the group 3 header (where the trans type is printed) I have this formula:
WhilePrintingRecords;
BooleanVar tType1 := false;
BooleanVar tType2 := false;
.
.
.
StringVar typeDesc := "";
If statType = "stat1" then tType1 := true;
If statType = "stat2" then tType2 := true;
.
.
.

2> In the page footer I have this formula:

WhilePrintingRecords;
BooleanVar tType1;
BooleanVar tType2;
.
.
.
StringVar typeDesc;


If tType1 = true then typeDesc := "description of stat1";
If tType2 = true then typeDesc := typeDesc + "desc of stat2";
.
.
.
typeDesc;

It looks like I've put formula's 1 and 2 in the same place. Where would I put formula 1 to initialize it? Thanks for your help.
 
Try formula 1 in the page header.

//newformula 1 - Placement Page Header

WhilePrintingRecords;
BooleanVar tType1 := false;
BooleanVar tType2 := false;

//end


//new Formula 2 placement Where 1 is now!
BooleanVar tType1;
BooleanVar tType2;
StringVar typeDesc := "";
If statType = "stat1" then tType1 := true;
If statType = "stat2" then tType2 := true;
.
.
.

//This is now formula 3 and remains in page footer

WhilePrintingRecords;
BooleanVar tType1;
BooleanVar tType2;

StringVar typeDesc;

If tType1 = true then typeDesc := "description of stat1";
If tType2 = true then typeDesc := typeDesc + "desc of stat2";
typeDesc;


Regards,

ro

Rosemary Lieberman
rosemary-at-microflo.com, Microflo provides expert consulting on MagicTSD and Crystal Reports.

You will get answers more quickly if you read this before posting: faq149-3762
 
Hi Rosemary,

I did what you said, but it still does the same thing; keeps adding to the typeDesc, but never resetting for the next page.
It's like the boolean value is not being reset to false. The stat descriptions don't repeat, they just get printed on pages where they don't exist. Surely there's some way to make the boolean variable reset from page to page...???

Thanks for your help.

Rick
 
Hi Rosemary!!

You sweet sweetheart! Disregard my last. Your solution works fine. It was my fat fingered setting of type(x) = false; instead of type(x) := false;

Thanks again.. You made my day!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top