Jump to content

jamshaidiqbal120

Members
  • Posts

    24
  • Joined

  • Last visited

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

jamshaidiqbal120's Achievements

Contributor

Contributor (5/14)

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

Recent Badges

0

Reputation

  1. I am working on a report where I have the following condition - if the percentage is < 60 % show the axis as red color - if the percentage is >= 60 % & <=85 show the axis as orange color - if the percentage is > 85 % show the axis as green color is it possible to show multiple colors on a single line or change the color of the dot highlighted? If it is possible using custom code, please do let me know. Thanks
  2. what is datafile in Caused by: java.lang.NoSuchMethodException: net.sf.jasperreports.data.DataFile.<init>()?[/code]
  3. @jonmacano I am using v7.0 from docker hub. Yeah, the parameters do not change for a single report. if another report is run, it changes with the report. Could you please guide me regarding v7.0? thanks
  4. I am having some reports in Jasper Reports Server developed using Jasper Studio. The data is being loaded from the Rest API. I want to decrease the load time and make the report load faster. Is there any way I could achieve that? My data is being displayed in Charts in the report. **What I have tried?** I have tried looking into ad-hoc cache but could not integrate it. The guide provided is for **v4.7** of the Jasper report server. I am using v7 of the server and it is running in a docker container. Is there any way I could decrease the load time of reports? If Ad-Hoc Cache is an option, then how can I make it work in v7 of Jasper Server? Thanks
  5. I am running Jasper Server v7 on the Docker container. I am having my APIs running in another container and the data is being fetched through the APIs to the jasper reports. I am willing to configure Ad Hoc Cache for my jasper server. But, as per this guide, I can not find the specified files in my server directory, and also the Ad Hoc Cache menu is not available in the UI of the server. Is this only for the PRO version? Will this be useful in my case as I am performing a number of functions on my data fetched from the database and then I am sending it to the report using GET. Please advise and if it is available for the non-pro version, how do I enable it in my said version. Thanks a lot
  6. I have an API working and can get data from it on POSTMAN using the correct authentication details and parameters of the GET request. The output is as follows: But when I set the same parameters in the GET request in JSON adapter, it returns the key count but doesn't return any data, neither in the data preview option nor in the report. Here is the request: Here is the data preview I am unable to get to know the cause of the error as if there was a problem on the API side, it would not have returned anything to the POSTMAN request as well and nothing to the JASPER data adapter. What might be causing the issue? Thanks a lot for your time.
  7. I am having a few reports in Jasper Server. I am accessing the reports on another server using rest-api for Jasper. The report is loaded there successfully. My Problem The report fetches data from the database every time and fills it. When there is too much data, it takes a lot of time to build and fill the report. What I want to do? I want to know whether there is any kind of cache option in Jasper Server which downloads the report image to the server for the first time when it is loaded for the first time. When it is loaded for the second time, it should load the downloaded report rather than fetching the data and loading the report again. Is there any option for this in Jasper?
  8. I have designed a report using Jasper Studio and having a StackedBarChart like this: I have to run a new report when I click on each color. I have created three reports which are almost the same and have just a difference of two comparison variables. I have dependent variables which are **MonthName** and name for each color from **Legend**. I am thinking to create a single report which will receive two parameters through the REST request link. I am using List in the newly opened reports to display the relevant data. Here is my rest request link for the report: http://0.0.0.0:9093/jasperserver/rest_v2/reports/Sub_Reports/BillPay_Feature_Subreport.html (0.0.0.0 is a dummy address) The link is passed to each CategorySeries as HyperLink. Is there any way I could add both the values as parameters to the report links? I am unable to get any method. Any help would be really appreciated. Thanks
  9. I am having the following JSON response from the API. .."result": [ { "taskId": 100004, "applicationName": "Retail Bank Portal", "taskType": "Gap", "featureName": "Bill Pay", "release": "5", "date": "06:49, Aug 23, 2020", "toJira": false, "attackControlList": [ { "status": "COMPLETE", "attack": "manipulate request parameters to view unauthorized resources", "control": "implement indirect object reference to resources (e.g, account statement ID) so only these indirect references are allowed in the client request parameters" }] ..[/code]I am trying to get the applicationName, featureName and taskType from the main JSON and the attack field from the array named as attackControlList. I have two datasets. 1st one is the main dataset of the report which contains the whole JSON as fields and another dataset contains the fields of the array. I am trying to read the attack field from the JSON using the sub dataset but it says that the field not found. Am I doing anything wrong? Here is my jrxml file: ..<?xml version="1.0" encoding="UTF-8"?><!-- Created with Jaspersoft Studio version 6.16.0.final using JasperReports Library version 6.16.0-48579d909b7943b64690c65c71e07e0b80981928 --><jasperReport xmlns="http://jasperreports.sourceforge.net/jasperreports" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://jasperreports.sourceforge.net/jasperreports http://jasperreports.sourceforge.net/xsd/jasperreport.xsd" name="Blank_A4" pageWidth="595" pageHeight="842" columnWidth="555" leftMargin="20" rightMargin="20" topMargin="20" bottomMargin="20" uuid="84388467-2247-47ee-a188-de42fda5a8bf"> <property name="com.jaspersoft.studio.data.defaultdataadapter" value="JasperAPI"/> <subDataset name="Dataset1" uuid="718009b5-a78c-4f75-8e8b-e31db9e39322"> <property name="com.jaspersoft.studio.data.defaultdataadapter" value="JasperAPI"/> <parameter name="Parameter" class="java.lang.String"/> <parameter name="JSON_INPUT_STREAM" class="java.io.InputStream" isForPrompting="false"/> <parameter name="net.sf.jasperreports.json.source" class="java.lang.String" isForPrompting="false"/> <parameter name="net.sf.jasperreports.json.sources" class="java.util.List" isForPrompting="false"/> <parameter name="net.sf.jasperreports.json.date.pattern" class="java.lang.String" isForPrompting="false"/> <parameter name="net.sf.jasperreports.json.number.pattern" class="java.lang.String" isForPrompting="false"/> <parameter name="JSON_LOCALE" class="java.util.Locale" isForPrompting="false"/> <parameter name="net.sf.jasperreports.json.locale.code" class="java.lang.String" isForPrompting="false"/> <parameter name="JSON_TIME_ZONE" class="java.util.TimeZone" isForPrompting="false"/> <parameter name="net.sf.jasperreports.json.timezone.id" class="java.lang.String" isForPrompting="false"/> <queryString language="JSON"> <![CDATA[result.attackControlList]]> </queryString> <field name="status" class="java.lang.String"> <property name="net.sf.jasperreports.json.field.expression" value="status"/> <fieldDescription><![CDATA[status]]></fieldDescription> </field> <field name="attack" class="java.lang.String"> <property name="net.sf.jasperreports.json.field.expression" value="attack"/> <fieldDescription><![CDATA[attack]]></fieldDescription> </field> <field name="control" class="java.lang.String"> <property name="net.sf.jasperreports.json.field.expression" value="control"/> <fieldDescription><![CDATA[control]]></fieldDescription> </field> </subDataset> <parameter name="JSON_INPUT_STREAM" class="java.io.InputStream" isForPrompting="false"/> <parameter name="net.sf.jasperreports.json.source" class="java.lang.String" isForPrompting="false"/> <parameter name="net.sf.jasperreports.json.sources" class="java.util.List" isForPrompting="false"/> <parameter name="net.sf.jasperreports.json.date.pattern" class="java.lang.String" isForPrompting="false"/> <parameter name="net.sf.jasperreports.json.number.pattern" class="java.lang.String" isForPrompting="false"/> <parameter name="JSON_LOCALE" class="java.util.Locale" isForPrompting="false"/> <parameter name="net.sf.jasperreports.json.locale.code" class="java.lang.String" isForPrompting="false"/> <parameter name="JSON_TIME_ZONE" class="java.util.TimeZone" isForPrompting="false"/> <parameter name="net.sf.jasperreports.json.timezone.id" class="java.lang.String" isForPrompting="false"/> <queryString language="json"> <![CDATA[result]]> </queryString> <field name="taskId" class="java.lang.Integer"> <property name="net.sf.jasperreports.json.field.expression" value="taskId"/> <fieldDescription><![CDATA[taskId]]></fieldDescription> </field> <field name="applicationName" class="java.lang.String"> <property name="net.sf.jasperreports.json.field.expression" value="applicationName"/> <fieldDescription><![CDATA[applicationName]]></fieldDescription> </field> <field name="taskType" class="java.lang.String"> <property name="net.sf.jasperreports.json.field.expression" value="taskType"/> <fieldDescription><![CDATA[taskType]]></fieldDescription> </field> <field name="featureName" class="java.lang.String"> <property name="net.sf.jasperreports.json.field.expression" value="featureName"/> <fieldDescription><![CDATA[featureName]]></fieldDescription> </field> <field name="release" class="java.lang.String"> <property name="net.sf.jasperreports.json.field.expression" value="release"/> <fieldDescription><![CDATA[release]]></fieldDescription> </field> <field name="date" class="java.lang.String"> <property name="net.sf.jasperreports.json.field.expression" value="date"/> <fieldDescription><![CDATA[date]]></fieldDescription> </field> <field name="toJira" class="java.lang.String"> <property name="net.sf.jasperreports.json.field.expression" value="toJira"/> <fieldDescription><![CDATA[toJira]]></fieldDescription> </field> <field name="attackControlList" class="java.lang.String"> <property name="net.sf.jasperreports.json.field.expression" value="attackControlList"/> <fieldDescription><![CDATA[attackControlList]]></fieldDescription> </field> <background> <band splitType="Stretch"/> </background> <summary> <band height="220" splitType="Stretch"> <stackedBarChart> <chart evaluationTime="Report"> <reportElement x="0" y="0" width="555" height="220" uuid="9620de9c-81d8-4006-b931-aa67dc4cd257"/> <chartTitle/> <chartSubtitle/> <chartLegend/> </chart> <categoryDataset> <dataset resetType="Report"> <datasetRun subDataset="Dataset1" uuid="e11ed00e-3e5b-489d-910d-c5016df04ba6"> <datasetParameter name="Parameter"> <datasetParameterExpression><![CDATA[$F{attack}]]></datasetParameterExpression> </datasetParameter> <datasetParameter name="JSON_INPUT_STREAM"> <datasetParameterExpression><![CDATA[$P{JSON_INPUT_STREAM}]]></datasetParameterExpression> </datasetParameter> <datasetParameter name="net.sf.jasperreports.json.source"> <datasetParameterExpression><![CDATA[$P{net.sf.jasperreports.json.source}]]></datasetParameterExpression> </datasetParameter> <datasetParameter name="net.sf.jasperreports.json.sources"> <datasetParameterExpression><![CDATA[$P{net.sf.jasperreports.json.sources}]]></datasetParameterExpression> </datasetParameter> <datasetParameter name="net.sf.jasperreports.json.date.pattern"> <datasetParameterExpression><![CDATA[$P{net.sf.jasperreports.json.date.pattern}]]></datasetParameterExpression> </datasetParameter> <datasetParameter name="net.sf.jasperreports.json.number.pattern"> <datasetParameterExpression><![CDATA[$P{net.sf.jasperreports.json.number.pattern}]]></datasetParameterExpression> </datasetParameter> <datasetParameter name="JSON_LOCALE"> <datasetParameterExpression><![CDATA[$P{JSON_LOCALE}]]></datasetParameterExpression> </datasetParameter> <datasetParameter name="net.sf.jasperreports.json.locale.code"> <datasetParameterExpression><![CDATA[$P{net.sf.jasperreports.json.locale.code}]]></datasetParameterExpression> </datasetParameter> <datasetParameter name="JSON_TIME_ZONE"> <datasetParameterExpression><![CDATA[$P{JSON_TIME_ZONE}]]></datasetParameterExpression> </datasetParameter> <datasetParameter name="net.sf.jasperreports.json.timezone.id"> <datasetParameterExpression><![CDATA[$P{net.sf.jasperreports.json.timezone.id}]]></datasetParameterExpression> </datasetParameter> </datasetRun> </dataset> <categorySeries> <seriesExpression><![CDATA[$F{status}]]></seriesExpression> <categoryExpression><![CDATA[$F{attack}]]></categoryExpression> <valueExpression><![CDATA[0]]></valueExpression> </categorySeries> </categoryDataset> <barPlot> <plot/> <itemLabel/> <categoryAxisFormat> <axisFormat labelColor="#000000" tickLabelColor="#000000" axisLineColor="#000000"/> </categoryAxisFormat> <valueAxisFormat> <axisFormat labelColor="#000000" tickLabelColor="#000000" axisLineColor="#000000"/> </valueAxisFormat> </barPlot> </stackedBarChart> </band> </summary></jasperReport>..[/code]
  10. I have created a report where my Data Source is the REST API. The API works in the following way: The user sends username and passwordA token is generated and sent back as a responseThe user uses this token in the next requests and it expires after a defined time.I am having a problem with my report. I have used the API in my report but it needs to log in each time and gets a token to access the data which takes up to 8-15 seconds to build and display the report. That is causing an extra delay in report generation which is irritating and is unacceptable. Is there any way I could overcome logging in each time while generating a report? this question explains my time taken to generate the report on different platforms and also contains the code to generate the report. Thanks a lot
  11. @gustavofaris I did that and it worked. Why is that so? Why it created multiple pages in detail band but not in the summary band? Thanks a lot
  12. I am working on a report where I am having two CSV data adapters. One is for a stacked bar graph and the other one is for a table. Here is the data for Chart: Here is the data for the table The final report should be on a single page only which displays a chart and data. But, it shows 10 pages in the output. I am not getting the reason behind it. Here is my output file.
  13. I am working in JasperStudio and customizing a **StackedBarChart** to show it values like this. I have written the below code static class CustomBarRenderer extends BarRenderer { /** * */ private static final long serialVersionUID = 1L; public CustomBarRenderer() { super(); } public Paint getItemPaint(int row, int column) { Color color = null; CategoryDataset cd = getPlot().getDataset(); if (cd != null) { String l_rowKey = (String) cd.getRowKey(row); String l_colKey = (String) cd.getColumnKey(column); double l_value = cd.getValue(l_rowKey, l_colKey).doubleValue(); if (l_value < 70) {// red color = new Color(231, 104, 110); } // yellow else if (l_value >= 70 && l_value <= 90) { color = new Color(255, 190, 6); } //green else if (l_value > 90) { color = new Color(5, 176, 76); } } return color; } } and called it using: public void customize(JFreeChart chart, JRChart jrChart) { CustomBarRenderer renderer = new CustomBarRenderer(); chart.getCategoryPlot().setRenderer(renderer);} but it produces the following output which is totally strange to me. it creates separate bars whereas I want the results on the same bar. Is there any way I could get it stacked fulfilling the above conditions? Thanks If I try this code, It doesn't produce the seprate bars but doesn't categories the results. CategoryPlot cplot = (CategoryPlot)chart.getPlot(); //set bar chart color ((BarRenderer)cplot.getRenderer()).setBarPainter(new StandardBarPainter()); BarRenderer r = (BarRenderer)chart.getCategoryPlot().getRenderer(); r.setSeriesPaint(0, new Color(231,104,110)); r.setSeriesPaint(1, new Color(255,190,6)); r.setSeriesPaint(2, new Color(5,176,76)); I am having three category series in my chart in Jasper report
×
×
  • Create New...