Home General

GlobalOnCreate is not called for PDF output

edited June 2010 in General
Hello

I'm using Report Builder 12 and Delphi 2010

i Have a problem when generate PDF from Report Explorer.

Step :

- an empty report
- add a ShowMessage('HERE') on globalOnCreate()

If I run the code call Preview / Print / Design the message is showed, All
OK.

but if i want genere a PDF , showmessage is not called.


then... globalOnCreate is not called when i want a PDF OutPut.

and all my reports go in crash.....




my code for have PDF ( from Report Explorer button )


RB 11 CODE :

FReportExplorer.LoadReport(FListView.ItemName, FListView.FolderId);

lPDFDevice := TppPDFDevice.Create(nil);
lPDFDevice.FileName := SaveDialog.FileName;

lPDFDevice.Publisher := FReportExplorer.Designer.Report.Publisher;

FReportExplorer.Designer.Report.PrintToDevices;


RB 12 CODE :

FReportExplorer.Designer.Report.TextFileName := SaveDialog.FileName;

FReportExplorer.Designer.Report.AllowPrintToFile := True;
FReportExplorer.Designer.Report.ShowPrintDialog :=False;
FReportExplorer.Designer.Report.ShowAutoSearchDialog :=False;
FReportExplorer.Designer.Report.DefaultFileDeviceType := 'PDF';
// NEW RB 12.0
FReportExplorer.Designer.Report.DeviceType := dtPDF;

FReportExplorer.Designer.Report.PDFSettings.Title := 'Documento Planet';
FReportExplorer.Designer.Report.PDFSettings.OpenPDFFile := True;


// DON'T COMPILE
FReportExplorer.Designer.Report.PrintToDevices(FListView.ItemName,
FListView.FolderId);
// I DON'T KNOW HOW LOAD REPORT FROM REPORT EXPLORER


__________ Information from ESET NOD32 Antivirus, version of virus signature database 5169 (20100603) __________

The message was checked by ESET NOD32 Antivirus.

http://www.eset.com

Comments

This discussion has been closed.