I use the INTRAWEB 15 + FASTREPORT 6.0 to achieve browser side generate reports (that is, in a temporary directory on the server side to generate PDF) code is as follows:
PROCEDURE TIWFORM1. Preview_frx (tbname: string; Doc_no i_code: string);
VAR
DM: TDATAMODULE1;
SQL1: STRING;
PDF_PATH: STRING;
PDF_GUID: STRING;
PDF_FILENAME: STRING;
FR3_LOADPATH: STRING;
I: INTEGER;
FRXRP: TfrxReport;
FRXPDFEX: TfrxPDFExport;
The begin
FRXRP:=TFRXREPORT. Create (SELF);
FRXPDFEX:=TFRXPDFEXPORT. Create (SELF);
FR3_LOADPATH:=WEBAPPLICATION ApplicationPath + 'PRINT_MODLE_TYPE \';
IWRDGP_PRINT_DETAIL. Items. The Add (FR3_LOADPATH);
PDF_PATH:=WEBAPPLICATION ApplicationPath + 'lable \';
PDF_GUID:=getGUID;
PDF_FILENAME:=PDF_PATH + PDF_GUID + 'PDF';
DM:=TDATAMODULE1. Create (SELF);
SQL1:='SELECT * FROM' + TBNAME;
DM.SSPDS.DataSet.Com mandText:=SQL1;
DM. SSPDS. Active:=true;
DM. SSPDS. DataSet. Active:=true;
FRXRP. LoadFromFile (FR3_LOADPATH + IWEDIT_FR3NAME. Text);
FRXDBDATASET1. The DataSet:=DM. SSPDS;
FRXRP. The DataSet:=FRXDBDATASET1;
FRXRP. PrintOptions. ShowDialog:=false;
FRXPDFEX. ShowDialog:=FALSE;
FRXPDFEX. FileName:=PDF_FILENAME;
FRXRP. PrepareReport ();
FRXRP. Export (FRXPDFEX);
DM. SSPDS. DataSet. Active:=FALSE;
DM. SSPDS. Active:=FALSE;
DM. Free;
FRXRP. FREE;
FRXPDFEX. FREE;
end;
In the process of the actual test server IIS INTRAWEB generate DLL files on the server, the question now is, IIS starts first open IE generating PDF report didn't ask, don't close the IE could have been generated, but after close before open IE again open the IE, unable to generate reports, tracking and found FRXRP. PrepareReport (); Did not perform well,
Hope masters teach you one, two
CodePudding user response:
What is not normal execution errors, or what is unusual,CodePudding user response:
Client IE in the execution has been exported hope of PDF file, there is no error windowCodePudding user response: