0

2 つの異なる DataSet を使用して 2 つの DB テーブルからデータを選択する単純な BIRT レポートを作成しました。また、DataSet クエリに渡される 2 つのパラメーターもあります。

私の問題は、Eclipse+BIRT 環境からレポートを実行すると、必要なすべてのデータがフェッチされますが、Grails birt-report サービスからレポートを実行すると、静的スケルトンのみが出力され、データは出力されないことです。 DB。

最初に、サービスに渡したパラメーター値に何か問題があると考えたので、それらの値を出力する行をレポートに追加しました。パラメータは渡され、必要に応じて出力されました。次に、クエリからwhere
部分 を削除しましたが、それでも何も起こりませんでした。レポートは、Eclipse から実行すると入力され、birt-reportプラグインで実行すると空になります。

これは、レポートを印刷するために使用するコードです。

    params.remove('action')
    params.remove('controller')
    params.remove('name')

    params.put("userId", 10)   //parameter that should be passed
    params.put("resumeId", 5)  //parameter that should be passed

    println params;

    def options = birtReportService.getRenderOption(request, 'doc')
    def result=birtReportService.runAndRender(reportName, params, options)
    response.setHeader("Content-disposition", "attachment; filename=" +reportName + "."+reportExt);
    response.contentType = 'application/doc'
    response.outputStream << result.toByteArray()

理由は何ですか?

UPD:内部で実際に何が起こっているかを確認するためにデバッグするにはどうすればよいですか?

UPD 2: アプリと関係があるようです。新しい Grails アプリケーションでレポートを起動すると正常に動作するためです。

デバッグログを調べたときに見つかった起動の成功と失敗の唯一の違いは次のとおりです。

私のアプリログ:

[26/03/2013 13:12:36,909] [org.eclipse.birt.data.engine.impl.PreparedDataSourceQuery] [219] エントリ org.eclipse.birt.data.engine.impl.DataEngineImpl@1ed14cb8 org.eclipse。 birt.data.engine.api.querydefn.QueryDefinition@729b6def org.eclipse.birt.data.engine.impl.OdaDataSetAdapter@200ecb05 {org.eclipse.datatools.connectivity.oda.util_consumerResourceIds=org.eclipse.datatools.connectivity.oda .util.ResourceIdentifiers@2b32c5b4、OdaJDBCDriverPassInConnection=DataSource [org.apache.commons.dbcp.BasicDataSource@39547eb6]、HTML_RENDER_CONTEXT=org.eclipse.birt.report.engine.api.HTMLRenderContext@1251c294 からのターゲット接続用のトランザクション対応プロキシ、 org.eclipse.birt.data.query.ResultBufferSize=100}
[26/03/2013 13:12:36,909] [org.eclipse.birt.data.engine.impl.DataEngineImpl] [219] PreparedQuery が起動します。
[26/03/2013 13:12:36,909] [org.eclipse.birt.data.engine.impl.aggregation.AggregateTable] [219] エントリー
[26/03/2013 13:12:36,909] [org.eclipse.birt.data.engine.impl.aggregation.AggregateTable] [219] RETURN
[26/03/2013 13:12:36,909] [org.eclipse.birt.data.engine.impl.aggregation.AggregateTable] [219] エントリ C:\Users\SZAGOR~1\AppData\Local\Temp\DataEngine_517033144_2\ [オブジェクト オブジェクト] []
[26/03/2013 13:12:36,909] [org.eclipse.birt.data.engine.impl.aggregation.AggregateTable] [219] RETURN
[26/03/2013 13:12:36,909] [org.eclipse.birt.data.engine.impl.DataEngineImpl] [219] PreparedQuery の準備を開始します。
[26/03/2013 13:12:36,909] [org.eclipse.birt.data.engine.impl.aggregation.AggrRegistry] [219] エントリ 0 -1 真の org.eclipse.birt.core.script.ScriptContext@57b32816
[26/03/2013 13:12:36,909] [org.eclipse.birt.data.engine.impl.aggregation.AggrRegistry] [219] 戻る

//これらの行は疑わしい
[26/03/2013 13:12:36,909][org.eclipse.birt.data.engine.expression.InvalidExpression] [219] InvalidExpression が起動します
[26/03/2013 13:12:36,912] [org.eclipse.birt.data.engine.expression.InvalidExpression] [219] InvalidExpression が起動します

