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

Showing the same Summary for two different groups 1

Status
Not open for further replies.

mintman

IS-IT--Management
Mar 5, 2007
66
US
Hello friends need some help on this
I have group on field A and anfd Im showing Summary in Group Headrer on Units. Below is the example data

Group Summary
A 20--------------Group Header
B 5
C 1

thing is i want to show whatever the summary value I get for A , I want to show the same summary value for C.Like below

Group Summary
A 20
B 5
C 20.

Any ideas on this.
Thanks a lot.
M
 
You are confusing things my calling the group field "A" as well as calling one of the instances of the group "A". I'll just call the group field {table.groupfield}. Create a formula {@amountA}:

if {table.groupfield} = "A" then {table.amt} //or 1 if you are counting

Then create a second formula to place in the group section:

whileprintingrecords;
numbervar amtA := sum({@amountA},{table.groupfield});
if {table.groupfield} = "C" then
amtA else
sum({table.amt},{table.groupfield});

-LB
 
Hello LB thanks a lot for quick reply
I did what you suggested but I am getting 0 there like
A 20--------------Group Header
B 5--------------Group Header
C 0--------------Group Header I am getting right data for A,B but not c .

I will explain in more detail

I did group on on field E_NAME and Summary on Quantity and in group header Im displaying Group E_NAME and Summary of Quantity at Group level.

Thanks again,
M
 
Sorry, change the formula to:

whileprintingrecords;
numbervar amtA := sum({@amountA},{table.groupfield});
numbervar subtot;

if {table.groupfield} = "C" then
subtot := amtA else
subtot := sum({table.amt},{table.groupfield});
subtot

-LB
 
Sorry LB, for some reason I am getting 0 for c and If i chnage that to B i get zero there too. I will give you my formula

Formula1:
If {E_AUD_LOG.ELEM_DESC} = "MAKE CARTON PACK" then {E_AUD_LOG.TA_MULTIPLIER}

Formula2:
whileprintingrecords;
numbervar elementA := sum({@Group},{E_AUD_LOG.ELEM_DESC});
numbervar subtot;

if {E_AUD_LOG.ELEM_DESC} = "GET AND SCAN TOTE" then
subtot := elementA else
subtot := sum({E_AUD_LOG.TA_MULTIPLIER},{E_AUD_LOG.ELEM_DESC});
subtot

Hope this helps. And thank you so much for the help.
M
 
In response to your impatience--please understand that I and others who respond here have jobs and other commitments and cannot always respond instantly--nor is it our job to.

Sorry about the formula. Please make this change, assuming that {@Group1} is your name for the first formula:

whileprintingrecords;
numbervar elementA := sum({@Group}); //remove the group condtion here
numbervar subtot;

if {E_AUD_LOG.ELEM_DESC} = "GET AND SCAN TOTE" then
subtot := elementA else
subtot := sum({E_AUD_LOG.TA_MULTIPLIER},{E_AUD_LOG.ELEM_DESC});
subtot

-LB
 
Im sorry LB, this was not even my report and they gave me a deadline this evening, was lil nervous. I am really sorry about that. And I want to thank you so much for your time, this worked awsome. I am learning lot of stuff from this site. Again I am sorry and many thanks.
M
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top