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

Group Header,, supress printing, how to

Status
Not open for further replies.

jmd0252

Programmer
May 15, 2003
667
Using a Group header line like a "level break", in RPG. Had to say that for all the AS400 people out there.. So how do I supress the printing of the line,, when a calculated value ,, using group summary values,, is 0.00.. or a given range of values. Say anything from -.09 to +.09. Ideas,, I looked at sections expert, and using a formula to supress printing,, but could not figure just how to say it..
 
Depends upon how you calculated it, but go into the section expert->group header->suppress->x+2 and enter something like:

sum({table.amt},{table.groupfield}) in -.09 to .09

-LB
 
ok, sometime the simple things escape me. I suppressed the section via a formula {@qtyvar} = 0, this line inserted into the suppress no drill down,, and then checking suppress when blank. Of course I ended up with lots of white space from the footers, I then did the same things suppress when blank. So far so good.. I now of course have a lone group 1 header,, that prints, I was workgin at the group 2 level. so No group 2 printing, how do you supress the group 1 header?? Ideas
 
What is the content of your {@qtyvar}?

-LB
 
Sum ({JC_AIAPROGBILLD.BILL_QUANTITY}, {JC_AIAPROGBILLD.COST_CODE}) - Average ({Command.TC1}, {JC_AIAPROGBILLD.COST_CODE})

Yes I know one is a sum and the other is an average,, but because of record selection,, it works out this way.
 
No, actually this isn't simple, since you can't just change the formula to reflect the higher order group. I think you would have to save the report as a subreport linked on the group #1 field, place in a GH#1a section, and then use a shared variable to sum the value of the above formula at the group #1 level, and then use the result to suppress the GH1b section.

-LB
 
Actually things are coming togather,, I do have a calculated field,, calculated at group 2,, that I cannot run a SUM() on.. I tried creating a formula field,, that litterally said Sum({@dv}),, but that did not work.. the summary would occur on what lines got printed.. the @dv shows up correctly. based on 2 sum fields,, subtracted, and then multiplied times a dollar factor.. This is a bear,, I can run it a lot quicker using a couple of views, but the views need to be at a certain point in time,, ie date sensative. So they want this report that runs via the web,, so joe can go run his own report..
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top