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

Crystal reports data - need to supress at regular interval

Status
Not open for further replies.

rrp299

Programmer
Feb 26, 2013
2
US
Hi Experts,
I have a requirement to show data in crystal reports as below:

When I run the report, it shows some ‘X’ no of records. From that ‘X’ no of records, I need to show only some records based on ’Random # ’ and ‘interval number’ (I am passing parameters to both of these)

Random # - will be the number that user enters to tell the program what record to begin.

’Interval number’ - tells program to pull every ‘interval’ to show on the report.

Example: Random # is 12 and the Interval is 10. If there are total 100 records in the report, Then Report need to pull records starting with the 12th record and then 10 + interval ----------- That means report pulls recors with the numbers.. 12,22,32,42, 52, 62, 72, 82, 92

I tried in this way: In the detail section- suppress formula : ( recordnumber() < ?Random #) OR (( recordnumber() mod ?intervalnumbner) <> 0

but its not giving the exact result - its showing the records numbers: 20,30,40,....90
Please help me
 

This should do the trick:

recordnumber < {?Random}
or
(recordnumber - {?Random}) mod {?Interval} <> 0
 
yep..its working!!! excellent!!!

Thanks a lot
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top