Report Printing Issues

Stemdriller

Registered User.
Local time
Today, 17:57
Joined
May 29, 2008
Messages
187
Hi Everyone

I have a query thats drives a report. When the user selects the report they get asked 3 questions Reason, Dept and Category all driven from the underlying query.

The report then displays on the screen.

I placed a Print button on the report with the following code.
DoCmd.OpenReport "rptMain", acViewPreview

But when the button is selected the user gets asked the same 3 questions again? I guess it is re running the query.

Can anyone enlighten me as to why?

Thanks
 
Remove the criteria in the query and put it in Filter property of the report. Set Filter On Load = Yes.
 
Remove the criteria in the query and put it in Filter property of the report. Set Filter On Load = Yes.

Thanks for replying.

Think I should have said that the report is printing a Chart, which is based on a query.

So the report is unbound, but the chart within it is based on the query.
 
I don't use the MS Access Chart much, but I would imagine at some point you will bind the report to pull data from it for the chart? Or are you drawing the chart in code?

The only reason I can think of as to why you're being asked for input three times is because the chart is being requeried or refreshed before being finalised. Your best bet is to use a form with textboxes to collect those parameters and pass it to the query.
 
I don't use the MS Access Chart much, but I would imagine at some point you will bind the report to pull data from it for the chart? Or are you drawing the chart in code?

The only reason I can think of as to why you're being asked for input three times is because the chart is being requeried or refreshed before being finalised. Your best bet is to use a form with textboxes to collect those parameters and pass it to the query.

One query collects the data, I created a standard report hit the Chart Wizard to place the chart on the Report, based on the query. That works fine.

As i said previously, when your open the report you get asked the 3 Questions and the Graph shows up on screen ok, it's when I try to print it it then asks me the same questions again.
 
One query collects the data, I created a standard report hit the Chart Wizard to place the chart on the Report, based on the query. That works fine.

As i said previously, when your open the report you get asked the 3 Questions and the Graph shows up on screen ok, it's when I try to print it it then asks me the same questions again.
This is how Access is supposed to work. It runs the query (and asks the 3 questions) when the report is previewed, and runs the query again (and asks the 3 questions) when the report is printed. The query is rerun when printing in order to get the most recent data from the database.
 

Users who are viewing this thread

Back
Top Bottom