Jump to content
Changes to the Jaspersoft community edition download ×

xok

Members
  • Posts

    46
  • Joined

  • Last visited

xok's Achievements

Contributor

Contributor (5/14)

  • First Post Rare
  • Collaborator Rare
  • Conversation Starter Rare
  • Week One Done
  • One Month Later

Recent Badges

0

Reputation

  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
×
×
  • Create New...