Report Runs Faster Than Subreports?

  • Thread starter Thread starter justinschmidt
  • Start date Start date
J

justinschmidt

I am having an unusual problem that I cannot figure out. I have a
report which can either be run for 1 project, or for all projects. When
it is run for all projects, each project will print out on a unique
page (the output would look exactly the same as if I ran the 1 project
report over and over for every job).

This report contains a number of subreports, which run off queries. The
gist of the report is
-The main body of the report contains this week's production.
-3 subreports will query the database, and display the previous 3
week's production
-Production is shown for about 35 different items per week

Now, when I run the 1 project report, everything runs fine, and all the
fields propegate as they should. See a screen shot here
http://img290.imageshack.us/img290/8606/reportproblems2wj1.jpg
This report works by running a query on my 'Report Printer' form that
sets the criteria for the project to be whichever project is selected
on the form.

When I run the All Projects report, for some reason all of the
subreport's data does not show up. See the screen shot here
http://img102.imageshack.us/img102/9837/reportproblems1bb1.jpg
Many of the fields show up as zero's, instead of showing up showing the
correct production as is shown in the 1 project report. This report
works by eliminating the project selection box from the 'Report
Printer' screen, thereby giving a null value for the project criteria,
and thus reporting all records for all projects.

The thing that is puzzling me is that some data does show up. It's not
like the whole subreport blows up, because as you can see from the
screen shots, the first 4 lines of data actually report correctly. When
I look at the query after I run the report, all of the necessary data
is linking correctly. Somehow, it just doesn't make it to the report
though.

My only theory is that the report is running too fast for the
subreports, so before all the data can propegate in the subreports, the
main report has already moved on to the next project and so it just
zero's out everything it didn't get to. Make sense?

Anyone have any clues as to what is happening?
 
You mentioned nulls and zeros. Any chance your query(ies) use the Nz()
function? Could some of your data have zero-length strings ("") rather than
Nulls (they look alike, you know...)?

Regards

Jeff Boyce
Microsoft Office/Access MVP
 
Jeff said:
You mentioned nulls and zeros. Any chance your query(ies) use the Nz()
function? Could some of your data have zero-length strings ("") rather than
Nulls (they look alike, you know...)?

My queries are running correctly. I can run my reports, then look up
the filtered queries that are behind the report, and the queries are
all displaying the correct data. It's just that somehow, in between the
query and the actual report printing/running, it's blowing up, and some
data is getting lost.
 
My queries are running correctly. I can run my reports, then look up
the filtered queries that are behind the report, and the queries are
all displaying the correct data. It's just that somehow, in between the
query and the actual report printing/running, it's blowing up, and some
data is getting lost.

Figured it out. My queries were running correctly, however, my filters
were incorrect, so it was filtering to the wrong data.
 

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

Back
Top