Jump to content

Recommended Posts

Posted

I need to display the jasper report in webpage with parameter panel. I searched a lot of materials online, but they don't work to me. So, could anyone help me to display my report in web-page with parameter panel? the XML file for my report is as follow.

<?xml version="1.0" encoding="UTF-8"?>
<!-- Created with Jaspersoft Studio version 6.1.0.final using JasperReports Library version 6.1.0  -->
<!-- 2015-06-25T02:10:23 -->
<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_2" pageWidth="595" pageHeight="842" columnWidth="555" leftMargin="20" rightMargin="20" topMargin="20" bottomMargin="20" uuid="f63b2357-ec93-4888-9301-cc151fdd7756">
<property name="com.jaspersoft.studio.data.defaultdataadapter" value="NewDataAdapter "/>
<parameter name="startdate" class="java.sql.Date">
<parameterDescription><![CDATA[Please select start date]]></parameterDescription>
</parameter>
<parameter name="starttime" class="java.sql.Time">
<parameterDescription><![CDATA[Please select start time]]></parameterDescription>
</parameter>
<parameter name="enddate" class="java.sql.Date">
<parameterDescription><![CDATA[Please select end date]]></parameterDescription>
</parameter>
<parameter name="endtime" class="java.sql.Time">
<parameterDescription><![CDATA[Please select end time]]></parameterDescription>
</parameter>
<queryString>
<![CDATA[sELECT count(distinct ttc.vehicle_id) as vc,ttc.routeTag,ttc_routes.title,ttc.dateTime
FROM ttc
INNER JOIN ttc_routes ON ttc.routeTag = ttc_routes.routeTag
WHERE ttc.dateTime >= TIMESTAMP($P{startdate}, $P{starttime}) and ttc.dateTime <= TIMESTAMP($P{enddate}, $P{endtime})
GROUP BY ttc_routes.title
order by vc desc
limit 10]]>
</queryString>
<field name="vc" class="java.lang.Long"/>
<field name="routeTag" class="java.lang.String">
<fieldDescription><![CDATA[]]></fieldDescription>
</field>
<field name="title" class="java.lang.String">
<fieldDescription><![CDATA[]]></fieldDescription>
</field>
<field name="dateTime" class="java.sql.Timestamp">
<fieldDescription><![CDATA[]]></fieldDescription>
</field>
<background>
<band splitType="Stretch"/>
</background>
<title>
<band height="252" splitType="Stretch">
<barChart>
<chart evaluationTime="Report">
<reportElement x="227" y="52" width="200" height="200" uuid="ba244296-4247-4400-b20b-110dc34fa405"/>
<chartTitle/>
<chartSubtitle/>
<chartLegend/>
</chart>
<categoryDataset>
<categorySeries>
<seriesExpression><![CDATA["SERIES 1"]]></seriesExpression>
<categoryExpression><![CDATA[$F{title}]]></categoryExpression>
<valueExpression><![CDATA[$F{vc}]]></valueExpression>
</categorySeries>
</categoryDataset>
<barPlot>
<plot/>
<itemLabel/>
<categoryAxisFormat>
<axisFormat/>
</categoryAxisFormat>
<valueAxisFormat>
<axisFormat/>
</valueAxisFormat>
</barPlot>
</barChart>
</band>
</title>
<pageHeader>
<band height="35" splitType="Stretch"/>
</pageHeader>
<columnHeader>
<band height="61" splitType="Stretch"/>
</columnHeader>
<detail>
<band height="125" splitType="Stretch"/>
</detail>
<columnFooter>
<band height="45" splitType="Stretch"/>
</columnFooter>
<pageFooter>
<band height="54" splitType="Stretch"/>
</pageFooter>
<summary>
<band height="42" splitType="Stretch"/>
</summary>
</jasperReport>
 
  • Replies 5
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Posted Images

Posted

hi, @hozawa. Thank you for your reply. But, I can't install the jasper server, the installation process is fine. But, when I try to open the webpage, it always show the following error.

QQ20150626024704.png.095fd42232d0a41e03e5d088395edaeb.png

 

Could you tell me how do I fix this problem?

 

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 account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...