FR4 and Webbroker

edited 8:51AM in FastReport 4.0
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

Leave a Comment

Rich Text Editor. To edit a paragraph's style, hit tab to get to the paragraph menu. From there you will be able to pick one style. Nothing defaults to paragraph. An inline formatting menu will show up when you select text. Hit tab to get into that menu. Some elements, such as rich link embeds, images, loading indicators, and error messages may get inserted into the editor. You may navigate to these using the arrow keys inside of the editor and delete them with the delete or backspace key.