Jump to content

FastReport Use


johnp
 Share

Recommended Posts

I am using Delphi XE along with uniGUI 94.1017 with Fast Reports with DBISAM. Overall processing of data and my query results on grids etc. work fine. Speed and sorting is an issue on large tables. However, I am having problems with creating reports using Fast Reports.

 

This Fast Report dataset property values rbcurrent and recurrent are not recognized on a second form and are treated undeclared identifiers as coded below.  Yet  works on my first form and I can nicely create a PDF file on the one form. I have all forms included in my uses list, which all FastReport components are stored in my data module. 

 

 

 DataModule.frxDBDatasetWaybills.rangebegin := rbcurrent;   // rbcurrent not recognized on second form
 
 DataModule.frxDBDatasetWaybills.rangeend := recurrent;    //   recurrent not recognized on second form
 
 
 
My report code above on my first form works fine that somebody helped me with before. If I try to copy the same code as below and use on a second form using either the same or a a duplicate set of components I get a cache path error that cannot find the file. Also it does not work off a DBISAM query and only sends blank results, it only seems to work off a data table and not a query, which I would like to print the record that the pointer is on from a query. I had a similar posting on this before.
 
 
var
   s,fn:String;
   FormUrlView1: TFormUrlView;
   
begin
 
    fn:=  UniLabelShipmentID.caption +'.pdf'; // Create a name for report.
    DataModule.frxDBDatasetWaybills.rangebegin := rbcurrent;
    DataModule.frxDBDatasetWaybills.rangeend := recurrent;
 
    DataModule.frxReportWaybill.PrintOptions.ShowDialog := False;
    DataModule.frxReportWaybill.ShowProgress:=false;
    DataModule.frxReportWaybill.PrintOptions.ShowDialog:=false;
    DataModule.frxReportWaybill.EngineOptions.SilentMode:=True;
    DataModule.frxPDFExportWaybill.Background:=True;
    DataModule.frxPDFExportWaybill.ShowProgress:=False;
    DataModule.frxPDFExportWaybill.ShowDialog:=False;
    DataModule.frxPDFExportWaybill.FileName := UniServerModule.LocalCachePath + fn;
 
 
    DA3DataModule.frxPDFExportWaybill.DefaultPath := '';
 
   if Mainform.WebMode then begin
      DataModule.frxPDFExportWaybill.ShowDialog := False;
      DataModule.frxReportWaybill.ShowProgress:=False;
      DataModule.frxPDFExportWaybill.DefaultPath := UniServerModule.LocalCachePath;
      DataModule.frxReportWaybill.PrepareReport(); // Create Report
      DataModule.frxReportWaybill.Export(DataModule.frxPDFExportWaybill); // Export Report
      FormUrlView1:=TFormURLView.Create(UniApplication);
      FormUrlView1.URLFrame.URL := UniServerModule.LocalCacheURL + fn ;
      FormUrlView1.Show;
   end else begin
      showmessage ('Report condition');
      DA3DataModule.frxReportWaybill.Clear;
     
   end;
 
 

Hope someone can give me some insight on this. 

 

 

John P.

In Canada

 

 

 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...