Jump to content
Changes to the Jaspersoft community edition download ×

xok

Members
  • Posts

    46
  • 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 xok

  1. How do you know that it is not a font's problem? Can you show a print screen of Microsoft Word and a print to PDF from there?
  2. Hi Sanda, WOW !!! This version 4.5.1 has really accelarated the preview! I really mean it... Now the preview has the same performance as the production environment and consumes less CPU and memory. See image attached! This was annoying me for quite some time : ) Post Edited by robccsilva at 03/19/2012 21:36
  3. I am glad I have found this topic because I was about to submit a bug report about this.. but before I will try your settings. I have a very complex iReport, and making an preview of the report takes about 6 minutes, altough on the production environment a LAMP setup with Tomcat and PHP JavaBridge takes just about 11 segs. See images attached so that you can have an idea. What is very strange in this, it is the preview that consumes a lot of CPU and memory. You can see the pattern of the Task Manager for a better picture. Does anyone has this kind of problem?
  4. After struggling several hours over this issue, I have found the problem. So that the variable works properly as expected, instead of using "Variable Expression" we must use "Initial Value Expression": new SimpleDateFormat("yyyy-MM-dd").parse("2011-11-13") Then we can use an text box and format the way we want. .e.g "dd-MM-yyyy". Can anyone explain why do I have to use "Initial Value Expression" instead of "Variable Expression"? This seems to me a bug... or am I using the varaibles in a wrong way.
  5. I am doing further tests and there are things that I dont understand... I have the following elements on a test report: 1 - Variable: $V{vDATE} - java.lang.String Defined as: new SimpleDateFormat("yyyy-MM-dd").parse("2011-11-13") 2 - An text box with Text Field Expression: $V{vDATE} Results in NULL 3 - An text box with Text Field Expression: new SimpleDateFormat("yyyy-MM-dd").parse("2011-11-13") Results in 13-11-2011 0:00 Why does does element #2 result in NULL ? I find this behaviour very weird !
  6. Hello, How can I convert a String parameter to a Date? I want to type a date in the format "yyyy-MM-dd" as a string parameter and then convert it in the format "dd-MM-yyyy" just to be written in a text box. Note: I do not want a date parameter as it will shred the report because I have 9 datasources using the parameter as a String ;) Post Edited by robccsilva at 03/01/2012 14:28 Post Edited by robccsilva at 03/01/2012 15:39
  7. After explore more than 50 websites and documentation.. I discovered the Report Element "Page Break" !
  8. Hello, I have a report with several Group Headers, about 9 group headers (each one has a table). I want to manually break the page with "New page" in several Group Headers. For example, in the group header #3 and #6 I want a page break but if I setup Group Header #3 with "New Page" break, every header stays configured with "New Page" checked. How can I configure properly the page breaks? I have tried with band "details" but that is worse and even dont have "New page" settings :) Regards, Post Edited by robccsilva at 02/29/2012 15:47
  9. My knowledge with Java is very basic, see bellow an exceprt of my PHP code, which might help (see $param variable): Code:require_once("java/Java.inc.php");$System = new Java("java.lang.System");//print_r($System->getProperties());$compileManager = new JavaClass("net.sf.jasperreports.engine.JasperCompileManager"); $report = $compileManager->compileReport($report_filename); $fillManager = new JavaClass("net.sf.jasperreports.engine.JasperFillManager"); //#############################################################################//Define parameters//#############################################################################$params = new Java("java.util.HashMap"); //$date = new Java("java.util.Date", 70, 9, 4);//-----------------------------------------------------------------------------//Parameters are Case Sensitive//-----------------------------------------------------------------------------//$params->put("MYDATE", "2011-12-29");$params->put("MYDATE", $mydate);//$params->put("SUBREPORT_DIR", realpath(".") ."\\");//$params->put("SUBREPORT_DIR", "./");//$params->put("SUBREPORT_DIR", "C:/aweb/qualistats/www/reports/");//$params->put("SUBREPORT_DIR", ".");//$params->put("SUBREPORT_DIR", "./");$params->put("SUBREPORT_DIR", ".\\");//-----------------------------------------------------------------------------//$params->put("id_report", convertValue($id_report + 0, "java.lang.Integer"));//$params->put("text", "Java Bridge!");//$params->put("number", "3.56" + 0.01);//$params->put("date", $date);//$params->put("title", "Java Bridge!");//$params->put("when", $date);//$num = new Java("java.util.Integer", 123);//$params->put("number", 3.00);//$params = new Java("java.util.HashMap");//$params->put("text", "This is a test string");//$params->put("number", 3.00);//$params->put("date", convertValue("2007-12-31 0:0:0", "java.sql.Timestamp"));//$params->put("id_report", "$id_report.00" );//echo "ID: ". $id_report;//#############################################################################//$fileResolver = new JavaClass("net.sf.jasperreports.engine.util.FileResolver"); //$fileResolver = new Java("net.sf.jasperreports.engine.util.SimpleFileResolver"); /* Code: String reportsDirPath = context.getRealPath("/reports/"); File reportsDir = new File(reportsDirPath); if (!reportsDir.exists()) { throw new FileNotFoundException(String.valueOf(reportsDir)); } parameters.put(JRParameter.REPORT_FILE_RESOLVER, new SimpleFileResolver(reportsDir));*///#############################################################################//O FileResolver serve para mapear a directoria onde se encontra o report//de forma a se poder ler, p.ex., a imagem do logotipo//#############################################################################$reportsDirPath = realpath("."); $reportsDir = new Java("java.io.File",$reportsDirPath); $params->put("REPORT_FILE_RESOLVER", new Java("net.sf.jasperreports.engine.util.SimpleFileResolver",$reportsDir)); //echo "###$reportsDirPath###<br />";//#############################################################################//setLocale PT - Portugal//#############################################################################$params->put("REPORT_LOCALE", new Java("java.util.Locale",convertValue("PT", "java.lang.String") ) ); //$System->setProperty( "user.language", convertValue("pt", "java.lang.String") );//$System->setProperty( "user.region", convertValue("PT", "java.lang.String") );//echo "user.language => ". $System->getProperty( "user.language" ) . "<br />";//echo "user.region => ". $System->getProperty( "user.region" ) . "<br />";//#############################################################################//#############################################################################//INIT THE REPORT'S MYSQL DATASOURCE//#############################################################################$class = new JavaClass("java.lang.Class");$class->forName("com.mysql.jdbc.Driver");$driverManager = new JavaClass("java.sql.DriverManager");//$conn_DataSource = $driverManager->getConnection("jdbc:mysql://localhost/database", "user", "pass");$conn_DataSource = $driverManager->getConnection("jdbc:mysql://{$DBCONN->host}/{$DBCONN->db}", "{$DBCONN->user}", "{$DBCONN->pass}"); //$emptyDataSource = new Java("net.sf.jasperreports.engine.JREmptyDataSource"); $jasperPrint = $fillManager->fillReport($report, $params, $conn_DataSource); $exportManager = new JavaClass("net.sf.jasperreports.engine.JasperExportManager"); //#############################################################################//EXPORT REPORT//#############################################################################$exportManager->exportReportToPdfFile($jasperPrint, $outputPath);// We'll be outputting a PDFheader('Content-type: application/pdf');// It will be called downloaded.pdfheader('Content-Disposition: attachment; filename="report.pdf"'); // The PDF source is in original.pdfreadfile($outputPath);//#############################################################################//Delete file//#############################################################################//unlink($outputPath);
  10. Example: - Create a parameter MYDATE - Under the Datasource create the parameter MYDATE again. On the SQL, you can have something like: CALL my_store_procedure($P{MYDATE}); OR CALL my_store_procedure('$P!{MYDATE}'); Then if you use the Datasource on a Table or Crosstab, this is very important, be sure to check the parameter MYDATE on the object. You need to add MYDATE as with $P{MYDATE} as a default value or else it will be null. It is easy once you know how to do it, I took a long time to learn it..
  11. On a developer enviroment, I had previously a weird sistuation. I use a virtual machine envirionment with VirtualBox, being Windows 7 SP1 64 Bits and the Guest an Windows XP Pro SP3 32 Bits. If I use the Direct3D drivers of the Virtualbox Guest Additions, the iReport in the VM will be very slow... The java.exe process will use a lot of CPU usage because of this. Not sure if it is related with your problem. Post Edited by robccsilva at 01/26/2012 14:04
  12. How to draw a table without any break in a group? See images attached, so that you can have an idea of the problem. Suggestions appreciated to solve this issue :)
  13. Hi Matt, I have filled the issue here: http://jasperforge.org/projects/jasperreports/tracker/view.php?id=5594 Thanks, Roberto Silva
  14. Hi Matt, I have made a typo in the PDF. The last sentence is: Rename the field “M_sum_transports_total1†back to “M_sum_transports_totalâ€
  15. I have successfully replicate the issue. You can see it on PDF attached. Post Edited by robccsilva at 01/06/2012 22:11
  16. Hi Matt, Yes, I can access the tracker when logged. I will create ticket with the JRXML file and provide the instructions to replicate the bug. I damaged one file today and wasted a lot of time trying to repair it, then it happened again and destroyed the file again with the same situation.. I had found the situation weird but happening a second time.. seems like a bug :)
  17. Hi, I to know if anyone has the following issue: - Rename a "measure" variable, on a Crosstab. It will rename the variable and another one randomly and both will have the same name. Then when you make a "Preview" of the report it does not work And the report it is completly damaged.. showing "Invalid Report Data" I wanted to report this as a bug but the tracker is not acessible. Has anyone felt this serious bug? Rgds, RCS
  18. Hello, I have a table with a column "HEXCOLOR," which has the hexadecimal color for the background of the row. How can I display a row with the background color based in the field "HEXCOLOR", e.g. FFFFFF, F0F0F0, D0D0D0, C0C0C0 (white and several gray shades)? Regards, RCS Post Edited by robccsilva at 10/11/2011 13:35
  19. Need an expert opinion in here.. I have edited the file nano /etc/rc.d/init.d/tomcat6 , removed the reference to the user TOMCAT and it started to generate reports properly. Doing this in this form is it insecure? Do you think it does any security issue? Java is overcomplicated to me... ---------------------------- before editing ------------------------- if [ "$SECURITY_MANAGER" = "true" ]; then $SU - $TOMCAT_USER -c "${TOMCAT_SCRIPT} start-security" \ >> $TOMCAT_LOG 2>&1 else $SU - $TOMCAT_USER -c "${TOMCAT_SCRIPT} start" >> $TOMCAT_LOG 2>&1 fi ---------------------------- after editing ------------------------- if [ "$SECURITY_MANAGER" = "true" ]; then $SU -c "${TOMCAT_SCRIPT} start-security" \ >> $TOMCAT_LOG 2>&1 else $SU -c "${TOMCAT_SCRIPT} start" >> $TOMCAT_LOG 2>&1 fi -------------------------------------------------------------------------
  20. I am still pursuing this quest ;) I have tried Eclipse with iReport integrated, regarding the following link: http://jasperforge.org/website/ireportwebsite/JSS%20Website/download.html?header=project&target=jaspersoftstudio Eclipse it a bit faster but it is very slow anyway and it bring a bug related to UTF-8 and ISO-8859-1 characters in the report. It there any editor of .JRXML report files not based on Java? Rgds,
  21. WooooooooHHHHHHHHoooooooooooo!!! Almost solved! Free keg is mine! /tools/fckeditor/editor/images/smiley/msn/teeth_smile.gif Starting the JavaBridge manually works properly with the following command: service tomcat6 stop /usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0.x86_64/bin/java -Djava.ext.dirs="/usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0.x86_64/jre/lib/ext:/usr/java/packages/lib/ext:/usr/share/java/tomcat6" -jar /var/lib/tomcat6/webapps/JavaBridge/WEB-INF/lib/JavaBridge.jar HTTP_LOCAL:8080 3 /JavaBridge.log With the command above I was able to export the report's PDF including the Arial font ( http://corefonts.sourceforge.net/ and tutorial and other page that I cannot find the link .. ) [root@localhost ~]$ yum install cabextract rpm-build When finished run the following as root [root@localhost build]$ wget http://corefonts.sourceforge.net/msttcorefonts-2.0-1.spec [root@localhost build]$ rpmbuild -ba msttcorefonts-2.0-1.spec [root@localhost build]$ rpm -ivh /usr/src/redhat/RPMS/noarch/msttcorefonts-2.0-1.noarch.rpm [root@localhost build]$ /sbin/service xfs reload So... why does TOMCAT says permission denied !?
  22. Hi all, (Sorry if this is considered cross-post but I posted before in the wrong forum...). I am having an issue that is driving me nuts.. see error bellow. Anyone who gives me the right solution to solve this, I will pay 50 USD /tools/fckeditor/editor/images/smiley/msn/teeth_smile.gif And a keg of free beer! /tools/fckeditor/editor/images/smiley/msn/teeth_smile.gif System Specification: LAMP (CentOS 5.5, Apache, PHP 5.3, MySQL) PHP-JavaBridge Apache Tomcat 6 Java (Several flavours... tired of trying lots of things) Executing the report: Fatal error: Uncaught [[o:Exception]:"java.lang.Exception: Invoke failed: [[c:JasperCompileManager]]->compileReport((o:String)[o:String]). Cause: net.sf.jasperreports.engine.JRException: java.io.FileNotFoundException: /FULL_PATH/rpt_file.jrxml (Permission denied) VM: 1.6.0_17@http://java.sun.com/" at: #-12 net.sf.jasperreports.engine.xml.JRXmlLoader.load(JRXmlLoader.java:174) #-11 net.sf.jasperreports.engine.xml.JRXmlLoader.load(JRXmlLoader.java:154) #-10 net.sf.jasperreports.engine.JasperCompileManager.compileReport(JasperCompileManager.java:146) #-9 sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) #-8 sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) #-7 sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) #-6 java.lang.reflect.Method.invoke(Method.java:616) #-5 php.java.bridge.JavaBridge.Invoke(JavaBridge.java:1044) #-4 php.java.bridge.Request.handleRequest(Request.java:417) # in /FULL_PATH/Java.inc.php on line 195 I have chmod and chown to apache ; tomcat ; root as 0777 and all of them returns the same. Renaming the file returns file not found (obvious..), so the file is found but I cant solve the permission thing.. Rgds, Post Edited by robccsilva at 03/25/2011 18:45 Post Edited by robccsilva at 03/25/2011 18:47
  23. Sorry, posted in the wrong place (Moderator's please delete this thread).
  24. Have you tried: return "number: "+ number + 0.00;
  25. Hi all, I am having an issue that is driving me nuts for the last week :) I have read a LOT of posts and pages on the web trying to solve this.. Fatal error: Uncaught [[o:Exception]:"java.lang.Exception: Invoke failed: [[c:JasperCompileManager]]->compileReport((o:String)[o:String]). Cause: net.sf.jasperreports.engine.JRException: java.io.FileNotFoundException: /FULL_PATH/rpt_file.jrxml (Permission denied) VM: 1.6.0_17@http://java.sun.com/" at: #-12 net.sf.jasperreports.engine.xml.JRXmlLoader.load(JRXmlLoader.java:174) #-11 net.sf.jasperreports.engine.xml.JRXmlLoader.load(JRXmlLoader.java:154) #-10 net.sf.jasperreports.engine.JasperCompileManager.compileReport(JasperCompileManager.java:146) #-9 sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) #-8 sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) #-7 sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) #-6 java.lang.reflect.Method.invoke(Method.java:616) #-5 php.java.bridge.JavaBridge.Invoke(JavaBridge.java:1044) #-4 php.java.bridge.Request.handleRequest(Request.java:417) # in /FULL_PATH/Java.inc.php on line 195 I have chmod and chown to apache ; tomcat ; root as 0777 and all of them returns the same. Renaming the file returns file not found (obvious..), so the file is found but I cant solve the permission thing.. Rgds,
×
×
  • Create New...