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.

Topics - JAVH

Pages: [1]
1
Discussion | Обсуждение / Bad size printing
« on: April 01, 2019, 10:54:37 AM »
Hi, i trying to use limereport with a printer label, doing tests, I adjust the page size in Designer, in preview the size is Ok too, but when I send to print, the size is very small, maybe at 50%, but if a send to save to PDF and then print from PDF software, the size are ok.



This is a fragment of my lrxml file:

Code: [Select]
<pageItem ClassName="PageItem" Type="Object">
          <objectName Type="QString">ReportPage1</objectName>
          <geometry width="620" x="0" y="0" Type="QRect" height="127"/>
          <children Type="Collection">
            <item ClassName="ReportHeader" Type="Object">
              <objectName Type="QString">ReportHeader1</objectName>
              <geometry width="620" x="0" y="0" Type="QRect" height="128"/>
              <children Type="Collection">
                <item ClassName="BarcodeItem" Type="Object">
                  <objectName Type="QString">BarcodeItem1</objectName>
                  <geometry width="286" x="290" y="0" Type="QRect" height="122"/>
                  <children Type="Collection"/>
                  <zOrder Value="0" Type="qreal"/>
                  <borders Value="0" Type="enumAndFlags"/>
                  <parentName Type="QString">ReportHeader1</parentName>
                  <borderLineSize Value="0" Type="int"/>
                  <isVisible Value="1" Type="bool"/>
                  <borderColor Value="#000000" Type="QColor"/>
                  <itemLocation Value="0" Type="enumAndFlags"/>
                  <stretchToMaxHeight Value="1" Type="bool"/>
                  <itemAlign Value="4" Type="enumAndFlags"/>
                  <content Type="QString">$V{barcode}</content>
                  <barcodeType Value="20" Type="enumAndFlags"/>
                  <testValue Type="QString">$V{barcode}</testValue>
                  <foregroundColor Value="#000000" Type="QColor"/>
                  <backgroundColor Value="#ffffff" Type="QColor"/>
                  <whitespace Value="2" Type="int"/>
                  <angle Value="0" Type="enumAndFlags"/>
                  <barcodeWidth Value="0" Type="int"/>
                  <securityLevel Value="2" Type="int"/>
                  <pdf417CodeWords Value="928" Type="int"/>
                  <inputMode Value="1" Type="enumAndFlags"/>
                  <hideText Value="1" Type="bool"/>
                </item>

I need to send any parameter before print for adjust the page size??

Thanks!!

Best regards.

2
Discussion | Обсуждение / Skip printdialog
« on: March 31, 2019, 05:29:21 AM »
Hi, I learn to send to print I can use this:

Code: [Select]
ReportEngine::printReport(QPrinter * printer = 0)
I did try but I get this error:

Code: [Select]
expected primary-expression before * token
'printer' was not declared in this scope

Ok, I declare printer before and then do this:

Code: [Select]
Etiqueta->printReport(printer=0);
But then print dialog shows, only get printer selected, but not skip dialog, there are another new way to do?? I'm using last git version.

This is my code:

Code: [Select]
LimeReport::ReportEngine *Etiqueta=new LimeReport::ReportEngine(this);
QPrinter *printer;
Etiqueta->loadFromFile("rpt/barcode.lrxml");
Etiqueta->dataManager()->setReportVariable("barcode",Codigo);
Etiqueta->printReport(printer=0);

Thanks and best regards.

3
Discussion | Обсуждение / QTreeWidget and SpinBox
« on: January 07, 2019, 02:20:52 AM »
Hi!!, sorry for this question that is newbie, recently i'm learning this Report generator and is amazing.

I have a QTreeWidget with a QDoubleSpinBox inside



In this topic topic i did learn how to send data from Widget to the report, I can send all, except the last field (SpinBox)

I did try with a casting sending value of SpinBox to a QAbstractItemModel

Code: [Select]
    LimeReport::ReportEngine *Ticket =new LimeReport::ReportEngine(this);
    Ticket->dataManager()->addModel("treeWidget",ui->TrWVenta->model(),false);
    QAbstractItemModel *ModCant;
    ModCant=dynamic_cast<QAbstractItemModel*>(ui->TrWVenta->itemWidget(Item,3));
    Ticket->dataManager()->addModel("Cantidad",ModCant,true);
    Ticket->designReport();

But in data manager I get only this (with red circle) and I cannot view any data



How can send data from QDoubleSpinBox to the report??

Thanks and sorry for my bad english!!

Pages: [1]