BIRT Viewer 2.2 Detailed parameter settings - turn

2010-12-16  来源:本站原创  分类:Web  人气:288 

Detailed parameter settings BIRT Viewer 2.2

2007.08.24
BIRT as a powerful open source reporting tools, the upgrade is also very fast update rate, from 1.0 to 2.0, has been to the latest 2.2.1 version, in terms of function or performance have been greatly improved and expanded. BIRT also provides a standard J2EE implementation component, can be published to support the J2EE application server, web server, you can preview the generated report and other operations. We use the BIRT Viewer in the time it may be more numerous set of parameters, such as foggy, online forums and many people are faced with this problem seems so, but the document does not detail the official incompetence. So I carried on these parameters, a simple summary of the system, hoping to help our BIRT development. These parameters are subject to version 2.2.1, please pay special attention.

1. Servlet model <br /> view the BIRT Viewer that comes with the web.xml file, you can see the following pattern:
frameset ---- use Ajax framework that can display the toolbar, navigation bar and the TOC panel to achieve complex operations, such as paging processing, export data, export report, print and so on. This mode is automatically generated report document file (preview report design file) to a particular directory (the user can specify parameters can also be defined in web.xml in). Use of Ajax, slowly.
run ---- also used Ajax framework, but does not implement the frameset of the complex functions, the report document will not generate temporary files (preview report design file), does not support paging, this is mainly applied in the preview in the BIRT Designer tab where you can support the cancel operation, the other less commonly used. Use of Ajax, slowly.
preview --- did not use Ajax framework, direct calls to the underlying Engine API to the statements render, to generate the report content direct output to the browser. This mode and run mode call is the same Engine API, the only difference is that the run using Ajax for report content, and direct output to the browser preview. If you want to support paging, the user needs to define __page and __pagerange URL parameters, these two parameters will be detailed later. Need of special note is that in these types of preview mode, preview speed is the fastest.
document --- the model is mainly from the report design file to generate report document file. Users can set the URL on to mention generated document files stored in the path (stored in the server side), if not specified, will be directly sent to the client generates rptdocument browser, users can download to the client.
output --- the model is similar to frameset, will be automatically generated report document file (preview report design file), except that the output does not use Ajax, but the contents of the generated report directly to the browser.
parameter --- the model parameters are mainly used to generate a dialog box, users do not generally used, the user can directly provide the JSP Tag - parameterPage to achieve the Parameters dialog box, do not need to directly call.
download --- export report data to CSV format, when you use the frameset toolbar in the export data function, you use this mode.

2. Web.xml the parameter settings in
web.xml file, there are many parameters, the user should proceed according to the needs of their own on these parameters have an in-depth understanding. Now I will do to illustrate these parameters one by one.
[BIRT_VIEWER_LOCALE]
Set the default Locale information, there is no much sense. Locale information because, first of all defined URL __locale to prevail, if not defined, the browser will find the current Locale information, the final definition of the information here will be used.
[BIRT_VIEWER_WORKING_FOLDER]
Set the BIRT Viewer in the working directory. Users can report design or report document files stored in this directory, so that you can use a relative path on the URL to preview the report file. The default is the current root directory.
Currently supports three forms:
--- The relative path of the WEB application relative to the current context root.
Absolute path
--- JAVA system variables can start the server, the definition of JVM system variables, such as java-Dmyworkingfolder = D: / reports. This can be used in the web.xml $ {myworkingfolder} for references.
[BIRT_VIEWER_DOCUMENT_FOLDER]
Set the generated document file storage path. Default documents directory. Path setting Ibid.
[WORKING_FOLDER_ACCESS_ONLY]
Simple control implementation report access restrictions, if set to true, which can only be stored in the working directory preview the report file. The default value is false.
[BIRT_VIEWER_IMAGE_DIR]
Set generated temporary image storage path. The default is the report / images directory. With the working directory path is set.
[BIRT_VIEWER_LOG_DIR]
Set the log file storage path generated. The default is the logs directory. With the working directory path is set.
[BIRT_VIEWER_LOG_LEVEL]
Set the log level, optional values are: ALL | SEVERE | WARNING | INFO | CONFIG | FINE | FINER | FINEST | OFF. Level from high to low.
[BIRT_VIEWER_SCRIPTLIB_DIR]
Set user script lib file storage directory (used in the report Java Event Handler Class). The default value is scriptlib. With the working directory path is set.
[BIRT_RESOURCE_PATH]
Set user resources storage path, these resources include library files, image files. The default is the current root directory. With the working directory path is set.
[BIRT_VIEWER_MAX_ROWS]
Set the maximum number of records to obtain dataset. When the report is mainly used in the design, preview the report if the number of records too, will spend a lot of time, may also cause out of memory problems. The default is no limit.
[BIRT_VIEWER_MAX_CUBE_LEVELS]
Set the maximum query CUBE series. Role similar to the previous parameters. The default is no limit.
[BIRT_VIEWER_CUBE_MEMORY_SIZE]
CUBE set generated, you can write the maximum value in the memory unit is MB. Can improve efficiency, written in the memory than to write directly on the hard drive much faster. But we must pay attention to memory usage issues.
[BIRT_OVERWRITE_DOCUMENT]
This parameter is mainly used for frameset / output mode, they will generate a temporary document files. If set to true, then refresh the page each time, will be re-generated document to document, if false, is not rebuilt, it will only use the original document files to generate the report content.
[BIRT_VIEWER_CONFIG_FILE]
Properties file defines the path, can not be amended.
[BIRT_VIEWER_PRINT_SERVERSIDE]
Toolbar in the frameset, provide a back-end server print function, this parameter can be set to be turned on or off background printing function. The default is open. Optional values: ON and OFF.
[HTML_ENABLE_AGENTSTYLE_ENGINE]
This parameter is passed to the Engine, and is mainly used for a number of CSS compatibility issues. The default value is true.

