Normal Topic reports with only selected subrecords listed (Read 4466 times)
Steve_in_Texas
Senior Member
*****
Offline


No personal text

Posts: 893
Location: San Antonio
Joined: Feb 21st, 2004
reports with only selected subrecords listed
Jan 16th, 2005 at 1:32am
Print Post Print Post  
Can LE names be referred to and used in "On Print" programming in Reports?

I'd like to run a report for all invoices created today, but list ONLY items SOLD today. Then run a different report with the same retrieved records showing only items RETURNED today.

Can I create an unbound Value Box in the Group Body section and use a program such as:

if @formfieldvalue("LineItems","Transaction Type",x) = "Purchase" then Total amount = @formfieldvalue("LineItems","purchaseprice",x)


Or, is it "all or none" when printing a report using subrecords?

Thanks,

Steve
  
Back to top
IP Logged
 
Hammer
YaBB Administrator
Lanticans
*****
Offline


Fire bad. Tree pretty.

Posts: 3436
Location: Ohio
Joined: Nov 22nd, 2002
Re: reports with only selected subrecords listed
Reply #1 - Jan 26th, 2005 at 8:25pm
Print Post Print Post  
Steve,

You can't use FormFieldValue (there's no form) but you can "filter" the subrecords.

If your subreport has these three elements: TransactionType, Item, PurchasePrice

Try something like this in the On Print event for the first element to show only Sale transactions:

If (TransactionType = "SALE")
{
       Visibility(TransactionType, 1)
       Visibility(Item, 1)
       Visibility(PurchasePrice, 1)
}
Else
{
       Visibility(TransactionType, 0)
       Visibility(Item, 0)
       Visibility(PurchasePrice, 0)
}

If you are doing summaries (like totals), you will need to maintain your own values in variables. Summary Elements will not automatically skip the invisible rows.

Give it a try and let us know how it works out for you.
  

- Hammer
The plural of anecdote is not data.
Back to top
IP Logged
 
Steve_in_Texas
Senior Member
*****
Offline


No personal text

Posts: 893
Location: San Antonio
Joined: Feb 21st, 2004
Re: reports with only selected subrecords listed
Reply #2 - Jan 27th, 2005 at 5:06am
Print Post Print Post  
Erika,

Thank you for your response. I'll try your technique as soon as I find time and report back as to how it goes.

Thanks again!

Steve
  
Back to top
IP Logged