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

Choosing certain data in a subreport

Status
Not open for further replies.

vafishing

Programmer
Joined
Jul 18, 2001
Messages
35
Location
US
In a subreport I have a column of data in a group called giftype. In select expert, I filtered out all giftypes that <> pledge or writeoff. This will give me ALL pledges and writeoffs in the following sample order:
Type Giftsumkey Amt
pledge transaction 1090 250
pledge transaction 3090 15
pledge transaction 1555 750 (want to show this)
writeoff transaction 1555 (250) (want to show this)
pledge transaction 5244 50
pledge transaction 4254 144

In this case the I only want to show the data if the pledge transaction had an accompanying writeoff transaction. in this case I want to show the entry with the giftsumkey of 1555 only. In this case, the giftsumkey for the pledge transaction would equal that of the writeoff. How would I filter out the pledge information that did not have an accompanying writeoff?
 
what you might do is create a group based on GiftSumKey

then in the Group record formula...not the Record Select Formula but you find it Report|Edit Selection Formula|Group

make a formula

count({Table.GiftSumKey},{table.GiftSumKey}) > 1

See if that works...I have just started to play with restricting Group values this way...if it will work you will eliminate all of the one-of's

Jim Broadbent

The quality of the answer is directly proportional to the quality of the problem statement!
 
If it is possible to have more than one pledge transaction per giftsumkey, then I would take a slightly different approach. Group on {table.giftsumkey}, and then create a formula {@writeoff} for the details section:

if {table.gifttype} = &quot;Writeoff&quot; then 1 else 0

Then go to report->edit selection formula->GROUP and enter:

sum({@writeoff}, {table.giftsumkey}) > 0

If there is always only one pledge transaction per giftsumkey, then Jim's approach should work fine.

After you use a group select, you will need to use running totals for calculations, since the non-group selected records will still contribute to the more usual summaries.

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top