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

gkuehnberger

Members
  • Posts

    25
  • Joined

  • Last visited

gkuehnberger's Achievements

Apprentice

Apprentice (3/14)

  • Week One Done
  • One Month Later
  • One Year In
  • First Post Rare
  • Collaborator Rare

Recent Badges

0

Reputation

  1. remove the dot and it should work fine.
  2. please find below comparison of pro (working) vs. CE version (broken). fact: in neigther pro nor CE version the the mysql user jaserdb may connect to "localhost" however can connect to "127.0.0.1": eg: abeast14:/opt/jasperserver-pro-3.7/mysql/bin# ./mysql -ujasperdb -ppassword -P3324 -hlocalhost ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2) So I assume, that the config of the import/export tool in the CE-Version somewhere points to localhost. ################### 370 professional ################### ### ports-concept # use all ports + 18 Und hol Dir die Doku & ### install /opt/jasper_src/jasperserver-3.7-linux-installer.bin ### answers /opt/jasperserver-pro-3.7 1 1 8080 8098 tomcat-web 8005 8023 tomcat-controll Y Y 3306 3324 mysql ### start stop log /opt/jasperserver-pro-3.7/jasperctl.sh start /opt/jasperserver-pro-3.7/jasperctl.sh stop tail -f /opt/jasperserver-pro-3.7/apache-tomcat/logs/*.log --- EXPORT - working ??? ---- cd /opt/jasperserver-pro-3.7/scripts ./js-export.sh --everything --output-zip export1.zip OK, worked fine; ################### 370 CE ################### ### ports-concept # use all ports + 17 # remove reinstall ### install cd /opt/jasper_src/ ./jasperserver-ce-3.7.0-RC-linux-installer.bin ### answers /opt/jasperserver-ce-3.7.0 1 1 8080 8097 tomcat-web 8005 8022 tomcat-controll 3306 3323 mysql Y Y ### start stop log /opt/jasperserver-ce-3.7.0/jasperctl.sh start /opt/jasperserver-ce-3.7.0/jasperctl.sh stop tail -f /opt/jasperserver-ce-3.7.0/apache-tomcat/logs/*.log /opt/jasperserver-ce-3.7.0/mysql/data/mysqld.log --------- # EXPORT - working ??? ---- cd /opt/jasperserver-ce-3.7.0/scripts ./js-export.sh --everything --output-zip export1.zip >>> broken - Error: abeast14:/opt/jasperserver-ce-3.7.0/scripts# ./js-export.sh --everything --output-zip export1.zip | more 18:00:06,932 WARN JDBCExceptionReporter:100 - SQL Error: 0, SQLState: null 18:00:06,936 ERROR JDBCExceptionReporter:101 - Cannot create PoolableConnectionFactory (Access denied for user 'jasperdb '@'localhost' (using password: YES)) 18:00:06,940 WARN SettingsFactory:133 - Could not obtain connection to query metadata org.apache.commons.dbcp.SQLNestedException: Cannot create PoolableConnectionFactory (Access denied for user 'jasperdb'@' localhost' (using password: YES)) at org.apache.commons.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:855) at org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDataSource.java:540) at org.springframework.orm.hibernate3.LocalDataSourceConnectionProvider.getConnection(LocalDataSourceConnectionP rovider.java:82) at org.hibernate.cfg.SettingsFactory.buildSettings(SettingsFactory.java:111) at org.hibernate.cfg.Configuration.buildSettingsInternal(Configuration.java:2119) at org.hibernate.cfg.Configuration.buildSettings(Configuration.java:2115) at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1339) at org.springframework.orm.hibernate3.LocalSessionFactoryBean.newSessionFactory(LocalSessionFactoryBean.java:814 ) at org.springframework.orm.hibernate3.LocalSessionFactoryBean.buildSessionFactory(LocalSessionFactoryBean.java:7 32) at org.springframework.orm.hibernate3.AbstractSessionFactoryBean.afterPropertiesSet(AbstractSessionFactoryBean.j ava:211)
  3. Seems I guessed wrong, as the "columnCount" is an attribute of jasperReport, as is columnWidth; However you should be able to solve your task by creating two subreports (1col + 2col) and configure the subreport expression to respect the user input param. regards georg
  4. In regards to columns: I guess yes, however you would have to subsequently calculate the column width depending on the choosen number of columns. why not giving it a try in iReport upfront? hth regards georg
  5. Chaps, as discussed, I filed a bug under: http://jasperforge.org/projects/jasperserver/tracker/view.php?id=4535 I assume, that the config of the import/export tool in the CE-Version somewhere points to localhost, as mysqlconnect to localhost fails for user jasperdb. thanks upfront, regards georg
  6. you wanna try the following, which provides a QR code pointing to bit.ly (for shortening the url) which then redirects to this post: <image scaleImage="RealSize"> <reportElement x="0" y="0" width="350" height="350"/> <imageExpression class="java.lang.String"><![CDATA["http://chart.apis.google.com/chart?cht=qr&chs=230x230&chl=http%3A%2F%2Fbit.ly%2F4FIY3I"]]></imageExpression> </image>
  7. Chamil, How did you solve the 2d bacode generation? I only found a few a commercial offers promising the above including libs for ireport and jasperreports one of them was: http://www.keepautomation.com/guide/barcode_ireport.html regards georg
  8. Thanks for the feedback; I'll file a bug within the next days. regards georg
  9. how about posting the ttf font and your jrxml here, so everybody can better understand and duplicate your problem and eventually offer a solution to you? just my 2cents.
  10. It seems the export/import scripts, their settings or the mysql jars are broken in: jasperserver-ce-3.7.0-RC-linux-installer.bin Howto reproduce: - install jasperserver-ce-3.7.0-RC-linux-installer.bin in complete standalone (tomcat & mysql) mode eg. on debian - webinterface and webservices worked fine so far - however export import did not worke like: cd <js-install> cd scripts ./js-export.sh --everything --output-dir /tmp/370 results in: 12:21:40,678 ERROR JDBCExceptionReporter:101 - Cannot create PoolableConnectionFactory (Access denied for user 'jasperdb'@'localhost' (using password: YES)) 12:21:40,681 WARN SettingsFactory:133 - Could not obtain connection to query metadata org.apache.commons.dbcp.SQLNestedException: Cannot create PoolableConnectionFactory (Access denied for user 'jasperdb'@'localhost' (using password: YES)) at org.apache.commons.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:855) at org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDataSource.java:540) at org.springframework.orm.hibernate3.LocalDataSourceConnectionProvider.getConnection(LocalDataSourceConnectionProvider.java:82) - testing the DB conection see below, worked fine though: cd <js-install> cd mysql/bin ./mysql -ujasperdb -ppassword -P3306 -h127.0.0.1 Please advice on cause and fix or let me know wether I should file a bugreport. Thanks, regards Georg
  11. you could simply pass the db-creds db-name and db-host to the report during report-creation. so you would not have to create separate datasources and neigther separate reports, just use input parameters and you are done. hth regards georg
  12. I feel your error: "that the font cannot be embedded due to liscencing issues" is related to the licencing of the TTF font.
  13. Within the webinterface of JasperServer, you can can add your font as a ressource (like images or input controlls) to your report, and provide das name for this ressource, eh. fontname. From your jrxml-file you referce the font then like "repo:fontname" hth regards georg
  14. Just another idea - use the Webservices: Instead of letting the users access JasperServer directly you can use the SOAP Implementation provided. Version a) Checkout the php samples provided with JS, they are great and easily customizable. - do this in case you want to provide more than a few reports to the user and let the user browse around according to his rights. Version b) checkout: http://gist.github.com/26205 - do this in case you want to provide just one or two reports hth regards georg PS: ad b) as the link seems to be broken I'll attach the php code below. Post Edited by gkuehnberger at 01/04/2010 00:51 Code:<?php/** * PHP client for requesting reports from JasperServer via SOAP. * * USAGE: * * $jasper_url = "http://jasper.example.com/jasperserver/services/repository"; * $jasper_username = "jasperadmin"; * $jasper_password = "topsecret"; * * * $client = new JasperClient($jasper_url, $jasper_username, $jasper_password); * * $report_unit = "/my_report"; * $report_format = "PDF"; * $report_params = array('foo' => 'bar', 'fruit' => 'apple'); * * $result = $client->requestReport($report_unit, $report_format,$report_params); * * header('Content-type: application/pdf'); * echo $result; */class JasperClient { private $url; private $username; private $password; public function __construct($url, $username, $password) { $this->url = $url; $this->username = $username; $this->password = $password; } public function requestReport($report, $format, $params) { $params_xml = ""; foreach ($params as $name => $value) { $params_xml .= "<parameter name="$name"><![CDATA[$value]]></parameter>n"; } $request = " <request operationName="runReport" locale="en"> <argument name="RUN_OUTPUT_FORMAT">$format</argument> <resourceDescriptor name="" wsType="" uriString="$report" isNew="false"> <label>null</label> $params_xml </resourceDescriptor> </request> "; $client = new SoapClient(null, array( 'location' => $this->url, 'uri' => 'urn:', 'login' => $this->username, 'password' => $this->password, 'trace' => 1, 'exception'=> 1, 'soap_version' => SOAP_1_1, 'style' => SOAP_RPC, 'use' => SOAP_LITERAL )); $pdf = null; try { $result = $client->__soapCall('runReport', array( new SoapParam($request,"requestXmlString") )); $pdf = $this->parseReponseWithReportData( $client->__getLastResponseHeaders(), $client->__getLastResponse()); } catch(SoapFault $exception) { $responseHeaders = $client->__getLastResponseHeaders(); if ($exception->faultstring == "looks like we got no XML document" && strpos($responseHeaders, "Content-Type: multipart/related;") !== false) { $pdf = $this->parseReponseWithReportData($responseHeaders, $client->__getLastResponse()); } else { throw $exception; } } if ($pdf) return $pdf; else throw new Exception("Jasper did not return PDF data. Instead got: n$result"); } protected function parseReponseWithReportData($responseHeaders, $responseBody) { preg_match('/boundary="(.*?)"/', $responseHeaders, $matches); $boundary = $matches[1]; $parts = explode($boundary, $responseBody); $pdf = null; foreach($parts as $part) { if (strpos($part, "Content-Type: application/pdf") !== false) { $pdf = substr($part, strpos($part, '%PDF-')); break; } } return $pdf; }}?> Post Edited by gkuehnberger at 01/04/2010 00:52
  15. kpent, The timestamp difference is probably caused be the JasperServer and your iReport instance "living" in different timezones. In case no timezone information is provided within the report itself, jaspereports will use the system's default timezone (and locale btw.). JasperServer: On the web-login screen you can choose a timezone and locale for your user-session. iReport: Somewhere under Options > Settings > you can modify timezone and local. hth regards georg
×
×
  • Create New...