Add parameter in jasper report query string
Dear Experts,
i developed a pdf report using jasperreports . in this reports i used a query string where dont have any parameter, now i want to add a parameter between querystring. how can i do this?? (i know another solution and that is using jrDatasource) in this context i dont want to do this beacuse then i have to do it again from begining.
here is my XML FILE
i just want to add a parameter in querysting
like
<queryString><![CDATA[SELECT CH_RECORD_ID,FH_PRODUCT_ID,
CH_SEQUENCE_NO FROM TABLE_NAE WHERE ID='<![CDATA[$P{CH_FULL_NAME}]]>'can i do this or how can i do this
<?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="Statement"
columnCount="1"
printOrder="Vertical"
orientation="Portrait"
pageWidth="612"
pageHeight="864"
columnWidth="612"
columnSpacing="0"
leftMargin="0"
rightMargin="0"
topMargin="0"
bottomMargin="0"
whenNoDataType="BlankPage"
isTitleNewPage="true"
isSummaryNewPage="false">
<queryString><![CDATA[SELECT CH_RECORD_ID,FH_PRODUCT_ID,
CH_SEQUENCE_NO,
CH_CUSTOMER_NO,
CH_FULL_NAME,
CH_COMPANY_NAME,
CH_ADDR1 as ADD1,
CH_ADDR2 as ADD2,
CH_CITY,
CH_STATE,
CH_CNTRY,
CH_POSTCODE,
CH_STMT_DATE,
CH_STMT_END_DATE,
CH_PAYDUE_DATE,
CH_COMBINE_LIMIT,
CH_BARCODED_COMBINE_LIMIT,
AH_RECORD_ID,
AH_SEQUENCE_NO,
AH_CARDHOLDER_NO,
AH_CARD_DESC,
AH_CARD_DESC2,
AH_BILLING_CURR_CD,
AH_OUTSTD_BAL,
AH_OUTSTD_BAL_S,
AH_MIN_PMT,
AH_BPON_OPEN,
AH_BPNT_EARN,
AH_BPNT_EARN_S,
AH_BPNT_MGM,
AH_BPNT_MGM_S,
AH_BPNT_REDEEM,
AH_BPNT_REDEEM_S,
AH_BPNT_EXPIRY_MTH,
AH_BPNT_EXPIRY_MTH_S,
AH_BPNT_CLOSE,
AH_BPNT_EXPIRY,
AH_BPNT_EXP_DATE,
AH_REWARDS_IND,
AH_LINE_LIMIT,
AH_AVAIL_LIMIT,
AH_AVAIL_LIMIT_S,
AH_AVAIL_CASH_LIMIT,
AH_AVAIL_CASH_LIMIT_S,
TD_RECORD_ID,
TD_RECORD_TAG,
TD_CARDHOLDER_NO,
TD_CARDHOLDER_NAME,
TD_BILLING_CURR_CD,
TD_BAS_SUPP_IND,
if(TD_TRXN_DATE="00000000",' ',TD_TRXN_DATE) as TD_TRXN_DATE,
if(TD_POST_DATE="00000000",' ',TD_POST_DATE) as TD_POST_DATE ,
TD_DESCRIPTION,
TD_AMOUNT,
TD_AMOUNT_S,
TD_CARD_LIMIT FROM CUSTOMER_HEADER,
ACCOUNT_HEADER, TRANSACTION_DETAIL,FILE_HEADER
WHERE
CH_RECORD_ID = AH_RECORD_ID AND
AH_RECORD_ID = TD_RECORD_ID AND
AH_BILLING_CURR_CD = TD_BILLING_CURR_CD AND
TD_DESCRIPTION!='SUB TOTAL'
ORDER BY CH_RECORD_ID,
AH_BILLING_CURR_CD,
TD_BILLING_CURR_CD,
TD_RECORD_TAG, TD_POST_DATE]]></queryString>
<field name="ADD1" class="java.lang.String"/>
<field name="ADD2" class="java.lang.String"/>
<field name="AH_AVAIL_CASH_LIMIT" class="java.lang.String"/>
<field name="AH_AVAIL_CASH_LIMIT_S" class="java.lang.String"/>
<field name="AH_AVAIL_LIMIT" class="java.lang.String"/>
<field name="AH_AVAIL_LIMIT_S" class="java.lang.String"/>
<field name="AH_BILLING_CURR_CD" class="java.lang.String"/>
<field name="AH_BPNT_CLOSE" class="java.lang.String"/>
<field name="AH_BPNT_EARN" class="java.lang.String"/>
<field name="AH_BPNT_EARN_S" class="java.lang.String"/>
<field name="AH_BPNT_EXPIRY" class="java.lang.String"/>
<field name="AH_BPNT_EXPIRY_MTH" class="java.lang.String"/>
<field name="AH_BPNT_EXPIRY_MTH_S" class="java.lang.String"/>
<field name="AH_BPNT_EXP_DATE" class="java.lang.String"/>
<field name="AH_BPNT_MGM" class="java.lang.String"/>
<field name="AH_BPNT_MGM_S" class="java.lang.String"/>
<field name="AH_BPNT_REDEEM" class="java.lang.String"/>
<field name="AH_BPNT_REDEEM_S" class="java.lang.String"/>
<field name="AH_BPON_OPEN" class="java.lang.String"/>
<field name="AH_CARDHOLDER_NO" class="java.lang.String"/>
<field name="AH_CARD_DESC" class="java.lang.String"/>
<field name="AH_CARD_DESC2" class="java.lang.String"/>
<field name="AH_LINE_LIMIT" class="java.lang.String"/>
<field name="AH_MIN_PMT" class="java.lang.String"/>
<field name="AH_OUTSTD_BAL" class="java.lang.String"/>
<field name="AH_OUTSTD_BAL_S" class="java.lang.String"/>
<field name="AH_RECORD_ID" class="java.lang.String"/>
<field name="AH_REWARDS_IND" class="java.lang.String"/>
<field name="AH_SEQUENCE_NO" class="java.lang.String"/>
<field name="CH_BARCODED_COMBINE_LIMIT" class="java.lang.String"/>
<field name="CH_CITY" class="java.lang.String"/>
<field name="CH_CNTRY" class="java.lang.String"/>
<field name="CH_COMBINE_LIMIT" class="java.lang.String"/>
<field name="CH_COMPANY_NAME" class="java.lang.String"/>
<field name="CH_CUSTOMER_NO" class="java.lang.String"/>
<field name="CH_FULL_NAME" class="java.lang.String"/>
<field name="CH_PAYDUE_DATE" class="java.lang.String"/>
<field name="CH_POSTCODE" class="java.lang.String"/>
<field name="CH_RECORD_ID" class="java.lang.String"/>
<field name="CH_SEQUENCE_NO" class="java.lang.String"/>
<field name="CH_STATE" class="java.lang.String"/>
<field name="CH_STMT_DATE" class="java.lang.String"/>
<field name="CH_STMT_END_DATE" class="java.lang.String"/>
<field name="FH_PRODUCT_ID" class="java.lang.String"/>
<field name="TD_AMOUNT" class="java.lang.String"/>
<field name="TD_AMOUNT_S" class="java.lang.String"/>
<field name="TD_BAS_SUPP_IND" class="java.lang.String"/>
<field name="TD_BILLING_CURR_CD" class="java.lang.String"/>
<field name="TD_CARDHOLDER_NAME" class="java.lang.String"/>
<field name="TD_CARDHOLDER_NO" class="java.lang.String"/>
<field name="TD_CARD_LIMIT" class="java.lang.String"/>
<field name="TD_DESCRIPTION" class="java.lang.String"/>
<field name="TD_POST_DATE" class="java.lang.String"/>
<field name="TD_RECORD_ID" class="java.lang.String"/>
<field name="TD_RECORD_TAG" class="java.lang.String"/>
<field name="TD_TRXN_DATE" class="java.lang.String"/>
<group name="Customer_header" isStartNewColumn="false" isStartNewPage="true" isResetPageNumber="true" isReprintHeaderOnEachPage="true" minHeightToStartNewPage="0" >
<groupExpression><![CDATA[$F{CH_RECORD_ID}]]></groupExpression>
<groupHeader>
<band height="208" isSplitAllowed="true" >
<textField isStretchWithOverflow="false" pattern="" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None" > <reportElement
mode="Opaque"
x="168"
y="84"
width="274"
height="16"
forecolor="#000000"
backcolor="#FFFFFF"
positionType="Float"
isPrintRepeatedValues="true"
isRemoveLineWhenBlank="false"
isPrintInFirstWholeBand="false"
isPrintWhenDetailOverflows="false"/>
<textElement textAlignment="Left" verticalAlignment="Top" lineSpacing="Single">
<font fontName="Arial" pdfFontName="Helvetica" size="12" isBold="false" isItalic="false" isUnderline="false" isPdfEmbedded ="false" pdfEncoding ="CP1252" isStrikeThrough="false" />
</textElement>
<textFieldExpression class="java.lang.String"><![CDATA[$F{CH_FULL_NAME}]]></textFieldExpression>
</textField>
<textField isStretchWithOverflow="false" pattern="" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None" > <reportElement
mode="Opaque"
x="168"
y="116"
width="281"
height="14"
forecolor="#000000"
backcolor="#FFFFFF"
positionType="Float"
isPrintRepeatedValues="true"
isRemoveLineWhenBlank="false"
isPrintInFirstWholeBand="false"
isPrintWhenDetailOverflows="false"/>
<textElement textAlignment="Left" verticalAlignment="Top" lineSpacing="Single">
<font fontName="Arial" pdfFontName="Helvetica" size="12" isBold="false" isItalic="false" isUnderline="false" isPdfEmbedded ="false" pdfEncoding ="CP1252" isStrikeThrough="false" />
</textElement>
<textFieldExpression class="java.lang.String"><![CDATA[$F{ADD1}]]></textFieldExpression>
</textField>
<textField isStretchWithOverflow="false" pattern="" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None" > <reportElement
mode="Opaque"
x="168"
y="100"
width="179"
height="14"
forecolor="#000000"
backcolor="#FFFFFF"
positionType="Float"
isPrintRepeatedValues="true"
isRemoveLineWhenBlank="false"
isPrintInFirstWholeBand="false"
isPrintWhenDetailOverflows="false"/>
<textElement textAlignment="Left" verticalAlignment="Top" lineSpacing="Single">
<font fontName="Arial" pdfFontName="Helvetica" size="12" isBold="false" isItalic="false" isUnderline="false" isPdfEmbedded ="false" pdfEncoding ="CP1252" isStrikeThrough="false" />
</textElement>
<textFieldExpression class="java.lang.String"><![CDATA[$F{CH_COMPANY_NAME}]]></textFieldExpression>
</textField>
<textField isStretchWithOverflow="false" pattern="" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None" > <reportElement
mode="Opaque"
x="239"
y="148"
width="119"
height="14"
forecolor="#000000"
backcolor="#FFFFFF"
positionType="Float"
isPrintRepeatedValues="true"
isRemoveLineWhenBlank="false"
isPrintInFirstWholeBand="false"
isPrintWhenDetailOverflows="false"/>
<textElement textAlignment="Left" verticalAlignment="Top" lineSpacing="Single">
<font fontName="Arial" pdfFontName="Helvetica" size="12" isBold="false" isItalic="false" isUnderline="false" isPdfEmbedded ="false" pdfEncoding ="CP1252" isStrikeThrough="false" />
</textElement>
<textFieldExpression class="java.lang.String"><![CDATA[$F{CH_CITY}]]></textFieldExpression>
</textField>
<textField isStretchWithOverflow="false" pattern="" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None" > <reportElement
mode="Opaque"
x="168"
y="148"
width="70"
height="14"
forecolor="#000000"
backcolor="#FFFFFF"
positionType="Float"
isPrintRepeatedValues="true"
isRemoveLineWhenBlank="false"
isPrintInFirstWholeBand="false"
isPrintWhenDetailOverflows="false"/>
<textElement textAlignment="Left" verticalAlignment="Top" lineSpacing="Single">
<font fontName="Arial" pdfFontName="Helvetica" size="12" isBold="false" isItalic="false" isUnderline="false" isPdfEmbedded ="false" pdfEncoding ="CP1252" isStrikeThrough="false" />
</textElement>
<textFieldExpression class="java.lang.String"><![CDATA[$F{CH_POSTCODE}]]></textFieldExpression>
</textField>
<textField isStretchWithOverflow="false" pattern="" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None" > <reportElement
mode="Opaque"
x="168"
y="164"
width="201"
height="13"
forecolor="#000000"
backcolor="#FFFFFF"
positionType="Float"
isPrintRepeatedValues="true"
isRemoveLineWhenBlank="false"
isPrintInFirstWholeBand="false"
isPrintWhenDetailOverflows="false"/>
<textElement textAlignment="Left" verticalAlignment="Top" lineSpacing="Single">
<font fontName="Arial" pdfFontName="Helvetica" size="12" isBold="false" isItalic="false" isUnderline="false" isPdfEmbedded ="false" pdfEncoding ="CP1252" isStrikeThrough="false" />
</textElement>
<textFieldExpression class="java.lang.String"><![CDATA[$F{CH_CNTRY}]]></textFieldExpression>
</textField>
<textField isStretchWithOverflow="false" pattern="" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None" > <reportElement
mode="Opaque"
x="29"
y="130"
width="90"
height="14"
forecolor="#000000"
backcolor="#FFFFFF"
positionType="Float"
isPrintRepeatedValues="true"
isRemoveLineWhenBlank="false"
isPrintInFirstWholeBand="false"
isPrintWhenDetailOverflows="false"/>
<textElement textAlignment="Center" verticalAlignment="Top" lineSpacing="Single">
<font fontName="Arial" pdfFontName="Helvetica" size="12" isBold="false" isItalic="false" isUnderline="false" isPdfEmbedded ="false" pdfEncoding ="CP1252" isStrikeThrough="false" />
</textElement>
<textFieldExpression class="java.lang.String"><![CDATA[$F{CH_STMT_DATE}.substring(6,8)+"."+$F{CH_STMT_DATE}.substring(4,6)+"."+$F{CH_STMT_DATE}.substring(0,4)]]></textFieldExpression>
</textField>
<textField isStretchWithOverflow="false" pattern="" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None" > <reportElement
mode="Opaque"
x="470"
y="130"
width="81"
height="13"
forecolor="#000000"
backcolor="#FFFFFF"
positionType="Float"
isPrintRepeatedValues="true"
isRemoveLineWhenBlank="false"
isPrintInFirstWholeBand="false"
isPrintWhenDetailOverflows="false"/>
<textElement textAlignment="Center" verticalAlignment="Top" lineSpacing="Single">
<font fontName="Arial" pdfFontName="Helvetica" size="12" isBold="false" isItalic="false" isUnderline="false" isPdfEmbedded ="false" pdfEncoding ="CP1252" isStrikeThrough="false" />
</textElement>
<textFieldExpression class="java.lang.String"><![CDATA[$F{CH_PAYDUE_DATE}.substring(6,8)+"."+$F{CH_PAYDUE_DATE}.substring(4,6)+"."+$F{CH_PAYDUE_DATE}.substring(0,4)]]></textFieldExpression>
</textField>
<textField isStretchWithOverflow="false" pattern="" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None" > <reportElement
mode="Opaque"
x="476"
y="67"
width="46"
height="13"
forecolor="#000000"
backcolor="#FFFFFF"
positionType="Float"
isPrintRepeatedValues="true"
isRemoveLineWhenBlank="false"
isPrintInFirstWholeBand="false"
isPrintWhenDetailOverflows="false"/>
<textElement textAlignment="Left" verticalAlignment="Top" lineSpacing="Single">
<font fontName="Arial" pdfFontName="Helvetica" size="12" isBold="false" isItalic="false" isUnderline="false" isPdfEmbedded ="false" pdfEncoding ="CP1252" isStrikeThrough="false" />
</textElement>
<textFieldExpression class="java.lang.String"><![CDATA[$F{FH_PRODUCT_ID}]]></textFieldExpression>
</textField>
<textField isStretchWithOverflow="false" pattern="" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None" > <reportElement
mode="Opaque"
x="168"
y="132"
width="236"
height="14"
forecolor="#000000"
backcolor="#FFFFFF"
positionType="Float"
isPrintRepeatedValues="true"
isRemoveLineWhenBlank="false"
isPrintInFirstWholeBand="false"
isPrintWhenDetailOverflows="false"/>
<textElement textAlignment="Left" verticalAlignment="Top" lineSpacing="Single">
<font fontName="Arial" pdfFontName="Helvetica" size="12" isBold="false" isItalic="false" isUnderline="false" isPdfEmbedded ="false" pdfEncoding ="CP1252" isStrikeThrough="false" />
</textElement>
<textFieldExpression class="java.lang.String"><![CDATA[$F{ADD2}]]></textFieldExpression>
</textField>
<textField isStretchWithOverflow="false" pattern="" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None" > <reportElement
mode="Opaque"
x="529"
y="67"
width="28"
height="13"
forecolor="#000000"
backcolor="#FFFFFF"
positionType="Float"
isPrintRepeatedValues="true"
isRemoveLineWhenBlank="false"
isPrintInFirstWholeBand="false"
isPrintWhenDetailOverflows="false"/>
<textElement textAlignment="Left" verticalAlignment="Top" lineSpacing="Single">
<font fontName="Arial" pdfFontName="Helvetica" size="12" isBold="false" isItalic="false" isUnderline="false" isPdfEmbedded ="false" pdfEncoding ="CP1252" isStrikeThrough="false" />
</textElement>
<textFieldExpression class="java.lang.String"><![CDATA[$F{CH_RECORD_ID}]]></textFieldExpression>
</textField>
</band>
</groupHeader>
<groupFooter>
<band height="0" isSplitAllowed="true" >
</band>
</groupFooter>
</group>
<group name="Account_Header" isStartNewColumn="false" isStartNewPage="false" isResetPageNumber="true" isReprintHeaderOnEachPage="true" minHeightToStartNewPage="0" >
<groupExpression><![CDATA[$F{AH_BILLING_CURR_CD}]]></groupExpression>
<groupHeader>
<band height="175" isSplitAllowed="true" >
<textField isStretchWithOverflow="false" pattern="" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None" > <reportElement
mode="Opaque"
x="12"
y="16"
width="156"
height="15"
forecolor="#000000"
backcolor="#FFFFFF"
positionType="Float"
isPrintRepeatedValues="true"
isRemoveLineWhenBlank="false"
isPrintInFirstWholeBand="false"
isPrintWhenDetailOverflows="false"/>
<textElement textAlignment="Center" verticalAlignment="Top" lineSpacing="Single">
<font fontName="Arial" pdfFontName="Helvetica" size="12" isBold="false" isItalic="false" isUnderline="false" isPdfEmbedded ="false" pdfEncoding ="CP1252" isStrikeThrough="false" />
</textElement>
<textFieldExpression class="java.lang.String"><![CDATA[$F{AH_CARDHOLDER_NO}.substring(0,4)+" "+$F{AH_CARDHOLDER_NO}.substring(4,8)+" "+$F{AH_CARDHOLDER_NO}.substring(8,12)+" "+$F{AH_CARDHOLDER_NO}.substring(12,16)]]></textFieldExpression>
</textField>
<textField isStretchWithOverflow="false" pattern="" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None" > <reportElement
mode="Opaque"
x="226"
y="16"
width="84"
height="15"
forecolor="#000000"
backcolor="#FFFFFF"
positionType="Float"
isPrintRepeatedValues="true"
isRemoveLineWhenBlank="false"
isPrintInFirstWholeBand="false"
isPrintWhenDetailOverflows="false"/>
<textElement textAlignment="Right" verticalAlignment="Top" lineSpacing="Single">
<font fontName="Arial" pdfFontName="Helvetica" size="12" isBold="false" isItalic="false" isUnderline="false" isPdfEmbedded ="false" pdfEncoding ="CP1252" isStrikeThrough="false" />
</textElement>
<textFieldExpression class="java.lang.String"><![CDATA[$F{AH_OUTSTD_BAL}]]></textFieldExpression>
</textField>
<textField isStretchWithOverflow="false" pattern="" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None" > <reportElement
mode="Opaque"
x="417"
y="16"
width="90"
height="15"
forecolor="#000000"
backcolor="#FFFFFF"
positionType="Float"
isPrintRepeatedValues="true"
isRemoveLineWhenBlank="false"
isPrintInFirstWholeBand="false"
isPrintWhenDetailOverflows="false"/>
<textElement textAlignment="Right" verticalAlignment="Top" lineSpacing="Single">
<font fontName="Arial" pdfFontName="Helvetica" size="12" isBold="false" isItalic="false" isUnderline="false" isPdfEmbedded ="false" pdfEncoding ="CP1252" isStrikeThrough="false" />
</textElement>
<textFieldExpression class="java.lang.String"><![CDATA[$F{AH_MIN_PMT}]]></textFieldExpression>
</textField>
<textField isStretchWithOverflow="false" pattern="" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None" > <reportElement
mode="Opaque"
x="0"
y="95"
width="128"
height="14"
forecolor="#000000"
backcolor="#FFFFFF"
positionType="Float"
isPrintRepeatedValues="true"
isRemoveLineWhenBlank="false"
isPrintInFirstWholeBand="false"
isPrintWhenDetailOverflows="false"/>
<textElement textAlignment="Center" verticalAlignment="Top" lineSpacing="Single">
<font fontName="Arial" pdfFontName="Helvetica" size="12" isBold="false" isItalic="false" isUnderline="false" isPdfEmbedded ="false" pdfEncoding ="CP1252" isStrikeThrough="false" />
</textElement>
<textFieldExpression class="java.lang.String"><![CDATA[$F{AH_CARDHOLDER_NO}.substring(0,4)+" "+$F{AH_CARDHOLDER_NO}.substring(4,8)+" "+$F{AH_CARDHOLDER_NO}.substring(8,12)+" "+$F{AH_CARDHOLDER_NO}.substring(12,16)]]></textFieldExpression>
</textField>
<textField isStretchWithOverflow="false" pattern="" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None" > <reportElement
mode="Opaque"
x="191"
y="95"
width="216"
height="14"
forecolor="#000000"
backcolor="#FFFFFF"
positionType="Float"
isPrintRepeatedValues="true"
isRemoveLineWhenBlank="false"
isPrintInFirstWholeBand="false"
isPrintWhenDetailOverflows="false"/>
<textElement textAlignment="Center" verticalAlignment="Top" lineSpacing="Single">
<font fontName="Arial" pdfFontName="Helvetica" size="12" isBold="false" isItalic="false" isUnderline="false" isPdfEmbedded ="false" pdfEncoding ="CP1252" isStrikeThrough="false" />
</textElement>
<textFieldExpression class="java.lang.String"><![CDATA[$F{CH_FULL_NAME}]]></textFieldExpression>
</textField>
<textField isStretchWithOverflow="false" pattern="" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None" > <reportElement
mode="Opaque"
x="517"
y="95"
width="35"
height="14"
forecolor="#000000"
backcolor="#FFFFFF"
positionType="Float"
isPrintRepeatedValues="true"
isRemoveLineWhenBlank="false"
isPrintInFirstWholeBand="false"
isPrintWhenDetailOverflows="false"/>
<textElement textAlignment="Center" verticalAlignment="Top" lineSpacing="Single">
<font fontName="Arial" pdfFontName="Helvetica" size="12" isBold="false" isItalic="false" isUnderline="false" isPdfEmbedded ="false" pdfEncoding ="CP1252" isStrikeThrough="false" />
</textElement>
<textFieldExpression class="java.lang.Integer"><![CDATA[$V{PAGE_NUMBER}]]></textFieldExpression>
</textField>
<textField isStretchWithOverflow="false" pattern="" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None" > <reportElement
mode="Opaque"
x="9"
y="134"
width="72"
height="15"
forecolor="#000000"
backcolor="#FFFFFF"
positionType="Float"
isPrintRepeatedValues="true"
isRemoveLineWhenBlank="false"
isPrintInFirstWholeBand="false"
isPrintWhenDetailOverflows="false"/>
<textElement textAlignment="Center" verticalAlignment="Top" lineSpacing="Single">
<font fontName="Arial" pdfFontName="Helvetica" size="12" isBold="false" isItalic="false" isUnderline="false" isPdfEmbedded ="false" pdfEncoding ="CP1252" isStrikeThrough="false" />
</textElement>
<textFieldExpression class="java.lang.String"><![CDATA[$F{CH_STMT_DATE}.substring(6,8)+"."+$F{CH_STMT_DATE}.substring(4,6)+"."+$F{CH_STMT_DATE}.substring(0,4)]]></textFieldExpression>
</textField>
<textField isStretchWithOverflow="false" pattern="" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None" > <reportElement
mode="Opaque"
x="123"
y="135"
width="69"
height="15"
forecolor="#000000"
backcolor="#FFFFFF"
positionType="Float"
isPrintRepeatedValues="true"
isRemoveLineWhenBlank="false"
isPrintInFirstWholeBand="false"
isPrintWhenDetailOverflows="false"/>
<textElement textAlignment="Center" verticalAlignment="Top" lineSpacing="Single">
<font fontName="Arial" pdfFontName="Helvetica" size="12" isBold="false" isItalic="false" isUnderline="false" isPdfEmbedded ="false" pdfEncoding ="CP1252" isStrikeThrough="false" />
</textElement>
<textFieldExpression class="java.lang.String"><![CDATA[$F{CH_PAYDUE_DATE}.substring(6,8)+"."+$F{CH_PAYDUE_DATE}.substring(4,6)+"."+$F{CH_PAYDUE_DATE}.substring(0,4)]]></textFieldExpression>
</textField>
<textField isStretchWithOverflow="false" pattern="" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None" > <reportElement
mode="Opaque"
x="201"
y="135"
width="82"
height="15"
forecolor="#000000"
backcolor="#FFFFFF"
positionType="Float"
isPrintRepeatedValues="true"
isRemoveLineWhenBlank="false"
isPrintInFirstWholeBand="false"
isPrintWhenDetailOverflows="false"/>
<textElement textAlignment="Right" verticalAlignment="Top" lineSpacing="Single">
<font fontName="Arial" pdfFontName="Helvetica" size="12" isBold="false" isItalic="false" isUnderline="false" isPdfEmbedded ="false" pdfEncoding ="CP1252" isStrikeThrough="false" />
</textElement>
<textFieldExpression class="java.lang.String"><![CDATA[$F{AH_LINE_LIMIT}]]></textFieldExpression>
</textField>
<textField isStretchWithOverflow="false" pattern="" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None" > <reportElement
mode="Opaque"
x="332"
y="135"
width="88"
height="15"
forecolor="#000000"
backcolor="#FFFFFF"
positionType="Float"
isPrintRepeatedValues="true"
isRemoveLineWhenBlank="false"
isPrintInFirstWholeBand="false"
isPrintWhenDetailOverflows="false"/>
<textElement textAlignment="Right" verticalAlignment="Top" lineSpacing="Single">
<font fontName="Arial" pdfFontName="Helvetica" size="12" isBold="false" isItalic="false" isUnderline="false" isPdfEmbedded ="false" pdfEncoding ="CP1252" isStrikeThrough="false" />
</textElement>
<textFieldExpression class="java.lang.String"><![CDATA[$F{AH_AVAIL_LIMIT}]]></textFieldExpression>
</textField>
<textField isStretchWithOverflow="false" pattern="" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None" > <reportElement
mode="Opaque"
x="461"
y="136"
width="79"
height="15"
forecolor="#000000"
backcolor="#FFFFFF"
positionType="Float"
isPrintRepeatedValues="true"
isRemoveLineWhenBlank="false"
isPrintInFirstWholeBand="false"
isPrintWhenDetailOverflows="false"/>
<textElement textAlignment="Right" verticalAlignment="Top" lineSpacing="Single">
<font fontName="Arial" pdfFontName="Helvetica" size="12" isBold="false" isItalic="false" isUnderline="false" isPdfEmbedded ="false" pdfEncoding ="CP1252" isStrikeThrough="false" />
</textElement>
<textFieldExpression class="java.lang.String"><![CDATA[$F{AH_AVAIL_CASH_LIMIT}]]></textFieldExpression>
</textField>
<textField isStretchWithOverflow="false" pattern="" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None" > <reportElement
mode="Opaque"
x="284"
y="135"
width="44"
height="15"
forecolor="#000000"
backcolor="#FFFFFF"
positionType="Float"
isPrintRepeatedValues="true"
isRemoveLineWhenBlank="false"
isPrintInFirstWholeBand="false"
isPrintWhenDetailOverflows="false"/>
<textElement textAlignment="Left" verticalAlignment="Top" lineSpacing="Single">
<font fontName="Arial" pdfFontName="Helvetica" size="12" isBold="false" isItalic="false" isUnderline="false" isPdfEmbedded ="false" pdfEncoding ="CP1252" isStrikeThrough="false" />
</textElement>
<textFieldExpression class="java.lang.String"><![CDATA["("+$F{AH_BILLING_CURR_CD}+")"]]></textFieldExpression>
</textField>
<textField isStretchWithOverflow="false" pattern="" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None" > <reportElement
mode="Opaque"
x="421"
y="135"
width="30"
height="15"
forecolor="#000000"
backcolor="#FFFFFF"
positionType="Float"
isPrintRepeatedValues="true"
isRemoveLineWhenBlank="false"
isPrintInFirstWholeBand="false"
isPrintWhenDetailOverflows="false"/>
<textElement textAlignment="Left" verticalAlignment="Top" lineSpacing="Single">
<font fontName="Arial" pdfFontName="Helvetica" size="12" isBold="false" isItalic="false" isUnderline="false" isPdfEmbedded ="false" pdfEncoding ="CP1252" isStrikeThrough="false" />
</textElement>
<textFieldExpression class="java.lang.String"><![CDATA[$F{AH_AVAIL_LIMIT_S}.equals("-")?"CR":""]]></textFieldExpression>
</textField>
<textField isStretchWithOverflow="false" pattern="" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None" > <reportElement
mode="Opaque"
x="541"
y="136"
width="22"
height="15"
forecolor="#000000"
backcolor="#FFFFFF"
positionType="Float"
isPrintRepeatedValues="true"
isRemoveLineWhenBlank="false"
isPrintInFirstWholeBand="false"
isPrintWhenDetailOverflows="false"/>
<textElement textAlignment="Left" verticalAlignment="Top" lineSpacing="Single">
<font fontName="Arial" pdfFontName="Helvetica" size="12" isBold="false" isItalic="false" isUnderline="false" isPdfEmbedded ="false" pdfEncoding ="CP1252" isStrikeThrough="false" />
</textElement>
<textFieldExpression class="java.lang.String"><![CDATA[$F{AH_AVAIL_CASH_LIMIT_S}.equals("-")?"CR":""]]></textFieldExpression>
</textField>
<textField isStretchWithOverflow="false" pattern="" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None" > <reportElement
mode="Opaque"
x="337"
y="16"
width="19"
height="15"
forecolor="#000000"
backcolor="#FFFFFF"
positionType="Float"
isPrintRepeatedValues="true"
isRemoveLineWhenBlank="false"
isPrintInFirstWholeBand="false"
isPrintWhenDetailOverflows="false"/>
<textElement textAlignment="Left" verticalAlignment="Top" lineSpacing="Single">
<font fontName="Arial" pdfFontName="Helvetica" size="12" isBold="false" isItalic="false" isUnderline="false" isPdfEmbedded ="false" pdfEncoding ="CP1252" isStrikeThrough="false" />
</textElement>
<textFieldExpression class="java.lang.String"><![CDATA[$F{AH_OUTSTD_BAL_S}.equals("-")?"CR":""]]></textFieldExpression>
</textField>
</band>
</groupHeader>
<groupFooter>
<band height="0" isSplitAllowed="true" >
</band>
</groupFooter>
</group>
<background>
<band height="0" isSplitAllowed="true" >
</band>
</background>
<
HI.
Try using Ireport for pass the parameters and edit the query easier.
Similar Messages
-
Add Image to Jasper Report with Struts 2 and Hibernate
Hi I want to add image to jasper report[pdf] in the environment of Struts 2 framework and hibernate. I am trying
this for last couple of days, but i am unable to get the work done. if any body know the steps to add image to
jasper reports, please help me or if u have any tutorials please let me know. I am using iReport-nb-3.5.0 to generate jasper files.
Thanks in advanceFinally i found a way to add image to jasper report. It is pretty simple, just give the exact image location to the image expression. In your web application, the image location may vary so, dynamically set the image location from your model class. Also, make sure that your lib folder contains itext-1.3.1.jar. If your lib folder contains itext-1.3.1.jar and iText-2.1.3.jar u will get like: java.lang.NoSuchMethodError: com.lowagie.text.Image.plainWidth()F
So remove the iText-2.1.3.jar and keep only itext-1.3.1.jar, try this will work -
Can i add JPanel to Jasper Report
I have a panel on which I have drawn some graphics and now I want this panel to be added on report, is this possible?
Can we add Jpanel to Jasper report, if anybody has any thoughts and ideas please share with me?
Thanks & regards,
- PrashantDon't know exactly what you mean but this is how I add a JPanel to a JScrollPane.
public class Scroll extends JFrame{
JScrollPane jsp;
JPanel panel;
public Scroll(){
jsp = new JScrollPane();
panel = new JPanel();
jsp.getViewPort().add(panel);
getContentPane().add(jsp, BorderLayout.CENTER)
} -
Dynamic Reports. Runtime parameter passing to Report Query.
Hi everyone,
I have developed a report using apex shared components (report query and report layout) along with BI Publisher for report printing in pdf format. the Report template is built using Template Builder for Word. I have configured my Apex4.1 env with BI Publisher 11.
This report is working fine for hardecode ID ( like REQUEST_ID=10 ).
to make report dynamic i have made following additions in the report
I have added
where clause in report query as WHERE REQUEST_ID = :REQUEST_ID (:REQUEST_ID is the text field in my page).
Added a text field names :REQUEST_ID to get user input at run time.
Create a button and add Repot Query URL in its properties.
When i run the report with some valid value in :REQUEST_ID text field i did not get expected result infect there is no record getting displayed in the PDF file.
i think this is not the write way to do this but interestingly im not getting any error.
please can someone guide me that how can i get this functionality in apex this way or the other ?
Best Regards.Hi,
the online help will help you on how to build a parameter list at all. For your desired functionality, all you need to do is to have the user pressing a button after he selected the parameters he want to assign values to and then create the parameter list in a PSLQL program unit in Forms.
Frank -
How give parameter to jasper report form sun studio
hi master
sir i use ireport that run well but sir how call that report with parameter
how give parameter and datasource to japer report
please give me idea
thank's
aamirHello,
THIS IS NOT WORKING ...SHOWING AN ERROR CANNOT FIND MENU ITEM .This error means you are not giving the correct menu name and item name.
Open the menu and select the menu which you want to enable/disable dynamically then press F3 (for calling object navigator). You will find the menu name and item name (selected). Note that menu name and item name then use as below...
SET_MENU_ITEM_PROPERTY('MENU_NAME.ITEM_NAME',ENABLED,PROPERTY_TRUE);-Ammad -
How to add alter session to report query !!
Hi all,
I need to add
alter session set "_optimizer_cost_based_transformation"=off
before select query runs in Oracle discoverer.
Recently I encountered with ORA 00600 bug and this is the way it can be solved.
Before running the query, the session should be altered.
Any ideas is appreciated..
ThanksHi,
Your best option may be to turn the cost based transformation off using a logon trigger. It will then be turned off for all Discoverer sessions. You will need to create a package procedure that executes the alter session command. Then call this procedure either from a Discoverer logon trigger, or a database trigger that checks that the session is a Discoverer session. Or if you are using the eBS you can use the Applications initialization profile.
However, an alternative approach may be to use a hint in the query. For example, you can set the optimizer features back to previous version that does not have this optimizer feature e.g. using:
/*+ optimizer_features_enable('9.2.0') */
Then put this hint in the query using a view. I am not sure that ther is a hint which will turn just this feature off.
Rod West -
Report region with column link that opens a pdf doc based on report query
Hello
I'm building a report table that displays info about a customer - simple select - and, for each record, has associated column links based on report queries that receive ID as parameter. When clicked, it opens the report in pdf extension. My problem here is how to pass the ID as a parameter to that report query considering i'm using a report table and that there are no items in page 71...
This is the report query i'm using:
select initcap(a.customer) customer
, initcap(a.address) address
, initcap(a.rep) rep
, (select initcap(b.city)
from portal_records b
where b.contrib=a.contrib
and b.year=to_char(sysdate,'yyyy')) city
, (to_char(a.datereg,'dd')||' de '||to_char(a.datereg,'Month')||' de '||to_char(a.datereg,'yyyy')) datereg
from portal_authorizations_cve a
where a.id=:P71_ID ???????????????
I thank in advance all your replies!!Hello
First of all, let me compliment your for your demo application... It's awesome!
I've looked into your sample (page 15) and, as far as i see, it opens a document saved in a table's column. I don't want the file to be saved there but generated when the user clicks on that particular link... So i still have the problem of how to pass the right ID as a parameter considering there is no page item on that page...
My javascript knowledge is little so i ask you: when clicking the link, is there any way of opening a window with the url f?p=&APP_ID.:0:&SESSION.:PRINT_REPORT=Authorization_CVE and the ID as a parameter?
I thank in advance! -
Invalid column name in query string - using Format function
In my post just before this one the problem was solved for writing a query string using a date range. The rest of the query string includes the same date field (Call_Date) but formatted as 'MMM-YY'. I get an invalid column name error when I add this field to the query string. Here is the rest of the query string:
strSql = "SELECT Format(CALL_DATE,'mmm-yy'), " _
& "HOME_REGION FROM CCC2.CASE_EPRP " _
& "WHERE (HOME_REGION = 'NCR') AND " _
"(CALL_DATE >= to_date( '1/1/2002', 'MM/DD/YYYY' )" _
& "AND CALL_DATE <= to_date( '2/28/2003', 'MM/DD/YYYY' ))"
In the Access Query tool I can include this field
Format(CALL_DATE,'mmm-yy')
and the query runs fine (I just need to make it dynamic using ADO). But in my ADO query string above, I get the invalid column name error. Is there a way I can include
Format(CALL_DATE,'mmm-yy')
in my ADO query string? I appologize for not being more familiar with Oracle Sql. Any help greatly appreciated.
Thanks again,
RichThank you very much for your reply. I think I'm getting closer to the solution. Just I got an error message
"date format not recognized"
when I add "to_char( call_date, 'mmm-yy' )" to the query string. I tried using all uppercase, but that did not make a difference. Do I need to use to_date inside the to_char maybe?
to_char(to_date(call_date, 'mmm/yy'), 'mmm-yy')
Thanks again for your help.
Rich -
How can I use today's date as default value in query string filter web part in SharePoint
I have a query string filter on my web part page. I am trying to figure out how I can set it's default value to Today? I can't find anything online...
Hi,
Per my understanding, you might want to set a default value to the Query String Filter Web Part.
It would not be able to set default value to the Query String Filter Web Part with the OOTB features available.
By default, with a Query String Filter Web Part in the current page, we can filter other web part in the same page by adding parameters and values in the address bar
of browser.
If setting the “Query String Parameter Name” of a Query String Filter Web Part as “t”, then we can filter the corresponding connected web part by inputting such an
URL into the address bar:
http://sharepoint/SitePages/Page1.aspx?t=value1
Suppose you want to filter the list view with a value dynamically when user opens this page, as a workaround, we can generate an URL with the parameters needed when
page loaded, then redirect user to this URL afterwards. This can be achieved using JavaScript.
About how to redirect user to other page with an URL:
http://www.tizag.com/javascriptT/javascriptredirect.php
How to get today’s date using JavaScript:
http://www.w3schools.com/js/js_dates.asp
Best regards
Patrick Liang
TechNet Community Support -
Sharepoint 2013 :Content Search Web part Property Filter By Query String - How to use ?
Hi,
I would like to filter data that is displayed in content search web part by using URL.
I tried to use Value of a parameter from a URL - Query String.Parameter1
But have no idea how to use it.
Can someone help me pleas ?duplicate thread
http://social.msdn.microsoft.com/Forums/en-US/f9fef155-1aa3-43b5-b285-5eae5d036b8d/content-search-webpart-property-filter-by-query-string-how-to-use-?forum=sharepointgeneral
My Blog- http://www.sharepoint-journey.com|
If a post answers your question, please click Mark As Answer on that post and Vote as Helpful -
Outlook office 365 calender window query string
Hello,
For one of our client i need to open outlook office 365 new event entry form with pre-populated values.
Using following url i am able to populate the subject in the new entry form.
https://outlook.office365.com/owa/#viewmodel=IComposeCalendarItemViewModelFactory&wid=6&ispopout=1&Subject=Test
subject
I need to populate value in following fields
1. Body
2. Location
3. Attendee.
I did not find any query string key for attendee. If add Body or Location in query string the APPS does not load at all.
If any body have idea how to populate those values through query sting please response on the post.
Regards,
Samaresh DasHi Samaresh,
As this question is more related to office 365 outlook, I suggest you create a post to office 365 forum.
More experts will help you and you will get more detailed information from there.
http://community.office365.com/en-us/f/158.aspx
Best regards,
Zhengyu Guo
TechNet Community Support
Please remember to mark the replies as answers if they
help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact [email protected]
Zhengyu Guo
TechNet Community Support -
i wanna use jasperreport in my web application to print a report.i am using struts framework in my app.pls help me.how will i do it that reporting in my web app?
my sample code is working in only server side. What should i do to work in client side for printing a report?
----My Codes--------
public class denemeaction extends Action {
private JasperReport jasperReport;
private JasperPrint jasperPrint;
private Object out;
public denemeaction() {
public ActionForward execute(ActionMapping mapping,
ActionForm form,
HttpServletRequest request,
HttpServletResponse response)
throws Exception{
denemeform dform=(denemeform)form;
File reportFile = new File("C:/omer.jasper");
if (!reportFile.exists())
throw new JRRuntimeException("File x.jasper not found. The report design must be compiled first.");
JasperReport jasperReport = (JasperReport)JRLoader.loadObject(reportFile.getPath());
JasperPrint jasperPrint =JasperFillManager.fillReport(jasperReport, new HashMap(),new JREmptyDataSource());
JasperPrintManager.printReport(jasperPrint,false);
return mapping.getInputForward();
Thanks ..Finally i found a way to add image to jasper report. It is pretty simple, just give the exact image location to the image expression. In your web application, the image location may vary so, dynamically set the image location from your model class. Also, make sure that your lib folder contains itext-1.3.1.jar. If your lib folder contains itext-1.3.1.jar and iText-2.1.3.jar u will get like: java.lang.NoSuchMethodError: com.lowagie.text.Image.plainWidth()F
So remove the iText-2.1.3.jar and keep only itext-1.3.1.jar, try this will work -
Content Search Webpart Property Filter By Query String - How to use ?
Hi,
I would like to filter data that is displayed in content search web part by using URL.
I tried to use Value of a parameter from a URL - Query String.Parameter1
But have no idea how to use it.
Can someone help me pleas ?Hi,
I am looking for solution to filter data on content search web part ( SP 2013) by using URL.
For example:
My URL is: http://SiteCollName/Sitename/Pages/PageName.aspx?MyParameter1=XXXX
Result : Display results that field "My field" contains XXXX.
nikita -
Add Multiple Detail Items Using the Same Query String Parameter
I am using InfoPath 2010 and SharePoint 2010.
I have 2 forms libraries - Expense and Expense Details.
The 2 libraries are linked via a custom site column Expense ID.
The Expense form contains the main header type info you would typically find on an expense report; e.g., name, purpose, department, etc.
The Expense Details form contains multiple detail expenses related to the main expense report such as airfare, rental car, etc.
I have created a page that displays an expense report with all of the related expense detail items.
The page contains a link to add a new expense detail and passes the Expense ID of the Expense form to the Expense Detail form.
This all works fine. The problem comes in after the first expense detail form is submitted.
I can successfully submit the first detail item. However, the expense detail form loses the Expense ID that was passed to it after the first expense detail form has been submitted.
The parameter still shows in the URL but the detail form no longer shows the value of the parameter.
What do I need to do in order to be able to add multiple expense detail items using the same Expense ID that was passed to the form?
I have tried using a Submit Behavior of Open a new form, Close the form, and Leave the form open.
None of these options give me what I need. Thanks for your help.
pamLaura Rogers Blog
In case anyone stumbles upon this looking for an answer. Laura Rogers has the answer found in the comments section of her blog above. It’s not the best but it
does work. You have to add an extra Info Path Web Form for it to work. I know, you can roll your eyes.<o:p></o:p>
Steps.<o:p></o:p>
1. Add Query String<o:p></o:p>
2. Add the extra Info Path form to the page. This form will be a hidden on the page and will receive the value from the query string.<o:p></o:p>
3. Add your original Info Path form and have it receive a parameter from the hidden Info Path form.<o:p></o:p>
Now, when you hit save and it opens a new form the 3 Info Path form will function properly. <o:p></o:p> -
Jasper Reports Dynamic Query String
Hi guys. Could you help me out? I'm trying to create a program with jasper reports where the query string should be dynamic. Meaning the sql queries are to change depending on certain conditions. For example, Condition A executes sqlqueryA while condition B executes sqlqueryB. All on the same report. Although of course not at the same time. Is it possible? Could you give me a sample code? I have no idea at all. Thanks.
Hi guys. Could you help me out? I'm trying to create a program with jasper reports where the query string should be dynamic. Meaning the sql queries are to change depending on certain conditions. For example, Condition A executes sqlqueryA while condition B executes sqlqueryB. All on the same report. Although of course not at the same time. Is it possible? Could you give me a sample code? I have no idea at all. Thanks.
Maybe you are looking for
-
How to disable "Open in Immersive Browser" in IE 11
Hello,<o:p></o:p> I am trying to stop our users from using the Immersive Browser in Windows 8.1 and IE11, as our filtering is done by a local application using a plugin. This BHO does not work in immersive view, and therefore bypasses all of our blac
-
i have spent 22 hrs with Apple support on line about a mail problem. I have a new Macbook Pro and I want to know if after I format the hard drive for the 4th time, reinstall Mavericks can I generate a completely new Apple ID, and E-mail address, jus
-
Doubt in Conditions of Query Designer
Hai, I have a requirement. I have three characteristics CLUSTER, TOWN,SALES OFFICE. I want to display the Top N customers based on Value sale in each of the characteristic specified above. Now, in condition, i chose ALL CHARACTERISTICS IN DRILLDOWN I
-
Leopard prompts for 802.1X username and password instead of WEP password
hey! so i got leopard on friday and i haven't been able to connect to my wireless properly since. i have an old D-Link DI-624 (Revision B) router that i have protected with a WEP password. in tiger i never had any problems with this, but now instead
-
Isight shows blue or green images
hi guys, can anyone tell me why my build-in isight images look blue or green? It's not totally blue just like looking from a piece of blue glass. Can I adjust the color of isight and how?