Jump to content
Changes to the Jaspersoft community edition download ×

atiquek

Members
  • Posts

    22
  • 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 atiquek

  1. You can create your own applicationContext-ds.xml file and define your CustomDataSourceService <bean id="itmsCustomDataSource" class="com.jaspersoft.jasperserver.api.engine.jasperreports.util.CustomDataSourceDefinition"> <property name="factory" ref="customDataSourceServiceFactory"/> <property name="name" value="itmsCustomDataSource"/> <property name="serviceClassName" value="org.quwic.itms.bi.ds.CustomDataSourceService"/> <property name="validator"> <bean class="org.quwic.itms.bi.ds.CustomDSValidator"/> </property> <property name="propertyDefinitions"> <list> <map> <entry key="name" value="action"/> <entry key="default" value="This is a required value"/> </map> </list> </property> <property name="queryExecuterMap"> <map/> </property> </bean>[/code]This bean will be responsible for instantiating your CustomDataSource. More details here http://community.jaspersoft.com/wiki/custom-data-source-sample-readme
  2. In 5.2 it seems preauthenticated filters cant be implemented properly. I found that the filter is not called straightaway. Rather AccessDeniedException is thrown which is then forwarded to authentication entry point. I am using 5.2 and my requirement is to bypass login page based on some request parameters. My beans are defined as below: <bean id="proxyAuthenticationProcessingFilter" class="org.quwic.itms.bi.externalauth.BIAuthenticationProcessingFilter"> <property name="authenticationManager" ref="customAuthenticationManager" /> <property name="externalDataSynchronizer" ref="externalDataSynchronizer" /> <property name="sessionRegistry" ref="sessionRegistry" /> <property name="internalAuthenticationFailureUrl" value="/login.html?error=1" /> <property name="defaultTargetUrl" value="/loginsuccess.html" /> <property name="invalidateSessionOnSuccessfulAuthentication" value="true" /> <property name="migrateInvalidatedSessionAttributes" value="true" /> <property name="filterProcessesUrl" value="/j_spring_security_check" /> </bean> <bean id="proxyExceptionTranslationFilter" class="org.springframework.security.ui.ExceptionTranslationFilter"> <property name="authenticationEntryPoint"> <bean class="org.springframework.security.ui.webapp.AuthenticationProcessingFilterEntryPoint"> <property name="loginFormUrl" value="/j_spring_security_check" /> <property name="forceHttps" value="false" /> </bean> </property> <property name="accessDeniedHandler"> <bean class="com.jaspersoft.jasperserver.war.themes.ThemeAwareAccessDeniedHandlerImpl"> <property name="errorPage" value="/WEB-INF/jsp/modules/system/AccessDeniedPage.jsp" /> <property name="themeResolver" ref="themeResolver" /> <property name="themeSource" ref="themeSource" /> </bean> </property> </bean> <bean id="customAuthenticationManager" class="org.springframework.security.providers.ProviderManager"> <property name="providers"> <list> <ref bean="customAuthenticationProvider" /> <ref bean="${bean.daoAuthenticationProvider}" /> </list> </property> </bean> <bean id="customAuthenticationProvider" class="org.quwic.itms.bi.externalauth.BIAuthenticationProvider" />
  3. Hi, I recently started upgrade to JRS 5.0.1 from 4.5.0. We execute reports using HTTP API. Most of our reports use web services to fetch data which is implemented using JRDataSource. In 4.5.0, we were able to retrieve HttpServletRequest using code snippet private HttpServletRequest getHttpServletRequest() { HttpServletRequest request = null; ServletRequestAttributes attrs = (ServletRequestAttributes) RequestContextHolder.getRequestAttributes(); if(attrs != null) { request = attrs.getRequest(); } return request; } This method returns null in 5.0.1. Does anyone know how to retrieve this request object in JRDataSource implementation. Thanks,
  4. Hi, I have a professional Jasper report server with multiple organizations. I want to implement custom SSO wherein any request to JRS will come with an id, JRS is supposed to send a validation request to some internal application and then serve the request if validation is true. Could you please suggest whats the best approach to integrate this. Any working examples similar to this will be quite helpful as well. Thanks, Atique
  5. Hi Gurus, I have created a report which includes 3 subreports. The subreports subreport1 and subreport2 have been placed in a frame and needs to be displayed together. The 3rd subreport subreport3 is placed in a frame as well. Both these frames overlap each other. The idea is to always display the frame with the 2 subreports. When this report will be exported to csv format then the frame with the subreport3 should be exported else the frame with subreport1 & subreport2 should be exported. The problem is I am getting both the frames printed in the default view. Could someone please advise/point how do I hide the subreport3 frame when viewing it and export it to csv based on user selection. The detail band is given as follows: <property name="net.sf.jasperreports.export.csv.exclude.origin.keep.first.band.1" value="columnHeader"/> <property name="net.sf.jasperreports.export.csv.exclude.origin.band.2" value="pageFooter"/> <property name="net.sf.jasperreports.export.csv.exclude.key.normal" value=""/> <property name="net.sf.jasperreports.export.pdf.exclude.key.csv" value=""/> <property name="net.sf.jasperreports.export.html.exclude.key.csv" value=""/> <property name="net.sf.jasperreports.export.xls.exclude.key.csv" value=""/> <property name="net.sf.jasperreports.export.xlsx.exclude.key.csv" value=""/> <property name="net.sf.jasperreports.export.docx.exclude.key.csv" value=""/> <property name="net.sf.jasperreports.export.rtf.exclude.key.csv" value=""/> <property name="net.sf.jasperreports.export.odt.exclude.key.csv" value=""/> <property name="net.sf.jasperreports.export.ods.exclude.key.csv" value=""/> <property name="net.sf.jasperreports.export.swf.exclude.key.csv" value=""/> <detail> <band height="41" splitType="Stretch"> <frame> <reportElement key="normal" stretchType="RelativeToTallestObject" x="0" y="0" width="575" height="40" isRemoveLineWhenBlank="true"/> <subreport isUsingCache="false" runToBottom="false"> <reportElement key="" x="0" y="0" width="389" height="40"/> <subreportParameter name="stationid"> <subreportParameterExpression><![CDATA[$F{id}]]></subreportParameterExpression> </subreportParameter> <subreportParameter name="description"> <subreportParameterExpression><![CDATA[$F{description}]]></subreportParameterExpression> </subreportParameter> <connectionExpression><![CDATA[$P{REPORT_CONNECTION}]]></connectionExpression> <subreportExpression><![CDATA["AqmBarChart1.jasper"]]></subreportExpression> </subreport> <subreport isUsingCache="false" runToBottom="false"> <reportElement key="" x="389" y="0" width="186" height="40"/> <subreportParameter name="stationid"> <subreportParameterExpression><![CDATA[$F{id}]]></subreportParameterExpression> </subreportParameter> <connectionExpression><![CDATA[$P{REPORT_CONNECTION}]]></connectionExpression> <subreportExpression><![CDATA["AqmChartDesc1.jasper"]]></subreportExpression> </subreport> </frame> <frame> <reportElement key="csv" x="0" y="0" width="575" height="40" isRemoveLineWhenBlank="true"/> <subreport isUsingCache="false"> <reportElement key="" x="0" y="0" width="575" height="40" isRemoveLineWhenBlank="true"/> <subreportParameter name="stationid"> <subreportParameterExpression><![CDATA[$F{id}]]></subreportParameterExpression> </subreportParameter> <subreportParameter name="description"> <subreportParameterExpression><![CDATA[$F{description}]]></subreportParameterExpression> </subreportParameter> <connectionExpression><![CDATA[$P{REPORT_CONNECTION}]]></connectionExpression> <subreportExpression><![CDATA["AqmCsv.jasper"]]></subreportExpression> </subreport> </frame> </band> </detail>
  6. Hi Gurus, I have created a report which includes 3 subreports. The subreports subreport1 and subreport2 have been placed in a frame and needs to be displayed together. The 3rd subreport subreport3 is placed in a frame as well. Both these frames overlap each other. The idea is to always display the frame with the 2 subreports. When this report will be exported to csv format then the frame with the subreport3 should be exported else the frame with subreport1 & subreport2 should be exported. The problem is I am getting both the frames printed in the default view. Could someone please advise/point how do I hide the subreport3 frame when viewing it and export it to csv based on user selection. The detail band is given as follows: <property name="net.sf.jasperreports.export.csv.exclude.origin.keep.first.band.1" value="columnHeader"/> <property name="net.sf.jasperreports.export.csv.exclude.origin.band.2" value="pageFooter"/> <property name="net.sf.jasperreports.export.csv.exclude.key.normal" value=""/> <property name="net.sf.jasperreports.export.pdf.exclude.key.csv" value=""/> <property name="net.sf.jasperreports.export.html.exclude.key.csv" value=""/> <property name="net.sf.jasperreports.export.xls.exclude.key.csv" value=""/> <property name="net.sf.jasperreports.export.xlsx.exclude.key.csv" value=""/> <property name="net.sf.jasperreports.export.docx.exclude.key.csv" value=""/> <property name="net.sf.jasperreports.export.rtf.exclude.key.csv" value=""/> <property name="net.sf.jasperreports.export.odt.exclude.key.csv" value=""/> <property name="net.sf.jasperreports.export.ods.exclude.key.csv" value=""/> <property name="net.sf.jasperreports.export.swf.exclude.key.csv" value=""/> <detail> <band height="41" splitType="Stretch"> <frame> <reportElement key="normal" stretchType="RelativeToTallestObject" x="0" y="0" width="575" height="40" isRemoveLineWhenBlank="true"/> <subreport isUsingCache="false" runToBottom="false"> <reportElement key="" x="0" y="0" width="389" height="40"/> <subreportParameter name="stationid"> <subreportParameterExpression><![CDATA[$F{id}]]></subreportParameterExpression> </subreportParameter> <subreportParameter name="description"> <subreportParameterExpression><![CDATA[$F{description}]]></subreportParameterExpression> </subreportParameter> <connectionExpression><![CDATA[$P{REPORT_CONNECTION}]]></connectionExpression> <subreportExpression><![CDATA["AqmBarChart1.jasper"]]></subreportExpression> </subreport> <subreport isUsingCache="false" runToBottom="false"> <reportElement key="" x="389" y="0" width="186" height="40"/> <subreportParameter name="stationid"> <subreportParameterExpression><![CDATA[$F{id}]]></subreportParameterExpression> </subreportParameter> <connectionExpression><![CDATA[$P{REPORT_CONNECTION}]]></connectionExpression> <subreportExpression><![CDATA["AqmChartDesc1.jasper"]]></subreportExpression> </subreport> </frame> <frame> <reportElement key="csv" x="0" y="0" width="575" height="40" isRemoveLineWhenBlank="true"/> <subreport isUsingCache="false"> <reportElement key="" x="0" y="0" width="575" height="40" isRemoveLineWhenBlank="true"/> <subreportParameter name="stationid"> <subreportParameterExpression><![CDATA[$F{id}]]></subreportParameterExpression> </subreportParameter> <subreportParameter name="description"> <subreportParameterExpression><![CDATA[$F{description}]]></subreportParameterExpression> </subreportParameter> <connectionExpression><![CDATA[$P{REPORT_CONNECTION}]]></connectionExpression> <subreportExpression><![CDATA["AqmCsv.jasper"]]></subreportExpression> </subreport> </frame> </band> </detail>
  7. Hi All, I am using Custom Data Source to fetch data to create a report wherein I have a detail section which displays data in a tabular format followed by a custom chart in the summary section. The tabular format is Date Item1 Count Item1 Count Item3 Count 01/03/2012 35 45 52 02/03/2012 55 25 58 03/03/2012 45 45 65 The chart is supposed to display this data in a bar chart with three series for Item1, 2 & 3. I understand the main query could not be used for the chart. I have modified the data to be a JRCollection like Date date; String item; Integer count; so that item can be used a series, date as category and count as value. Could someone please advise how can I pass this bean to the chart. One thing to note this is implemented using Custom data source and the data can be retrieved only once using custom data source and passed along to the chart. Thanks, Atique Post Edited by atiquek at 04/08/2012 09:11 Post Edited by atiquek at 04/08/2012 09:12
  8. Thanks very much. Such a simple stuff solved my misery.
  9. I have created a report with a title, column header, group header, group footer, detail, page footer and summary bands. Group header displays data grouped on month with the group footer containing totals for that group. I have put the Grand Total stuff on the summary band followed by a page break and a bar chart. The summary band is set to Maximize Band Height. When I preview the report the grand total stuff goes into a new page, then a page break with the chart stuff in a new page. Basically, I would like the grand total just after the last group total so that the chart always display in a new page. I have attached my sample report for you guys to have a look. Is there any trick which allows the grand total just after the last group footer. Any help is highly appreciated.
  10. Hi, I have a bar chart in my report which doesnt get exported in csv as expected. Now the requirement is to replace the bar chart with some textual information which can be exported only for csv format. Does anyone have a working sample. Any help will be greatly appreciated. Thanks,
  11. Hi, I have a requirement wherein I need to create multiple Bar Charts for each month's data based on a selected duration. Each Bar chart has a series of 3 items. When I specify series color and if one of the series is not drawn then the colors get changed in the created charts. For example, in the january chart red bar is for item1, green for item2 and blue for item3. In the february chart it becomes green for item1 and blue for item2 since there is no items3. Is there anyway to control this color behaviour using a chart customizer. Thanks in advance for your help. Thanks, Atique
  12. I fixed this on my own with some the help of some old posts on this forum. I had to create 3 custom DataSource one for main and 2 for each subreports. Then I created 2 fields fieldSubReport1 and fieldSubReport2 on the main report with their data type as java.util.List. These two fields are passed as subreport parameters to the corrresponding subreports with the DataSource expression being new my.package.ClassName($F{chartData}) and new my.package.ClassName1($F{chartDesc}). Each of these subreport DataSource implements JRDataSource and thats pretty much.
  13. Hi Gurus, I have implemented a custom datasource to fetch my data to populate a report which contains 2 subreports placed adjacent to each other. So for each row of data I want the 2 subreports to be executed. I am retrieving the data using web services in the custom datasource and need to pass this data to the subreports. I am lost here completely and need some help/guidance so that the data can be populated in the subreports. Please help. Thanks, Atique
  14. You are correct. It was mainly a width problem. When I changed the master report to landscape it started working and have fixed the issue. Your advice/suggestion is highly appreciated.
  15. The files are attached. I have a ChartCustomiser in the report, please remove it to run the report.
  16. The second subreport has very minimum data as shown in the attached file. The black rectangle contains the second subreport data. you can see the first one takes the entire width of the report.
  17. Thanks Mennei for your quick response. I tried frames but no luck. The second one is written over the first one which takes the whole width of the master report.
  18. Hi there, I have a main report (Master.jrxml) which needs to place two subreports (subreport1.jrxml & subreports2.jrxml) side by side. The first subreport contains a bar chart while the second one contains some further information related to the chart and needs to be displayed to the right of the chart or subreport1. Could someone please suggest how do I place the two subreports so that they dont overlap. Thanks, Atique
  19. Thanks very much for your advice. I have been able to solve it quite easily. Do you know if its possible to add some text value towards the end of the chart like the one in the attached snapshot. For each I want to display some additional information about the color of the bar like Good, Moderate, Hazardous etc... Thanks, Atique
  20. Hi All, I am trying to create a report similar to the attached file. The values on the y-axis range from 0-10 and the color of the bar changes based on the value. If the value is 0-3 its green, 4-7 amber, 8-10 red. Similarly for others. I have tried different options but could not come up with a solution. Does anyone has any similar experience working with iReports. Post Edited by atiquek at 02/13/2012 12:37
×
×
  • Create New...