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

gkuehnberger

Members
  • Posts

    25
  • 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 gkuehnberger

  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
  16. Sherman, I solved the task, without the need of a new custom datasource, the following way. hth someone searching the archives later on; regards Georg a) added xpath2 functionality to jasperserver 3.5 see: see http://jasperforge.org/plugins/espforum/view.php?group_id=112&forumid=102&topicid=68744 b) used a java.lang.String input parameter, which ist then taken over by the org.w3c.dom.Document XML_DATA_DOCUMENT; within the main report I used something like: <parameter name="XML_DATA" class="java.lang.String"> <defaultValueExpression><![CDATA["<data><node1>node1-text</node1><node2>node2-text</node2></data>"]]></defaultValueExpression> </parameter> <parameter name="XML_DATA_DOCUMENT" class="org.w3c.dom.Document" isForPrompting="false"> <defaultValueExpression><![CDATA[net.sf.jasperreports.engine.util.JRXmlUtils.parse(new org.xml.sax.InputSource(new java.io.StringReader($P{XML_DATA})))]]></defaultValueExpression> </parameter> <queryString language="xpath2"> <![CDATA[/data]]> </queryString>
  17. see http://jasperforge.org/plugins/espforum/view.php?group_id=112&forumid=102&topicid=68744 I solved my problem and also described there howto easily add xpath2 to jasperserver 3.5 regards georg
  18. FYI I solved the above. Apparently I misunderstood the queryexecuters logic a bit, and I especially stumbled upon jasperserver missing the xpath2 queryexector. Anyway, as for reference, please find my solution below; hth someone later on regards Georg ### adding xpath2 query executer to jasperserver 3.5 without using a custom datasource a) extended /opt/jasperserver-3.5.0/apache-tomcat/webapps/jasperserver/WEB-INF/classes/jasperreports.properties with # addition for xpath2 queries net.sf.jasperreports.query.executer.factory.xpath2=com.jaspersoft.jrx.query.JRXPathQueryExecuterFactory b) copied jasperreports-extensions-3.5.3.jar (from iReport) to /opt/jasperserver-3.5.0/apache-tomcat/webapps/jasperserver/WEB-INF/lib/jasperreports-extensions-3.5.3.jar c) restarted jasperserver d) within the main report I used something like: <parameter name="p_xml_url" class="java.lang.String"> <defaultValueExpression><![CDATA["http://mydomain/generate_xml.php"]]></defaultValueExpression> </parameter> <parameter name="XML_URL" class="java.lang.String" isForPrompting="false"> <defaultValueExpression><![CDATA[$P{p_xml_url}]]></defaultValueExpression> </parameter>
  19. Hi all, Teodor, >I can only say this query executer is a separate project that you can find here: >http://www.jasperforge.org/sf/projects/jasperreports-extensions It seems this link is outdated; Anyone having a new one? > Since this is a special functionality that is not required by the great majority of our users, the guides you mentioned do not cover it. I do know that the usage of remote XML Datasources is by no means "a minority program". Thus IMHO JasperServer and JasperReports should support remote XML Datasources in the same way the do with other DS; (yes I've read all advices and books avail, in regards to Custom Datasources and even compiled the JR: demo/samples/xmldatasource); iReport is offering an excellent wealth of Datasources; how come the JS-Project can not re-use those ? regards georg
  20. Sherman, Thanks for your reply; Except for the official documentation shipped with jasperserver, and the offficial documentation we bought (all J-ultimate Guides), studied in depth, which however "only" show, cite, state examples of custom datasources, I were not able to locate any ressources, like downloadable code-examples of or ready to use custom datasources for the described specific task? Could you point me towards such a ressource? I feel such add-on downloads (supported or not) would add an incredible benefit supporting the proliferation of the product. Me feels that iReport with its wast datasources, meanwhile is way ahead of JS, which IMHO should not necessary be the case. Suggestion: setup a wiki-page describing howto "migrate" iReport DataSources to JasperServer? Thanks upfront, regards Georg
  21. john, (elder question I know, but), were you able to solve the described task? how? I'm interested in a solution eigther passing the xml-data within the request or referring to an external url which provides the xml. thanks upfront regards georg
  22. Hello, My target is to generate reports based on an external XML-Datasource, which should be handed over as parameter during runtime. I've succeeded doing so with iReport, however fail to do so with Jasper-Server. I understood that one could use a custom datasource, however I'm wondering wether this is really needed. Anyone already solved the above task with or without a custom datasource, and how? Thanks upfront regards Georg
×
×
  • Create New...