Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Crystal Reports
#1
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.  Smile
Reply
#2
Many users use Crystal Reports with IntraWeb.
Reply
#3
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
Reply
#4
(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;
Reply
#5
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
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)