PDF Export in FR3
As soon as i finished installing I got down to business immediatley, with particular focus on the frxPDFExport.
I however got an error when I tried the following code.
frxPDFExport1.FileName := 'c:\testfile.pdf';
frxPDFExport1.OpenAfterExport := True;
frxReport1.PrepareReport();
frxReport1.Export(frxPDFExport1)
What is the correct way to use the Exprot?
Regards
Kimo
I however got an error when I tried the following code.
frxPDFExport1.FileName := 'c:\testfile.pdf';
frxPDFExport1.OpenAfterExport := True;
frxReport1.PrepareReport();
frxReport1.Export(frxPDFExport1)
What is the correct way to use the Exprot?
Regards
Kimo
Comments
I was checking and the demo does not have a frxExport on the main form while all other export filters are there.
procedure TForm1.FormShow(Sender: TObject);
begin
WPath := ExtractFilePath(Application.ExeName);
Tree.Items[0].Item[0].Selected := True;
TfrxPDFExport.Create(nil);
end;
frxPDFExport1.FileName := 'c:\testfile.pdf';
frxPDFExport1.OpenAfterExport := True;
frxReport1.LoadFromFile('c:\reportfile.fr3')
frxReport1.PrepareReport();
frxReport1.Export(frxPDFExport1)
THis code works fine
frxReport1.LoadFromFile('c:\reportfile.fr3')
frxReport1.ShowReport();
Regards
frxReport1.ShowReport;
//Export to PDF
frxPDFExport1.FileName := 'd:\newfile.pdf';
frxReport1.PrepareReport();
frxReport1.Export(frxPDFExport1);
With this code I would espect the selected report to bring up the preview once then export when the preview is closed.
Actually I got "List index out of bounds (1)" and I cant see why?
Regards
Kimo
Just to let you know
i removed your exception loger from project and recompiled under d7Pro fr3 pro
ran the test project you sent under d7Pro w98 acrobat reader 5.01......
all works ok no problems
will try later on d7 winxp acrobat 6.? will let you know
will try later on d7 winxp acrobat 6.? will let you know
results ok here also no problems
So code seems ok try removing your exception logger from project and see what happens.
Project1
Access violation at address 00008000. Read of address 00008000.
OK
So, I can't not view Chinese pdf files.
I have used that code to generate a pdf file and works well, however the text doesn't stay justify in pdf file, which when I execute a preview form report the text is justify.
Anyboby have any ideia how to solve this problem?
Thank you
Fernandon