Home > Back-end >  Problems about Delphi intraweb fastreport do WEB statements
Problems about Delphi intraweb fastreport do WEB statements

Time:09-23

About Delphi intraweb WEB + fastreport do report problems
System environment: Windows 7 version + IE8
Programming environment: Delphi xe10 + intraweb14.0.52 + FastReports 5.2.12
Because of a recent study in intraweb, after learning to make statements reference Gao Yong data, the following code:
Procedure TIWForm_YJB. IWButton5Click (Sender: TObject);
Var
LFile: string;
LOptions: string;
LWindowName: string;
LURL: string;
The begin
//import report template file 3. Fr3
FrxReport1. LoadFromFile (WebApplication. ApplicationPath + 'files \ YJB fr3');
//define temporary storage on the server report file name
LFile:='temp. HTM';
//WebApplication. AppID is server for each user generated only a string, thus ensure the user to call himself the generated report
FrxHTML4DivExport1. FileName:=WebApplication. ApplicationPath + + WebApplication. 'files \' AppID + '\' + LFile;
The only folder//generated files directory under
ForceDirectories (ExtractFileDir (frxHTML4DivExport1 FileName));
//ready to report data
FrxReport1. PrepareReport;
//the report data in HTML format export to file frxHTMLExport1. The FileName in the
FrxReport1. Export (frxHTML4DivExport1);
//the following to send the report to the client//window name
LWindowName:='HTML report sample;
//if there is a scroll bar, Internet explorer window length and width, can be an empty string, if null window this complete Internet explorer window,
//LOptions:='scrollbars=yes;
LOptions:='scrollbars=yes, width=800, height=600'.
//give reports generated on the server URL address
LURL:=WebApplication AppURLBase + '/FilesNC/+ WebApplication. AppID +'/' + LFile;
//LURL:=WebApplication AppURLBase + '/Files/+ WebApplication. AppID +'/' + LFile;
WebApplication. NewWindow (LURL);
//open a new window, IE will report show
+ LURL AddToInitProc (' NewWindow (" '+' ' ', ' '+ LWindowName +' ' ', ' '+ LOptions +' ' '); ');
//AddToInitProc (' NewWindow (" '+ LURL + ", "' + LWindowName + ", "' + LOptions + '"); '); }
end;
In the actual operation of the temporary file Temp. HTML can be generated on the server side, opening statements unable to open the browser
Report URL: http://filesnc/84AC8IGxxug~tPRCo5AlWq/temp.htm

In the code of Gao Yong why
LURL:=WebApplication AppURLBase + '/FilesNC/+ WebApplication. AppID +'/' + LFile; Would be FilesNC, Files in the Files, I put him into a Files is wrong, what is the reason? Thank you very much!
  • Related