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 - Muthu Samy

Pages: [1]
1
API for page setup (Page size, margins etc) needed from LimeReport::ReportEngine class.

2
engine->dataManager()->setReportVariable("varName","value)

Above API works correctly only for variables added during design time.

For new variables created during runtime, the newly added variable is shown in External variables section & variable does not exists error comes when we call ViewReport.

3
Support for printing to Dotmatrix printer using epson escape codes (Raw mode printing)

Lot of people are using Dotmatrix printers for printing Invoices & Roll paper printing. Regular printing through printer driver is very slow on those printers. Is there a way to print raw text with Epson Escape Codes in LimeReport?

4
Pull requests created in github

5
Support needed for creating reports programatically (without designer & lrxml file)

I have written a helper class for this purpose (files attached). For this helper class to work, I had to make the following changes.

a) Add the following method in ReportEngine class

Code: [Select]
PageDesignIntf* pageDesign(int index=0){
                 Q_D(ReportEngine);
                 if (d->pageCount()>index)
                      return d->pageAt(index);
                 else
                     return d->appendPage("page1");
}

b) add LIMEREPORT_EXPORT macro in the following class declarations
    LimeReport::PageDesignIntf
    LimeReport::BandDesignIntf
    LimeReport::BandDesignIntf
    LimeReport::DataBandDesignIntf
    LimeReport::BandDesignIntf
    LimeReport::BandDesignIntf
    LimeReport::GroupBandHeader
    LimeReport::BandDesignIntf

    LimeReport::TextItem
    LimeReport::ShapeItem and the like.

Is it the right approach?


[вложение удалено администратором]

6
Arin Alex, My pleasure.

7
Thank you Arin Alex!

I have added the following function in lrscriptenginemanager.cpp

QScriptValue setVariable(QScriptContext* pcontext, QScriptEngine* /*pengine*/){

    QString name = pcontext->argument(0).toString();
    QVariant value = pcontext->argument(1).toVariant();

    ScriptEngineManager* sm = qscriptvalue_cast<ScriptEngineManager*>(pcontext->callee().data());
    DataSourceManager* dm = sm->dataManager();

    dm->changeVariable(name,value);
    return QScriptValue();
}

And added this function in ScriptManagerConstructor as below

    addFunction("setVariable", setVariable, "GENERAL", "");

It serves my purpose for now.


8
Discussion | Обсуждение / Re: Change width in TextItem
« on: July 25, 2016, 06:47:15 AM »
Feature request: Simalarly, functions needed for setting x & y positions of an Item..

Alternatively, we can make QRectF new-able from script (similar to QColor, so that a QRectF can be assigned to Geometry property)

9
How to set/change the value for an user variable from script?

Pages: [1]