RE: Weird Problem with a Subreport
- From: Klatuu <Klatuu@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Thu, 9 Aug 2007 06:24:01 -0700
The two lists are separate. That is why you could use a Union query to put
the together on one report. You will have to make sure you can order the
union query so the lists are in the order you want. Also, to present a lable
between lists and to keep the list separate, you could use the report
Sorting and Grouping and group by the list identifier. The use a Group
Header and you can put a label in the group header.
Here is an example of how to use the Union Query to identify the lists:
SELECT 0 AS ListID, SomeField, AnotherField, AnyField FROM FirstList;
UNION ALL
SELECT 1 As ListID, SomeField, AnotherField, AnyField FROM SecondList;
The output of your query will now have a field named ListID. You would
group on ListID and sort on ListID in the report.
Here is an example where I do exactly this in a report. Note the first
calculated field is used to sort the two and the second field is what I use
for the Group Header Labels:
SELECT 0 As GroupType, "Active Contracts With No Start Date" As
Group_Description, ContractType, ClientName, PropertyName FROM
qselMonActRptNoStart;
UNION ALL SELECT 1 As GroupType, "InActive Contracts With No End Date" As
Group_Description, ContractType, ClientName,PropertyName FROM
qselMonActRptNoEnd;
--
Dave Hargis, Microsoft Access MVP
"Chels" wrote:
Will that allow me to keep the two lists seperate? They can't be mixed.
together. Also would it be possible to put a label before the second list
starts?
--
Chels
"Klatuu" wrote:
Have you tried using a Union query to join the two lists together and using
that as the record source of the report?
--
Dave Hargis, Microsoft Access MVP
"Chels" wrote:
You guys have saved me before so I hope you can do it again! I am using
Access 2000. I am trying to create a report that will display two lists of
Unit numbers with remarks for each Unit number. I want the lists to be one
after the other but I would also like them to be in columns because the data
is not very detailed but there are a lot of units.
I have had no problem with creating one report displayed in 3 columns for
one list of numbers. I thought I could add a subreport with the other list of
numbers and it would put it at the end of the first list. That didnt work.
The Subreport will only show as many rows as will fit in the area I delegated
for the subreport in design view. Also the subreport keeps putting itself in
numerical order using the first unit number in it's list. I don't know how it
is doing it but I want it to go at the end of the first list.
Then I tried making a report with a subreport for each list. The first
subreport goes in fine. Then the second subreport (the one I tried adding as
a subreport in my first attempt) again will only show the number of units it
can fit in the area it's given and it keeps putting itself in order. I even
tried putting these subreports side by side in design view to see if it would
give me two lists side by side but again it will only show the limited units
and it is STILL putting itself in numerical order with the first just beside
it.
Does anyone know why these things are happening? I have never tried using
subreports so maybe i am doing this totally wrong? I am adding the subreports
to the "details" section so this is also making me have HUGE spaces between
entries. Also it doesnt matter if the page is setup to be in columns or not I
get the same problems.
Thank you for any help!
--
Chels
- Follow-Ups:
- RE: Weird Problem with a Subreport
- From: Chels
- RE: Weird Problem with a Subreport
- Prev by Date: Re: Limiting report data in the report and not in the query
- Next by Date: Re: saving report
- Previous by thread: A2000ReportToPDF seems does not work on Access 2007
- Next by thread: RE: Weird Problem with a Subreport
- Index(es):
Relevant Pages
|