Birt usage summary, birt Summary
Put the report on another server and re-create the Data Source. This is the configuration. Copying the project will not be copied at the same time.
(1) Use Report in EXTJs to refresh reports
Ext. getCmp ("showview"). body. update ("<iframe id = 'showviewframework' src = '" ++ "'> </iframe> ");
Showview is the id of the panel to be refreshed.
(2) Birt report localization (Implementation title bar exists in Chinese form under Tomcat) z download org. eclipse. birt. report. view. nl. jar put under WEB-INF/lib
Place the zh-CN folder under MyEclipse/dropins
Zh-CN includes features and plugins.
(3) Report Table Line Problems
Right-click New style ----> (Name :) TableStyle ----> select Border ---->
Set the line, right-click the column header (each column) and the row header respectively
Select the style you just set for AppleStyle.
(4) Report selection item ----- attribute binding SQL statement
Var query = "select student_name, student_id from student ";
If (params ["student_name"]. value! = "All ")
{
Query + = "where student_name = '" + params ['student _ anme'] + "'";
}
This. query = query;
(5) passing garbled values from birt to Tomcat
Put URIEncoding = "UTF-8" useBodyEncodingForURI = "true" in apache-tomcat/conf/server. xml
<Connector port = "8080" protocol = "HTTP/1.1"
ConnectionTimeout = "20000"
RedirectPort = "8443" type = "regxph" text = "yourobjectname"/>
.
(6) The start date is less than or equal to the end date
The first is the forced type conversion problem. Get the year, month, and day, convert them into strings, and then add them together.
Var dayTime = new Date ();
Year = dayTime. getFullYear (); // 4-digit 2014
Month = (dayTime. getMonth () + 1) <10? "0" + Month: Month;
Day = (dayTime. getDate () <10? "0" + Day: Day;
Year. toString () + Month. toString () + Day. toString ();
Note: In February October 10, 2014, dayTime. getMonth () is used to obtain the date September, so we need to add 1
Var st = Ext. getCmp ('sale _ date'). getValue ();
Deal = (st. getFullYear. toString ()
+ (St. getMonth () + 1 )? <10: "0" + (st. getMonth () + 1) :( st. getMonth () + 1). toSting ()
+ (St. getDate () <10? "0" + st. getDate (): st. getDate (). toString ()
)
(7) SQL statement date between... and .....
Amount> = <=
(8) determine in EXT that the initial date is less than or equal to the end date
There are built-in functions in EXTJs.
In the initial items
Listeners :{
'Select': function (){
Var start = Ext. getCmp ('st'). getValues ();
Ext. getCmp ('et'). setMinValue (start );
Var et = Ext. getCmp ('et'). getValue ();
If (start> et ){
Ext. getCmp ('st'). setValue (start );
}
}
}
In the completed items:
Listeners :{
'Select': function (){
Var start = Ext. getCmp ('st'). getValues ();
Var end = Ext. getCmp ('et'). getValue ();
Ext. getCmp ('et'). setMinValue (start );
If (start> end ){
Ext. getCmp ('st'). setValue (et );
}
}
}
(9) The starting amount in the amount is less than or equal to the ending amount
Add:
If (deal_feel> deal_feez ){
Ext. MessageBox. alert ('hprompt ', 'start amount must be less than or equal to end amount ');
} Else {
Ext. getCmp ("showview "). body. update ("<ifame id = 'showviewframework' src = '" + clientURL + "'width = 100% height = 100%> </iframe> ");
}
(10) Remove the display/export data/print of the title bar.
Modify WebRoot/report-viewer/birt/pages/control/ToolbarFragment. jsp:
(11) fuzzy search
Select name from student where name = ''% '+ ____ +' % '';
(12) There must be spaces between if in SQL statements; otherwise, it is difficult to locate the error.
(13) do not comment out parameters for troubleshooting
(14) Integrate the Report project into the Web Report
In mydeskde, ---> Project Capabilities ----> Add Report Capabilities
(15) Select merge and use the if else statement to edit the report.
(16) when the transaction amount of the String type is used, the filter condition is String num.
(17) add sequence numbers to the report
<1> click in the blank space and go to the Script page, select initialize, and enter var count = 0;
<2> return to the report design page and enter:
Count ++;
Count
<3> Save
(18) Remove the date automatically generated by birt
Click xml Source and delete <page-footer>... </page-footer>.
(19) Use hyperlinks
<1> Create a column to view the var c = 'view' In the hyperlink Script ';
<2>
<3> Hyperlink --> Edit of the Data property Editor
Select Hyperlink Type: Select Drill-through
Step 1: Report Design: select the Report to be linked
Report Parameters: Parameters
Select the where statement attribute
Click in the blank space
Select values
Click OK.
You must have a where statement in the Report to be selected and create the Report Parameters attribute.
(20) Use Data Clubes (multi-dimensional dataset) as a summary table
1. new Data Source
2. new Data Sets
3. new Data Cubes
In Dataset, in Primary dataset, drag and drop the data in Dataset Groups and Summaries in 2 to Groups and Summary Fields at a time.
Click OK.
4. Drag and Drop the Data cube to the Panel
5. Preview
(21) The Cross report is similar to (20)
Add cross-project in sequence in Groups
(22) use charts
Set a name for the X axis. It will be displayed directly without modification.
(23) warning when running birt
In web. xml, change the waring in <param-name> BIRT_VIEWER_LOG_LEVE </param-name> to SEVERE.