Click to See Complete Forum and Search --> : Saving reports in Access 2000
KidJavelin
Mar 28th, 2006, 12:39 PM
I think this is the right place for this...
My application in Access 2000 need to be able to out put a report onto the local drive(C:/somethingorother). Is there a way to open up the file explorer to allow users to save the file wherever they want?
Thanks!
John
KidJavelin
Mar 28th, 2006, 01:31 PM
Okay, I found the open file api on Dev Ashish website. How do I change it around so I can open then save the report I have?
John
RobDog888
Mar 28th, 2006, 01:42 PM
This code will present them with a dialog box to select the report name and type to export it as. You just need to open the report before hand.
Application.DoCmd.OpenReport "Report1", acViewPreview, , , acWindowNormal
Application.DoCmd.RunCommand acCmdExport
KidJavelin
Mar 28th, 2006, 01:59 PM
So how do I prompt them for a directory to export to? I'm lost here.
RobDog888
Mar 28th, 2006, 04:40 PM
Did you test it out?
This line invokes the dialog prompt requesting the location for them to choose.
Application.DoCmd.OpenReport "Report1", acViewPreview, , , acWindowNormal
'Prompt and export in one line of code.
Application.DoCmd.RunCommand acCmdExport
Estuardo
Apr 17th, 2006, 01:30 AM
G'd morning!!! and i'm sorry to butt in...
But wouldn't be easier to "print" your report in a pdf printer? it will automaticaly ask for the place to save and you won't need expensive api calls. Even better 0 lines of code.
Good luck
Estuardo
RobDog888
Apr 17th, 2006, 01:40 AM
A pdf printer is just as expensive if not more then using the internal Office methods. Plus, the poster want to save the file to the drive too. :)
Estuardo
Apr 17th, 2006, 10:56 AM
G'd afternoon!!
I wouldn't call expensive the pdf tool, If you have a elaborated layout, with boxes, lines, overlaped textboxes, graphics, etc. It will always output your report/doc as it is, It let's you save it on the disk.
The same does not happen with the export command, it will export a "naked" report just label's and textboxes. From there you will need to re-do it by hand.
RobDog888
Apr 17th, 2006, 12:38 PM
Well its good desing that you wouldnt place anything other then labels or textboxes on your report. Either way, you can use what is best suited for your needs.
Estuardo
Apr 17th, 2006, 01:37 PM
I don't like to quote other people's post, so let me try this way:
"Well its good desing that you wouldnt place anything other then labels or textboxes on your report"
Are you serious? or it's just your way to say "Welcome" to new members?
I don't know what kind of reports you design. I don't know how do you present statistics without graphs, what about logo's? could you please point me any manufacturer's link where they recomend to use nothing but textboxes and labels?
Please don't get me wrong, i did not came here to get it in arguments, but i think is not nice to just reply without take a good read of other's posts.
In my first post i said:
"... it will automaticaly ask for the place to save "
and in you replied:
".... Plus, the poster want to save the file to the drive"
Then i had try to explain myself better. No luck. It wasn't enough, and again with no valid args you come here to tell the world that is not a good design to use more than labels and textboxes!!!
Once again: Are you serious?
RobDog888
Apr 17th, 2006, 01:46 PM
Either way, you can use what is best suited for your needs. Should say it all. :)
vbforums.com
Copyright Internet.com Inc., All Rights Reserved.