Hello,
My company is migrating to intraweb a vcl Delphi application.
We use intraweb 15.2.x and the TMS Intraweb Component pack.
Now we need to create reports. We have the old system with Crystal Reports. iS this compatible with intraweb? i mean it is possible to use the crystal reports through intraweb?
thank you.
Many users use Crystal Reports with IntraWeb.
Most developers create PDF based reports which are the standard for web reports.
There are a couple of demos that show how the basics should work when generating a report. More specifically, using the file cache.
You basically generate a PDF file using any report generator, including Crystal, and add it to the cache. Then you just use it as any PDF file in a web application.
For instance this one:
https://github.com/Atozed/IntraWeb/tree/...eTimeCache
(09-15-2020, 09:22 AM)Alexandre Machado Wrote: [ -> ]Most developers create PDF based reports which are the standard for web reports.
There are a couple of demos that show how the basics should work when generating a report. More specifically, using the file cache.
You basically generate a PDF file using any report generator, including Crystal, and add it to the cache. Then you just use it as any PDF file in a web application.
For instance this one: https://github.com/Atozed/IntraWeb/tree/...eTimeCache
Also,
Just make sure that your report writer is set to be threadsafe.
here is some example code for reportbuilder
Code:
procedure fxProcess_Report(ARBreport:TppReport;Output_type:string; Send_Stream:boolean=false;AFileName:string='';APdfPassword:string='');
var lFileName,
lURL,
lFileDir:string;
lMS : TMemoryStream;
lPDFDevice: TppPDFDevice;
begin
lFileName := 'test';
try
with ARBreport do
begin
AllowPrintToFile := False;
ShowPrintDialog := False;
TextFileName := lFileDir;
DeviceType := 'PDF';
ModalCancelDialog := false;
ModalPreview := false;
ShowCancelDialog := false;
lMS := TMemoryStream.Create;
lPDFDevice := TppPDFDevice.Create(nil);
try
lPDFDevice.PDFSettings := ARBreport.PDFSettings;
lPDFDevice.OutPutSTream := lMS;
lPDFDevice.Publisher := ARBreport.publisher;
ARBreport.PrintToDevices;
lURL := IWappCache.TIWAppCache.StreamToCacheFile(WebApplication, lMS, TIWMimeTypes.GetAsString('.' + 'PDF'), ctOneTime);
// WebApplication.SendStream(MS,false,HD.ContentType,Afilename);
WebApplication.NewWindow( lURL
, 'Report'
, 0
, 0
, [woResizable, woDetectBlock]
);
finally
lPDFDevice.free;
lMS.free;
end;
end;
except
raise;
end;
end;