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!

Create an array dynamically from a formula

Status
Not open for further replies.

bigz60

Technical User
Apr 18, 2007
40
US
Hello,

I am using CR 9.

I have created a report that lists all outstanding payroll checks. There is no grouping or subreports in the main report.

The report consist of simply: check number, check date, and amount.

The problem is when a check is voided, that check number is listed twice. Once for the positive amount, and once for the negative amount. The sum of the two is inconsequential, but the presentation is not what I am going for.

I have created a running total to count the check number and reset on the change of the check number field. This gives me a starting off point to find the voided checks, but I would like to know how I can choose to suppress the voided checks alltogether.

I tried to suppress the detail section with a formula stating to suppress if the running total =2, but this only suppresses the negative amount, and not the positive amount.

I was thinking I could create an array dynamically. The array would hold the check numbers that the running total = 2, and suppress all check numbers in the array.

I'm not sure how to do this, or if there is a better way.

Thanks in advance.
 
bigz60,

You could try:

1. group by check number
2. suppress the group header
3. Put the check amount in detail section and sum it for your group
4. supress the detail section
5. put your other fields on the group footer
6. on the group footer, insert a suppression for the section : sum({check amount},{checknumber})=0

Andy



 
You could go to report->selection formula->GROUP and enter:

sum({table.checkamt},{table.checkno}) <> 0

-LB
 
Thank you both. That was much simpler that I was trying to make it.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top