DBLookupComboBox and DBXQuery
I'm trying to populate a TfrxDBLookupComboBox in a dialog from a TfrxDBXQuery using Fast Report 4.5 demo.
I followed these steps from the designer:
1. Create a new report
2. On Data page create a new TfrxDBXDatabase sets the connection parameters and set Connected to True
3. On Data page create a new TfrxDBXQuery sets the Database and SQL properties
4. Create a new Dialog Page and create into it a new TfrxDBLookupComboBox object. Set its Dataset, ListField and KeyField properties
5. Click on Preview button: a "Cannot perform this operation on an open dataset" error appeares.
I tried to use TfrxADODatabase and TfrxADOQuery objects instead of TfrxDBXDatabase and TfrxDBXQuery and the report ran correctly.
I also tried to delete the dialog page and to create a MasterData Band referenced to the TfrxDBXQuery object and the preview ran correctly.
Could someone help me?
Thanks in advance,
Mauro
I followed these steps from the designer:
1. Create a new report
2. On Data page create a new TfrxDBXDatabase sets the connection parameters and set Connected to True
3. On Data page create a new TfrxDBXQuery sets the Database and SQL properties
4. Create a new Dialog Page and create into it a new TfrxDBLookupComboBox object. Set its Dataset, ListField and KeyField properties
5. Click on Preview button: a "Cannot perform this operation on an open dataset" error appeares.
I tried to use TfrxADODatabase and TfrxADOQuery objects instead of TfrxDBXDatabase and TfrxDBXQuery and the report ran correctly.
I also tried to delete the dialog page and to create a MasterData Band referenced to the TfrxDBXQuery object and the preview ran correctly.
Could someone help me?
Thanks in advance,
Mauro
Comments
Hi Mauro ,
Do this : Set TfrxDBLookupComboBox.AutoOpenDataSet to false .