PDA

View Full Version : Suppress Group Footer



HenryEgal
30-Mar-2005, 06:02 PM
Hi all! I am working on a report in which I may need to suppress a group
footer based on values in the previous group footer. I've been trying some
things with running totals but not working correct. Is there any
suggestions out there? Thanks for any advise!!! Henry

David Martinko
30-Mar-2005, 09:29 PM
You will have to use a variable in the report.

--
David Martinko
Redeemed Software
248-535-7495
RedeemedSoftware(SHIFT+2)Hotmail(PERIOD)com
www.redeemedsoftware.com

"Henry Egal" <Henry@horizon-is.com> wrote in message
news:WiKqJ2XNFHA.3624@dacmail.dataaccess.com...
> Hi all! I am working on a report in which I may need to suppress a group
> footer based on values in the previous group footer. I've been trying
> some
> things with running totals but not working correct. Is there any
> suggestions out there? Thanks for any advise!!! Henry
>
>

henry
3-Apr-2005, 09:00 PM
David, Hi there! Yes I am trying shared variables.
I delcare the variable in the Report Header
In the group HEADER I move the subtotal of the group footer (which I
thought would have the previous group footer value in memory) to the
variable
In the Group Footer I display the variable.

It seems that the header has the value of the footer already. Do you know
if that is written at the same time or do you have any examples of this?
Thanks for any input!!! Hope to see you in Florida. Thanks!! Henry


"David Martinko" <RedeemedSoftware@Hotmail.com> wrote in message
news:3vHc7kZNFHA.5316@dacmail.dataaccess.com...
> You will have to use a variable in the report.
>
> --
> David Martinko
> Redeemed Software
> 248-535-7495
> RedeemedSoftware(SHIFT+2)Hotmail(PERIOD)com
> www.redeemedsoftware.com
>
> "Henry Egal" <Henry@horizon-is.com> wrote in message
> news:WiKqJ2XNFHA.3624@dacmail.dataaccess.com...
>> Hi all! I am working on a report in which I may need to suppress a group
>> footer based on values in the previous group footer. I've been trying
>> some
>> things with running totals but not working correct. Is there any
>> suggestions out there? Thanks for any advise!!! Henry
>>
>>
>
>

David Martinko
3-Apr-2005, 10:27 PM
Henry, Try the attached sample. It is in Crystal Report 10. If you don't
have 10 follow the steps listed below:

1) Create a new report.
2) Create a formula field called "Header_Var"
{@Header_Var}
Global numberVar MyPage ;
MyPage:= 0 ;

3) Place this formula in the REPORT HEADER
4) Create a formula field called "Footer_Var"
{@Footer_Var}
WhilePrintingRecords ;
Global numberVar MyPage ;
If ((PageNumber = 1) or (PageNumber = 3) or (PageNumber = 5) or (PageNumber
= 7) or (PageNumber = 9)) Then MyPage:= (MyPage + 1) ;
MyPage

5) Place this formula in the PAGE FOOTER
6) Create a formula field called "Header2_Var"
{@Header2_Var}
WhilePrintingRecords ;
Global numberVar MyPage ;
MyPage

7) Place this formula in the PAGE HEADER
8) Add your own datafile
9) Drag a single field into the report details
10) Preview

What it does:
First we define a variable and place it in the header of the report so it is
declared once. Next, we created a formula that used the declared variable.
If it is an odd page number, we increment the variable value. The last
formula we created just displays the current value of the variable. You
should be able to adjust the logic for the {@Footer_Var} to do your totals
or whatever you are doing.
--
David Martinko
Redeemed Software
248-535-7495
RedeemedSoftware(SHIFT+2)Hotmail(PERIOD)com
www.redeemedsoftware.com

HenryEgal
4-Apr-2005, 07:41 AM
David thank you very much for the sample!!! I'm checking it out now and
will let you know! Thanks, Henry


