5
votes

Is there anyone knows how to get PDF prints from "fast report"? (.NET)

report1.Export(frxPDFExport1); 

that line doesn't work, ?

2
Did you get any exception or error message?Soner Gönül
says "it doesn't exist in current contex"? May I install a tool?blackman
Why you question have javascript tag? how does it ralated?Tommix

2 Answers

8
votes

Hi here is the answer how to export to pdf.

using FastReport.Export.Pdf;

 report1.Prepare();
              PDFExport pdf = new PDFExport();
              report1.Export(pdf, "c:\\ExportedPDF.pdf");

That's it :) to export to other formats you need to create appropriate ExportBase object. Also if your report have forms - then user must click ok first and only then it will create pdf because of Prepare method.

0
votes

you can use this code :

using FastReport.Export.Pdf;
report1.Prepare();
PDFExport pdf = new PDFExport();
pdf.FileName = "c:\\YourPDF.pdf"
report1.Export(pdf);