Nogi Posted February 4, 2018 Share Posted February 4, 2018 Hi,I am new to this platform and trying to get my head around the iReport Designer tool. I have 2 questions:Where are the html5 templates for iReport Designer? My install isn't showing anyWhen I create a basic line graph with 2 lines and date on the X Axis, it's drawing a new graph for every date but with the same graph each time.For example, if i have 5 dates, it is drawing the graph with the correct lines but 5 times instead of the once. https://imgur.com/a/ljj2rthanks for any assistance. Link to comment Share on other sites More sharing options...
elizam Posted February 4, 2018 Share Posted February 4, 2018 1. html5 charts are only available with commercial editions.2. I'd have to see a picture or XML before I could understand the question.3. If you have never used the tool, you might want to start with Jaspersoft Studio instead of iReport. iReport is no longer being actively developed. Link to comment Share on other sites More sharing options...
Nogi Posted February 4, 2018 Author Share Posted February 4, 2018 Report XML:<?xml version="1.0" encoding="UTF-8"?><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="Portfolio Trend" language="groovy" pageWidth="595" pageHeight="842" columnWidth="535" leftMargin="20" rightMargin="20" topMargin="20" bottomMargin="20" uuid="33a22ce1-6e1d-451e-a436-5c90984f6aa9"> <property name="ireport.zoom" value="1.0"/> <property name="ireport.x" value="0"/> <property name="ireport.y" value="0"/> <queryString> <![CDATA[sELECT *, UNIX_TIMESTAMP(portfolio_history.`checked`) AS date_checked, portfolio_history.`value` AS portfolio_history_value, portfolio_history.`free` AS portfolio_history_free, portfolio_history.`used` AS portfolio_history_used, portfolio_history.`Value` AS portfolio_history_ValueFROM `portfolio_history` portfolio_historyORDER BY date_checked ASC]]> </queryString> <field name="checked" class="java.sql.Timestamp"> <fieldDescription><![CDATA[]]></fieldDescription> </field> <field name="value" class="java.math.BigDecimal"> <fieldDescription><![CDATA[]]></fieldDescription> </field> <field name="freeBTC" class="java.math.BigDecimal"> <fieldDescription><![CDATA[]]></fieldDescription> </field> <field name="usedBTC" class="java.math.BigDecimal"> <fieldDescription><![CDATA[]]></fieldDescription> </field> <field name="ethValue" class="java.math.BigDecimal"> <fieldDescription><![CDATA[]]></fieldDescription> </field> <field name="date_checked" class="java.lang.Long"/> <field name="portfolio_history_value" class="java.math.BigDecimal"/> <field name="portfolio_history_freeBTC" class="java.math.BigDecimal"/> <field name="portfolio_history_usedBTC" class="java.math.BigDecimal"/> <field name="portfolio_history_ethValue" class="java.math.BigDecimal"/> <background> <band/> </background> <title> <band height="72"> <frame> <reportElement mode="Opaque" x="-20" y="-20" width="595" height="92" backcolor="#006699" uuid="1607789b-2fe3-4bf0-a530-965bf514a0d0"/> <staticText> <reportElement x="20" y="10" width="375" height="43" forecolor="#FFFFFF" uuid="f536f3c3-cad1-4974-9ff7-ba604f8d32f5"/> <textElement> <font size="24" isBold="true"/> </textElement> <text><![CDATA[Performance]]></text> </staticText> <staticText> <reportElement x="369" y="53" width="206" height="20" forecolor="#FFFFFF" uuid="ff0393f4-b3ed-4a3e-9e97-84cc2840a4ae"/> <textElement textAlignment="Right"> <font size="14" isBold="false"/> </textElement> <text><![CDATA[Trendline since go-live]]></text> </staticText> </frame> </band> </title> <pageHeader> <band/> </pageHeader> <detail> <band height="250"> <lineChart> <chart> <reportElement x="0" y="0" width="555" height="250" uuid="a3fbbfc9-d694-449f-a56f-e34d7da30054"/> <chartTitle/> <chartSubtitle/> <chartLegend/> </chart> <categoryDataset> <categorySeries> <seriesExpression><![CDATA["#1"]]></seriesExpression> <categoryExpression><![CDATA[$F{checked}]]></categoryExpression> <valueExpression><![CDATA[$F{value}]]></valueExpression> </categorySeries> <categorySeries> <seriesExpression><![CDATA["#2"]]></seriesExpression> <categoryExpression><![CDATA[$F{checked}]]></categoryExpression> <valueExpression><![CDATA[$F{ethValue}]]></valueExpression> </categorySeries> </categoryDataset> <linePlot> <plot/> <categoryAxisFormat> <axisFormat/> </categoryAxisFormat> <valueAxisFormat> <axisFormat/> </valueAxisFormat> </linePlot> </lineChart> </band> </detail></jasperReport> Link to comment Share on other sites More sharing options...
rajesh.sirsikar Posted February 4, 2018 Share Posted February 4, 2018 2. Thats because you have placed the Chart element in the Page Header section which repeats for each page. You can do one of the below to rectify.1. Either have the chart element in the report header section.2. Or in the report summary section. Link to comment Share on other sites More sharing options...
Solution hozawa Posted February 4, 2018 Solution Share Posted February 4, 2018 You've put your chart in the Detail section so it's being displayed to each row of your data. Move the chart to the summary section. Link to comment Share on other sites More sharing options...
Nogi Posted February 5, 2018 Author Share Posted February 5, 2018 @hozawa thank you that was it. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now