LimeReport Forum

General Category | Основное => Requests | Пожелания => Topic started by: solitarywolf on October 24, 2020, 04:10:18 PM

Title: report does not allow change to application
Post by: solitarywolf on October 24, 2020, 04:10:18 PM
Good afternoon, A query, when showing the report with previewReport () it does not let me return to my application until I close the report, how can you solve this.



This is the code of my button that shows the report, as I said before, when the report is shown it no longer lets me return to my application, if not until closing the report, any suggestions would be appreciated.

Code: [Select]
void Widget::on_pushButton_2_clicked()
{
  QFile fileName(":/rpt/Reporteusuarios.lrxml");
  if(!fileName.open(QIODevice::ReadOnly|QIODevice::Text)){
      QMessageBox::critical(this,qApp->applicationName(),
                            QString("Error al abrir el reporte.\n").append(
                              fileName.errorString()));
      return;
    }
  mReport=new LimeReport::ReportEngine(this);
  mReport->dataManager()->setReportVariable("DATABASE",db.strConexion());
  mReport->loadFromFile(fileName.fileName());
  mReport->previewReport();

}
Title: Re: report does not allow change to application
Post by: Arin Alex on October 26, 2020, 05:28:05 PM
Hi!
You can create a preview widget and show it as you wish.
report->createPreviewWidget();