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 - Subst

Pages: 1 2 [3] 4 5 ... 30
31
Oh..
QPrinter is not inherited from QObject
yep

I'll thing about how better

32
And what's trouble?
some th. like this

Code: [Select]
if (QPrinterInfo::defaultPrinter().isNull()) // no default printer in System
   return;
LimeReport::ReportEngine *m_report=new LimeReport::ReportEngine(this);
m_report->loadFromFile(path_to_template);
QPrinter *printer=new QPrinter(QPrinterInfo::defaultPrinter();
connect(m_report, &LimeReport::ReportEngine::renderFinished, printer, &QPrinter::deleteLater);
m_report->printReport(printer);

this code loads the report template from
Code: [Select]
path_to_template and send it to default system printer (if exist
after finsh the rendering created printer object will be destroyed

33
just try to change

Code: [Select]
if(equals(QT_MAJOR_VERSION, 5) : greaterThan(QT_MINOR_VERSION, 1)) | equals(QT_MAJOR_VERSION, 6) {
    SUBDIRS += console \
        lrdview

}

to

Code: [Select]
if(equals(QT_MAJOR_VERSION, 5) : greaterThan(QT_MINOR_VERSION, 1)) | equals(QT_MAJOR_VERSION, 6) {
    SUBDIRS += console
}

in limereport.pro

or if you need to build lrdview

change the lrdview.pro

Code: [Select]
CONFIG += uitools
to

Code: [Select]
equals(QT_MAJOR_VERSION, 4) {
    CONFIG += uitools
}

equals(QT_MAJOR_VERSION, 5) | equals(QT_MAJOR_VERSION, 6) {
    QT += uitools
}

35
I've asked Alex about crash.
We've discussed about and this behavior of band (crash in such case) it's right, normal.
I can quote our talk. but it's in Russian and I'm too lazy to translate it :) Sorry  ;)

36
Reportpage1_DataBand6 - you have thi band
Reportpage1_DataBand1 - and don't have this

Reportpage1_DataBand6 means PageName_BandName

37
I think you set the datasource for your DataBand6
It's affect to the program crash

I can't find the cause yet

38
it's all about that recommended use the JS but Qt 5.15, for example, still supports the QrScript
I've used JS? but each likes another and described fundamentally in ECMA-262 standart

39
OK. I'll add the new line in the function Thanks

Well we've tested again (Alex and Me after)
All looks fine

I've attached report (test.lrxml), dialog (test.ui) and database (322_ифф.sqt)

Let's try

40
No!
not IN the function
OUTSIDE them

Code: [Select]
function beforeDataPrint() {
  setVariable("id",2)
  }

Reportpage1_DataBand1.preparedForRender.connect(beforeDataPrint);

and
Code: [Select]
setVariable("id",2) has "brake down"... or
Code: [Select]
connect may be
Alex has promised to look

41
Sorry
I've forgot to tell about this

Code: [Select]
Reportpage1_DataBand1.preparedForRender.connect(beforeDataPrint);
after beforeDataPrint definition

But some thing wrong
I told Alex, let's wait

42
finally original trouble has been solved? or not yet?
 (when you fix the variable name from 'ib' to 'id')

Quote
Got it finally. I'm used to adding '..' to user defined number fields in mysql queries. In this case they were the problem!
Can U type here your query?
I did not fully understand your problem here




43
Hi!
You have some dialog in your report?

So, you can just access to needed element of diaog

Try do like this

first define the datasource
Code: [Select]
Source as
Code: [Select]
select * from Table where id=$V{id}then define in script page some scripts

Code: [Select]
YourDlg.exec()==1

function beforeDataPrint() {
 setVariable("id", YoourDlg.YourLineEdit.Text)
 reopenDatasource(Source)
 }


44
Discussion | Обсуждение / Re: Вопросы новичка
« on: October 27, 2022, 06:25:56 PM »
мимоходом...
для доступа к полю таблицы можно так делать
$D{table_name.field_name}

так короче и удобней


45
Discussion | Обсуждение / Re: Вопросы новичка
« on: October 27, 2022, 06:21:52 PM »
а from_date и to_date для полнооты картины?
из программы задаются?

Pages: 1 2 [3] 4 5 ... 30