My users like to have a one click solution and not click the External Data words to get the report in a file on the PC.
Is it possible to click the report and the file will be generated on the PC?
Thanks Russ @scaninc.org
My users like to have a one click solution and not click the External Data words to get the report in a file on the PC.
Is it possible to click the report and the file will be generated on the PC?
Thanks Russ @scaninc.org
How are you opening the report?
A file could be generated in the ON_Click event if a button is used to open the report.
A report "OnFormat" event (try the Detail section Onformat event) could be used to put code to generate the file.
Are you saying if the report is within a form - i could on the start of the report have code behind the on-click to start the report that would create the report within a file on my C: drive My Documents?
Thx for any pointers, I would think others would have blazed this path before. Or the report to get generated automaticly to my email. The process of creating a report and going to the external source then typing the name in gets old when you have 2 dozen reports to do weekly.
Russ
the report is not "within" a form, it is opened by the click of a button. That event, the click of the button can do other things too.
For example:
Private Sub YourButtonName_Click()
'DoCmd.OpenReport "report1", acViewPreview 'to preview he report
DoCmd.OpenReport "report1", acViewReport ' to print the report
'whatever other code you want
end sub
In A07, one can export the report to a file using the External Data >> Export Section icons to export to various data types. You can search this forum on doing this programmatically.
However, previous versions of Access reports do not translate well to files.
Can you run the PDF convert and have it pop into a PDF file?
That is how we manual click for 25 reports weekly after entering 25 date parameters.
Thx Rus
Yes, look at the Create Data menu Export section. PDF is one of the methods.
I have implemented Stephan Lebans code in an ac2007 db without any issues. One click and you have a pdf report. Unfortunately I believe the Snapshot feature has been dropped from ac2010 and Stephan's code depends on it.
You may also wish to look into PDF Printers such as this one.