zsy2053 Posted June 24, 2015 Posted June 24, 2015 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.dateTimeFROM ttcINNER JOIN ttc_routes ON ttc.routeTag = ttc_routes.routeTagWHERE ttc.dateTime >= TIMESTAMP($P{startdate}, $P{starttime}) and ttc.dateTime <= TIMESTAMP($P{enddate}, $P{endtime})GROUP BY ttc_routes.titleorder by vc desclimit 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>
hozawa Posted June 24, 2015 Posted June 24, 2015 Following page explains about input controls. Edit your report and go to "Resources", Check "Always Prompt"http://community.jaspersoft.com/documentation/jasperreports-server-user-guide/adding-input-controls
noobtiger Posted June 24, 2015 Posted June 24, 2015 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 pagehttp://community.jaspersoft.com/documentation/tibco-jasperreports-server-visualizejs-guide/v60/api-reference-inputcontrolsOr else you can just embed dashboards directly.
zsy2053 Posted June 25, 2015 Author Posted June 25, 2015 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?
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