Crystal Reports

<< Click to Display Table of Contents >>

Navigation:  Forum >

Crystal Reports

Forum link

 


 

09-10-2020, 03:39 PM:

 

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. 

 


 

09-11-2020, 03:10 PM:

 

Many users use Crystal Reports with IntraWeb.

 


 

09-15-2020, 09:22 AM:

 

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-18-2020, 01:30 PM:

 

(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;

 

 

 


 

09-18-2020, 05:10 PM:

 

If you are not sure that your report writer is threadsafe you can put it in a CGI. I do not know if Crystal Reports is threadsafe or not.

 

https://www.atozed.com/forums/showthread...60#pid1860

 

Dan