Menu

Problem with connect "setValues"

2023-04-01
2023-04-02
  • Venardos Gonidakis

    Hi there. I try to connect a report using the appropriate slot but i can see no result. The only result I can see is the report with the default values entered using designer. My values do not pass into the report. I use mingw in windows. Any ideas would be much appreciated ! Please find attached the very simple code and the report that is used. It does not work even if i remove the barcode from the report (i mention this, just in case you think that there might a problem with qtzint etc.). I can see the barcode just fine, but with its default (designer value) as well. Thank you

     

    Last edit: Venardos Gonidakis 2023-04-01
  • aliks-os

    aliks-os - 2023-04-02

    Hi, if you use MasterDataBand, you should define the row count that will be for your data.
    Add the code as below. Otherwise dont use MasterDataBand

    QObject::connect(report, SIGNAL(setDSInfo(DataSetInfo &)),
                         this, SLOT(setDSInfo(DataSetInfo &)));
    
    void ExampleDlg1::setDSInfo(DataSetInfo &dsInfo)
    {
        dsInfo.recordCount = ui->tableWidget->rowCount();
    }
    
     
  • Venardos Gonidakis

    Thank you so much for your quick answer !!! My main problem was that i totally forgot to use the square brackets and i was trying to use the name of the field of the form in order to fill it... I am so stupid !!! It is a useless post. I think you should delete it :)

     

Log in to post a comment.