Ireport integrated vector graphics

xiaoxiao2021-03-06  37

Ireport integrated vector graphics

Http://www.pcdog.com 2004-7-16 Internet author recently passed the JasperReports after the patch of the vector graphics, found the function of Ireport and the easily proximity to commercialized report tools. Be the first choice for open source report tools. The SVG patch directly uses IText's WRAP for Java Graphics2D to implement the SVG graphics of the PDF file.

Ireport Home JasperReports Vector Graphic Patch Patch The JasperReports CVS source code via SVG-Patch-SRC, compiles the IREPORT source code. The author found a few Chinese and XML checks, and can be resolved by modifying the source code. So it is recommended that ITEXT, JASPERREPORTS, JFREECHART, IREPORT use CVS source code. Chinese problem modification com.lowagie.text.pdf.defaultFontMapper's AWTTOPDF method: basefont bf = null; try {bf = basefont.createFont ("font.chinese.simyou", "D: / wiki / ireport -0.3.0 / fonts / SIMYOU.TTTF ", BaseFont.Identity_h, basefont.embedded;} catch (DocumentException E1) {// Todo Auto-generated catch block e1.printStackTrace ();} catch ({ooException E1) {/ / Todo Auto-Generated Catch Block E1.PrintStackTrace ();} When deploying on the Linux platform, you need to modify the corresponding fonts of JFreechart. Ireport Chartireport is currently supporting Chart, but it can be embedded in JFreeChart graphics via Image tags and Scriptlet, which is embedded in other CHARTs, such as JCHARTS methods.

Scriptlet Code public class ChartScriptlet extends JRDefaultScriptlet {/ ** * * / public void afterReportInit () throws JRScriptletException {Connection con = null; DefaultPieDataset pieDataset = new DefaultPieDataset (); try {Class.forName ( "oracle.jdbc.driver.OracleDriver" ); System.out.println ( "oracle.jdbc.driver.OracleDriver");} catch (ClassNotFoundException e) {// TODO Auto-generated catch block e.printStackTrace ();} try {con = DriverManager.getConnection ( " JDBC: Oracle: Thin: @ 127.0.0.1.38: 1521: Ora8i "," User "," password "); string query =" select province.name as name, sum (Bill.Total) AS Total from Province, Bill Node where bill.node_id = node.id and node.province_id = province.id and bill.create_time> to_date ('2004-1-1', 'YYY-mm-mm-mm-mm-dd') Group by province.name "; Statement Stmt= Con.createstatement (); // Submit a query, create a resultset Object results = stmt.executeQuery (query); while (rs.next ()) {system.out.println (Rs.getstring ("name") Piedataset.SetValue (Rs.getstring ("name"), RS.GETDOUBLE ("total"));}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}} rs.close (); stmt.close (); con.close ();} catch (SQLException E) {// Todo auto-generated catch block E.PrintStackTrace ();} jfreechart chart =

转载请注明原文地址:https://www.9cbs.com/read-64281.html

New Post(0)