Help with Report

H

Hadi Lalani

I have 5 fields in a table that I am trying to read and print a repor

Nam
Addres
Regio
Amoun
Descriptio

The description field has 2 values 2003 and 2004. I need the report to print as follow

Name Address Region Amount Description-2003 Description-200

When I run the report in Acess I get the report as follow

Name Address Region Amount Descriptio
Hadi 111 Main St Dallas 1000.00 200
Hadi 111 Main St Dallas 1000.00 200

All assistance is appreciate

Thank

Hadi Lalan
 
D

Duane Hookom

You didn't provide any record display for your desired "to print as
follows". Are there actually two values in the description field or are the
single values in two different records? Will the next name and address
contain the values 2003 and 2004 or will they have something different or
don't you care about other records?

--
Duane Hookom
MS Access MVP


Hadi Lalani said:
I have 5 fields in a table that I am trying to read and print a report

Name
Address
Region
Amount
Description

The description field has 2 values 2003 and 2004. I need the report to print as follows

Name Address Region Amount
Description-2003 Description-2004
When I run the report in Acess I get the report as follows

Name Address Region
Amount Description
 
H

Hadi Lalani

Thanks for your respons

Here is what my table contain

Name field contains names like
Had
Lalan
Smit

Address field contain
111 main stree
122 Main stree
123 Main stree

Region field contain
Dalla
Midcitie
Plan

Amount field contain
100
10
20

Description field contain
200
200

Every person can have a record for 2003 and 2004 or just 2003 or just 200

I need the report to print as follow

Name Address Region Amnt Desc Amnt Des
Hadi 111 main street Dallas 1000 2003 1000 200

when I run the report in Access it prints 2 lines for Hadi- one with 2003 in description and one in 2004 in description

what I am trying to do is to see who has records with 2003 values and who has 2004 values and who has both value
 
X

Xcelsoft

Hadi,

Based on your data structure in the table you can
accomplish what you are try to do as shown below. I will
be brief, if you need further detailed instructions send
an email.

1. Set your report to group on the NAME field and show a
report footer for the group.

2. Put the appropriate fields in the detail section of
the report. Change the detail section of the report to
invisible so it will not print.

3. In the detail section, add two additional Text
Controls (one for Txt2003 and Txt2004). Also make them
invisible.

4. Set Txt2003 Control Source to:
IIF([DESC]="2003", [AMOUNT],0)
Set the Running Sum property to Over Group.

5. Set Txt2004 Control source to:
IIF([DESC]="2004", [AMOUNT],0)
Set the Running Sum property to Over Group.

6. In the Group Footer add additional Text Controls that
will reference the Running Sum controls previously
establised in the detail section:

Txt2004Total
Control Source: =Txt2004

Txt2003Total
Control Source: =Txt2003

You can add other controls in the group footer to
reference the Name fields, etc. from the detail section.

Basically, the Group Footer will now become the detail
for each Name on one line.

Hope this helps. Email if you need further assistance.

Xcelsoft
-----Original Message-----
Thanks for your response

Here is what my table contains

Name field contains names like
Hadi
Lalani
Smith

Address field contains
111 main street
122 Main street
123 Main street

Region field contains
Dallas
Midcities
Plano

Amount field contains
1000
100
200

Description field contains
2003
2004

Every person can have a record for 2003 and 2004 or just 2003 or just 2004

I need the report to print as follows

Name Address Region Amnt Desc Amnt Desc
Hadi 111 main street Dallas 1000 2003 1000 2004

when I run the report in Access it prints 2 lines for
Hadi- one with 2003 in description and one in 2004 in
description.
what I am trying to do is to see who has records with
2003 values and who has 2004 values and who has both
values
 
N

Niklas Östergren

Hi Hadi!

Is there only going to be to different values in field *Description* (2003
and 2004)? Or is this going to be a 2005, 2006, 2007 and so on???

Because if so you shall think again about your tablestructure. Creating one
or maby two more tables (depends on the relationship between *Name" and
*Description". But you should (if I´m right here) definatly create another
table holding only *Description* and then link the tables creating relaition
One-Many with help of a Autonumber field in each table. Something like this:

tblPerson..............tblDescription
PersonID 1-----M fkPersonID
Name....................DescriptionID
Address................Description
Region..................Amount

Where *PersonID* and *DescriptionID* is autonumber field and *fkPersonID* is
a long or maby integer field containing the unique number for each person in
tblDescription (maby the table name tblDescription) isn´t a good name for
this table but it´s what i use to illustrate).

With this table structure you only have to store name, address etc. for the
person´s in your db in ONE place. This is called normalisation.

// Niklas




Hadi Lalani said:
Thanks for your response

Here is what my table contains

Name field contains names like
Hadi
Lalani
Smith

Address field contains
111 main street
122 Main street
123 Main street

Region field contains
Dallas
Midcities
Plano

Amount field contains
1000
100
200

Description field contains
2003
2004

Every person can have a record for 2003 and 2004 or just 2003 or just 2004

I need the report to print as follows

Name Address Region Amnt Desc Amnt Desc
Hadi 111 main street Dallas 1000 2003 1000 2004

when I run the report in Access it prints 2 lines for Hadi- one with 2003
in description and one in 2004 in description.
what I am trying to do is to see who has records with 2003 values and who
has 2004 values and who has both values
 
N

Niklas Östergren

Hmm. I was a little to fast for myself when I wrote the msg. Sorry for that!

// Niklas
 
L

Larry Linson

Hadi,

It sounds to me if the problem is that you want to combine on one line of
the report, data from two separate records. An approach such as that
suggested by Xcelsoft, or use of a Totals Query picking up the common
name/address information and with one First for Description and a separate
Last for Description might work.

I'd repeat the caution that if future need is for a additional record to be
consolidated in the same line each new year, it's going to be difficult.

Larry Linson
Microsoft Access MVP



Hadi Lalani said:
Thanks for all your replies.

Actualyl i have inherited this database from someone else and as such am
limited to what i can and cannot do as far as creating new tables. i do like
the idea of creating a table for description.
 
H

Hadi Lalani

Hello Xcelsoft

I undertand in theory what you are trying to tell me but seriously it is over my head. I can definetely use some detail instructions. FYI, I am doing this for our non profit church and trying to help them with this

Thanks for you assistanc
 

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