0
回答
java获取BO报表参数问题
利用AWS快速构建适用于生产的无服务器应用程序,免费试用12个月>>>   

情况是这样的,使用universe作为数据源,BO报表继承了BW里面的一个报表,继承了它的几个参数,然后bo报表里面还新加了几个自己的参数,现在想要获取这些参数,使用的方法如下面的链接:

http://blog.csdn.net/leoly003/article/details/8904469

得到的是一种xml格式的字符串,如下所示:

<DPCOMMANDS>
    <DPCOMMAND>
        <DP>
            <QUERY>
                <GROUPINGSETS>
                    <GROUPINGSET>
                        <INDEX VALUE="1"/>
                        <INDEX VALUE="5"/>
                        <INDEX VALUE="21"/>
                        <INDEX VALUE="19"/>
                        <INDEX VALUE="20"/>
                        <INDEX VALUE="9"/>
                        <INDEX VALUE="10"/>
                        <INDEX VALUE="12"/>
                        <INDEX VALUE="13"/>
                        <INDEX VALUE="14"/>
                        <INDEX VALUE="15"/>
                    </GROUPINGSET>
                </GROUPINGSETS>
                <QUERYRESULT>
                    <QUERYOBJECT KEY="[0CUSTOMER].[LEVEL01]" INDEX="0" />
                    <QUERYOBJECT KEY="[0PLANT__0COMP_CODE].[LEVEL01]" INDEX="1" />
                    <QUERYOBJECT KEY="[Measures].[5250QI7AHY6O3SXO1YHN2ASFO]" INDEX="2" />
                    <QUERYOBJECT KEY="[0CUSTOMER].[LEVEL01].[[20TAX_NUMB2]].[Value]" INDEX="3" />
                    <QUERYOBJECT KEY="[0CUSTOMER].[LEVEL01].[[50CUSTOMER]].[Value]" INDEX="4" />
                    <QUERYOBJECT KEY="[0CUSTOMER].[LEVEL01].[[20CUSTOMER]].[Value]" INDEX="5" />
                    <QUERYOBJECT KEY="[0PLANT__0COMP_CODE].[LEVEL01].[[20PLANT__0COMP_CODE]].[Value]" INDEX="6" />
                    <QUERYOBJECT KEY="[0PLANT__0COMP_CODE].[LEVEL01].[[50PLANT__0COMP_CODE]].[Value]" INDEX="7" />
                    <QUERYOBJECT KEY="[Measures].[5250SEHB1J5HO5TBX7ASFRDKK]" INDEX="8" />
                    <QUERYOBJECT KEY="[Measures].[5250P66ZZOI6OXDNL1UW80TBO]" INDEX="9" />
                    <QUERYOBJECT KEY="[Measures].[5250P6MD1LPLQ6GJWPZKS4QR8]" INDEX="10" />
                    <QUERYOBJECT KEY="[Measures].[5250P71Q3IX0RFJG8E49C8O6S]" INDEX="11" />
                    <QUERYOBJECT KEY="[Measures].[5250P7H35G4FSOMCK28XWCLMC]" INDEX="12" />
                    <QUERYOBJECT KEY="[Measures].[5250P7WG7DBUTXP8VQDMGGJ1W]" INDEX="13" />
                    <QUERYOBJECT KEY="[Measures].[5250P844QBXKCK8P1KFYQIHRO]" INDEX="14" />
                    <QUERYOBJECT KEY="[Measures].[5250PHPSFL2GMQJWC5DBAYVZO]" INDEX="15" />
                    <QUERYOBJECT KEY="[Measures].[525I28TLF442VFYE55XQWA16C]" INDEX="16" />
                    <QUERYOBJECT KEY="[Measures].[525I28LWW5IDCTEXZBVEM82GK]" INDEX="17" />
                    <QUERYOBJECT KEY="[Measures].[5250SEOZKHR76SCS31D4PTCAC]" INDEX="18" />
                    <QUERYOBJECT KEY="[Measures].[5250SEHB1J5HO5TBX7ASFRDKK]" INDEX="19" />
                    <QUERYOBJECT KEY="[Measures].[5250QI7AHY6O3SXO1YHN2ASFO]" INDEX="20" />
                    <QUERYOBJECT KEY="[0CUSTOMER].[LEVEL01].[[20NAME2]].[Value]" INDEX="21" />
                </QUERYRESULT>
                <QUERYSCOPE />
                <QUERYCONDITION>
                    <WHERE>

                        <OPERATOR VALUE="AND" >
                            <FILTER KEY="[!V000004]">
				<CONDITION OPERATORCONDITION="Between">
					<CONSTANT TECH_NAME="[0CALMONTH].[201412]"/>
					<CONSTANT TECH_NAME="[0CALMONTH].[201505]"/>
				</CONDITION>
			    </FILTER>
                            <FILTER KEY="[!V000003]">
				<CONDITION OPERATORCONDITION="Equal">
					<CONSTANT TECH_NAME="[ZMAT__Z3CPJ].[15Q1]"/>
				</CONDITION>
			    </FILTER>
                            <FILTER KEY="[!V000001]">
				<CONDITION OPERATORCONDITION="InList">
					<CONSTANT TECH_NAME="[0PLANT__0COMP_CODE].[3102]"/>
					<CONSTANT TECH_NAME="[0PLANT__0COMP_CODE].[3105]"/>
					<CONSTANT TECH_NAME="[0PLANT__0COMP_CODE].[3100]"/>
					<CONSTANT TECH_NAME="[0PLANT__0COMP_CODE].[3103]"/>
					<CONSTANT TECH_NAME="[0PLANT__0COMP_CODE].[3104]"/>
					<CONSTANT TECH_NAME="[0PLANT__0COMP_CODE].[3106]"/>
					<CONSTANT TECH_NAME="[0PLANT__0COMP_CODE].[3107]"/>
					<CONSTANT TECH_NAME="[0PLANT__0COMP_CODE].[3108]"/>
					<CONSTANT TECH_NAME="[0PLANT__0COMP_CODE].[3109]"/>
					<CONSTANT TECH_NAME="[0PLANT__0COMP_CODE].[3200]"/>
					<CONSTANT TECH_NAME="[0PLANT__0COMP_CODE].[3201]"/>
					<CONSTANT TECH_NAME="[0PLANT__0COMP_CODE].[3300]"/>
					<CONSTANT TECH_NAME="[0PLANT__0COMP_CODE].[3400]"/>
					<CONSTANT TECH_NAME="[0PLANT__0COMP_CODE].[3401]"/>
					<CONSTANT TECH_NAME="[0PLANT__0COMP_CODE].[3402]"/>
					<CONSTANT TECH_NAME="[0PLANT__0COMP_CODE].[3403]"/>
					<CONSTANT TECH_NAME="[0PLANT__0COMP_CODE].[3405]"/>
					<CONSTANT TECH_NAME="[0PLANT__0COMP_CODE].[3500]"/>
					<CONSTANT TECH_NAME="[0PLANT__0COMP_CODE].[3501]"/>
					<CONSTANT TECH_NAME="[0PLANT__0COMP_CODE].[3600]"/>
					<CONSTANT TECH_NAME="[0PLANT__0COMP_CODE].[3601]"/>
					<CONSTANT TECH_NAME="[0PLANT__0COMP_CODE].[3602]"/>
					<CONSTANT TECH_NAME="[0PLANT__0COMP_CODE].[3700]"/>
					<CONSTANT TECH_NAME="[0PLANT__0COMP_CODE].[3701]"/>
					<CONSTANT TECH_NAME="[0PLANT__0COMP_CODE].[5001]"/>
				</CONDITION>
			    </FILTER>
                        </OPERATOR>
                    </WHERE>
                </QUERYCONDITION>
            </QUERY>
        </DP>
    </DPCOMMAND>
</DPCOMMANDS>



然后我对这个XML格式的字符串进行解析,提取出来了
OPERATORCONDITION="InList"

TECH_NAME="[0PLANT__0COMP_CODE]

等内容,但实际上报表里面的参数的名称不是0PLANT_0COMP_CODE这样的,

据说用这种获取sql的方法来获取参数可行,但不知问题在哪

举报
影非弦
发帖于2年前 0回/192阅
顶部