如何在xml文件中进行运行时更改 [英] how to do runtime changes in xml file

查看:90
本文介绍了如何在xml文件中进行运行时更改的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


我正在通过Java应用程序生成报告.我已成功通过Java应用程序生成报告,但现在我想在xml文件中进行运行时更改.意味着首先我在xml文件中编写sql查询,例如follow

Hi,
I am work on generating report through java application.I successful to generate report through java application but now I want to do run time changes in xml file. means firstly I write sql query in xml file like follow

<queryString language="SQL">
             <!--  <![CDATA[SELECT * FROM EMPLOYEES ]]>-->
    </queryString>



并进行如下设计
< columnheader>< statictext>
< text><<![CDATA [$ F {EMPLOYEE_ID}

这是关于报告的列
<细节>



and design it as follows
<columnheader><statictext>
<text><<![CDATA[$F{EMPLOYEE_ID}

This is for column on report
<detail>

<band height="20">
    <line>
        <reportElement positionType="FixRelativeToBottom" x="0" y="19" width="555" height="1"/>
    </line>
    <textField isStretchWithOverflow="true">
        <reportElement x="0" y="0" width="92" height="20"/>
        <textElement>
            <font size="10"/>
        </textElement>
        <textFieldExpression><![CDATA[$F{EMPLOYEE_ID}]]></textFieldExpression>
    </textField


>
这是有关所选列的详细信息.
在这里,我想在运行时更改列名.对于此运行时,xml文件中的更改是什么?
请帮助我.


>
this is for details of selected column.
Here I want to changes the column name at run time.for this run time changes in xml file what do I am?
please help me.

推荐答案

F {EMPLOYEE_ID}

这是关于报告的列
<细节>
F{EMPLOYEE_ID}

This is for column on report
<detail>
<band height="20">
    <line>
        <reportElement positionType="FixRelativeToBottom" x="0" y="19" width="555" height="1"/>
    </line>
    <textField isStretchWithOverflow="true">
        <reportElement x="0" y="0" width="92" height="20"/>
        <textElement>
            <font size="10"/>
        </textElement>
        <textFieldExpression><![CDATA[


F { EMPLOYEE_ID} ]]> < > < /textField
F{EMPLOYEE_ID}]]></textFieldExpression> </textField


>
这是有关所选列的详细信息.
在这里,我想在运行时更改列名.对于此运行时,xml文件中的更改是什么?
请帮助我.


>
this is for details of selected column.
Here I want to changes the column name at run time.for this run time changes in xml file what do I am?
please help me.


这篇关于如何在xml文件中进行运行时更改的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