> Use a UNION query to combine your 2 queries. Then use the result as the
> recordsource of your report.
[quoted text clipped - 45 lines]
>>
>> What is the proper way to do this?
In your report, Group on "Type". Include a Footer for that group & add
subtotals on "Amount". That will give you separate totals for Invoices &
Expenses.
In your query, change ExpenseAmount to ExpenseAmount* -1 as ExpenseAmount.
That will show all Income as positive, Expenses as negative & a grand/report
total of the "Amount" field will give you the combined "difference".
Alternatively, on your report you could split "Amount" into 2 side-by-side
columns with the following as ControlSources: =iif([Type] =
"Invoice",[Amount],0) and =iif([Type] = "Expense",[Amount],0)
Wrap the entire expressions above in Sum() to get any Subtotals or Report
totals for the individual columns. Note: this might slow down the report
considerably if you have a lot of data.
HTH,
> Ok, and in this way I get a unified recordset where the expenses will have
> "Expense" type and income will have "Invoice" type. Then, at the report
[quoted text clipped - 55 lines]
>>>
>>> What is the proper way to do this?
Andreas - 24 Jan 2007 19:13 GMT
Is it possible to have different header for expenses and different for
invoicesor should I set the caption name based on condition (IIF)?
> In your report, Group on "Type". Include a Footer for that group & add
> subtotals on "Amount". That will give you separate totals for Invoices &
[quoted text clipped - 73 lines]
>>>>
>>>> What is the proper way to do this?