Link/hide subreport conditionally

B

Brian

I have a report of account activity for customers. Using a union query, I
combine unlike transactions (invoices, payments, & adjustments) into a single
list on the report, with a transaction type next to each one. There is a
field for InvoiceID; it is accurate for invoices but I set it to 0 for
payments/adjustments in the pre-union queries.

Now, certain customers need to see invoice details with the invoice. I
already have a subreport that links on the InvoiceID, but I have two problems
in getting it to work:

1. How can I do link so that I do not exclude the adjustments & payments,
which have no corresponding record in the subreport? I want to show all three
transaction types but include the InvoiceDetail subreport immediately below
the detail line WHEN the transaction for the detail line is an invoice (i.e.
InvoiceID >0)
2. This applies only to customers who have chosen to see details (Boolean
field called IncludeStatementDetail in the Customer table). I have already
included a join in the main reports RecordSource to include the Boolean value
of the IncludeStatementDetail field alongside the InvoiceID, but I do not
know how to use this to hide the subreport for customers having invoices but
not wanting to see details.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top