On 08/25/2010 10:59 AM, Paul McNett wrote:
> On 8/25/10 10:02 AM, Jeff Johnson wrote:
>
>> When I create a report in Dabo, it creates a pdf that works like a
>> preview in VFP. Is there a way to create a unique pdf file name and not
>> have it open a pdf viewer? In other words I want to create a large
>> number of individual pdfs that have unique names without any user
>> interaction or knowledge other than a status report when it is done.
>>
> Yes, of course! :)
>
> What you are seeing is likely default preview code that you got from somewhere
> originally (AppWizard?) This code likely looks something like:
>
> {{{
>
> from dabo.lib.reportWriter import ReportWriter
> from dabo.lib import reportUtils
>
> rw = ReportWriter()
>
> rw.ReportFormFile = "my.rfxml"
> rw.OutputFile = "my.pdf"
> rw.Cursor = myBiz.getDataSet()
> rw.write()
> reportUtils.previewPDF(outFile)
>
> }}}
>
> So you can see from reading this sample code, that you are in total control.
> rw.write() actually runs the report and outputs the PDF to rw.OutputFile
> (note that
> OutputFile can be a file-like object, too, so you could e.g. write to an
> in-memory
> buffer).
>
> In your case just run this code in a loop, changing the file names etc. as
> you go,
> and when the loop is done, notify the user using your own dialog or whatever.
> Don't
> call previewPDF() if you don't want the preview. :)
>
> Paul
>
>
>
Thanks Paul! One more question... is there any problem calling the
above routine about 25 times in a row? IOW will it wait while
outputting a file before outputting the next one?
Thanks!
--
Jeff
---------------
Jeff Johnson
[email protected]
(623) 582-0323
www.san-dc.com
_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-users
Searchable Archives: http://leafe.com/archives/search/dabo-users
This message: http://leafe.com/archives/byMID/[email protected]