Welcome, Guest. Please login or register.
Did you miss your activation email?

Author Topic: report does not allow change to application  (Read 64 times)

solitarywolf

  • Newbie
  • *
  • Posts: 4
    • View Profile
report does not allow change to application
« 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();

}

Arin Alex

  • Developer
  • Administrator
  • Hero Member
  • *****
  • Posts: 878
    • View Profile
Re: report does not allow change to application
« Reply #1 on: October 26, 2020, 05:28:05 PM »
Hi!
You can create a preview widget and show it as you wish.
report->createPreviewWidget();