3. Viewer.properties parameters
viewer.properties document was to define some extensions of the parameters.
# Configurable variable for JSP base href. Please uncomment the below line.
# Base_url = http://127.0.0.1:8080
This setting is mainly used in the case of a proxy server, use proxy server, obtain the URI from the request in not a real URI, need to define here.
# [EXTENSION SETTING]
viewer.extension.html = html
viewer.extension.pdf = pdf
viewer.extension.postscript = ps
viewer.extension.doc = doc
viewer.extension.xls = xls
viewer.extension.ppt = ppt
Define the output of the report file extension, and the format associated.
# [OUTPUT FORMAT LABEL NAME]
viewer.label.html = HTML
viewer.label.pdf = PDF
viewer.label.postscript = PostScript
viewer.label.doc = Word
viewer.label.xls = Excel
viewer.label.ppt = PowerPoint
Export Report dialog box define the report format list, and format associated with such names will be more meaningful.
# [CSV SEPARATOR]
viewer.sep.0 =,
viewer.sep.1 =;
viewer.sep.2 =:
viewer.sep.3 = |
viewer.sep.4 = \ t
Support a variety of CSV delimiter, users can also add a new separator (only support char, rather than string). But need to modify the JSP file and Messages.properties file.
# [LOGGERS]
# "Logger." + Class = level
# If no level is specified or the text "DEFAULT",
# Then the default level from the web.xml will be used
logger.org.eclipse.datatools.connectivity.oda = DEFAULT
logger.org.eclipse.datatools.enablement.oda = DEFAULT
The current log is output through the Engine, if you need other components of the log output, can be defined here. Note that the format must be logger.org ... .... And the component must implement the java the logger.
Can be individually set the log level for this component, if set to DEFAULT, will use the settings in web.xml.

