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!

Problem With WhileReadingRecords

Status
Not open for further replies.

dreman

Programmer
Jan 16, 2002
272
US
I am using CR 8.5:
I am using Groupheader displaying customer name, below it I am using detail section line displaying detail of orders but the section is depressed based on criteria ({@f_qty_Open} < 0). It is working ok !

What I would like to do is if no records are printer then suppress Group Header.
I am trying using WhileReadingRecords but no success. Please advise. Thank you.
 
Put in a conditional running total of type count on a unique detail field, executed on formula = &quot;NOT (suppress condition)&quot;, reset on group change. Then conditionally suppress the group header when this RT < 1.
 
I tried your method.
I undestand fully getting Running TOtal (count) for item displayed based on the formula and rest after group have changed.
It works like a charm if RT placed in Group footer (testing it). It is the counter of the item displayed, Then I Drag RT and place it in Group header. It prints 0 or 1.
However it is not working 100%, since I have a customer that RT = 2 when printed in Group footer but when placed in Group Header it still print 0
Any advice. Thank you.
André
 
Rogar:
I know there is a way whilereadingrecords function. But it is failing as well. It is happening only for that record.
Advices are welcome!!!!
Thank you.
 
I think if you remove the &quot;whileReadingRecords&quot; from the formula it will work....I still haven't found a use for that function Jim Broadbent
 
I reiterate the folling:
I undestand fully getting Running TOtal (count) for item displayed based on the formula and the reset after group have changed.
It works like a charm if RT placed in Group footer (tested OK). However When I placed RT in Group header. It prints 0 or 1. (OK but not for ALL)
I have a customer that RT should be 1 (Since it has some records for that customers) it is still displaying RT=0 in Group Header. (IT should be =1)
Any advice. Thank you.
André
 
My suggestion is not going to work because the RT Count of unsuppressed records in the group cannot be known until the group footer is reached, and the group header is already printed then. Can you exclude the unwanted records in the record selection formula instaed of suppressing them? Then there would be no empty groups.
 
If all you want this formula to do is suppress a group header...perhaps I can suggest an alternative way without the running total.

Place the hearder information in a detail subsection

Detail-a - header info
Detail b - normal detail stuff

Place a flag such that if one record is present then Detail-a is unsuppressed once and then suppressed thereafter

the flag would be reset with each new header Jim Broadbent
 
BTW the nature of the flag mentioned above is just a count

When it is = 1 then unsuppress the Detail-a...further increases add to the count (initially = 0

in the conditional suppress of the detail-a

WhilePrintingrecords;
numbervar Flag;

Flag <> 1; Jim Broadbent
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top