2012-06-28 34 views
0

我正在使用Jasperserver 4.5.0 Pro。我開發了一些額外功能的自定義數據源。所有使用此自定義DS的報告都會正確執行,並在手動執行時顯示正確的輸出。但是,當使用Jasper的報告作業調度程序計劃相同的報告時,會話啓動時會出現一些問題,因此報告不會執行。在jasper服務器中報告使用自定義數據源的作業調度4.5.0

讓我來解釋一下。

  1. 對於報告手動執行 -

定製DS的一部分,我不得不更新下列2個XML -

viewReportFlow.xml: 我更新了動作狀態 'runReport'使用我們的自定義DS執行者動作bean方法'xmlHttpDsExecuterAction.setUpSession'來啓動會話。請參閱runReport的下方標籤 -

<action-state id="runReport" xmlns:b="http://www.springframework.org/schema/webflow" xmlns:xi="http://www.w3.org/2001/XInclude"> 
<on-entry> 
    <evaluate expression="xmlHttpDsExecuterAction.setUpSession"/> 
</on-entry> 
<evaluate expression="viewReportActionBean"/> 
<transition on="success" to="reportOutput"/> 
<on-exit> 
    <evaluate expression="xmlHttpDsExecuterPageAction.setIndex"/> 
</on-exit> 

viewReportBeans.xml: 我定義在上述流程中的XML這裏使用的執行器動作豆 -

<bean id="xmlHttpDsExecuterAction" class="com.sigma.reporting.xmlhttpds.XmlHttpDsExecuterAction" xmlns:xsi="http://www.w 3.org/2001/XMLSchema-instance"/> <bean id="xmlHttpDsExecuterPageAction" class="com.sigma.reporting.xmlhttpds.XmlHttpDsExecuterPageAction" xmlns:xsi="http://www.w 3.org/2001/XMLSchema-instance"> 
<property name="requestParameterPageIndex" value="pageIndex"/> 
<property name="flowAttributePageIndex" value="pageIndex"/> 
<property name="xmlHttpDataSourceName" value="com.sigma.reporting.xmlhttpds.XmlHttpDsExecuterDataSourceService"/> 
<property name="repository"> 
    <ref bean="repositoryService"/> 
</property> 
<property name="jasperPrintName" value="jasperPrintName"/> 
<property name="reportUnitObject" value="reportUnitObject"/> </bean> 
  1. 對於作業調度報告: 我想要使用調度程序與上面類似地實現。在我的調查過程中,我試圖分析調度程序流程,並試圖進行修改,但至今沒有運氣。任何人都可以通過調度程序告訴我哪些流程用於運行報告,並且還請推薦如上配置自定義DS的地方?

回答

0

最後,在瞭解了japser服務器調度程序的流程之後,我已經得到了解決方案。 用於設置自定義數據源豆類和調用函數,我們需要在$JASPER_HOME/apache-tomcat/weaaps/jasperserver-pro/WEBINF/flows/reportJobBeans.xml來指定bean的目標,我們可以在reportJobFlow.xml使用這個beanjobOutput標籤LIK這

<view-state id="jobOutput" view="modules/reportScheduling/jobOutput"> 
     <on-entry> 
      <set name="flowScope.prevForm" value="'jobOutput'"/> 
      <evaluate expression="reportOptionsJobEditAction.setOutputReferenceData"/> 
      <evaluate expression="xmlHttpDsExecuterAction.setUpSession"/> 
     </on-entry> 
</view-state> 
相關問題