How to work with dynamic created Report / DataSets ?
Hi all...
I create the Report, the Designer, the Dataset??s during runtime. Then i loading a Report from a File and open the Report with the Designer. The Designer is showing but i can??t assign my dynamicly created frxDBDatasets to the Report because they are not showing in the Data Menu.
When i use Report.Datasets.Add(myfrxDBDataset) then i get an Access Violation from the Report.
Example:
Thanks for Help... " border="0" alt="mad.gif" /> Iam searching a long Time in the FastReport 4.0 Forum... Now i found the Solution via Google !" alt="> Iam searching a long Time in the FastReport 4.0 Forum... Now i found the Solution via Google !" /> http://www.fast-report.com/en/forum/index.php?showtopic=1564
I am changing the Owner from the frxDBDatasets from FReport to FDesigner and the Datasets are showing in the Menu. [img]style_emoticons/<#EMO_DIR#>/cool.gif" style="vertical-align:middle" emoid="B)" border="0" alt="cool.gif" /> Thanks a lot for your help...[/img]
I create the Report, the Designer, the Dataset??s during runtime. Then i loading a Report from a File and open the Report with the Designer. The Designer is showing but i can??t assign my dynamicly created frxDBDatasets to the Report because they are not showing in the Data Menu.
When i use Report.Datasets.Add(myfrxDBDataset) then i get an Access Violation from the Report.
Example:
var
  FReport: TfrxReport;
  FDesigner: TfrxDesigner;
  Query: TIBCQuery;
  FDataSet: TfrxDBDataset;
FReport:= TfrxReport.Create(nil);
FDesigner:= TfrxDesigner.Create(FReport);
Query:= TIBCQuery.Create(FReport);
FDataSet:= TfrxDBDataset.Create(FReport);
FDataSet.Name:= 'DataSet1';
FDataSet.DataSet:= Query;
.
// Data loading into Query
.
FReport.LoadFromFile(FReportFileLocation + NormalForm,False); // without the Loading i get a clear Report without a Page but with the Dataset when i run the "DataSets.Add" Line
FReport.DataSets.Add(DataSetPositions); // with this i get AccessViolation, without i can??t see the DataSet
.
.
FReport.Free;
AccessViolation:
exec. date/time : 2011-06-22 21:24
version : 1.0.0.3
compiled with : Delphi XE
madExcept version : 3.0m
callstack crc : $eb9f0867, $fa174f95, $fa174f95
exception number : 1
exception class : EAccessViolation
exception message : Zugriffsverletzung bei Adresse 004049E7 in Modul 'dBK.exe'. Lesen von Adresse 08DBD2B8.
main thread ($97c):
004049e7 +067 dBK.exe frxrcClass System.Move
008082ec +34c dBK.exe frxDataTree 236 +53 TfrxDataTreeForm.FillDataTree
0080918d +005 dBK.exe frxDataTree 481 +1 TfrxDataTreeForm.UpdateItems
00845532 +0ca dBK.exe frxDesgn 1842 +20 TfrxDesignerForm.CreateToolWindows
00843a23 +033 dBK.exe frxDesgn 1164 +7 TfrxDesignerForm.FormShow
007ed151 +0e1 dBK.exe frxClass 13386 +83 TfrxReport.DesignReport
00854f0d +241 dBK.exe dBK_Print 104 +48 TdBK_Print.PrintProcess
0087b3ba +032 dBK.exe main 486 +3 TFMain.pngbtnPrintLastProcessClick
Thanks for Help... " border="0" alt="mad.gif" /> Iam searching a long Time in the FastReport 4.0 Forum... Now i found the Solution via Google !" alt="> Iam searching a long Time in the FastReport 4.0 Forum... Now i found the Solution via Google !" /> http://www.fast-report.com/en/forum/index.php?showtopic=1564
I am changing the Owner from the frxDBDatasets from FReport to FDesigner and the Datasets are showing in the Menu. [img]style_emoticons/<#EMO_DIR#>/cool.gif" style="vertical-align:middle" emoid="B)" border="0" alt="cool.gif" /> Thanks a lot for your help...[/img]