Jump to content
Changes to the Jaspersoft community edition download ×

wentwog

Members
  • Posts

    12
  • 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 wentwog

  1. As far as I have got, here (JasperReports Server Web Service Guide) is said that JasperServer has RESTful services to run JasperServer's commands. E.g. you can run report throught this RESTful services. But, the question was how to make a report that reads it's data from REST datasource. Can you, please, help with this ?
  2. Hi all ! I have problems when exporting report to excel in iReport and JasperServer 4.0.0. My report is of A3 format. The problem is when the report gets printed it's splitted into two pages because of it's wide width. The problem does not exists when I have one element that occupies full width of the report. But it do emerge when I add an element shorter than the 1st. I'm exporting the report by the means of XLS JExcelAPI in iReport and by the means of default excel exporter in JasperServer. Have tried other exel exporters available with iReport - the same result. I'm attaching examples: report1 - the problem doesn't show up. report2 - has the problem.
  3. Hi all ! I have problems when exporting report to excel in iReport and JasperServer 4.0.0. My report is of A3 format. The problem is when the report gets printed it's splitted into two pages because of it's wide width. The problem does not exists when I have one element that occupies full width of the report. But it do emerge when I add an element shorter than the 1st. I'm exporting the report by the means of XLS JExcelAPI in iReport and by the means of default excel exporter in JasperServer. Have tried other exel exporters available with iReport - the same result. I'm attaching examples: report1 - the problem doesn't show up. report2 - has the problem.
  4. I suppose the problem is in report's parameters. Your can look at the source code (http://jasperforge.org/svn/repos/jasperserver). Locate the version of JasperServer you are using. I use 4.0. And I've seen the error block: Object[] builtinParameters = queryExecuterFactory.getBuiltinParameters(); if (builtinParameters != null) { for (int i = 0; i < builtinParameters.length - 1; i += 2) { String name = (String) builtinParameters; Class type = (Class) builtinParameters[i + 1]; //!! this is the error line Object value = parameterValues.get(name); dsParameters.add(new ValueParameter(name, type, value)); } } But, looking in your code, you have posted bofore, I have found that you dont use builtinParameters for your dataSource, So, I conclude that you have changed your dataSource code, or the error corresponds to another data source you might use, or your JS verson is not 4.0. So, I advice you to go through the sources or try to remove the inputControl for which you are using your Hibernate dataSource, and see if it goes without errors. Good luck !
  5. There is nothing magical with input controls. What I have describes before is just the way how to intergate your java code with JasperServer for to read info from anywhere you want and can with Java, and then, to use the read data in inputControl. If you have such an error, try to figure out it's origin. Do you have the full stack trace ? Where the mentioned class casting occures ?
  6. Unfortunately I have not used HSQL or Spring Aspect orientied Programming (AOP) with JasperServer. So I can give you only the general info about executing HSQL queries. (May be you already know it) First, you open Hibernate transaction, then Hibernate session, execute your HSQL query, close session, close transaction. If you are using Spring's AOP you can use declarative transaction and session management throught advisors. Unfortunately I have nor expirience, nor information about any specifics regarding usage of Hibernate or Spring together with JaserServer.
  7. So, I see that you have not yet implemented your DataSource. You can use the example dataSource that I've attached in my previons post. Or do you encounter some problems doing it ?
  8. loganathann Wrote: I need example codes for creating and implementing data source...Please kindly help me.. See the attached "SampleJRDataSource.java". It's the example from which I have drawn information about dataSources. The full example can be found here http://enholm.net/index.php/blog/jasper-reports-custom-data-source-example/ the full example is about using custom dataSource for report, not for input control, which is a little wider. If you need the dataSource just for input control, you only need the file I've attached. Hope it helps, good luck !
  9. Anyway, I have solved the problem. If somebody ever will encounter a similar problem, I supply my solution here. Yes, indeed, input controls do not support a BeanDataSource directly. But they do use queries. So you can create your custom queryExecutor, that uses your custom data source i.e. BeanDataSource. To do this you need: 1) create custom QueryExecuterFactory by implementing net.sf.jasperreports.engine.query.JRQueryExecuterFactory. This factory would create objects of your custom QueryExecuter. 2) create custom QueryExecuter by implementing net.sf.jasperreports.engine.query.JRQueryExecuter. This QueryExecuter would create objects of your custom DataSource. 3) create custom DataSource by implementing net.sf.jasperreports.engine.JRDataSource. This data source is the point where you load data you need. 4) register your QueryExecuterFactory in JasperServer: add line: net.sf.jasperreports.query.executer.factory.YOUR_QUERY_LANGUAGE=your.package.CustomQueryExecuterFactory to WEB-INF\classes\jasperreports.properties 5) register your query languge add property <value>YOUR_QUERY_LANGUAGE</value> under <property name="queryLanguages"> within file WEB-INF\flows\queryBeans.xml 6) register human-friendly label for YOUR_QUERY_LANGUAGE: add query.language.YOUR_QUERY_LANGUAGE.label=YOUR_QUERY_LANGUAGE_LABEL to WEB-INF\bundles\jasperserver_messages.properties and to any localized property files you have (if you need localization for the label, in most cases you don't) You can get the query string and report parameters (if you need of course) in method of the custom QueryExecuterFactory: your.package.CustomQueryExecuterFactory.createQueryExecuter(JRDataset dataset, Map parameters) Your get query from JRDataset, parameters from Map.
  10. On my report I have an input control. Using it, the user should select one value from the list. The list are to be read from IBM Tivoli LDAP. So I can't use JDBC Data Source and SQL query here. I think, I need to use the Bean Data Source, in which use Tivoly API to load the list. But, it seems, input controls don't support bean data sources, although the reports do. I' ve built a report that succesfully uses bean data source. Than, I try to use this bean data source for an input control and get the following error: net.sf.jasperreports.engine.JRRuntimeException: Parameter "REPORT_CONNECTION" does not exist. at net.sf.jasperreports.engine.query.JRAbstractQueryExecuter.getValueParameter(JRAbstractQueryExecuter.java:569) at net.sf.jasperreports.engine.query.JRAbstractQueryExecuter.getParameterValue(JRAbstractQueryExecuter.java:433) at net.sf.jasperreports.engine.query.JRAbstractQueryExecuter.getParameterValue(JRAbstractQueryExecuter.java:445) at net.sf.jasperreports.engine.query.JRJdbcQueryExecuter.<init>(JRJdbcQueryExecuter.java:90) at com.jaspersoft.jasperserver.api.engine.jasperreports.util.JRTimezoneJdbcQueryExecuter.<init>(JRTimezoneJdbcQueryExecuter.java:125) at com.jaspersoft.jasperserver.api.engine.jasperreports.util.JRTimezoneJdbcQueryExecuterFactory.createQueryExecuter(JRTimezoneJdbcQueryExecuterFactory.java:50) at com.jaspersoft.jasperserver.api.engine.jasperreports.util.JRQueryExecuterAdapter.executeQuery(JRQueryExecuterAdapter.java:111) at com.jaspersoft.jasperserver.api.engine.jasperreports.service.impl.EngineServiceImpl.executeQuery(EngineServiceImpl.java:1055) at com.jaspersoft.jasperserver.war.action.ReportParametersAction.executeQuery(ReportParametersAction.java:773) at com.jaspersoft.jasperserver.war.action.ReportParametersAction.createWrappers(ReportParametersAction.java:488) at com.jaspersoft.jasperserver.war.action.ReportParametersAction.createWrappers(ReportParametersAction.java:420) at com.jaspersoft.jasperserver.war.action.ReportParametersAction.createWrappers(ReportParametersAction.java:144) at com.jaspersoft.jasperserver.war.action.ViewReportAction.checkForParams(ViewReportAction.java:204) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:48) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:37) at java.lang.reflect.Method.invoke(Method.java:600) at org.springframework.webflow.action.DispatchMethodInvoker.invoke(DispatchMethodInvoker.java:98)and more . . . Can you help me out with the issue, please ? Post Edited by wentwog at 04/07/2011 07:14
  11. Hello. Try to use metadata.hibernate.dialect=org.hibernate.dialect.Oracle10gDialect It has worked for me. I've launched a search for "Oracle.*Dialect" throught jar's within my downloaded copy of "Generic ZIP distribution v 4.0", and among others have founded the mentioned dialect class. I suppose that "com.jaspersoft.ji.hibernate.dialect.OracleUnicodeDialect" is only distributed with the professional version of JS.
×
×
  • Create New...