omik_1
Aug 31 2004, 09:59 AM
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
Aug 31 2004, 11:39 AM
Your code works fine for me.
omik_1
Aug 31 2004, 02:01 PM
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
Aug 31 2004, 02:28 PM
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
Aug 31 2004, 02:29 PM
You may get AV because report is empty (load it by LoadFromFile before running).
omik_1
Sep 1 2004, 09:08 AM
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
Sep 1 2004, 07:40 PM
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
Sep 2 2004, 04:56 AM
Please make a demo project and send it to me, I'll look at it.
gordk
Sep 2 2004, 09:31 AM
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
gordk
Sep 2 2004, 10:35 AM
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.
omik_1
Sep 2 2004, 06:03 PM
---------------------------
Project1
---------------------------
Access violation at address 00008000. Read of address 00008000.
---------------------------
OK
---------------------------
crispin
Sep 3 2004, 11:41 PM
FR3 export to PDF not support CJK fonts.
So, I can't not view Chinese pdf files.
fernandon
Nov 24 2008, 01:12 PM
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.