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

Filter Details to Diplay 1st and 5th record

Status
Not open for further replies.

stuckDuck

Programmer
Jun 30, 2010
30
CA
I need to supress all the records in the detail section of a report if the record count is less than 5. If the record count is greater than 5 then display only the 1st and 5th record.


I have a running total formula that performs the count however it is not suppressing the 1st record if the record count is less than 5. Instead it is printing the 1st record.


In the Section Expert--> Details --> Suppress on Formula

whileprintingrecords;
if {#RT_RecordCount}>5 then not({@employeeData}) in [1,5]
 
Hi,
Do you have another supression formula for < 5 ? Your current one, as posted, would not have any effect on a < 5 condition.

Try something like:

If {#RT_RecordCount} <= 5
OR
if {#RT_RecordCount}>5
then not({@employeeData}) in [1,5]

[profile]

To Paraphrase:"The Help you get is proportional to the Help you give.."
 
Uncheck the section expression and then use:

{#RT_RecordCount} <= 5 or
(
{#RT_RecordCount} >5 and
not({@employeeData}) in [1,5])
)

-LB
 
Thank You for the promt reply. I have tested both forumlas and they suppress all the records including the first and fifth.

I was thinking of getting the sum of the record count. If the sum is less than 10 then suppress all the records in the detail section, however I cannot sum the count.



so I tried this and im stil getting the 1 record when the record count is less than 5
if remainder({@RT_INCREMENT},10)<>0
then not ({@RT_INCREMENT} in [1,5])
 
Oops, silly mistake. Should be:

count({table.field},{table.groupfield}) <= 5 or
(
count({table.field},{table.groupfield}) > 5 and
not({#RT_RecordCount} in [1,5])
)

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top