mirror of
https://github.com/python-LimeReport/LimeReport.git
synced 2024-12-23 20:22:58 +03:00
Demo reports added
This commit is contained in:
parent
36c9b060a9
commit
58d2063438
170
demo_r1/demo_reports/categories.lrxml
Normal file
170
demo_r1/demo_reports/categories.lrxml
Normal file
@ -0,0 +1,170 @@
|
||||
<Report>
|
||||
<object Type="Object" ClassName="LimeReport::ReportEnginePrivate">
|
||||
<objectName Type="QString"></objectName>
|
||||
<pages Type="Collection">
|
||||
<item Type="Object" ClassName="LimeReport::PageDesignIntf">
|
||||
<objectName Type="QString">page1</objectName>
|
||||
<sceneRect Type="QRect" x="-50" height="3070" y="-50" width="2200"/>
|
||||
<bspTreeDepth Value="5" Type="int"/>
|
||||
<font Type="QFont" pointSize="9" undeline="0" italic="0" family="Sans Serif" bold="0"/>
|
||||
<sortCacheEnabled Value="0" Type="bool"/>
|
||||
<stickyFocus Value="0" Type="bool"/>
|
||||
<minimumRenderSize Value="0" Type="qreal"/>
|
||||
<pageItem Type="Object" ClassName="PageItem">
|
||||
<objectName Type="QString">ReportPage1</objectName>
|
||||
<geometry Type="QRect" x="0" height="2970" y="0" width="2100"/>
|
||||
<children Type="Collection">
|
||||
<item Type="Object" ClassName="Data">
|
||||
<objectName Type="QString">DataBand1</objectName>
|
||||
<geometry Type="QRect" x="50" height="100" y="50" width="2000"/>
|
||||
<children Type="Collection">
|
||||
<item Type="Object" ClassName="ImageItem">
|
||||
<objectName Type="QString">ImageItem1</objectName>
|
||||
<geometry Type="QRect" x="54" height="50" y="22" width="200"/>
|
||||
<children Type="Collection"/>
|
||||
<zOrder Value="0" Type="qreal"/>
|
||||
<borders Value="0" Type="enumAndFlags"/>
|
||||
<parentName Type="QString">DataBand1</parentName>
|
||||
<itemLocation Value="0" Type="enumAndFlags"/>
|
||||
<stretchToMaxHeight Value="0" Type="bool"/>
|
||||
<image Type="QImage"></image>
|
||||
<opacity Value="100" Type="int"/>
|
||||
<content Type="QString"></content>
|
||||
<datasource Type="QString">category</datasource>
|
||||
<field Type="QString">Picture</field>
|
||||
<autoSize Value="1" Type="bool"/>
|
||||
</item>
|
||||
</children>
|
||||
<zOrder Value="0" Type="qreal"/>
|
||||
<borders Value="0" Type="enumAndFlags"/>
|
||||
<parentName Type="QString">ReportPage1</parentName>
|
||||
<autoHeight Value="1" Type="bool"/>
|
||||
<bandIndex Value="0" Type="int"/>
|
||||
<keepBottomSpace Value="0" Type="bool"/>
|
||||
<parentBand Type="QString"></parentBand>
|
||||
<backgroundColor Value="#ffffff" Type="QColor"/>
|
||||
<printIfEmpty Value="0" Type="bool"/>
|
||||
<datasource Type="QString">category</datasource>
|
||||
<keepSubdetailTogether Value="0" Type="bool"/>
|
||||
<splittable Value="0" Type="bool"/>
|
||||
<keepFooterTogether Value="0" Type="bool"/>
|
||||
<sliceLastRow Value="0" Type="bool"/>
|
||||
</item>
|
||||
<item Type="Object" ClassName="SubDetail">
|
||||
<objectName Type="QString">SubDetailBand1</objectName>
|
||||
<geometry Type="QRect" x="50" height="100" y="154" width="2000"/>
|
||||
<children Type="Collection">
|
||||
<item Type="Object" ClassName="TextItem">
|
||||
<objectName Type="QString">TextItem1</objectName>
|
||||
<geometry Type="QRect" x="66" height="50" y="22" width="614"/>
|
||||
<children Type="Collection"/>
|
||||
<zOrder Value="0" Type="qreal"/>
|
||||
<borders Value="0" Type="enumAndFlags"/>
|
||||
<parentName Type="QString">SubDetailBand1</parentName>
|
||||
<itemLocation Value="0" Type="enumAndFlags"/>
|
||||
<stretchToMaxHeight Value="0" Type="bool"/>
|
||||
<content Type="QString">$D{products.ProductName}</content>
|
||||
<margin Value="4" Type="int"/>
|
||||
<alignment Value="33" Type="enumAndFlags"/>
|
||||
<autoWidth Value="0" Type="enumAndFlags"/>
|
||||
<autoHeight Value="1" Type="bool"/>
|
||||
<font Type="QFont" pointSize="10" undeline="0" italic="0" family="Arial" bold="0"/>
|
||||
<backgroundOpacity Value="100" Type="int"/>
|
||||
<backgroundMode Value="1" Type="enumAndFlags"/>
|
||||
<backgroundColor Value="#ffffff" Type="QColor"/>
|
||||
<fontColor Value="#000000" Type="QColor"/>
|
||||
<angle Value="0" Type="enumAndFlags"/>
|
||||
<foregroundOpacity Value="100" Type="int"/>
|
||||
<trimValue Value="1" Type="bool"/>
|
||||
</item>
|
||||
<item Type="Object" ClassName="TextItem">
|
||||
<objectName Type="QString">TextItem2</objectName>
|
||||
<geometry Type="QRect" x="688" height="50" y="22" width="250"/>
|
||||
<children Type="Collection"/>
|
||||
<zOrder Value="0" Type="qreal"/>
|
||||
<borders Value="0" Type="enumAndFlags"/>
|
||||
<parentName Type="QString">SubDetailBand1</parentName>
|
||||
<itemLocation Value="0" Type="enumAndFlags"/>
|
||||
<stretchToMaxHeight Value="0" Type="bool"/>
|
||||
<content Type="QString">$D{products.UnitPrice}</content>
|
||||
<margin Value="4" Type="int"/>
|
||||
<alignment Value="33" Type="enumAndFlags"/>
|
||||
<autoWidth Value="0" Type="enumAndFlags"/>
|
||||
<autoHeight Value="0" Type="bool"/>
|
||||
<font Type="QFont" pointSize="10" undeline="0" italic="0" family="Arial" bold="0"/>
|
||||
<backgroundOpacity Value="100" Type="int"/>
|
||||
<backgroundMode Value="1" Type="enumAndFlags"/>
|
||||
<backgroundColor Value="#ffffff" Type="QColor"/>
|
||||
<fontColor Value="#000000" Type="QColor"/>
|
||||
<angle Value="0" Type="enumAndFlags"/>
|
||||
<foregroundOpacity Value="100" Type="int"/>
|
||||
<trimValue Value="1" Type="bool"/>
|
||||
</item>
|
||||
</children>
|
||||
<zOrder Value="0" Type="qreal"/>
|
||||
<borders Value="0" Type="enumAndFlags"/>
|
||||
<parentName Type="QString">ReportPage1</parentName>
|
||||
<autoHeight Value="1" Type="bool"/>
|
||||
<bandIndex Value="1" Type="int"/>
|
||||
<keepBottomSpace Value="0" Type="bool"/>
|
||||
<parentBand Type="QString">DataBand1</parentBand>
|
||||
<backgroundColor Value="#ffffff" Type="QColor"/>
|
||||
<printIfEmpty Value="0" Type="bool"/>
|
||||
<datasource Type="QString">products</datasource>
|
||||
<splittable Value="0" Type="bool"/>
|
||||
</item>
|
||||
</children>
|
||||
<zOrder Value="0" Type="qreal"/>
|
||||
<borders Value="0" Type="enumAndFlags"/>
|
||||
<parentName Type="QString"></parentName>
|
||||
<topMargin Value="5" Type="int"/>
|
||||
<bottomMargin Value="5" Type="int"/>
|
||||
<rightMargin Value="5" Type="int"/>
|
||||
<leftMargin Value="5" Type="int"/>
|
||||
<pageOrientation Value="0" Type="enumAndFlags"/>
|
||||
<pageSize Value="0" Type="enumAndFlags"/>
|
||||
</pageItem>
|
||||
</item>
|
||||
</pages>
|
||||
<datasourcesManager Type="Object" ClassName="LimeReport::DataSourceManager">
|
||||
<objectName Type="QString">datasources</objectName>
|
||||
<connections Type="Collection">
|
||||
<item Type="Object" ClassName="LimeReport::ConnectionDesc">
|
||||
<objectName Type="QString"></objectName>
|
||||
<name Type="QString">northwind</name>
|
||||
<driver Type="QString">QSQLITE</driver>
|
||||
<databaseName Type="QString">./demo_reports/northwind.db</databaseName>
|
||||
<userName Type="QString"></userName>
|
||||
<password Value="" Type="QString"/>
|
||||
<host Type="QString"></host>
|
||||
<autoconnect Value="1" Type="bool"/>
|
||||
</item>
|
||||
</connections>
|
||||
<queries Type="Collection">
|
||||
<item Type="Object" ClassName="LimeReport::QueryDesc">
|
||||
<objectName Type="QString"></objectName>
|
||||
<queryName Type="QString">category</queryName>
|
||||
<queryText Type="QString">Select * from categories</queryText>
|
||||
<connectionName Type="QString">northwind</connectionName>
|
||||
</item>
|
||||
</queries>
|
||||
<subqueries Type="Collection">
|
||||
<item Type="Object" ClassName="LimeReport::SubQueryDesc">
|
||||
<objectName Type="QString"></objectName>
|
||||
<queryName Type="QString">products</queryName>
|
||||
<queryText Type="QString">Select * from products where CategoryID = $D{category.CategoryID}</queryText>
|
||||
<connectionName Type="QString">northwind</connectionName>
|
||||
<master Type="QString">category</master>
|
||||
</item>
|
||||
</subqueries>
|
||||
<subproxies Type="Collection"/>
|
||||
<variables Type="Collection">
|
||||
<item Type="Object" ClassName="LimeReport::VarDesc">
|
||||
<objectName Type="QString"></objectName>
|
||||
<name Type="QString">TestName</name>
|
||||
<value Type="QString">TestValue</value>
|
||||
</item>
|
||||
</variables>
|
||||
</datasourcesManager>
|
||||
</object>
|
||||
</Report>
|
221
demo_r1/demo_reports/change_item_from_script.lrxml
Normal file
221
demo_r1/demo_reports/change_item_from_script.lrxml
Normal file
@ -0,0 +1,221 @@
|
||||
<?xml version="1.0" encoding="UTF8"?>
|
||||
<Report>
|
||||
<object Type="Object" ClassName="LimeReport::ReportEnginePrivate">
|
||||
<objectName Type="QString"></objectName>
|
||||
<pages Type="Collection">
|
||||
<item Type="Object" ClassName="LimeReport::PageDesignIntf">
|
||||
<objectName Type="QString">page1</objectName>
|
||||
<sceneRect height="3070" Type="QRect" width="2200" x="-50" y="-50"/>
|
||||
<bspTreeDepth Type="int" Value="5"/>
|
||||
<font undeline="0" Type="QFont" pointSize="8" bold="0" italic="0" family="MS Shell Dlg 2"/>
|
||||
<sortCacheEnabled Type="bool" Value="0"/>
|
||||
<stickyFocus Type="bool" Value="0"/>
|
||||
<minimumRenderSize Type="qreal" Value="0"/>
|
||||
<pageItem Type="Object" ClassName="PageItem">
|
||||
<objectName Type="QString">ReportPage1</objectName>
|
||||
<geometry height="2970" Type="QRect" width="2100" x="0" y="0"/>
|
||||
<children Type="Collection">
|
||||
<item Type="Object" ClassName="Data">
|
||||
<objectName Type="QString">DataBand1</objectName>
|
||||
<geometry height="110" Type="QRect" width="2000" x="50" y="306"/>
|
||||
<children Type="Collection">
|
||||
<item Type="Object" ClassName="TextItem">
|
||||
<objectName Type="QString">TextItem2</objectName>
|
||||
<geometry height="50" Type="QRect" width="814" x="28" y="18"/>
|
||||
<children Type="Collection"/>
|
||||
<zOrder Type="qreal" Value="0"/>
|
||||
<borders Type="enumAndFlags" Value="0"/>
|
||||
<parentName Type="QString">DataBand1</parentName>
|
||||
<borderLineSize Type="int" Value="1"/>
|
||||
<itemAlign Type="enumAndFlags" Value="4"/>
|
||||
<itemLocation Type="enumAndFlags" Value="1"/>
|
||||
<stretchToMaxHeight Type="bool" Value="0"/>
|
||||
<content Type="QString">$S{
|
||||
|
||||
var selectedItemBegin = '<span style="background:black; color:red; font-weight:bold ">';
|
||||
var selectedItemEnd = '</span>'
|
||||
|
||||
var customer = "";
|
||||
|
||||
if ($D{customers.CustomerID}=="ANTON"){
|
||||
customer = selectedItemBegin+$D{customers.CustomerID}+selectedItemEnd;
|
||||
} else {
|
||||
customer = $D{customers.CustomerID};
|
||||
}
|
||||
'<span>Customer: </span>'+customer;
|
||||
|
||||
}</content>
|
||||
<margin Type="int" Value="4"/>
|
||||
<alignment Type="enumAndFlags" Value="33"/>
|
||||
<autoWidth Type="enumAndFlags" Value="0"/>
|
||||
<autoHeight Type="bool" Value="0"/>
|
||||
<font undeline="0" Type="QFont" pointSize="10" bold="0" italic="0" family="Arial"/>
|
||||
<backgroundOpacity Type="int" Value="100"/>
|
||||
<backgroundMode Type="enumAndFlags" Value="1"/>
|
||||
<backgroundColor Type="QColor" Value="#ffffff"/>
|
||||
<fontColor Type="QColor" Value="#000000"/>
|
||||
<angle Type="enumAndFlags" Value="0"/>
|
||||
<foregroundOpacity Type="int" Value="100"/>
|
||||
<underlines Type="bool" Value="0"/>
|
||||
<adaptFontToSize Type="bool" Value="0"/>
|
||||
<trimValue Type="bool" Value="1"/>
|
||||
<lineSpacing Type="int" Value="1"/>
|
||||
<underlineLineSize Type="int" Value="1"/>
|
||||
</item>
|
||||
</children>
|
||||
<zOrder Type="qreal" Value="0"/>
|
||||
<borders Type="enumAndFlags" Value="0"/>
|
||||
<parentName Type="QString">ReportPage1</parentName>
|
||||
<borderLineSize Type="int" Value="1"/>
|
||||
<itemAlign Type="enumAndFlags" Value="4"/>
|
||||
<autoHeight Type="bool" Value="1"/>
|
||||
<bandIndex Type="int" Value="4"/>
|
||||
<keepBottomSpace Type="bool" Value="0"/>
|
||||
<parentBand Type="QString"></parentBand>
|
||||
<backgroundColor Type="QColor" Value="#ffffff"/>
|
||||
<printIfEmpty Type="bool" Value="0"/>
|
||||
<datasource Type="QString">customers</datasource>
|
||||
<keepSubdetailTogether Type="bool" Value="0"/>
|
||||
<splittable Type="bool" Value="0"/>
|
||||
<keepFooterTogether Type="bool" Value="0"/>
|
||||
<sliceLastRow Type="bool" Value="0"/>
|
||||
<columnsCount Type="int" Value="1"/>
|
||||
<columnsFillDirection Type="enumAndFlags" Value="0"/>
|
||||
</item>
|
||||
<item Type="Object" ClassName="ReportHeader">
|
||||
<objectName Type="QString">ReportHeader1</objectName>
|
||||
<geometry height="252" Type="QRect" width="2000" x="50" y="50"/>
|
||||
<children Type="Collection">
|
||||
<item Type="Object" ClassName="TextItem">
|
||||
<objectName Type="QString">TextItem1</objectName>
|
||||
<geometry height="222" Type="QRect" width="816" x="6" y="12"/>
|
||||
<children Type="Collection"/>
|
||||
<zOrder Type="qreal" Value="0"/>
|
||||
<borders Type="enumAndFlags" Value="0"/>
|
||||
<parentName Type="QString">ReportHeader1</parentName>
|
||||
<borderLineSize Type="int" Value="1"/>
|
||||
<itemAlign Type="enumAndFlags" Value="4"/>
|
||||
<itemLocation Type="enumAndFlags" Value="1"/>
|
||||
<stretchToMaxHeight Type="bool" Value="0"/>
|
||||
<content Type="QString">$S{
|
||||
var color = new QColor('#DEB887');
|
||||
var font = new QFont('Times New Roman',26,false,true);
|
||||
THIS.backgroundColor = color;
|
||||
THIS.fontColor = QColor('red');
|
||||
THIS.font = font;
|
||||
|
||||
'Test'}</content>
|
||||
<margin Type="int" Value="4"/>
|
||||
<alignment Type="enumAndFlags" Value="33"/>
|
||||
<autoWidth Type="enumAndFlags" Value="0"/>
|
||||
<autoHeight Type="bool" Value="0"/>
|
||||
<font undeline="0" Type="QFont" pointSize="10" bold="0" italic="0" family="Times New Roman"/>
|
||||
<backgroundOpacity Type="int" Value="100"/>
|
||||
<backgroundMode Type="enumAndFlags" Value="1"/>
|
||||
<backgroundColor Type="QColor" Value="#ffffff"/>
|
||||
<fontColor Type="QColor" Value="#000000"/>
|
||||
<angle Type="enumAndFlags" Value="0"/>
|
||||
<foregroundOpacity Type="int" Value="100"/>
|
||||
<underlines Type="bool" Value="0"/>
|
||||
<adaptFontToSize Type="bool" Value="0"/>
|
||||
<trimValue Type="bool" Value="1"/>
|
||||
<lineSpacing Type="int" Value="1"/>
|
||||
<underlineLineSize Type="int" Value="1"/>
|
||||
</item>
|
||||
<item Type="Object" ClassName="TextItem">
|
||||
<objectName Type="QString">TextItem3</objectName>
|
||||
<geometry height="86" Type="QRect" width="408" x="878" y="44"/>
|
||||
<children Type="Collection"/>
|
||||
<zOrder Type="qreal" Value="0"/>
|
||||
<borders Type="enumAndFlags" Value="0"/>
|
||||
<parentName Type="QString">ReportHeader1</parentName>
|
||||
<borderLineSize Type="int" Value="1"/>
|
||||
<itemAlign Type="enumAndFlags" Value="4"/>
|
||||
<itemLocation Type="enumAndFlags" Value="0"/>
|
||||
<stretchToMaxHeight Type="bool" Value="0"/>
|
||||
<content Type="QString"><p> <span>test1</span> <span style="background:red">test</span> </p></content>
|
||||
<margin Type="int" Value="4"/>
|
||||
<alignment Type="enumAndFlags" Value="33"/>
|
||||
<autoWidth Type="enumAndFlags" Value="0"/>
|
||||
<autoHeight Type="bool" Value="0"/>
|
||||
<font undeline="0" Type="QFont" pointSize="10" bold="0" italic="0" family="Arial"/>
|
||||
<backgroundOpacity Type="int" Value="100"/>
|
||||
<backgroundMode Type="enumAndFlags" Value="1"/>
|
||||
<backgroundColor Type="QColor" Value="#ffffff"/>
|
||||
<fontColor Type="QColor" Value="#000000"/>
|
||||
<angle Type="enumAndFlags" Value="0"/>
|
||||
<foregroundOpacity Type="int" Value="100"/>
|
||||
<underlines Type="bool" Value="0"/>
|
||||
<adaptFontToSize Type="bool" Value="0"/>
|
||||
<trimValue Type="bool" Value="1"/>
|
||||
<lineSpacing Type="int" Value="1"/>
|
||||
<underlineLineSize Type="int" Value="1"/>
|
||||
</item>
|
||||
</children>
|
||||
<zOrder Type="qreal" Value="0"/>
|
||||
<borders Type="enumAndFlags" Value="0"/>
|
||||
<parentName Type="QString">ReportPage1</parentName>
|
||||
<borderLineSize Type="int" Value="1"/>
|
||||
<itemAlign Type="enumAndFlags" Value="4"/>
|
||||
<autoHeight Type="bool" Value="1"/>
|
||||
<bandIndex Type="int" Value="1"/>
|
||||
<keepBottomSpace Type="bool" Value="0"/>
|
||||
<parentBand Type="QString"></parentBand>
|
||||
<backgroundColor Type="QColor" Value="#ffffff"/>
|
||||
<printIfEmpty Type="bool" Value="0"/>
|
||||
<splittable Type="bool" Value="0"/>
|
||||
</item>
|
||||
</children>
|
||||
<zOrder Type="qreal" Value="0"/>
|
||||
<borders Type="enumAndFlags" Value="0"/>
|
||||
<parentName Type="QString"></parentName>
|
||||
<borderLineSize Type="int" Value="1"/>
|
||||
<itemAlign Type="enumAndFlags" Value="4"/>
|
||||
<topMargin Type="int" Value="5"/>
|
||||
<bottomMargin Type="int" Value="5"/>
|
||||
<rightMargin Type="int" Value="5"/>
|
||||
<leftMargin Type="int" Value="5"/>
|
||||
<pageOrientation Type="enumAndFlags" Value="0"/>
|
||||
<pageSize Type="enumAndFlags" Value="0"/>
|
||||
</pageItem>
|
||||
</item>
|
||||
</pages>
|
||||
<datasourcesManager Type="Object" ClassName="LimeReport::DataSourceManager">
|
||||
<objectName Type="QString">datasources</objectName>
|
||||
<connections Type="Collection">
|
||||
<item Type="Object" ClassName="LimeReport::ConnectionDesc">
|
||||
<objectName Type="QString"></objectName>
|
||||
<name Type="QString">test</name>
|
||||
<driver Type="QString">QSQLITE</driver>
|
||||
<databaseName Type="QString">E:/LimeReportGit/lib/report/demo/r1/demo_reports/northwind.db</databaseName>
|
||||
<userName Type="QString"></userName>
|
||||
<password Type="QString" Value=""/>
|
||||
<host Type="QString"></host>
|
||||
<autoconnect Type="bool" Value="0"/>
|
||||
</item>
|
||||
</connections>
|
||||
<queries Type="Collection">
|
||||
<item Type="Object" ClassName="LimeReport::QueryDesc">
|
||||
<objectName Type="QString"></objectName>
|
||||
<queryName Type="QString">customers</queryName>
|
||||
<queryText Type="QString">Select * from customers limit 5</queryText>
|
||||
<connectionName Type="QString">test</connectionName>
|
||||
</item>
|
||||
</queries>
|
||||
<subqueries Type="Collection"/>
|
||||
<subproxies Type="Collection"/>
|
||||
<variables Type="Collection">
|
||||
<item Type="Object" ClassName="LimeReport::VarDesc">
|
||||
<objectName Type="QString"></objectName>
|
||||
<name Type="QString">TestName</name>
|
||||
<value Type="QString">TestValue</value>
|
||||
</item>
|
||||
</variables>
|
||||
</datasourcesManager>
|
||||
<scriptContext Type="Object" ClassName="LimeReport::ScriptEngineContext">
|
||||
<objectName Type="QString"></objectName>
|
||||
<dialogs Type="Collection"/>
|
||||
<initScript Type="QString"></initScript>
|
||||
</scriptContext>
|
||||
</object>
|
||||
</Report>
|
File diff suppressed because one or more lines are too long
BIN
demo_r1/demo_reports/northwind.db
Normal file
BIN
demo_r1/demo_reports/northwind.db
Normal file
Binary file not shown.
Loading…
Reference in New Issue
Block a user