4. URL parameter <br /> Here are some key parameters used in the URL.
"__report"
To preview the rptdesign defined file path, support a relative path and absolute path, relative path is relative to the web.xml defined in the working directory.
"__document"
To preview the rptdocument defined file path, support for relative and absolute paths. Relative path is relative to the web.xml defined in the working directory. At the same time defines the parameters __report and __document to __document as a priority, if not find the document file, the file will be generated from the design document file (frameset / output), or directly to render the design file (preview / run).
"__title"
Define the title of the report shows.
"__showtitle"
Mode is displayed above the title frameset section. true | false
"__toolbar"
Whether to display the frameset mode toolbar. true | false
"__navigationbar"
Whether to display the frameset navigation mode. true | false
"__parameterpage"
Whether or not to force the pop-up dialog box pop-up report parameters. true | false
"__format"
Output report format, the default is html. Now supports: pdf | doc | xls | postscript | ppt
"__locale"
Locale setting information, such as __locale = zh_CN, attention must be added the national language.
"__svg"
Chart output is set to SVG format. true | false
frameset and run mode, will use javascript to determine whether the client browser supports svg, but not effective for all browsers.
"__bookmark"
Set the page to locate the bookmark name.
"__istoc"
Specified location name of the bookmark is not a TOC. The case of true, parameter values will be based on __bookmark book to get a real signature in order to achieve a normal jump. This is mainly used for positioning on a TOC.
"__rtl"
Specifies whether the output HTML pages right to left. Support the reading habits of different countries, such as the Arab countries are right to left.
"__page"
Specifies the output report the number of pages, this depends on the report page design (page break).
"__pagerange"
Specifies the output report page range. If 1,3,5-9.
"__resourceFolder"
Define resource directory path. The BIRT_RESOURCE_PATH with web.xml settings.
"__asattachment"
Whether the attachment to download the report, such as generating PDF or other formats in. The default is inline.
"__masterpage"
Whether to display the master page. true | false
"__designer"
This parameter is mainly used in the BIRT Designer environment, such as the cache will read the report parameters, etc., generally do not. true | false
"__overwrite"
This parameter defines the parameters with the web.xml, but there is a global web.xml setting parameters in the URL can be defined via the setting of this operation.
"__imageID"
Internal parameters for the reference image, usually do not.
"__maxrows"
Set the maximum number of records Dataset query, take note of this setting is global, will affect all subsequent requests. Mainly used in BIRT Designer, increasing the efficiency of report design. The BIRT_VIEWER_MAX_ROWS with web.xml settings.
"__maxlevels"
Set the query to obtain the maximum Cube series. With the above __maxrows, also mainly for BIRT Designer design environment.
The BIRT_VIEWER_MAX_CUBE_LEVELS with web.xml settings.
"__cubememsize"
BIRT_VIEWER_CUBE_MEMORY_SIZE the same parameters in web.xml.
"__instanceid"
If you look at BIRT output HTML code, you can see there will be a number of HTML Element iid properties (eg, table), this is instanceid. This is the Engine dynamically generated, can not be predicted in advance. HTML code, so you need to get this value. This parameter is mainly to get reportlet (statement pieces, such as a report only to the output Table or a Chart). Need to meet the __isreportlet parameters.
"__isreportlet"
Specify the current output is not a reportlet. true | false
Special Note: In order to output a reportlet, BIRT now provides two ways.
1. In order to output the object (table or Chart) to define a bookmark, then you can use the following URL output reportlet.
http://localhost:8080/birt/frameset?__report=test.rptdesign&__bookmark=bk&__isreportlet=true
2. By instanceid, but this value can not be predicted in advance, the need to preview an HTML code from the get after. Then use the following URL output reportlet.
http://localhost:8080/birt/output?__report=test.rptdesign&__instanceid=iid&__isreportlet=true
There is to note that, reportlet only supports document document. If the design document is a preview to the output reportlet, he must use the frameset / output (automatically generated document file).
"__clean"
BIRT in the number of temporary files are generated and the session-related, such as the temporary document files, and image files. These files can also be managed through the session, this parameter specifies whether the session timeout time to remove these temporary files. The default value is true.
true | false
"__dpi"
Chart of the dpi can set the output value.
"__fittopage"
This parameter is only temporary PDF and postscript format statements effectively, specify whether to adjust to fit the page.
"__pagebreakonly"
This parameter is only temporary PDF and postscript format report on the effective use of BIRT reports specify whether only the default paging settings. This parameter is used in conjunction with the general needs and __fittopage.
"__agentstyle"
HTML_ENABLE_AGENTSTYLE_ENGINE the same parameters in web.xml.
========================== Background parameters ================== Server-side printing ========
"__action"
Define the implementation of the directive name. Currently only supports the print command to print for the back-end server.
"__printer"
Background printer name.
"__printer_copies"
Parameters corresponding to the number of copies the printer.
"__printer_collate"
Parameters of the corresponding duplex printer.
"__printer_duplex"
Duplex parameters corresponding to the printer.
"__printer_mode"
Model parameters corresponding to the printer. Monochrome or color.
"__printer_pagesize"
Parameters of the corresponding matrix printer. Such as the A4.
================================================== =============================
Parameters ==================== ========================== JSP Tag ===============
"__id"
viewer's ID number, this parameter is generally not used, mainly for the JSP Tag, such as a page into two BIRT Viewer, and file a report with the preview, this time because in a following session, so the need to use a different ID to generate a separate document files. Bu Zhiyu generates a single document file, giving rise to conflict.
"__pattern"
Used in the JSP Tag to specify the names submitted by the Servlet Pattern, such as the frameset / output / run / preview and so on. Parameter model is mainly used for generating parameter dialog using the dialog box.
"__target"
You can specify the name submitted to the window. Such as _blank, _self and so on.
"__nocache"
Specifies whether the cache will use the report parameter values, the values of these cache files are normally saved in rptconfig. In the design and preview the report when the report can save the input parameters. When this is not commonly used in the runtime.
================================================== =============================
========================== ===================== Report parameters related ==============
"__isnull"
Specifies the report parameter is null the current value of the parameter name followed by the report.
"__islocale"
Specifies the report parameter value is the current and the Locale / Format related, we must use a specific Locale / Format Conversion parameter values (from the String into a Object). Format __islocale = paramName.
"__isdisplay__"
DisplayText report parameters specified value, the format __isdisplay__paramName = displayText. Cited in a report displayText value, such as params ["p1"]. DisplayText.
When uploading displayText in the following URL (the report parameter called p1):
& __isdisplay__p1 = Hello
"__islocale__"
The report parameter value is specified Locale / Format related, but given the parameter values. Format __islocale__paramName = paramValue.
================================================== =============================
===================== ========================== Export Data parameters ==============
"__exportEncoding"
This parameter is used to export data to CSV, you can specify the exported file encoding, such as GBK or GB2312.
"__sep"
This parameter is used to export data to CSV, you can specify the data separator, such as commas, colons and so on.
"__exportdatatype"
This parameter is used to export data to CSV, you can specify whether the output data type. true | false
"ResultSetName"
To export the data record set name.
"SelectedColumnNumber"
To export a number of fields.
"SelectedColumn"
To export the data field names.
You can view BirtSimpleExportDataDialog.js specific file.
================================================== ===========

