SQL Anywhere and Report Builder
Hi,
I am trying to create a dataView and dataModule on the report for the data
dictionary selection.
I have downloaded and installed the NativeDb support for Report Builder.
I am using :- Delphi 7.0, SQLA 8.0/9.0 and RB 7.02 version
Here is a sample code for it .
procedure TfrmQueryWizard.CreateDataView;
var
lDataView: TdaNDBQueryDataView;
begin
lDataModule := daGetDataModule( Report);
FreeObject( lDataModule);
lDataModule := tdaDataModule.CreateForReport( Report);
lDataModule.FreeNotification( self);
lDataView := TdaNDBQueryDataView.Create( lDataModule);
lDataView.FreeNotification( self);
lDataView.Parent := lDataModule;
lDataView.Init;
SQL := lDataView.SQL;
// set SQL properties
SQL.Session := lDataView.Session;
SQL.DataDictionary := ReportWriterApplication.Dictionary.DataDictionary;
SQL.DatabaseName := LocalDataName;
end;
Native Db sample application work's great but when i used with the above
code it give me an access violation.
Can you help me what I'am missing here.
Thanks
-Bhoj
I am trying to create a dataView and dataModule on the report for the data
dictionary selection.
I have downloaded and installed the NativeDb support for Report Builder.
I am using :- Delphi 7.0, SQLA 8.0/9.0 and RB 7.02 version
Here is a sample code for it .
procedure TfrmQueryWizard.CreateDataView;
var
lDataView: TdaNDBQueryDataView;
begin
lDataModule := daGetDataModule( Report);
FreeObject( lDataModule);
lDataModule := tdaDataModule.CreateForReport( Report);
lDataModule.FreeNotification( self);
lDataView := TdaNDBQueryDataView.Create( lDataModule);
lDataView.FreeNotification( self);
lDataView.Parent := lDataModule;
lDataView.Init;
SQL := lDataView.SQL;
// set SQL properties
SQL.Session := lDataView.Session;
SQL.DataDictionary := ReportWriterApplication.Dictionary.DataDictionary;
SQL.DatabaseName := LocalDataName;
end;
Native Db sample application work's great but when i used with the above
code it give me an access violation.
Can you help me what I'am missing here.
Thanks
-Bhoj
This discussion has been closed.
Comments
This example using BDE, but should be adaptable to other data access
components:
http://www.digital-metaphors.com/tips/CreateDataModCustOrderLinkedDataViews.
zip
You might try modifying your Delphi library path from RBuilder\Lib to
RBuilder\Source and setting Debugging Options to break on language
exceptions. Then run in the debugger and see whether you can get a clue as
to where the problem occurs.
--
Nard Moseley
Digital Metaphors
http://www.digital-metaphors.com
Best regards,
Nard Moseley
Digital Metaphors
www.digital-metaphors.com