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

barsha_choudhury

Members
  • Posts

    3
  • Joined

  • Last visited

barsha_choudhury's Achievements

Newbie

Newbie (1/14)

  • Week One Done
  • One Month Later
  • One Year In
  • First Post Rare
  • Conversation Starter Rare

Recent Badges

0

Reputation

  1. while this approach works , if we have hard coded values in the data source class, and the report renders fine with these values. the question is how to get values from a postgresql database function/procedure. we need certain parameters to be passed from the report to the function, so that data is generated dynamically.
  2. we are trying to pass a custom data source (postgresql function) to a jasper report from servlet. the code in the servlet is as follows: Map<String, Object> hm = new HashMap<String, Object>(); JRDataSource datasource = new PostgreSqlDatasource(conectionn, string1, string2, string3); hm.put("report_custom_DataSource", datasource ); we have a parameter named report_custom_DataSource in the jrxml report , which is of type jr datasource. but this approach is not passing the required datasource to the report , as a result the report is not rendering on the UI . Please let us know the correct way to pass a custom data source to a jasper report.
  3. We need Jive component features (mainly Column sorting upon click of column header) in Jasper library 6.3. For this, we have downloaded the sample from <http://community.jaspersoft.com/wiki/table-sortinginteractivity-example-jasperreports-library-demos> and are trying to build our report in a similar way. We have written a Custom data source and set this as the data source expression for the Report/ Table/ Data Set in the JRXML file. We create an object of this data source and pass it as a parameter in the context-map. We have written a Custom servlet which extends the Jasper AbstractServlet - it's code is similar to the ViewerServlet present in the sample, except that it creates an Object of our data-source and puts it in the context-map. Then it calls VelocityUtil.processTemplate () with the body template and context-map. This Servlet is also set as the Custom viewer in the web.xml file: <servlet> <servlet-name>CustomViewerServlet</servlet-name> <servlet-class>MyCustomReportServlet</servlet-class> <init-param> <param-name>net.sf.jasperreports.web.servlets.viewer.header.template</param-name> <param-value>viewer/CustomHeaderTemplate.vm</param-value> </init-param> <init-param> <param-name>net.sf.jasperreports.web.servlets.viewer.body.template</param-name> <param-value>viewer/CustomBodyTemplate.vm</param-value> </init-param> <init-param> <param-name>net.sf.jasperreports.web.servlets.viewer.footer.template</param-name> <param-value>viewer/CustomFooterTemplate.vm</param-value> </init-param> </servlet> However, when we invoke this Servlet from the browser by giving it's URL and passing the parameters it needs, it just renders a blank blue screen with disabled arrow buttons for Next/ Previous. No data is coming in the report, and it seems the next () and getFieldValue () methods of our data-source are also not getting invoked. Please help resolve this. Any links to steps that need to be followed for enabling Jive components using a custom data-source will be appreciated.
×
×
  • Create New...