5. Other parameters
There is also the BIRT Viewer parameters of a more specific application, is that users can customize their own servlet, and then pass the object to the Application Context, in a report to the Application Context from the global to get to this object.
There are two default-related parameters, AppContextKey and AppContextValue. Here is a simple example.
public void service (HttpServletRequest request,
HttpServletResponse response) throws ServletException,
IOException, BirtException
{
String myKeyName = "mykey";
List values = new ArrayList ();
values.add ("hello");
values.add (new Date ());
request.setAttribute ("AppContextKey", myKeyName);
request.setAttribute ("AppContextValue", values);
RequestDispatcher rd = request.getRequestDispatcher ("/ frameset");
rd.include (request, response);
}<!--++ Plugin_code qcomic begin -> <!--++ plugin_code qcomic end ->

Transfer from: http://topic.csdn.net/u/20090802/18/89dca677-58ed-4fa5-bcc7-b2149607daa3.html

相关文章
  • BIRT Viewer 2.2 Detailed parameter settings - turn 2010-12-16

    Detailed parameter settings BIRT Viewer 2.2 2007.08.24 BIRT as a powerful open source reporting tools, the upgrade is also very fast update rate, from 1.0 to 2.0, has been to the latest 2.2.1 version, in terms of function or performance have been gre

  • Oracle Database REMOTE_LOGIN_PASSWORDFILE parameter settings 2010-03-17

    About Oracle Database REMOTE_LOGIN_PASSWORDFILE parameter settings Oracle utility orapwd command can be used to create the password file, the command's parameters are three: C: \> orapwd Usage: orapwd file = <fname> password = <password> en

  • android software parameter settings stored and read attached source 2010-04-28

    Data stored in a different way. Sharedperferences The parameters used to save the software settings, such as uc browser settings are displayed in the picture wap page. If it is generally used windows software ini file to save, if it is j2ee project w

  • In the jsp to display pdf | | website directly open PDF in IE to display pdf documents and parameter settings 2010-09-12

    align = center] in jsp to display pdf | | Web directly open the PDF in IE to display pdf documents and parameter settings [/ align] A: In the jsp to display pdf <%@ page language="java" import="java.util.*,java.io.*" pageEncoding=&q

  • Hibernate's HQL in parameter settings in 2011-04-28

    I usually use Hibernate, because between tables are not accustomed to associate, it is usually used when the HQL query in statement. The most common situation I have two kinds: 1, in a child after the query, such as FROM A WHERE A. ID IN (SELECT B. A

  • MOTO702 Camera parameter settings on the camera issue on 2010-10-29

    Custom photo Android (HTC, MOTO702) Note: Camera I have been abstracted (factory) /* * Copyright (C) 2010 More Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the Lic

  • JavaScript using the cookie, parameter settings, read, write, delete function 2010-04-04

    Set cookie Each cookie is a name / value pair, following a string can be assigned to document.cookie: document.cookie = "userId = 828"; If we were to store multiple name / value pairs, you can use a semicolon plus a space (;) separated, for exam

  • JavaScript using the cookie, parameter settings, notes; read, write, delete function 2010-04-13

    cookie Overview In the previous section, the framework has been used to store a constant shopping column data, and product display page is constantly changing, although it can achieve the functions of a simulated global variable, but not strict. For

  • Teach you in the "Run" to open common system settings (turn) 2010-10-12

    Check the Windows version winver --------- wmimgmt.msc---- open the windows management architecture (WMI) wupdmgr -------- windows update wscript -------- windows Script Host Settings write ---------- WordPad winmsd --------- System Information wiaac

  • Detailed TOP command (turn) 2011-01-14

    Detailed TOP command Key words: TOP command Detailed Detailed TOP command Transfer from: http://tolywang.itpub.net/post/48/130884 top command top command and the fundamental role of ps command is the same, display systems and other conditions the cur

  • Teach you the "Run" to open commonly used system settings (turn) 2010-10-12

    winver --------- check the version of Windows wmimgmt.msc---- open the windows management architecture (WMI) wupdmgr -------- windows update wscript -------- windows Script Host Settings write ---------- WordPad winmsd --------- System Information wi

  • Wireless bridge router settings (turn) 2011-03-09

    Hands-on teaching you set up a wireless router, called bridge mode (turn) This evening at home, get a bit inside the wireless router bridge mode has just started to figure out that their own how to set bridge mode. Baidu to find a lot to set the abov

  • websphere JVM parameter settings (support Chinese) 2008-12-19

    In the websphere console. Applications / server1 / process definition / java Virtual Machine / Universal jvm parameter setting / -Duser.language = zh-Duser.region = CN-Ddefault.client.encoding = GBK-Dclient.encoding.override = GBK-Dfile.encoding = GB

  • Chinese tomcat url parameter question (turn) 2009-11-04

    tomcat url parameters of the problem in Chinese Tomcat url parameters of the problem in Chinese reference: http://www.javaworld.com.tw/jute/post/view?bid=9&id=44042 Probably aware that there are two ways to pass parameters, depending on the request m

  • -Jar classpath parameter settings when running the application methods (transfer) 2010-08-12

    Reproduced, the source is unknown a When using java-jar yourJarExe.jar to run a packaged application through the time, you will find how to set-classpath parameter the application can not find the appropriate third-party class, reported ClassNotFound

  • IDEA IDEA 9 shortcut keys utf-8 encoding parameter settings to set encoding settings configuration 2010-09-25

    1. IDEA memory optimization to look at your configuration and configure the machine itself. \ IntelliJ IDEA 8 \ bin \ idea.exe.vmoptions ----------------------------------------- -Xms64m -Xmx256m -XX: MaxPermSize = 92m -Ea -Server -Dsun.awt.keepWorki

  • JVM - parameter settings 2011-01-03

    1. Set JVM parameters in the eclipse open eclipse-Window - Preferences-Java-installed JRE (in the current development environment for running java programs are effective, which is running in the eclipse java program) to edit the current use of the JR

  • Detailed VI command (turn) 2011-01-12

    This article describes some linux vi commands using shortcut keys, very use value. I hope for your help. Cursor control commands Commands move the cursor h ^ h or a character to the left j or ^ j or ^ n to move down one line k or move up one line ^ p

  • oracle reference system parameter settings 2010-07-22

    1, the operating system >> 1, patch >>???? >> 2. Modify system parameters >> >> # Cp / etc / system / etc/system.lei.090107 >> # Vi / etc / system >> - In the final with >> >> Set semsys: seminfo_semmn

  • Eclipse obfuscation of the parameter settings 2010-09-08

    Ago, the company and SP partner had provided a packaging bag, asked not to be confused with their package. At first, I also followed the practice before, but the confusion to break out of the bag, leaving only the external part of the package approac