Help - Search - Members - Calendar
Full Version: PDF Export in FR3
Fast Reports forum > Fast Reports Products > FastReport 3.0
omik_1
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
AlexTZ
Your code works fine for me.
omik_1
I keep getting AV and memory addresses.

I was checking and the demo does not have a frxExport on the main form while all other export filters are there.
AlexTZ
It is allowed because of:
procedure TForm1.FormShow(Sender: TObject);
begin
WPath := ExtractFilePath(Application.ExeName);
Tree.Items[0].Item[0].Selected := True;
TfrxPDFExport.Create(nil);
end;
AlexTZ
You may get AV because report is empty (load it by LoadFromFile before running).
omik_1
This was the code with a loaded report that keep giving AVs.

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
omik_1
For testing purposes I opened the demo project and added a frxPDFExport component. Then I added a few lines to make the code look like this:

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
AlexTZ
Please make a demo project and send it to me, I'll look at it.
gordk
Hi 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
wink.gif
gordk
Hi Kimo
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.
wink.gif
omik_1
---------------------------
Project1
---------------------------
Access violation at address 00008000. Read of address 00008000.
---------------------------
OK
---------------------------
crispin
FR3 export to PDF not support CJK fonts.
So, I can't not view Chinese pdf files.
fernandon
Hi,

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
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2012 Invision Power Services, Inc.