I have a misunderstanding problem.
I get always a error message "undecleared identifie: 'frxReport'" on the line
I have renamed it to
Because all Printings are on "Berichte".
Where is the "frxReport" delcared? I have nothing found at the sample script
procedure Form1_Button4_OnClick (Sender: string; var Cancel: boolean);
var
frxDBDataset1, frxDBDataset2: TfrxDBDataset;
Results1, Results2: TDataSet;
begin
// Data for first dataset
SQLQuery('SELECT * FROM Settings where id = 1', Results1);
// Data for second dataset
SQLQuery('SELECT * FROM Categories' , Results2);
// create first DataSet
frxDBDataset1 := TfrxDBDataset.Create(Form1);
frxDBDataset1.UserName := 'Report1';
frxDBDataset1.CloseDataSource := True;
frxDBDataset1.OpenDataSource := True;
frxDBDataset1.DataSet := Results1;
// create second DataSet
frxDBDataset2 := TfrxDBDataset.Create(Form1);
frxDBDataset2.UserName := 'Report2';
frxDBDataset2.CloseDataSource := True;
frxDBDataset2.OpenDataSource := True;
frxDBDataset2.DataSet := Results2;
// set up report
Form1.frxReport.Clear;
Form1.frxReport.DataSets.Clear;
Form1.frxReport.DataSets.Add(frxDBDataset1);
Form1.frxReport.DataSets.Add(frxDBDataset2);
// DESIGN MODE - comment the following two lines and uncomment the preview mode lines to preview report
Form1.frxReport.LoadFromFile(ExtractFilePath(Application.ExeName)+'Report\MyReport.fr3');
Form1.frxReport.DesignReport;
// PREVIEW MODE - comment the following four lines and uncomment the above design mode lines to design report
//frxDBDataset1.DataSet.Close;
//frxDBDataset2.DataSet.Close;
//Form1.frxReport.LoadFromFile(ExtractFilePath(Application.ExeName)+'Report\MyReport.fr3');
//Form1.frxReport.ShowReport;
frxDBDataset1.Free;
frxDBDataset2.Free;
end;
begin
end.
And there is no button definied as for printing on the forms.
Any Idea what I am missing?