Printing a report with a pivot chart (Access2010)

rspaeth

New member
Local time
Today, 12:28
Joined
Oct 7, 2015
Messages
5
I have a report with a Pivot Chart tracking weight. There are several clients that I can filter the pivot chart on. When I open the report, the chart prints fine with the original chart. When I filter the report on a different client it looks fine on the screen but still prints the original report. I tried creating a button with (DoCmd. .. refresh, requery, save. ) but nothing works.
If I close the report and re-open it, the newly chosen filter shows and prints but I have the same problem when i re-filter. I have tried creating a print button that saves the report, closed and re-opens the report before printing but it crashes the DB.

Any suggestions would be helpful. I am not a VB programmer so please go step by step.

thanks!!!
 
.. When I filter the report on a different client it looks fine on the screen but still prints the original report.
How and where do you filter the report?
How do you view the report, by "Report View" or "Report Preview"?
 
I filter the report by using the Pivot Table/Chart filter. The chart is on a report that I am viewing in report view. I just tried filtering the report going to print preview (both from the View tab and backstage from Print-print preview and it works.) This is a workable solution, but it would have been nice to have a print button. This is being distributed to non-technical users and now I have to include instructions on how to print the report.

I have a thought - i will try using my print button to open the print preview window.

Thanks for helping me think this through.
 
Thank you! I just needed to look at this from a different angle.

I coded my print button
Option Compare Database the save in unnecessary for the print but I added it so the report would open at the same point next time.

Private Sub Command1_Click()
DoCmd.Save acReport, "R-BPChart"
DoCmd.OpenReport "R-BPChart", acViewPreview
End Sub
 
I struggled with this for a couple days. It seems you need to close the current window and then open the report in Print Preview.

I have a button on a pivotchart embedded in a Report. (Access2010)
When i tried to just print the report- any filtering on the pivot chart didn't get carried over to the DoCmd.Printout command.

It was suggested I use open the print preview window, but it never received focus. I had to click off screen then back toe the print preview window. The code below seems to correct this.

Private Sub Button1_Click()
DoCmd.Save
DoCmd.Close
DoCmd.OpenReport "MyReport:", acViewPreview

End Sub
 

Users who are viewing this thread

Back
Top Bottom