Jump to content
We've recently updated our Privacy Statement, available here ×

Henry

Members
  • Posts

    72
  • Joined

  • Last visited

 Content Type 

Profiles

Forum

Events

Featured Visualizations

Knowledge Base

Documentation (PDF Downloads)

Blog

Documentation (Test Area)

Documentation

Dr. Jaspersoft Webinar Series

Downloads

Everything posted by Henry

  1. Hello Lucian, thank you for your answer. I will do it first with federated mysql tables because at the moment i have nerver work with custom data source. Regards, Henry
  2. Hello, i use in my 3D bar reports in a customizer class a ThresholdBarRenderer function that i found on the jfree forum (http://www.jfree.org/phpBB2/viewtopic.php?t=20027 ) It works and i create report with it. [file name=ThresholdBarRenderer.jpg size=8367]http://www.jasperforge.org/components/com_joomlaboard/uploaded/files/ThresholdBarRenderer.jpg[/file] But on one part in the customizer class im not sure if do a mistake. With this i set the thresholds for the report ThresholdBarRenderer renderer = (ThresholdBarRenderer) new ThresholdBarRenderer( I'm not sure what kind of 'type' i have to use. for example BarRenderer renderer = (BarRenderer) new ThresholdBarRenderer( works also. Can someone look on it and say what the correct way to do this. Regards, Henry Code: import java.awt.Color; import java.awt.Paint; import net.sf.jasperreports.engine.JRChart; import net.sf.jasperreports.engine.JRChartCustomizer; import org.jfree.chart.JFreeChart; import org.jfree.chart.axis.NumberAxis; import org.jfree.chart.plot.CategoryPlot; import org.jfree.chart.renderer.category.BarRenderer3D; import org.jfree.data.category.CategoryDataset; public class OVO3DBarChartSlaColorLimit90 implements JRChartCustomizer { public static class ThresholdBarRenderer extends BarRenderer3D { private static final long serialVersionUID = 20071126173100L; private double[] m_thresholds = {99.7,99.0,99.5,99.8}; // upper-bound threshold of range (assumed to be sorted) // i.e. {10.0, 15.0 18.0} correspond to ranges // {[Double.NEGATIVE_INFINITY, 10.0), [10.0, 15.0), [15.0, 18.0)} with // assumed range [18.0, Double.POSITIVE_INFINITY] private Paint[] m_paints = {Color.red,Color.orange,Color.yellow, Color.cyan, Color.green}; // paints selection for range // the length of m_paints should be one more than for m_thresholds where // the extra paint color is for the assumed upper range (i.e [18.0, // Double.POSITIVE_INFINITY] from above) // ranges defined by m_thresholds elements are painted with the // corresponding m_paints element (including the assumed range) // a null element in m_paints means there is no special paint for the // region, so return the series paint public ThresholdBarRenderer(double[] x_thresholds, Paint[] x_paints) { super(); m_thresholds = x_thresholds; m_paints = x_paints; } @Override public Paint getItemPaint(int x_row, int x_col) { CategoryDataset l_jfcDataset = getPlot().getDataset(); String l_rowKey = (String) l_jfcDataset.getRowKey(x_row); String l_colKey = (String) l_jfcDataset.getColumnKey(x_col); double l_value = l_jfcDataset.getValue(l_rowKey, l_colKey) .doubleValue(); int l_length = m_thresholds.length; for (int i = 0; i < l_length; i++) { double l_threshold = m_thresholds; if (l_value < l_threshold) { // l_value is in the range defined by l_threshold Paint l_paint = m_paints; // if l_paint is null, return the series paint if (null == l_paint) { return getSeriesPaint(x_row); } // else return the special paint for the range else { return l_paint; } } } // the value is in the assumed upper range, so return the last // m_paint element return m_paints[l_length]; } } public void customize(JFreeChart chart, JRChart jasperChart) { CategoryPlot plot = (CategoryPlot) chart.getPlot(); NumberAxis axis = (NumberAxis) plot.getRangeAxis(); axis.setRange(90, 100); axis.setAutoRangeIncludesZero(false); ThresholdBarRenderer renderer = (ThresholdBarRenderer) new ThresholdBarRenderer( new double[]{97.00,99.0,99.5,99.8}, new Paint[] {Color.red,Color.orange,Color.yellow, Color.cyan, Color.green}); plot.setRenderer(renderer); } } Post edited by: Henry, at: 2007/11/30 10:51 Post edited by: Henry, at: 2007/11/30 10:54 Post edited by: Henry, at: 2007/11/30 10:56
  3. Hello, at the moment i create some charts from different data sources (mysql) inside one report. For e.g. i change the data source from subreport to subreport in the same report. So, i have one Report with for e.g. 4 line chart diagrams, each with data from a different data source. What i want now is to use different data sources in one chart. A line chart with data from multiple data sources. My question now, is this possilbe directly in jasperreports? An other solution for this is to use federated mysql tables. I prefer to solve the problem inside the report because i don't want to change our database installation (new database server with federated mysql tables). Regards, Henry
  4. > Try using .equals() instead I tried it and it works. :) Big thanks for the fast answer and the hint. Henry
  5. Hello, i have a problem with comparison in a text field. I got different results when i generate the same report with iReport, JS via web page and JS via url call. I have some parameter with defaults values and some parameter set by input controls. In the text element i want print only the parameter with different values that the default parameters. iReport 2.0.1 (MyReportSchema: ovo_soest_2007_repanz) JasperServer 2.0.1 report unit via web page (MyReportSchema: ovo_soest_2007_repanz, MyUseSOCOperator: false) JasperServer 2.0.1 report unit via url (MyReportSchema: ovo_soest_2007_repanz, MyUseSOCOperator: false, MyReportOperator: .*, MyNotReportOperator: ^MyNotReportOperatorDefault$, MyReportMsgGrp: .*, MyNotReportMsgGrp: ^MyNotReportMsgGrpDefault$, MyReportNode: .*, MyNotReportNode: ^MyNotReportNodeDefault$) The Parameter defined as string or boolean, and the report are generated correct except the "output" of this text element. I have no idea why i got for the same report with the same input (input controls) this 3 different results. Henry ############################################################################################## boolean $P{MyUseSOCOperatorDefault}, default new Boolean(false) string $P{MyReportOperatorDefault}, default ".*" string $P{MyNotReportOperatorDefault}, default "^MyNotReportOperatorDefault$" string $P{MyReportMsgGrpDefault}, default ".*" string $P{MyNotReportMsgGrpDefault}, default "^MyNotReportMsgGrpDefault$" string $P{MyReportNodeDefault}, default ".*" string $P{MyNotReportNodeDefault}, default "^MyNotReportNodeDefault$" boolean $P{MyUseSOCOperator}, default $P{MyUseSOCOperatorDefault}, override by input control string $P{MyReportOperator}, default $P{MyReportOperatorDefault}, override by input control string $P{MyNotReportOperator}, default $P{MyNotReportOperatorDefault}, override by input control string $P{MyReportMsgGrp}, default $P{MyReportMsgGrpDefault}, override by input control string $P{MyNotReportMsgGrp}, default $P{MyNotReportMsgGrpDefault}, override by input control string $P{MyReportNode}, default $P{MyReportNodeDefault}, override by input control string $P{MyNotReportNode}, default $P{MyNotReportNodeDefault}, override by input control ############################################################################################## text element "(MyReportSchema: " + $P{MyReportSchema} + (($P{MyUseSOCOperator} == $P{MyUseSOCOperatorDefault}) ? "" : ", MyUseSOCOperator: " + $P{MyUseSOCOperator}) + (($P{MyReportOperator} == $P{MyReportOperatorDefault}) ? "" : ", MyReportOperator: " + $P{MyReportOperator}) + (($P{MyNotReportOperator} == $P{MyNotReportOperatorDefault}) ? "" : ", MyNotReportOperator: " + $P{MyNotReportOperator}) + (($P{MyReportMsgGrp} == $P{MyReportMsgGrpDefault}) ? "" : ", MyReportMsgGrp: " + $P{MyReportMsgGrp}) + (($P{MyNotReportMsgGrp} == $P{MyNotReportMsgGrpDefault}) ? "" : ", MyNotReportMsgGrp: " + $P{MyNotReportMsgGrp}) + (($P{MyReportNode} == $P{MyReportNodeDefault}) ? "" : ", MyReportNode: " + $P{MyReportNode}) + (($P{MyNotReportNode} == $P{MyNotReportNodeDefault}) ? "" : ", MyNotReportNode: " + $P{MyNotReportNode}) + ")"
  6. Hello Lucian, i changed the class like you described (public static class MyPieSectionLabelGenerator extends ...). Now all reports are generated, also the one with the big database. Is` a database from 2006 and the report create a pdf document with 365 pages. And also the system memory/swap usage during the reporting creation looks now very well. :) Big thanks for you help, Henry
  7. Hello Theodor, OVOPiePlot is one of my ChartCustomizer Class. I use this class from the time that i start with jasperreport. Till now everything works without problems (iReport and JasperServer). And now with JS 2.0.0 and 2.0.1 i have problems only with one report in combination with one datasource. The same report with a smaler datasource works fine in JS. I have attached the OVOPiePlot.java file. I use jfreechart-1.0.6.jar, jcommon-1.0.10.jar. But i have the same problems with the version that included in JS. Henry [file name=OVOPiePlot.txt size=2257]http://www.jasperforge.org/components/com_joomlaboard/uploaded/files/OVOPiePlot.txt[/file]
  8. Hello, if it's possible to increase the max length from label and value field in a list of values higher than 30? Henry
  9. Hello, at the moment i migrate from JS 1.2.1 to JS 2.0.1. I have the same problem like some weeks ago when i tried to migrated from 1.2.1 to 2.0.0. I generate every day identical reports with different data sources. The different between the data source is only the size. There are data inside from some month till one year. With JS 1.2.1 or iReport 2.0.1 i can generate all reports without problems. With JS 2.0.1 (also with 2.0.0) every report are generated except the one with the biggest data source. I “played†with some java memory parameter but nothing helps, i got every time the following error. Some ideas whats wrong or different to JS 1.2.1? Henry [file name=report_problem.txt size=13825]http://www.jasperforge.org/components/com_joomlaboard/uploaded/files/report_problem.txt[/file]
  10. Hello, i think i found the reason for my problem. I defined the database connection with input parameters with java.sql.DriverManager.getConnection($P{MyDatabaseUrl},$P{MyDatabaseUser},$P{MyDatabasePassword}). The parameters for getConnection are set by Input Controls and not defined with default values. It looks like JS evaluate the jrxml file to determine the default values for the input controls dialog box. At this moment the parameters for getConnection are not defined and it got a failure. Now i defined default values for this parameters and now i can start the report unit. The dialog box for the input controls popped up and show my the Input Controls with the default values. Henry [file name=dbconnection.txt size=1224]http://www.jasperforge.org/components/com_joomlaboard/uploaded/files/dbconnection.txt[/file] Post edited by: Henry, at: 2007/08/28 09:53
  11. Hello, from JS 1.2.1 to JS 2.0 the behavior of input controls are changed and it looks like that from 2.0 to 2.0.1 also. After migration to 2.0.1 the reports starts immediately with an fault messages without to aks for the input control values. In my reports i create the database connection with the input control values (java.sql.DriverManager.getConnection($P{MyDatabaseUrl},$P{MyDatabaseUser},$P{MyDatabasePassword}). After click on the report unit i got the attached fault messages. In the report file are no default values defined an in JS all imput controls as mandatory definded like i chanded it when in migrated from 1.2.1 to 2.0.(http://www.jasperforge.org/index.php?option=com_joomlaboard&Itemid=&func=view&catid=10&id=28566#28566) Henry [file name=fault_messages.txt size=47704]http://www.jasperforge.org/components/com_joomlaboard/uploaded/files/fault_messages.txt[/file] Post edited by: Henry, at: 2007/08/27 14:52
  12. Hello Lucian, that works. :) For all input controls was default values defined in the report files. After i deleted all this default values it works fine. Henry
  13. Hello Lucian, that works. :) For all input controls was default values defined in the report files. After i deleted all this default values it works fine. Henry
  14. Hello Lucian, that works. :) For all input controls was default values defined in the report files. After i deleted all this default values it works fine. Henry
  15. JS 2.0 reports via flow.html Hello, I create my reports via http request (flow.html). Since I changed to JS 2.0 I have one problem. There are some new features in the report unit definition (Report Wizard). “Controls layout†and “Always prompt†When I unchecked the “Always prompt†button the reports are generated via http request. But when I click the report unit in the web page, the report generation started immediately with the default values defined in the report. It is not possible to change the value from the defined Input Controls. When I checked the “Always promt†button I can run the reports manually in the web page with the possibility to change the input controls. But the generation via http request doesn’t work. The answer of the request is not the report, it is a web document that shows the input controls an a button “Run Reportâ€. Before I changed to JS 2.0 both was possible, to start the reports in the web page and via http request. Henry
  16. Hello, how i can use system environment variables as parameter or variable in reports? I use iReport to design the reports. Henry
  17. Hello together, I have installed JI on a tomcat server an one mysql database. Now I want to use a second JasperServer Database. My question how can in do this. The first try to install 2 time the jasperserver.war file as jasperserver_1.war and jasperserver_2.war in the tomcat webapps dir doesn't works. current installation "Tomcat - JI - MySQL" (MsSQL means the JI database) Planned installation 1.) "Tomcat - JI + MySQL_1" " |" " + MySQL_2" or 2.) "Tomcat + JI_1 - MySQL_1" " |" " + JI_2 - MySQL_2" or 3.) "Tomcat_1 - JI_1 - MySQL_1" "Tomcat_2 - JI_2 - MySQL_2" My preferred solution is 1.) or 2.) because I have only one physical installation from tomcat. But how I can do it? Any ideas? Best regards, Henry [file name=Question.txt size=791]http://www.jasperforge.org/components/com_joomlaboard/uploaded/files/Question.txt[/file] Post edited by: Henry, at: 2007/02/02 10:39
  18. Hello Anandharaj, it works. :) First I try to make a backup und restore with the administration gui. When I imported the data I got a messages 2006 that the server has gone away. After this I try to make the export/import by hand. I got also some error messages during the import like "server has gone". I think the size some of the big PDF-Reports that stored in the jasper DB are a problem for some select statement. I added the following option in the my.ini file for the 5.0 and 5.1 server and also in the import and export statement. [mysqld] max_allowed_packet=1G D:/Programme/MySQL/Server_5.0/bin>mysqldump -u root -p -P 3308 --databases jservermeta --max_allowed_packet=1G > D:/JServerMeta.sql D:/Programme/MySQL/Server_5.1/bin>mysql -u root -p -P 3318 jservermeta --max_allowed_packet=1G < D:/JServerMeta.sql Now the JasperIntelligence Server is up and runs with MySQL 5.1.14. :) Best regards, Henry Post edited by: Henry, at: 2007/01/24 12:28
  19. Hello, at the moment I use JI 1.1.0 with MySQL 5.0.27. I start to change all my MySQL DB to migrate to 5.1.14. My Question now: can I use JI 1.1.0 with MySQL 5.1.14 or higher? Henry
×
×
  • Create New...