Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. NCReport RunReportToQtPreview is empty
Forum Updated to NodeBB v4.3 + New Features

NCReport RunReportToQtPreview is empty

Scheduled Pinned Locked Moved General and Desktop
2 Posts 2 Posters 778 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • P Offline
    P Offline
    Polina89
    wrote on last edited by
    #1

    Hello! I'm trying to generate a report from my qt application. I created the report in a NCReportDesigner. It works perfect in the designer. But when I try to run it from my own appliction the preview shows nothing. My project file
    @QT += core gui
    QT += printsupport

    greaterThan(QT_MAJOR_VERSION, 4): QT += widgets

    TARGET = testProj
    TEMPLATE = app

    SOURCES += main.cpp
    mainwindow.cpp
    LIBS += C:\NCReport\2.11.2.MinGW.Qt5.2.1.eval\lib\libNCReport2.a
    INCLUDEPATH += C:\NCReport\2.11.2.MinGW.Qt5.2.1.eval\include\

    HEADERS += mainwindow.h

    FORMS += mainwindow.ui@

    And my slot

    @void MainWindow::on_pushButton_clicked()
    {
    QCoreApplication::setOrganizationName("OrganizationName");
    QCoreApplication::setApplicationName("ApplicationName");
    NCReport *report = new NCReport();
    report->setReportSource( NCReportSource::File );
    QString str=QStandardPaths::standardLocations(QStandardPaths::DataLocation)[0] + "/TestReport.ncr";
    report->setReportFile(QStandardPaths::standardLocations(QStandardPaths::DataLocation)[0] +"/TestReport.ncr");
    report->addParameter("transitidparam", 48);
    report->runReportToQtPreview();
    }@

    Thanx a lot for any help!

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi,

      You should rather contact the developers of NCReport directly. You'll have more chance to get an answer there

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      0

      • Login

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved