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

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Messages - falcon

Pages: [1]
1
Hello Alex,

First, I would like to thank you a lot for your help.
That was quick and efficient.  ;D

I tried to download the "develop branch" from git and build it.
Everythings seams to works good but when I compile my soft I have an error:

C:\LimeReport-master\Lib\include\lrglobal.h:49: erreur : QScriptEngine: No such file or directory

The error is there:
Code: [Select]
#ifdef USE_QJSENGINE
//#include <QJSEngine>
#include <QQmlEngine>
#else
#include <QScriptEngine>   <==(!)=====(!)======(!)== (line 49)
#endif

What is the problem ?

2
Hello everybody,

I'm a beginner with Qt and LimeReport and I try to print a picture from my c++ code to my Lime Report Template.

I already success to write a variable from my c++ code to the PDF file with the template.
To do that I created a new "Report variables" in "Data Browser -> Variables". Then, I created a new "TextItem" and in the "Property Name" to "content", I write "$V{number}" to reference the "Report variables" with the same name. I don't know if it's right but it's works.

You can see my code.

Code: [Select]
MainWindow::MainWindow(QWidget *parent) :
    QMainWindow(parent),
    ui(new Ui::MainWindow),
    report(new LimeReport::ReportEngine),
{
    ui->setupUi(this);
    this->number = 0;
    this->report = new LimeReport::ReportEngine(parent);
    this->report->loadFromFile("lrTemplate01.lrxml");
}

void MainWindow::on_pushButton_clicked()
{
    QPixmap p = ui->qgvChart->grab();

    this->report->dataManager()->setReportVariable("number", this->number++);
    p.save("a.png", "PNG", 100);
    this->report->previewReport();
}

void MainWindow::on_pushButton_2_clicked()
{
    this->report->printToPDF("report");
}


The question is, how can I do that for a picture.
I have "p" that is my "QPixmap" and I would like to do something like:
Code: [Select]
this->report->dataManager()->setReportVariable("image", p);
But I have no idea how it's possible and what kind of "variables" I have to create on the "Line Report Designer".

Somebody can please help me ?

Pages: [1]