How to display jasper report in web-page with parameter panel

0

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>
 
zsy2053's picture
Joined: May 20 2015 - 7:47am
Last seen: 4 years 3 weeks ago

Please help me

zsy2053 - 4 years 3 weeks ago

I am looking for a solution too. But there are two ways you can try doing this, if you want to customize the parameters in the embedded report then you need to use visualize and call the input controls.

Look for Creating input control widget in this page

http://community.jaspersoft.com/documentation/tibco-jasperreports-server...

Or else you can just embed dashboards directly.

noobtiger - 4 years 3 weeks ago

3 Answers:

-1

Following page explains about input controls. Edit your report and go to "Resources", Check "Always Prompt"

http://community.jaspersoft.com/documentation/jasperreports-server-user-...

hozawa's picture
44219
Joined: Apr 24 2010 - 4:31pm
Last seen: 1 month 6 days ago
0

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.

 

Could you tell me how do I fix this problem?

 

zsy2053's picture
Joined: May 20 2015 - 7:47am
Last seen: 4 years 3 weeks ago
0

and this is the error in tomcat log file

zsy2053's picture
Joined: May 20 2015 - 7:47am
Last seen: 4 years 3 weeks ago
Feedback