473,395 Members | 1,869 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

How do I display either of two fields in Report column.

I have two tables Invoices and Payments. I want to design a statement report
with data from both tables sorted by date.
Column headings are:
DATE INVOICE NUMBER DETAIL (supply or payment) AMOUNT (either
invoice amount or payment amount.).

I need to get all the payment records and all the invoice records for a
particular month and display each one sorted by date.
So the date field and the amount fields will have data from both tables,
depending on the date. There will be a separate report for each customer.
How do I get the report to do this.

Any help appreciated

John
Nov 13 '05 #1
2 2041
Can you tell which of the two it is other than by the name of the field the
value is in? If so, use an alias for the field name in one of the cases so
that the output field name is the same regardless if the value is an invoice
or payment. In the textbox, use an IIF statement or conditional formatting
based on the value of this other field to format the value as positive or
negative.

If you have to use the field name to tell, then use an IIF statement in the
textbox to return whichever field has a value.

Example:
=IIf(IsNull([InvoiceAmt]), [PaymentAmt], [InvoiceAmt])

You could add formatting to each one so that they appear differently in the
report.

--
Wayne Morgan
MS Access MVP
"John" <br****@gofree.indigo.ie> wrote in message
news:cr**********@kermit.esat.net...
I have two tables Invoices and Payments. I want to design a statement
report with data from both tables sorted by date.
Column headings are:
DATE INVOICE NUMBER DETAIL (supply or payment) AMOUNT (either
invoice amount or payment amount.).

I need to get all the payment records and all the invoice records for a
particular month and display each one sorted by date.
So the date field and the amount fields will have data from both tables,
depending on the date. There will be a separate report for each customer.
How do I get the report to do this.

Any help appreciated

John

Nov 13 '05 #2
Thanks Wayne, that'll do the job.
"Wayne Morgan" <co***************************@hotmail.com> wrote in message
news:2K******************@newssvr11.news.prodigy.c om...
Can you tell which of the two it is other than by the name of the field
the value is in? If so, use an alias for the field name in one of the
cases so that the output field name is the same regardless if the value is
an invoice or payment. In the textbox, use an IIF statement or conditional
formatting based on the value of this other field to format the value as
positive or negative.

If you have to use the field name to tell, then use an IIF statement in
the textbox to return whichever field has a value.

Example:
=IIf(IsNull([InvoiceAmt]), [PaymentAmt], [InvoiceAmt])

You could add formatting to each one so that they appear differently in
the report.

--
Wayne Morgan
MS Access MVP
"John" <br****@gofree.indigo.ie> wrote in message
news:cr**********@kermit.esat.net...
I have two tables Invoices and Payments. I want to design a statement
report with data from both tables sorted by date.
Column headings are:
DATE INVOICE NUMBER DETAIL (supply or payment) AMOUNT (either
invoice amount or payment amount.).

I need to get all the payment records and all the invoice records for a
particular month and display each one sorted by date.
So the date field and the amount fields will have data from both tables,
depending on the date. There will be a separate report for each customer.
How do I get the report to do this.

Any help appreciated

John


Nov 13 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: J.D. Buehls | last post by:
I am displaying some values on a report. I am opening the .asp page with a Response.ContentType = "application/msword" and these particular values appear in a table. One column shows percentages...
2
by: MJ | last post by:
Hi, I'm hoping this is relatively easy. I have a report based on a query - when you run the report, a form opens up and you are prompted for a date range. These are combo boxes (ie. January...
0
by: bill mahoney | last post by:
I have access 2k and I have 2 tables. One is a 7X6 table representing a month with zeroes padding the fields where no day exist. For example February 2003 0 0 0 0 0 0 1 2 3 4 5 6 7 ...
1
by: MJ | last post by:
I'm not following... where do I put that? I put a textbox on my report and put the following property for it: =!!.Value This displays 1 (for January 2003). How do I get it to display...
3
by: CSDunn | last post by:
Hello, I have 14 fields on a report that hold integer values. The field names use the following naming convention: T1Number, T2Number ....T14Number. I need to get a 'sub total' of all fields as...
2
by: Ross Hamilton | last post by:
Can anyone help me with this small problem. I have a report that is divided into 3 Columns using the page setup, It displays the report fields in 3 separate columns (Desc & Pg Num) but it only...
6
by: geronimo_me | last post by:
I have 20 queries that compare fields in one table with fields in another table - the query results are the records that do not match in Table1 and Table2. ie Table1 DOB 28/02/78 Table2 DOB...
3
by: Meena | last post by:
Hi Every Body, I have created a crystal Report and linked to my vb.net forms and working fine, I added more drill drowns in groups everything fine, but What I need is I am not able to display...
1
by: Peter Herath | last post by:
I have created a report using sample codes taken by the forum. one problem is that the report displays the field/column names in the table in columnar format(field names display in rows.) but i want...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.