Jump to content
We've recently updated our Privacy Statement, available here ×

ravijain

Members
  • Posts

    2
  • Joined

  • Last visited

 Content Type 

Profiles

Forum

Events

Featured Visualizations

Knowledge Base

Documentation (PDF Downloads)

Blog

Documentation (Test Area)

Documentation

Dr. Jaspersoft Webinar Series

Downloads

Posts posted by ravijain

  1. Hi,

    I'm new to Jasper Report and currently supporting the already live reports on production for any enhancement / issues.

    I need to paas multiple parameters to Jasper Reports. And don't know the syntax for same.

    The below link is used to call a folder "Employment_Application" on server and pass a value of 100 to "id" parameter of each JRML file exists in that folder.

    http://myserver.domain.com:8080/PDFReport/asdf.pdfreq?formtype=Employment_Application&id=100

    Queries:

    1)  Though from above link its clear visible that we are passing a value of 100 to a parameter "id" but I checked the jrxml report and did not able to find this parameter defined anywhere. Instead there is a parameter name "REPORT_APPLICANT_ID" defined and getting this value 100 from this link and working perfectly. How is this "id=100" is linked to "REPORT_APPLICANT_ID" ?

    "REPORT_APPLICANT_ID" has isForPrompting="true" property set.

    2) I now have created one more parameter in report named "SUBREPORT_DIR" and need to pass a value to it at run time.

    "SUBREPORT_DIR" has isForPrompting="false" property set and has been assigned a default value in report.

    How can I pass the value to this parameter from above link along with current parameter ?

    Please help me....

     

    Code:
    <?xml version="1.0" encoding="UTF-8"  ?><!-- Created with iReport - A designer for JasperReports --><!DOCTYPE jasperReport PUBLIC "//JasperReports//DTD Report Design//EN" "http://jasperreports.sourceforge.net/dtds/jasperreport.dtd"><jasperReport		 name="Main"		 columnCount="1"		 printOrder="Vertical"		 orientation="Portrait"		 pageWidth="612"		 pageHeight="792"		 columnWidth="552"		 columnSpacing="0"		 leftMargin="30"		 rightMargin="30"		 topMargin="20"		 bottomMargin="20"		 whenNoDataType="NoPages"		 isTitleNewPage="false"		 isSummaryNewPage="false">	<property name="ireport.scriptlethandling" value="0" />	<property name="ireport.encoding" value="UTF-8" />	<import value="java.util.*" />	<import value="net.sf.jasperreports.engine.*" />	<import value="net.sf.jasperreports.engine.data.*" />	<parameter name="SUBREPORT_DIR" isForPrompting="false" class="java.lang.String">		<defaultValueExpression ><![CDATA[".\SubReports\"]]></defaultValueExpression>	</parameter>	<parameter name="Report_Applicant_ID" isForPrompting="true" class="java.lang.Integer"/>	<queryString><![CDATA[select 1 from dual]]></queryString>	<field name="1" class="java.math.BigDecimal"/>		<group  name="Group_Edu" >			<groupExpression><![CDATA[$P{SUBREPORT_DIR}]]></groupExpression>			<groupHeader>			<band height="34"  isSplitAllowed="true" >				<subreport  isUsingCache="true">					<reportElement						x="-17"						y="0"						width="569"						height="34"						key="subreport-1"/>					<subreportParameter  name="Report_Applicant_ID">						<subreportParameterExpression><![CDATA[$P{Report_Applicant_ID}]]></subreportParameterExpression>					</subreportParameter>					<connectionExpression><![CDATA[$P{REPORT_CONNECTION}]]></connectionExpression>					<subreportExpression  class="java.lang.String"><![CDATA[$P{SUBREPORT_DIR} + "Education_History.jasper"]]></subreportExpression>				</subreport>			</band>			</groupHeader>			<groupFooter>			<band height="0"  isSplitAllowed="true" >			</band>			</groupFooter>		</group>
×
×
  • Create New...