基于Excel模板的Oracle BI报告在通过Reportservice调用时没有数据?

发布于 2025-02-02 17:20:47 字数 3981 浏览 4 评论 0原文

Oracle BI Publisher 12.2.1.4.0
我有一组我想使用RunReport Report Service运行的报告。在浏览器中启动时,所有报告都运行良好。当通过报告服务运行时,基于Excel模板的模板只有一个带有列标签的标头行。根本没有数据。当通过报告服务询问“ XLSX格式”时,基于BI模板的人都可以。
那些使用Oracle BI Publisher Desktop 12.2.1.4.0在Excel(2019)中创建的模板的那些插件可正常工作,除非使用SOAP信封Runreport Action进行调用。
我做错了什么,但找不到。不确定问题是否在传递/构建参数(特别是日期),或者我的肥皂中缺少或错误的问题:

<?xml version="1.0" encoding="utf-8"?>
<soap-env:Envelope xmlns:soap-env="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <soap-env:Body>
        <ns0:RunReport xmlns:ns0="http://xmlns.oracle.com/oxp/service/v2">
                <ns0:reportRequest>
                    <ns0:attributeCalendar>Gregorian</ns0:attributeCalendar>
                    <ns0:attributeFormat>excel</ns0:attributeFormat>
                    <ns0:attributeLocale>hr-Hr</ns0:attributeLocale>
                    <ns0:attributeTemplate>_TO_EXCEL_WEEKS_Cards.xls</ns0:attributeTemplate>
                    <ns0:flattenXML>true</ns0:flattenXML>
                    <ns0:parameterNameValues>
                        <ns0:listOfParamNameValues>
                            <ns0:item>
                                <ns0:name>DateFrom</ns0:name>
                                <ns0:values>
                                    <ns0:item>2022-05-01T00:00:00.000+02:00</ns0:item>
                                </ns0:values>
                            </ns0:item>
                            <ns0:item>
                                <ns0:name>DateTo</ns0:name>
                                <ns0:values>
                                    <ns0:item>2022-05-28T00:00:00.000+02:00</ns0:item>
                                </ns0:values>
                            </ns0:item>
                            <ns0:item>
                                <ns0:name>DateDeliveredTo</ns0:name>
                                <ns0:values>
                                    <ns0:item>2022-05-28T00:00:00.000+02:00</ns0:item>
                                </ns0:values>
                            </ns0:item>
                            <ns0:item>
                                <ns0:name>Marcet</ns0:name>
                                <ns0:values>
                                    <ns0:item>*</ns0:item>
                                </ns0:values>
                            </ns0:item>
                        </ns0:listOfParamNameValues>
                    </ns0:parameterNameValues>
                    <ns0:reportAbsolutePath>/MKTP/06-Sell/70_Offer/Reports/70_20_WEEKS_TO_EXCEL_TODAY_2022_REPORT.xdo</ns0:reportAbsolutePath>
                    <ns0:sizeOfDataChunkDownload>-1</ns0:sizeOfDataChunkDownload>
                    <ns0:byPassCache>True</ns0:byPassCache>
                </ns0:reportRequest>
            <ns0:userID>username</ns0:userID>
            <ns0:password>password</ns0:password>
        </ns0:RunReport>
    </soap-env:Body>
</soap-env:Envelope>

我确实尝试了不同的属性标签(仅在“ excel”,否则错误时起作用),试图更改该标签Flattenxml标签(没有true或false的数据)。模板非常简单,一组重复记录,并且标头始终存在,因此模板名称/位置没有问题。
XDO_METADATA:

Data Constraints:       
XDO_?XDOFIELD1? <?DOCTYPE?> 
XDO_?XDOFIELD2? <?DOC_ID?>  
XDO_?XDOFIELD3? <?STATUS?>  
XDO_?XDOFIELD4? <?ORDER_ID?>    
XDO_?XDOFIELD5? <?DOC_YEAR?>    
XDO_?XDOFIELD6? <?DOC_NUM?> 
XDO_?XDOFIELD7? <?DOC_DATE?>    
...
... 

XDO_GROUP_?XDOG1?   <xsl:for-each select=".//G_1">  </xsl:for-each>

所有其他报告(PDF-S)的运行方式都可以。

感谢您的时间...

Oracle BI Publisher 12.2.1.4.0
I have a set of reports that I want to run using runReport Report Service. All the reports are working well when started within browser. The ones based on excel template when run through Report Service has just a header row with column labels. No data at all. Those based on BI template when asked for "xlsx format" through Report Service are all ok.
Those whose templates are created in excel (2019) using Oracle BI Publisher Desktop 12.2.1.4.0 add-on work ok unless called with SOAP envelope runReport action.
I'm doing something wrong, but could not find what. Not sure if the problem is in passing/formating parameters (dates especialy), or something else is missing or wrong in my SOAP:

