FR4 and Webbroker
Hello,
I'm trying to develop a Webbroker app to display a pdf generated by FR4.
The result is that Acrobat is opened on my browser but it displays a blak page.
I set to false every dialogs options to flase in frxReport and frxPDFexport component.
I'm using Delphi XE3, FR 4.13, Win7.
Has someone already solved this issue ?
Following there is the code I'm testing :
procedure TWebModule1.WebModule1DefaultHandlerAction(Sender: TObject;
Request: TWebRequest; Response: TWebResponse; var Handled: Boolean);
var
s: TStrings;
IDOrdine: integer;
ms : TMemoryStream;
begin
if (Request.Query > '') then begin
s := Request.QueryFields;
IDOrdine := StrToInt(s.Values);
if (self.cdsOrd.State in [dsInsert, dsEdit]) then
self.cdsOrd.Post;
self.cdsOrd.Params.ParamValues := IDOrdine;
self.cdsOrd.Open;
try
self.frxReport.LoadFromFile('SchedaOrdine.fr3');
self.frxPDFExport.FileName := 'SchedaOrdine.pdf';
self.frxReport.PrepareReport;
if (self.frxReport.Export(self.frxPDFExport)) then begin
ms := TMemoryStream.Create;
ms.LoadFromFile('SchedaOrdine.pdf');
Response.ContentType := 'Application/pdf';
Response.ContentStream := ms;
end;
finally
self.cdsOrd.Close;
end;
end;
end;
Thank you,
Davide
I'm trying to develop a Webbroker app to display a pdf generated by FR4.
The result is that Acrobat is opened on my browser but it displays a blak page.
I set to false every dialogs options to flase in frxReport and frxPDFexport component.
I'm using Delphi XE3, FR 4.13, Win7.
Has someone already solved this issue ?
Following there is the code I'm testing :
procedure TWebModule1.WebModule1DefaultHandlerAction(Sender: TObject;
Request: TWebRequest; Response: TWebResponse; var Handled: Boolean);
var
s: TStrings;
IDOrdine: integer;
ms : TMemoryStream;
begin
if (Request.Query > '') then begin
s := Request.QueryFields;
IDOrdine := StrToInt(s.Values);
if (self.cdsOrd.State in [dsInsert, dsEdit]) then
self.cdsOrd.Post;
self.cdsOrd.Params.ParamValues := IDOrdine;
self.cdsOrd.Open;
try
self.frxReport.LoadFromFile('SchedaOrdine.fr3');
self.frxPDFExport.FileName := 'SchedaOrdine.pdf';
self.frxReport.PrepareReport;
if (self.frxReport.Export(self.frxPDFExport)) then begin
ms := TMemoryStream.Create;
ms.LoadFromFile('SchedaOrdine.pdf');
Response.ContentType := 'Application/pdf';
Response.ContentStream := ms;
end;
finally
self.cdsOrd.Close;
end;
end;
end;
Thank you,
Davide