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

Comments

  • edited 8:18PM
    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
  • edited 8:18PM
    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

    Hi Mauro ,
    Do this : Set TfrxDBLookupComboBox.AutoOpenDataSet to false .

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.