我需要通过jasper报告从mysql表打印最后输入的行吗?我

时间:2018-03-24 20:42:01

标签: mysql sql jasper-reports

<queryString>
    <![CDATA[SELECT
 bill.`QTY` AS bill_QTY,
 bill.`TAXABLEVALUE` AS bill_TAXABLEVALUE,
 bill.`To` AS bill_To,
 bill.`PAN No` AS bill_PAN_No,
 bill.`Inv Dated` AS bill_Inv_Dated,
 bill.`GSTIN` AS bill_GSTIN,
 bill.`Landline` AS bill_Landline,
 bill.`BuyersOrderno` AS bill_BuyersOrderno,
 bill.`Contact` AS bill_Contact,
 bill.`InvNo` AS bill_InvNo,
 bill.`Dated` AS bill_Dated,
 bill.`SlNo` AS bill_SlNo,
 bill.`Descriptionofgoods` AS bill_Descriptionofgoods,
 bill.`RATE` AS bill_RATE,
 bill.`Amount` AS bill_Amount,
 bill.`AmountCharged` AS bill_AmountCharged,
 bill.`Total` AS bill_Total,
 bill.`CGST` AS bill_CGST,
 bill.`SGST` AS bill_SGST,
 bill.`Ratep` AS bill_Ratep,
 bill.`Amountc` AS bill_Amountc,
 bill.`Rates` AS bill_Rates,
 bill.`Amounts` AS bill_Amounts,
 bill.`Totalw` AS bill_Totalw,
 bill.`CGSTa` AS bill_CGSTa,
 bill.`SGSTa` AS bill_SGSTa,
 bill.`HSN` AS HSN,
 bill.`HSN1` AS HSN

这      bill bill]]&gt;

Text Field code
<textField>
            <reportElement style="Detail" x="26" y="23" width="393" height="56" uuid="b8080258-f13c-453e-abf1-f8d932f501e2"/>
            <textElement>
                <font size="14"/>
            </textElement>
            <textFieldExpression><![CDATA[$F{bill_To}]]></textFieldExpression>
        </textField>

这是我的查询和jasper报告xml示例代码。在此先感谢您的帮助:)

1 个答案:

答案 0 :(得分:0)

我相信你可以使用LAST_INSERTED_ID()函数