View Full Version : reporttopdf and file names


Crowbar
07-08-2009, 11:23 AM
Hi,
Boss thew curveball at me today,
I originally made a nice little DB that automatically saves a report as a PDF using lebans' report to pdf. I made it save to a specific folder on our server, using a file name based on an autonumber type of counter (I didnt use an autonumber).
Now the boss wants to be able to choose the folder, but wants access to supply the file name as it is currently doing.
To try and clarify, he would like the save as dialog box to start at a specific folder, have the user choose a sub folder, but have the file name already filled in.

I turned on the option to show the save as dialog, but the file name is not included in the dialog box, and it goes to the local "my documents" folder.

Any nudge in the right direction would be much appreciated!

HiTechCoach
07-08-2009, 06:44 PM
Have you tried this:

BrowseFolder Dialog (http://www.lebans.com/callbackbrowser.htm)

Hope this helps ...

Crowbar
07-09-2009, 05:17 AM
Have you tried this:

BrowseFolder Dialog (http://www.lebans.com/callbackbrowser.htm)

Hope this helps ...

Thank you,
Have you ever tried to add this to another function like the report to pdf function? I am going to give it a try now....

HiTechCoach
07-09-2009, 05:32 AM
I have used the folder bower (link provided) and the save file dialog both with Leban's Report2PDF code and other custom functions.

I have never actually had to modified any of Leban's code. There is no need to do so. The way it is designed, you show not ever need to do so. To add additional functionality, I just "wrap" my code around his by code in my own functions that do what I need and calls the standard Report2PDF code. This allows the Report2PDF code to remain generic and reusable. This way it can be called from many other custom functions that add the functionality needed for that task without having any impact on other code..

Crowbar
07-09-2009, 07:09 AM
Yes, I think I see. I am going to try to put the folder browser call in just before I call the reporttopdf function, and I guess try to pass the folder choice over to reporttopdf. That would be the hard part, but I am giving it a go.


Thanks for the tips.