Part 1: Use the IREPORT to make a detailed process (in the Windows environment)
Tip: In some sectors, the pictures in the article can not see, it is recommended to browse my blog: http://blog.9cbs.net/jemlee2002/ The article will involve 3 aspects:
Part 1: Use the IREPORT to make a detailed process (in the Windows environment)
Part II: Develop fat client report applications using JasperReport as a report control
Part III: Develop Web Report Applications using JasperReport as a report control
1 Introduction
You can search for many articles that use Ireport and JasperReport to achieve various report tasks, but I think there is very little (almost no) to make a more detailed introduction how to use the whole process of generating reports using Ireport, I have seen The basic idea of the article is a wide coverage. Many of the content is mentioned. It is not the development personnel to have time to realize each practice. If there is more detailed information, it is not a pleasure. For this thought, I hope that I can help those friends who use Ireport and JasperReport friends, especially those who need to realize reports, hoping to bring you a little help. This article is not introduced for every detail of Ireport, and each detail of Ireport can refer to the information of the IREPORT website, but it may cost some fees. General users don't have to pay these fees, because we care about how we need reports, rather than expanding Ireport, such as making Ireport plugins.
2, prepare
2.1, download JDK
Address: http://www.sun.com, select 1.3 or higher version (recommended 1.4.2 or higher version), install JDK, the default installation can be installed; if your system has installed JDK or JRE 省略 省One step, verify that the JDK or whether JRE can run by default, in the command line (CMD), 打:: 打 如果 如果: USAGE: Java ............................................................................................................................. . Otherwise, configuration must be configured, the configuration information is as follows, in Windows environment variable settings:
Path: Add "; Java installation directory" at the end
Java_Home: "Java installation directory"
ClassPath: "Java installation directory / bin" Re-authentication JDK or if the JRE can run in any location of CMD
2.2, download IREPORT
Address: http://ireport.sourceforge.net/, select 0.3.2 version (Recommended version before publishing) Unzip IREPORT in any directory, unzipped files with an Ireport.bat, by double-click, over 30 Seconds If you can pop up an IREPORT's main form indicates that your system can run IREPORT, if you cannot pop up the main form, it is generally the first step error, or not completed.
2.3, prepare the database
Ireport supports most of the database as long as the database can provide a JDBC drive. This article provides a MySQL database as an example, but the article will finally refer to how to configure Oracle support. For the installation and establishment of the database, please refer to other information. This article assumes that mysql has been installed and there are some tables already in MySQL, and the data is already available in the table.
* [Special Tips] MySQL version requires the use of the MySQL driver with the lib directory under the Ireport folder, the author recommends to http://dev.mysql.com/downloads/ download the latest version of MySQL drive, so it will not It should be a JDBC drive to support the database support. 2.4, start mysql service
Determine the character set used by mysql is an important issue, especially for friends who need Chinese reports, should pay special attention to this problem.
2.5, determine business logic
That is, what kind of report tasks are hoped to do. A detailed description of the report that needs to be implemented, this is a business condition that implements the report, otherwise the most of the tasks are meaningless. This article uses a bug record table as an example, and the example of this article is a BUG quantity statist for making a module packet in the project and project.
3, start configuring basic information
3.1 Configuring the language and report output path used by the interface
The first entry system is an English environment, and the basic information dialog box configures the IREPORT system can be enabled by [Tools]-[Options]. Select the interface language you need in the "Language" option, such as "Chinese-China". Click the [Apply] button to create a whole interface throughout the interface.
In the basic information dialog box of the IREPORT system, select [Compile] Label, then determine your report output path, you can select "Compile in Report Data Folders" to select the tick, so that the report's JRXML file and Jasper file are placed in the same file. folder. (You will ask you to save the JRXML file to the specified folder when new reports)
Part of the parameters in the [options] option cannot work directly by the [Apply] button, such as "Look & Feel", must restart IREPORT to work. I don't know if Ireport's bug? ! Finally [archive].
3.2, configure the database connection of mysql
This is the interface between the report and the database. You can turn on the Configuration List dialog by [Data Source] - [Connection / Data Source], Ireport will record all connections previously used, unless you manually remove these connections, all connections will exist in the Connection / Data Source Configuration List dialog box. No matter whether it is indeed available.
Click [New] to enter the configuration new connection interface, as shown:
Fill in the information required for JDBC connections, Ireport supports multiple data source connections, as shown:
This article is only introduced
Database JDBC Connection
Connecting methods, this is also the most common way, especially in embedded report applications. All information is filled in and tested, and finally, it is to save information. Go back to the configuration list dialog, close the dialog, complete
Mysql
database
JDBC
Connection configuration. Tip: If you need a report to provide Chinese content display can be worn in the JDBC URL, such as input: jdbc: mysql: // localhost / subrdb? User = **** & password = **** & useunicode = true & characterencoding = GB2312 where ** ** replace the user-friendly password for the database.
3.3, the basic configuration of the newly built a daily report
Click the first tool "New Report" in the toolbar, create a new report, enter some parameters of the report name, and definition report, such as the name input bugsrpt (example is a BUG quantity statistics for a project), click [more ... .】 Select the label, fill in or select XML encoding, which is related to the selection of the character set of your XML support, please select as needed, such as your XML file support Chinese, then enter GB2312 or GBK, then click [OK] button, enter the design interface of the report. * [Special Tips] Please save the report before starting any work. At this time, the IREPORT prompts the location of the report, and then enter BugSrpt as the name after selecting the appropriate location.
3.4, define the font type and its properties that may be required
The content of a report is five flowers, there are heads, field names, data, other variable information, etc., if this information is consistent font and attribute (such as color), then the entire report is dead, it is very rough. We can define the properties of the elements when adding each element to the report, but that is a time-time job, if you can predefine some of the combinations of properties, you only need to select one of these combinations when you create each element. , Save time and fast.
Click [Preview] - [Report Font] to turn on the Custom Combination dialog. Click [New] to enter the definition dialog box, as shown: Fill in the information and steps in the order in the figure, define "Head", "Group", "Column", "Column", "Statistical Calculation", " Other "The font combination in the like. Pay attention to the selection of the embedded fonts of the PDF, if you need a report, you will make a choice for this.
4, understand a few important concepts
4.1, Ireport's Output Format
The preview output format of IREPORT can support the following:
PDF, HTML, CSV, Java2D, Excel, Pure Text, JRVIEWER, the most commonly used PDF, JRVIEWER. This article is an example of JRVIEWER. JRVIEWER is the output format that is directly used as a report in a C / S mode, and outputs it under the JFrame frame. JasperReport provides a default JRViewer output class.
4.2 Dynamic object variables, parameters, fields of reports
In the process of using IREPOR, you will encounter these content related to variables, parameters, fields, and we want to introduce the use and significance of these objects:
Field (Fields): It is the database content that is available in the database and wants to appear in the report. For example, all values of an ID. $ F {filedsname}
• Parameters: This is your application needs to provide the entrance to the report, such as the condition value of the WHERE statement when you want to interpret it, then parameters can be used. $ P {parametersAme}
• Variables: This is the performance of some logical operations in the report, such as statistics. $ V {variablesname}
The definition format of each object is as follows, for example, a variable is defined, then the expression is written to $ V {variablesname}, the name of this variable is the name of this variable. The use method will be described in detail later.
4.3, compile, static operation, dynamic operation
JasperReport is required to run a Jasper suffix file, the compilation process is actually a file that generates the JRXML suffix to the Jasper suffix. (Can refer to the operation principle of JasperReport) Static operation and dynamic running is relative, the latter runs with data source, such as the database running. The former is a static text run, and the data source is independent. If there is an object related to the data source in the report, it is displayed in NULL.
4.4, report structure
The structure of a report is roughly several parts: Title, Pageheader, Columnhead, Detial, ColumnFooter, Pagefooter, Summary, Groupheader, Groupfooter.
· Title: Each statement generally has a name, such as the ××× sales report, Title is the best place to put this name, of course, you can still put it on the right place as needed.
· PageHeader: Some public elements of the report, such as page numbers, creating time, creative, and other information are placed here is a better choice.
· ColumnHeader: Unconscious here is the name of the list, remember not column data.
· DETIAL: Place data that needs to be loop, such as sales record data.
· ColumnFooter: Place the statistical calculation value of the column level or the description of the column.
• PageFooter: Place the statistical value of the page level or a page of the page.
Summary: There may be a statistical value that may need to be a few pages (your report may have a few pages). For example, 50 sales records occupy 3 pages, then the statistical value of these statistics records is Summary.
· GROUPHEADER: The content of each table may need to divide content and calculation content according to a certain property. For example, you want to display sales records separately in units in units, then you can define a group (definition reference for group), Groupheader is the best place to place a group or group logo.
· GroupFooter: Statistics or description of the group
5, add objects to the table
5.1, add static objects
You can add static objects through the toolbar, such as text, click [T], then click on the blank of the report, so you can add a static object to the report, then drag the border of the object, make it the size, Double-click the property configuration dialog box of the object pop-up, switch to [font] label, in the "Report Font" Combox, "Header" font, (the header font is the custom property combination provided by the previous article), then switch to [Static TEXT] Label, modify the name of the header, such as "BUG Statistics" or "Sales Record Statistics Table", etc. related to business. Add a picture, please click [Image Tool], followed by TEXT. Other static object operations are similar.
5.2, use connection
Remember the "Section 3.2 of the previous article" Configuring the MYSQL database connection? Here we will use the previous configuration. Select menu [create] - [Use Dynamic Connection] Turn on an optional dynamic connection, select any one of your needs, the last [OK], save the report, so your report uses this connection.
* [Special Tips] This connection must be consistent with the connection used in the future application.
5.3, create a SQL query statement
The SQL statement is a language that works with any RDBMS. External users need to use these language management to maintain data in the database, the same, Ireport also needs to do this, we need to provide the language-SQL statement of the query database, this, Ireport This SQL statement gains data, then organizes to the report and appears to meet the needs of users. Enter the SQL Enter dialog box through the menu [Data Source] - [Report Query] and enter the SQL statement in [Report SQL Query] Label. Still manually obtain the available fields for the database table. Click [OK] to save the report.
5.4, create a field dynamic object
The dynamic objects of the report have variables, parameters, fields, foregoing mentioned their concept, here will explain how to use it.
Fields are also the fields in the database, enable the list of fields through the menu [Preview] - [Report Field] (the corresponding tool can be found on the toolbar), you can drag and drop any field to any location of the report, such as drag some bug Content fields to the DETIAL segment (notified, just know the principle).
5.5, create a group
The group is a very important concept, a report can be multiple groups, each group is marked with a keyword, such as wishing the BUG statistics, based on the project (or product). Then you can set a group of item marks. As shown in the figure: The parameter setting of the group can be understood by the interface, the most important thing is "group expression", which is the first field name that must be entered and exists, "Proname" in this article is [Field] An element. Establish other group objects in this class. Each of the groups will appear on the interface of the report, as shown: As for their meaning and accommodation content reference "4.4 Report Structure", they are the first end. (Header and Footer)
5.6, add parameters and use parameters
We reiterate the role of parameters, generally requiring the outside world to provide parameters to the entrance to the report, such as the expression of the WHERE condition of the SQL statement. Enable the Report Parameter List dialog box (Report Parameters) to turn on the Report Parameter List dialog (the corresponding tool can be found on the toolbar). As shown: Enter the name and other parameters. [Ok], save the report.
So how do you use it? Open the SQL statement dialog, refer to "5.3 Creating SQL Query Statements", this time the SQL statement should be: select *
From bugs where proname = $ p {projectname} ORDER BY PRONAME, ModulenAme Note that the red body part is used to apply the variable just defined to the SQL statement. This way when the application provides parameters, as long as the report interpretation engine can replace these variables and then execute the SQL statement, the parameter setting code is provided when the second part is mentioned.
5.7, add variables and use variables
Definition of variables Similar parameters, open the report variable list dialog box by [Preview] - [Report Variable] (Toolbar), as shown, the variable defined in the figure is: Define a bug counter, The data type is java.lang.integer, using the count function for statistics Tester, the scope is the module group, that is, the BUG of the statistical module. The Tester can change to other non-group objects, such as Proname is a group object, do not use the statistical parameters here. The above is provided with a custom variable. In fact, the IREPORT system also provides variables that provide some embedding, such as page numbers, line records, and the like, which are used depending on the needs. 6, the final report
6.1, after completion
6.2, preview report
Click on the dynamic running report, as shown in the figure: 7, summary The first part only introduces how to make a dynamic data report, in fact IReport provides a lot of features for developers, such as histogram, pie chart, and various shapes Graphics, etc. to meet the needs of most applications of enterprises. I hope you can continue to study and make full use. About using the Oracle database as a data source: Provides the JDBC driver corresponding to the Oracle version used, place the drive in the lib directory of the IREPORT, configuring the JDBC connection of the database: Other operations are basically no different. 8. Supplemental content 8.1, implement the form to add the necessary lines in DETIAL to implement the table, with ColumnFooter, ColumnHeader, Detial These 3 positions, you can try the location of the line!
Copyright Notice: 9CBS is this BLOG managed service provider. If this paper involves copyright issues, 9CBS does not assume relevant responsibilities, please contact the copyright owner directly with the article Author.
Posted on October 05, 2004 11:24 AM
Feedback # Reply: The first part: Use the IREPORT to make a detailed process (Windows environment) 2004-10-05 12:11 PM Laokang
ITS Good!
# 回: Part 1: Use the Ireport to make a detailed process (Windows environment) 2004-10-09 5:01 PM Jem.lee
If there is any appearance: Compiling to file ... ./businessrpt.jasper -> ./businessrpt.java errors compiling ./businessrpt.jasper! Java.io.iOException: createProcess: javac -classpath. ;; ./ Classes / ;. . . . . . . . . . . . . . . . . Similar compilation errors, typically a JDK path configuration problem. Can reinstall JDK or check the JDK path configuration
# 回: Part 1: Detailed procedure for making reports using Ireport (Windows Environment) 2004-10-09 5:07 PM Nanjia
Excuse me, if there is any good way to generate the form line.
# 回: Part 1: Detailed procedures for making reports using Ireport (Windows Environment) 2004-10-09 9:53 PM Jem.lee
Yes, look at my last supplement example
# 回: Part 1: Detailed procedures for making reports using IREPORT (in Windows Environment) 2004-10-10 8:11 PM Sunny
Can you move "Module BUG Statistics:" to Grouphead Location Display # Reply: The first part: Use the IREPORT to make a report (Windows Environment) 2004-10-11 9:18 AM Jem.lee
the same
# 回: Part 1: Detailed procedures for making reports using IREPORT (Windows Environment) 2004-10-17 7:05 PM Tomuno
good
# Excuse me! 2004-10-18 9:51 AM database connection success, enter the SQL statement, an error!
java.io.UTFDataFormatException:. Invalid byte 1 of 1-byte UTF-8 sequence Zoom changed to50.050.0 Exception occurred during event dispatching: java.lang.ArrayIndexOutOfBoundsException: Array index out of range: 14 at java.util.Vector.get (Vector.java:713) at javax.swing.plaf.basic.BasicDirectoryModel.getElementAt (BasicDirector yModel.java:143) at javax.swing.JList.getSelectedValues (JList.java:1776) at javax.swing.plaf.metal .MetalFileChooserUI.setFileSelected (MetalFileCh ooserUI.java:1200) at javax.swing.plaf.metal.MetalFileChooserUI $ DelayedSelectionUpdater.run (MetalFileChooserUI.java:904) at java.awt.event.InvocationEvent.dispatch (InvocationEvent.java:178) at java.awt.EventQueue.dispatchEvent (EventQueue.java:448) at java.awt.EventDispatchThread.pumpOneEventForHierarchy (EventDispatchTh read.java:197) at java.awt.EventDispatchThread.pumpEventsForHierarchy (EventDispatchThre ad.java:150) at java. AWT.EventDispatchthread.pumpeventsforhierarchy (EventDispatchthre Ad.java:140) At java.awt.dialog .show (Dialog.java:538) at javax.swing.JFileChooser.showDialog (JFileChooser.java:696) at javax.swing.JFileChooser.showOpenDialog (JFileChooser.java:599) at it.businesslogic.ireport.gui.MainFrame. jMenuItemOpenActionPerformed (M ainFrame.java:4546) at it.businesslogic.ireport.gui.MainFrame.jButtonOpenActionPerformed (Mai nFrame.java:4367) at it.businesslogic.ireport.gui.MainFrame.access $ 1600 (MainFrame.java:53) at it.businesslogic.ireport.gui.MainFrame $ 17.actionPerformed (MainFrame.j ava: 1106) at javax.swing.AbstractButton.fireActionPerformed (AbstractButton.java:17 64) at javax.swing.AbstractButton $ ForwardActionEvents.actionPerformed (abstra ctButton. Java: 1817) at javax.swing.defaultButtonModel.fireActionPerformed (DefaultButtonModel .java:
419) at javax.swing.DefaultButtonModel.setPressed (DefaultButtonModel.java:257) at javax.swing.plaf.basic.BasicButtonListener.mouseReleased (BasicButtonL istener.java:245) at java.awt.AWTEventMulticaster.mouseReleased (AWTEventMulticaster.java: 2 27) at java.awt.Component.processMouseEvent (Component.java:5134) at java.awt.Component.processEvent (Component.java:4931) at java.awt.Container.processEvent (Container.java:1566) at java .awt.Component.dispatchEventImpl (Component.java:3639) at java.awt.Container.dispatchEventImpl (Container.java:1623) at java.awt.Component.dispatchEvent (Component.java:3480) at java.awt.LightweightDispatcher. retargetMouseEvent (Container.java:3450) at java.awt.LightweightDispatcher.processMouseEvent (Container.java:3165) at java.awt.LightweightDispatcher.dispatchEvent (Container.java:3095) at java.awt.Container.dispatchEventImpl (Container.java : 1609) At java.awt.window.dispatcheventimpl (window.java: 1590) at java.awt.component.dispatchevent (Component.java: 3480) AT java.aw t.EventQueue.dispatchEvent (EventQueue.java:450) at java.awt.EventDispatchThread.pumpOneEventForHierarchy (EventDispatchTh read.java:197) at java.awt.EventDispatchThread.pumpEventsForHierarchy (EventDispatchThre ad.java:150) at java.awt.EventDispatchThread .pumpEvents (EventDispatchThread.java:144) at java.awt.EventDispatchThread.pumpEvents (EventDispatchThread.java:136) at java.awt.EventDispatchThread.run (EventDispatchThread.java:99) Exception occurred during event dispatching: java.lang.ArrayIndexOutOfBoundsException : Array Index Out of Range: 14 at java.util.vector.get (Vector.java: 713) at javax.swing.plaf.basic.basicDirectorymodel.getlementat (BasicDirector Ymodel.java: 143) at javax.swing.jlist. GetSelectedVALUES (JList.java:
1776) at javax.swing.plaf.metal.MetalFileChooserUI $ 11.valueChanged (MetalFileCh ooserUI.java:925) at javax.swing.JList.fireSelectionValueChanged (JList.java:1318) at javax.swing.JList $ ListSelectionHandler.valueChanged (JList .java: 1332) at javax.swing.DefaultListSelectionModel.fireValueChanged (DefaultListSel ectionModel.java:187) at javax.swing.DefaultListSelectionModel.fireValueChanged (DefaultListSel ectionModel.java:157) at javax.swing.DefaultListSelectionModel.setValueIsAdjusting (DefaultList SelectionModel.java : 554) at javax.swing.JList.setValueIsAdjusting (JList.java:1672) at javax.swing.plaf.basic.BasicListUI $ MouseInputHandler.mouseReleased (Ba sicListUI.java:1370) at java.awt.AWTEventMulticaster.mouseReleased (AWTEventMulticaster .java: 2 28) at java.awt.AWTEventMulticaster.mouseReleased (AWTEventMulticaster.java:2 27) at java.awt.AWTEventMulticaster.mouseReleased (AWTEventMulticaster.java:2 27) at java.awt.Component.processMouseEvent (Component.java : 5134) AT java.awt.component.processEvent ( Component.java:4931) at java.awt.Container.processEvent (Container.java:1566) at java.awt.Component.dispatchEventImpl (Component.java:3639) at java.awt.Container.dispatchEventImpl (Container.java:1623 ) at java.awt.Component.dispatchEvent (Component.java:3480) at java.awt.LightweightDispatcher.retargetMouseEvent (Container.java:3450) at java.awt.LightweightDispatcher.processMouseEvent (Container.java:3165) at java.awt .LightweightDispatcher.dispatchEvent (Container.java:3095) at java.awt.Container.dispatchEventImpl (Container.java:1609) at java.awt.Window.dispatchEventImpl (Window.java:1590) at java.awt.Component.dispatchEvent ( Component.java: 3480) AT java.awt.eventqueue.dispatchevent (EventQueue.java:
450) at java.awt.EventDispatchThread.pumpOneEventForHierarchy (EventDispatchTh read.java:197) at java.awt.EventDispatchThread.pumpEventsForHierarchy (EventDispatchThre ad.java:150) at java.awt.EventDispatchThread.pumpEventsForHierarchy (EventDispatchThre ad.java:140) at java.awt.Dialog.show (Dialog.java:538) at javax.swing.JFileChooser.showDialog (JFileChooser.java:696) at javax.swing.JFileChooser.showOpenDialog (JFileChooser.java:599) at it.businesslogic. ireport.gui.MainFrame.jMenuItemOpenActionPerformed (M ainFrame.java:4546) at it.businesslogic.ireport.gui.MainFrame.jButtonOpenActionPerformed (Mai nFrame.java:4367) at it.businesslogic.ireport.gui.MainFrame.access $ 1600 (MainFrame .java: 53) at it.businesslogic.ireport.gui.MainFrame $ 17.actionPerformed (MainFrame.j ava: 1106) at javax.swing.AbstractButton.fireActionPerformed (AbstractButton.java:17 64) at javax.swing.AbstractButton $ ForwardActionEvents .Antialformed (Abstra ctbutton.java:1817) at javax.swing.defaultButtonModel.fireActionPerformed (DE faultButtonModel .java: 419) at javax.swing.DefaultButtonModel.setPressed (DefaultButtonModel.java:257) at javax.swing.plaf.basic.BasicButtonListener.mouseReleased (BasicButtonL istener.java:245) at java.awt.AWTEventMulticaster.mouseReleased ( AWTEventMulticaster.java:2 27) at java.awt.Component.processMouseEvent (Component.java:5134) at java.awt.Component.processEvent (Component.java:4931) at java.awt.Container.processEvent (Container.java: 1566) at java.awt.Component.dispatchEventImpl (Component.java:3639) at java.awt.Container.dispatchEventImpl (Container.java:1623) at java.awt.Component.dispatchEvent (Component.java:3480) at java. AWT.LightWeightdispatcher. RetargetMouseEvent (Container.java:
3450) at java.awt.LightweightDispatcher.processMouseEvent (Container.java:3165) at java.awt.LightweightDispatcher.dispatchEvent (Container.java:3095) at java.awt.Container.dispatchEventImpl (Container.java:1609) at java. awt.Window.dispatchEventImpl (Window.java:1590) at java.awt.Component.dispatchEvent (Component.java:3480) at java.awt.EventQueue.dispatchEvent (EventQueue.java:450) at java.awt.EventDispatchThread.pumpOneEventForHierarchy (EventDispatchTh read.java:197) at java.awt.EventDispatchThread.pumpEventsForHierarchy (EventDispatchThre ad.java:150) at java.awt.EventDispatchThread.pumpEvents (EventDispatchThread.java:144) at java.awt.EventDispatchThread.pumpEvents (EventDispatchThread. Java: 136) at java.awt.eventdispatchthread.run (EventDispatchthread.java:99) # Supplement: 2004-10-18 9:54 AM I use the Oracle database, the corresponding SQL statement is also successful in PL / SQL!
Thank you! . . I am a beginner!
# 回: Part 1: Detailed process for making reports using Ireport (in Windows Environment) 2004-10-18 5:32 PM Jem.lee
Your problem estimate is the property configuration selection character set problem, change to other character sets, such as GB2312 or GBK, compile test.
# 回: Part 1: Detailed procedures for making reports using Ireport (in Windows Environment) 2004-10-18 5:35 PM Jem.lee
Your problem estimate is the property configuration selection character set problem, change to other character sets, such as GB2312 or GBK, compile test.
# Continue to ask! 2004-10-19 9:42 AM a lot of questions? !
Version: IREPORT 0.3.2 JDK 1.4 1. Java.io.utfdataFormatexception: Invalid Byte 1 of 1-byte UTF-8 SEQUENCE. This exception is in a startup Ireport.bat! 2. Why do the database connections are reconfigured each time, my operations are as follows: Test successfully "Save" Menu Builder "Set Active Connection! Next time the SET ACTIVE Connection can not find the original configuration! 3. Next: Report SQL Query Enter SQL statements, such as: select * from hr_dept appears above my post! Errors in Report SQL Query: SQL PLOBLEMS: ORA-00600: Internal error code, parameter: [TTCGCSHND-1]. [0]. []. []. []. []. []. []. . . . I set up a gb2312 in the XML encoding of the attribute but I open the report code is XML Version = "1.0" encoding = "UTF-8"?>! Do you change it to GB2312? But change, Chinese issues appear! ? . . . . Thank you! . . Thank you! # Third question has been solved 2004-10-19 4:13 PM Thank you
Thank you! !
# 回: Part 1: Use the IREPORT to make a detailed process (Windows Environment) 2004-10-20 4:51 PM Happy
Question: When doing reports, Static Text Tool can be automatically wrap if the width of the character is greater than the specified width, but the TextField Tool cannot be automatically wrapped, the character of the width will be blocked, how can it be Make it automatically wrap? Anxious!
# 回: Part 1: Detailed procedures for making reports using Ireport (under Windows Environment) 2004-10-21 9:14 AM Jem.lee
To Happy: Double-click the TextField Tool object to enter the Properties dialog -> Select Text Field-> Tick Stretch Whith overflow. This will satisfy your requirements.
# 回: Part 1: Detailed process for making reports using IREPORT (in Windows Environment) 2004-10-22 9:31 AM Happy
Thank you Jem.lee
# 回:: Part 1: Detailed process for making reports using Ireport (in Windows Environment) 2004-10-23 12:05 AM Jem.lee
I have to thank you for seeing my article!
# 回: Part 1: Detailed procedures for making reports using Ireport (in Windows Environment) 2004-11-01 6:09 PM KWWong
I am Using Oracle Database and The Report Cannot Display Chinese Characters. How to set the characterencoding usings.
# 回: Part 1: Detailed process for making reports using Ireport (Windows Environment) 2004-11-02 3:09 PM Xiaokiki I use IREPORT, time to report D: /jdk1.3.1/bin/java.exe -dorg .xml.sax.driver = org.apache.xerces.parsers.SAXParser IReportCompiler -c -pdf -jdrivercom.microsoft.jdbc.sqlserver.SQLServerDriver -jusersa -jpasswdsa -jurljdbc: microsoft: sqlserver: // localhost: 1433; DatabaseName = kenoah -query "select * from client" "" File: "java.lang.StringIndexOutOfBoundsException: String index out of range: -2 at java.lang.String.substring (String.java:1591) at IReportCompiler.main (IReportCompiler. Java: 112) Abnormal Termination! What is going on?
# 回: Part 1: Detailed process for making reports using IREPORT (Windows Environment) 2004-11-02 3:41 PM Happy
There are several questions, please ask you: 1. When the report generates an HTML file, the line can be displayed why the line is not in the printing? 2. The picture in the HTML file can be displayed normally. Why can't the picture when generating an Excel file?
# 回: Part 1: Detailed process for making reports using Ireport (Windows Environment) 2004-11-02 3:42 PM Jem.lee
To: kwwong may be you will change your report's character, ref my doc; may be you must change you report's field character, ref my doc; if your oracle database has been set useing other characters, my be you will change it, ref ora DOC.
# 回: Part 1: Detailed process for making reports using Ireport (Windows Environment) 2004-11-03 5:54 PM Goggle
The compile time is wrong, how can I solve? Thank you! Errors compiling F: /iReport-0.4.0/test/vsmp_test.jasper - Parse Error at line 88 column 124:! Attribute "evaluationTime" with value "now" must have a value from the list "Now Report Page Column Group". ORG.XML.SAX.SAXPARSEEXCEPTION: Attribute "EvaluationTime" with value "now" Must Have a value from the list "No Report Page Column Group"
. At org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseException (Unknown Source) at org.apache.xerces.util.ErrorHandlerWrapper.error (Unknown Source) at org.apache.xerces.impl.XMLErrorReporter.reportError (Unknown Source) at org.apache.xerces.impl.XMLErrorReporter.reportError (Unknown Source) at org.apache.xerces.impl.dtd.XMLDTDValidator.validateDTDattribute (Unknown Source) at org.apache.xerces.impl.dtd.XMLDTDValidator.addDTDDefaultAttrsAndValidate (Unknown Source ) at org.apache.xerces.impl.dtd.XMLDTDValidator.handleStartElement (Unknown Source) at org.apache.xerces.impl.dtd.XMLDTDValidator.startElement (Unknown Source) at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanStartElement ( Unknown Source) at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl $ FragmentContentDispatcher.dispatch (Unknown Source) at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument (Unknown Source) at org.apache.xerces.parsers.XML11Confi guration.parse (Unknown Source) at org.apache.xerces.parsers.DTDConfiguration.parse (Unknown Source) at org.apache.xerces.parsers.XMLParser.parse (Unknown Source) at org.apache.xerces.parsers.AbstractSAXParser. Parse (unknown source) at Org.apache.commons.digester.digester.parse (Digester.java: 1514) at Net.sf.jasperReports.EnGine.xml.jrxmlloader.LoadXml (JRXMLLOADER.JAVA: 400) at Net.sf. jasperreports.engine.xml.JRXmlLoader.load (JRXmlLoader.java:384) at net.sf.jasperreports.engine.xml.JRXmlLoader.load (JRXmlLoader.java:338) at net.sf.jasperreports.engine.xml.JRXmlLoader. Load (JRXMLLOADER.JAVA: 322) at Net.sf.jasperReports.EnGine.jasperCompileManager.compileReportToft (JasperCompileManager.java:
128) at it.businesslogic.ireport.IReportCompiler.run (IReportCompiler.java:336) at java.lang.Thread.run (Unknown Source) org.xml.sax.SAXParseException: Attribute "evaluationTime" with value "now" must have a value from the list "Now Report Page Column Group". at org.apache.xerces.parsers.AbstractSAXParser.parse (Unknown Source) at org.apache.commons.digester.Digester.parse (Digester.java:1514) at net .sf.jasperreports.engine.xml.JRXmlLoader.loadXML (JRXmlLoader.java:400) at net.sf.jasperreports.engine.xml.JRXmlLoader.load (JRXmlLoader.java:384) at net.sf.jasperreports.engine.xml .JRXmlLoader.load (JRXmlLoader.java:338) at net.sf.jasperreports.engine.xml.JRXmlLoader.load (JRXmlLoader.java:322) at net.sf.jasperreports.engine.JasperCompileManager.compileReportToFile (JasperCompileManager.java:128 ) At it.businessLogic.ireport.ireportCompiler.run (IreportCompiler.java: 336) at java.lang.thread.run (unknown source) NESTED by: net.sf.jasperreports.Engine.jrexce Ption: Attribute "EvaluationTime" with value "now" Must Have a value from the list "Now Report Page Column Group"
. At net.sf.jasperreports.engine.xml.JRXmlLoader.loadXML (JRXmlLoader.java:404) at net.sf.jasperreports.engine.xml.JRXmlLoader.load (JRXmlLoader.java:384) at net.sf.jasperreports. engine.xml.JRXmlLoader.load (JRXmlLoader.java:338) at net.sf.jasperreports.engine.xml.JRXmlLoader.load (JRXmlLoader.java:322) at net.sf.jasperreports.engine.JasperCompileManager.compileReportToFile (JasperCompileManager. java: 128) at it.businesslogic.ireport.IReportCompiler.run (IReportCompiler.java:336) at java.lang.Thread.run (Unknown Source) Caused by: org.xml.sax.SAXParseException: Attribute "evaluationTime" with value "now" must have a value from the list "now Report Page Column Group". at org.apache.xerces.parsers.AbstractSAXParser.parse (Unknown Source) at org.apache.commons.digester.Digester.parse (Digester.java : 1514) At Net.sf.jasperReports.EnGine.xml.jrxmlloader.lowadxml (JRXMLLOADER.JAVA: 400) ... 6 more # Reply: Part 1: Using the IREPORT Making Report Details (Windows Environment) 2004-11 -08 5:13 PM xiaox Iao
When doing report parameters, such as: select mobile from ttt where mobile = $ p {name} Local Tips in Report Query: please set a defaut value for the parameter 'name' What is wrong? How to do it,
# 回: Part 1: Detailed procedures for making reports using Ireport (in Windows Environment) 2004-11-09 8:41 AM Jem.lee
To Xiaoxiao: Specify a default value for Name. In fact, as long as the test passes the SQL statement with WHER, it can be added to the program to add the condition.
# 回: Part 1: Detailed process for making reports using Ireport (in Windows Environment) 2004-11-09 10:10 AM Xiaoxiao
I just tried it, and the report field coming out is all, no screening. My approach is this: Name a parameter, didn't specify the default value for Name, and write the Select Mobile from TTT in Report Query, save. In the SELECT Mobile from TTT, it adds where mobile = $ p {name} cannot be saved, OK is ash. It can be compiled into JASPER normally, and the JSP code is as follows: <% @ page contentty = "text / html; charset = GB2312"%> <% @ page import = "Net.sf.jasperreports.Engine. *"% > <% @ page import = "net.sf.jasperreports.Engine.util. *"%> <% @ page import = "net.sf.jasperreports.Engine.export. *"%> <% @ page import = " Java.util. * "%> <% @ page import =" java.io. * "%> <% @ page import =" java.sql. * "%> <% file reportfile = new file (Application.getRealPath "Test13.jasper"); class.Forname ("Sun.jdbc.odbc.jdbcodbcdriver"); map parameters = new hashmap (); //parameters.put ("name "," p "); parameters.put "Name", New String ("13823496150"); system.out.println ("-------- CONN YYM -----------"); // To database connection conn = drivermanager.getConnection ("JDBC: ODBC: AA", "SA", "aa"); System.out.Println ("------- Jasper Begin -------- ------- "); // Show the physical path of the report file in the console //system.out.println (ReportFile.getPath ()); byte [] bytes = jasperrunmanager.runreporttopdf (ReportFile.GetPath ), parameters, conn; system.out.println ("------- jasper end -----------"); response.setContentType ("app) lication / pdf "); response.setContentLength (bytes.length); ServletOutputStream ouputStream = response.getOutputStream (); ouputStream.write (bytes, 0, bytes.length); ouputStream.flush (); ouputStream.close ();% > Please give a point, where is a problem.
I have tried it for a long time, I didn't get it. # Reply: The first part: Use the IREPORT production report (Windows Environment) 2004-11-09 10:40 AM The same error
97891 [Thread-87] ERROR digester.Digester - Parse Error at line 120 column 124: Attribute "evaluationTime" with value "now" must have a value from the list "Now Report Page Column Group" org.xml.sax.SAXParseException. : Attribute "evaluationTime" with value "now" must have a value from the list "now Report Page Column Group" at org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseException (Unknown Source).
# 回: Part 1: Use the Ireport to make a detailed process (in Windows Environment) 2004-11-09 12:00 PM Xiaoxiao
The problem has been resolved, as long as it is changed in XML. Thank you, the author answered everyone's question.
# 回: Part 1: Detailed process for making reports using Ireport (in Windows Environment) 2004-11-11 3:12 PM Xiaoxiao
Chinese shows the problem, I use the IREPORT4.0 report, using JasperViewer to display Chinese normally, can use PDF but cannot display Chinese (whether static or dynamic), in the PDF format in JSP, the Chinese cannot be displayed. XML Encoding has also changed GB2312. The JSP page has also added <% @ page contenttype = "text / html; charset = GBK"%> Where is the problem? How to operate? Advice
# 回: Part 1: Detailed procedures for making reports using Ireport (Windows Environment) 2004-11-12 5:27 PM STUDY
20011 class sequence subject class 1. Language 2 2. Mathematics 6 3. Chemical 8 small gauge: 16 20012 class serial subject class 1. Chinese 6 2. Mathematics 5 3. Chemical 7 small meter: 18 Total: 34 If the child is Field, If I have to get a small plan, what should I do?
# 回: Part 1: Detailed process for making reports using Ireport (in Windows Environment) 2004-11-15 2:38 PM STUDY
Oh, the problem has been solved
# 回: The first part: Use the Ireport to make a detailed process (Windows environment) 2004-12-26 1:02 AM JJ
I also encountered Chinese issues?
# 回: The first part: Use the Ireport to make a detailed process (Windows Environment) 2004-12-26 1:11 AM JJ
Oh, it's simple, get all! Thank you!
# 回: Part 1: Use the Ireport to make a detailed process (Windows Environment) 2005-01-10 3:23 PM I am an initiator 1, Tools-Options Configure the basic information of the IREPORT system, in the "Language" option Without any options, why? 2, when configuring the MySQL database connection, the following error occurs, where is the setting error? How can I solve it? SQL Problems: Unable to connection: java.net.connectException: Connection Refused: Connect JDBC: MySQL: // Localhost / bug
# 回: The first part: Use the IREPORT to make a detailed process (Windows Environment) 2005-01-12 4:05 PM My question is also the same as the upstairs, how to solve, save ""
ERROR digester.Digester - Parse Error at line 77 column 124:. Attribute "evaluationTime" with value "now" must have a value from the list "Now Report Page Column Group" org.xml.sax.SAXParseException: Attribute "evaluationTime" with value "now" must have a value from the list "now Report Page Column Group". at org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseException (Unknown Source) at org.apache.xerces.util.ErrorHandlerWrapper.error (Unknown Source ) at org.apache.xerces.impl.XMLErrorReporter.reportError (Unknown Source) at org.apache.xerces.impl.XMLErrorReporter.reportError (Unknown Source) at org.apache.xerces.impl.dtd.XMLDTDValidator.validateDTDattribute (Unknown Source ) At org.apache.xerces.impl.dtd.xmldtdValidator.adddddefaultattrsandValidate (Unknown Source)
# 回: Part 1: Use the Ireport to make a detailed process (Windows environment) 2005-01-12 4:50 PM brothers, hurry to help solve this problem, great author.