[26/03/2013 13:12:36,912] [org.eclipse.birt.data.engine.impl.GroupBindingColumn] [219] ENTRY null 0 {first_name=org.eclipse.birt.data.engine.api.querydefn. Binding@f6678eba, last_name=org.eclipse.birt.data.engine.api.querydefn.Binding@77fdce94, 合体 (resume.mobile_phone, " - ")=org.eclipse.birt.data.engine.api.querydefn.Binding @9beadc7d}

および新しいアプリ ログ:

2013-03-26 12:51:08,352 [http-bio-8080-exec-1] DEBUG impl.PreparedDataSourceQuery - エントリー org.eclipse.birt.data.engine.impl.DataEngineImpl@79bff971 org.eclipse.birt.data. engine.api.querydefn.QueryDefinition@1799e2e2 org.eclipse.birt.data.engine.impl.OdaDataSetAdapter@1aec9361 {org.eclipse.datatools.connectivity.oda.util_consumerResourceIds=org.eclipse.datatools.connectivity.oda.util.ResourceIdentifiers @21bfd316、OdaJDBCDriverPassInConnection=DataSource [org.apache.commons.dbcp.BasicDataSource@38bb5aa9]、HTML_RENDER_CONTEXT=org.eclipse.birt.report.engine.api.HTMLRenderContext@143d2a58、org.eclipse からのターゲット接続のトランザクション対応プロキシ。 birt.data.query.ResultBufferSize=100}
2013-03-26 12:51:08,352 [http-bio-8080-exec-1] DEBUG impl.DataEngineImpl - PreparedQuery が起動します。
2013-03-26 12:51:08,352 [http-bio-8080-exec-1] DEBUG 集計.AggregateTable - エントリ
2013-03-26 12:51:08,352 [http-bio-8080-exec-1] DEBUG 集計.AggregateTable - 戻る
2013-03-26 12:51:08,352 [http-bio-8080-exec-1] DEBUG aggregate.AggregateTable - エントリ C:\Users\SZAGOR~1\AppData\Local\Temp\DataEngine_2042624369_1\ [オブジェクト オブジェクト] []
2013-03-26 12:51:08,352 [http-bio-8080-exec-1] DEBUG 集計.AggregateTable - 戻る
2013-03-26 12:51:08,352 [http-bio-8080-exec-1] DEBUG impl.DataEngineImpl - PreparedQuery の準備を開始します。
2013-03-26 12:51:08,362 [http-bio-8080-exec-1] DEBUG 集計.AggrRegistry - エントリ 0 -1 真の org.eclipse.birt.core.script.ScriptContext@560fc912
2013-03-26 12:51:08,362 [http-bio-8080-exec-1] DEBUG 集計.AggrRegistry - 戻る

// ここが違う
2013-03-26 12:51:08,362 [http-bio-8080-exec-1] DEBUG 式。ColumnReferenceExpression - ENTRY first_name
2013-03-26 12:51:08,362 [http-bio-8080-exec-1] DEBUG 式。ColumnReferenceExpression - RETURN
2013-03-26 12:51:08,362 [http-bio-8080-exec-1] DEBUG 式。ColumnReferenceExpression - ENTRY last_name
2013-03-26 12:51:08,362 [http-bio-8080-exec-1] DEBUG 式。ColumnReferenceExpression - RETURN
2013-03-26 12:51:08,362 [http-bio-8080-exec-1] DEBUG 式.ColumnReferenceExpression - ENTRY 合体 (resume.mobile_phone, " - ")
2013-03-26 12:51:08,362 [http-bio-8080-exec-1] DEBUG 式。ColumnReferenceExpression - RETURN
2013-03-26 12:51:08,362 [http-bio-8080-exec-1] DEBUG impl.GroupBindingColumn - ENTRY null 0 {first_name=org.eclipse.birt.data.engine.api.querydefn.Binding@f6678eba, last_name=org.eclipse.birt.data.engine.api.querydefn.Binding@77fdce94、coalesce(resume.mobile_phone, " - ")=org.eclipse.birt.data.engine.api.querydefn.Binding@9beadc7d}

どちらの場合も、同じレポート ファイルが使用されました。

4

0 に答える 0