On Friday, April 15, 2011 12:02:04 pm Sibylle Koczian wrote: > Hello, > > after reading the documentation I thought I could get two reports in one > file like this: > > pdfName = "myreps.pdf" > rw = ReportWriter() > with open(pdfName, "w") as outFile: > rw.ReportFormFile = "myform_1.rfxml" > rw.OutputFile = outFile > # for testing > rw.UseTestCursor = True > rw.write(save=False) > # repeat for myform_2.rfxml, at the moment left out > reportUtils.previewPDF(pdfName) > > But if I try that, I get a message from Adobe Reader that the file > "myreps.pdf" couldn't be opened, because the file type isn't supported > or the file is corrupted (this is my translation of the german error > message). And if I omit "save=False" in the call to rw.write(), I get no > error message, but Adobe Reader shows an empty page. > > All this using > > Platform: Win > Python Version: 2.7.1 on win32 > Dabo Version: Version 0.9.3; Revision ~6557 > UI Version: 2.8.11.0 on wxMSW > > No change with Python 2.6.6, everything else the same. > > Creating and showing either one of the reports using the file name as > rw.OutputFile property and rw.write() works as expected, so the reports > themselves seem to be correct. But I want to get them into one file and > print them on one page, without resorting to a separate PDF Editor, if > at all possible. > > How should I do it? >
Have you tried not specifying the OutputFile until you after you add the second report: rw.ReportFormFile = "myform_2.rfxml" rw.OutputFile = outFile -- Adrian Klaver adrian.kla...@gmail.com _______________________________________________ Post Messages to: Dabo-users@leafe.com 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/201104151239.53799.adrian.kla...@gmail.com