<?xml version="1.0" encoding="utf-8"?>
<soap-env:Envelope xmlns:soap-env="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <soap-env:Body>
        <ns0:RunReport xmlns:ns0="http://xmlns.oracle.com/oxp/service/v2">
                <ns0:reportRequest>
                    <ns0:attributeCalendar>Gregorian</ns0:attributeCalendar>
                    <ns0:attributeFormat>excel</ns0:attributeFormat>
                    <ns0:attributeLocale>hr-Hr</ns0:attributeLocale>
                    <ns0:attributeTemplate>_TO_EXCEL_WEEKS_Cards.xls</ns0:attributeTemplate>
                    <ns0:flattenXML>true</ns0:flattenXML>
                    <ns0:parameterNameValues>
                        <ns0:listOfParamNameValues>
                            <ns0:item>
                                <ns0:name>DateFrom</ns0:name>
                                <ns0:values>
                                    <ns0:item>2022-05-01T00:00:00.000+02:00</ns0:item>
                                </ns0:values>
                            </ns0:item>
                            <ns0:item>
                                <ns0:name>DateTo</ns0:name>
                                <ns0:values>
                                    <ns0:item>2022-05-28T00:00:00.000+02:00</ns0:item>
                                </ns0:values>
                            </ns0:item>
                            <ns0:item>
                                <ns0:name>DateDeliveredTo</ns0:name>
                                <ns0:values>
                                    <ns0:item>2022-05-28T00:00:00.000+02:00</ns0:item>
                                </ns0:values>
                            </ns0:item>
                            <ns0:item>
                                <ns0:name>Marcet</ns0:name>
                                <ns0:values>
                                    <ns0:item>*</ns0:item>
                                </ns0:values>
                            </ns0:item>
                        </ns0:listOfParamNameValues>
                    </ns0:parameterNameValues>
                    <ns0:reportAbsolutePath>/MKTP/06-Sell/70_Offer/Reports/70_20_WEEKS_TO_EXCEL_TODAY_2022_REPORT.xdo</ns0:reportAbsolutePath>
                    <ns0:sizeOfDataChunkDownload>-1</ns0:sizeOfDataChunkDownload>
                    <ns0:byPassCache>True</ns0:byPassCache>
                </ns0:reportRequest>
            <ns0:userID>username</ns0:userID>
            <ns0:password>password</ns0:password>
        </ns0:RunReport>
    </soap-env:Body>
</soap-env:Envelope>

I did try different attributeFormat tags (it works only when "excel", otherwise error), tryed to change the flattenXML tag (no data with true or false). Template is very simple with one group of repeating records and the header is always there, so there is not the problem with template name/location.
XDO_METADATA:

Data Constraints:       
XDO_?XDOFIELD1? <?DOCTYPE?> 
XDO_?XDOFIELD2? <?DOC_ID?>  
XDO_?XDOFIELD3? <?STATUS?>  
XDO_?XDOFIELD4? <?ORDER_ID?>    
XDO_?XDOFIELD5? <?DOC_YEAR?>    
XDO_?XDOFIELD6? <?DOC_NUM?> 
XDO_?XDOFIELD7? <?DOC_DATE?>    
...
... 

XDO_GROUP_?XDOG1?   <xsl:for-each select=".//G_1">  </xsl:for-each>

All the other reports (pdf-s) working ok whatever way they are run.

Thanks for your time...

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

相对绾红妆 2025-02-09 17:20:47

找到了。该问题是BI中定义为日期的参数。将其更改为文本,将数据集中的Where子句调整为类似的内容

 column Between To_Date(date_param1, 'dd.mm.yyyy') And To_Date(date_param2, 'dd.mm.yyyy')

,并在SOAP信封中的日期参数值。它现在起作用。
无论如何,我想知道是否有一个解决方案,我可以将参数保留在BI中以停留日期类型。这是很多无聊的事情要做。

Found it. The problem is parameter in BI defined as DATE. Changed it to text, adjusted the WHERE clause in dataset to something like

 column Between To_Date(date_param1, 'dd.mm.yyyy') And To_Date(date_param2, 'dd.mm.yyyy')

and shortend the date parameter values in SOAP Envelope. It works now.
Anyway, I would like to know if there is a solution where I could keep my parameters in BI to stay of date type. This is a lot of boring things to do.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文