"David Martinko" <RedeemedSoftware@Hotmail.com> wrote in message
news:J53VbuQOFHA.964@dacmail.dataaccess.com...
> Henry, Try the attached sample. It is in Crystal Report 10. If you don't
> have 10 follow the steps listed below:
>
> 1) Create a new report.
> 2) Create a formula field called "Header_Var"
> {@Header_Var}
> Global numberVar MyPage ;
> MyPage:= 0 ;
>
> 3) Place this formula in the REPORT HEADER
> 4) Create a formula field called "Footer_Var"
> {@Footer_Var}
> WhilePrintingRecords ;
> Global numberVar MyPage ;
> If ((PageNumber = 1) or (PageNumber = 3) or (PageNumber = 5) or
(PageNumber
> = 7) or (PageNumber = 9)) Then MyPage:= (MyPage + 1) ;
> MyPage
>
> 5) Place this formula in the PAGE FOOTER
> 6) Create a formula field called "Header2_Var"
> {@Header2_Var}
> WhilePrintingRecords ;
> Global numberVar MyPage ;
> MyPage
>
> 7) Place this formula in the PAGE HEADER
> 8) Add your own datafile
> 9) Drag a single field into the report details
> 10) Preview
>
> What it does:
> First we define a variable and place it in the header of the report so it
is
> declared once. Next, we created a formula that used the declared variable.
> If it is an odd page number, we increment the variable value. The last
> formula we created just displays the current value of the variable. You
> should be able to adjust the logic for the {@Footer_Var} to do your totals
> or whatever you are doing.
> --
> David Martinko
> Redeemed Software
> 248-535-7495
> RedeemedSoftware(SHIFT+2)Hotmail(PERIOD)com
> www.redeemedsoftware.com
>
>
>
>

henry
4-Apr-2005, 10:14 PM
David thanks again that worked great! WhilePrintingRecords is what I was
missing. thank you!!! Henry
"Henry Egal" <Henry@horizon-is.com> wrote in message
news:K7QIbTROFHA.1284@dacmail.dataaccess.com...
> David thank you very much for the sample!!! I'm checking it out now and
> will let you know! Thanks, Henry
>
>
> "David Martinko" <RedeemedSoftware@Hotmail.com> wrote in message
> news:J53VbuQOFHA.964@dacmail.dataaccess.com...
>> Henry, Try the attached sample. It is in Crystal Report 10. If you don't
>> have 10 follow the steps listed below:
>>
>> 1) Create a new report.
>> 2) Create a formula field called "Header_Var"
>> {@Header_Var}
>> Global numberVar MyPage ;
>> MyPage:= 0 ;
>>
>> 3) Place this formula in the REPORT HEADER
>> 4) Create a formula field called "Footer_Var"
>> {@Footer_Var}
>> WhilePrintingRecords ;
>> Global numberVar MyPage ;
>> If ((PageNumber = 1) or (PageNumber = 3) or (PageNumber = 5) or
> (PageNumber
>> = 7) or (PageNumber = 9)) Then MyPage:= (MyPage + 1) ;
>> MyPage
>>
>> 5) Place this formula in the PAGE FOOTER
>> 6) Create a formula field called "Header2_Var"
>> {@Header2_Var}
>> WhilePrintingRecords ;
>> Global numberVar MyPage ;
>> MyPage
>>
>> 7) Place this formula in the PAGE HEADER
>> 8) Add your own datafile
>> 9) Drag a single field into the report details
>> 10) Preview
>>
>> What it does:
>> First we define a variable and place it in the header of the report so it
> is
>> declared once. Next, we created a formula that used the declared
>> variable.
>> If it is an odd page number, we increment the variable value. The last
>> formula we created just displays the current value of the variable. You
>> should be able to adjust the logic for the {@Footer_Var} to do your
>> totals
>> or whatever you are doing.
>> --
>> David Martinko
>> Redeemed Software
>> 248-535-7495
>> RedeemedSoftware(SHIFT+2)Hotmail(PERIOD)com
>> www.redeemedsoftware.com
>>
>>
>>
>>
>
>