Transferring global variables into a report

edited March 2015 in FastReport 4.0
Hello,

I will like to build reports using FastReport 4.13.2 for Delphi XE5. I am just new to FastReport; and I could not find the appropriate chapter in help-documentation that addresses this issue.

I will like to show the report, by a Click-event of a button from the MainForm.

Thus, I will be linking the FastReport's form to the MainForm in order to acquire Global variables??? values, to be inserted into FastReport???s text-contents. In order words, how can I display parameters/values from application MainForm anywhere within the FastReport (:using ???Text??? Object)?

Global variables can of the types ???String???, Integer???, Float-type???, etc. Let???s say, for example, Edit1.Text or Myvariable:= 99 from the MainForm. How can I transfer/access variables defined in the Delphi project in my FastReport?


Any help and enlightenment about this issue will be highly appreciated. Thanks very much in advance!


Regards,
Alex Siron


N.B:

unit Main;

interface

uses
SysUtils, WinTypes, WinProcs, Messages, Classes, Graphics, Controls,
Forms, Dialogs, StdCtrls;

type
TfrmMain = class(TForm)
btnPreview: TButton;
procedure btnPreviewClick(Sender: TObject);
Edit1: TEdit;
private
{ Private declarations }
public
{ Public declarations }
end;

var
frmMain: TfrmMain;

implementation



{$R *.DFM}

procedure TfrmMain.btnPreviewClick(Sender: TObject);
begin
frxReport1.ShowReport;
end;

end.

Comments

  • gordkgordk St.Catherines On. Canada.
    edited 6:29PM
    read the programmers manual chapters on using variables and how to pass values to those variables.
    also how to use the ongetvalue event.

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.