2017-05-03 6 views
0

Birt Engineを初めて使用しました。私の仕事の1つは、Birtランタイムをバージョン4.4.2にアップグレードすることでした。 PDFレポートは例外なく生成されています。BirtUpgrade中にPDFレポートを生成する際の問題点バージョン4.4.2

しかし、PDFには多くのデータの不一致があります。後続のページで多くの初期値が繰り返されます。ログに例外はありません。 PDFはBirt Runtime 3.7.0までの正しいデータを生成しています。

私は技術の新機能として、問題の根本原因が何であるかわかりません。実行時の3.7.0と4.4.2の間の大きな変更は見られないので、なぜこれが起こっているのかは分かりません。とにかく誰も私を導くことができますか?

コードの一部が追加されている可能性があります。私たちは、BIRTエンジンを初期化

パート:私たちはレポートエンジンを実行

EngineConfig config = new EngineConfig(); 
String birtHome = ReportingProperties.getConstantString("BIRT_HOME"); 
ReportingServiceLogger.LOGGER.info("Setting BIRT Home: " + birtHome); 
config.setEngineHome(birtHome); 
config.setLogConfig(null, Level.ALL); 
ReportingServiceLogger.LOGGER.info("Starting up platform"); 
Platform.startup(config); 
ReportingServiceLogger.LOGGER.info("Platfor`enter code here`m started"); 
IReportEngineFactory factory = (IReportEngineFactory) Platform.createFactoryObject(
IReportEngineFactory. 
EXTENSION_REPORT_ENGINE_FACTORY); 
birtEngine = factory.createReportEngine(config); 
birtEngine.changeLogLevel(Level.WARNING); 

パート:BIRTのバージョンは、データセットの結果をキャッシュ

ReportingServiceLogger.LOGGER.info("Executing Report Using BIRT Engine"); 
design = birtEngine.openReportDesign(inputFilePath); 
IRunAndRenderTask task = birtEngine.createRunAndRenderTask(design); 
RenderOption options = null; 
if (outputFormat.equalsIgnoreCase(ReportingProperties.OUTPUT_FORMAT_XLS)) { 
    options = BIRTEngine.renderOptionsXLS(); 
} else if (outputFormat.equalsIgnoreCase(IRenderOption.OUTPUT_FORMAT_PDF)) { 
    options = BIRTEngine.renderOptionsPDF(); 
} else if (outputFormat.equalsIgnoreCase(IRenderOption.OUTPUT_FORMAT_HTML) || outputFormat.equalsIgnoreCase(ReportingProperties.OUTPUT_FORMAT_CHART_IMAGE)) { 
    options = BIRTEngine.renderOptionsHTML(reportOutputFolder); 
} 
options.setOutputFileName(outputFilePath); 
task.setRenderOption(options); 
params.put("outputFormat", outputFormat); 
task.setParameterValues(params); 
ReportingServiceLogger.LOGGER.info("Run BIRT Task with outputpath : " + outputFilePath); 
if (ReportingProperties.getConstantString("EXECUTION_ON_ERROR").equalsIgnoreCase("CANCEL")) { 
    task.setErrorHandlingOption(IRunAndRenderTask.CANCEL_ON_ERROR); 
} else { 
    task.setErrorHandlingOption(
    IRunAndRenderTask.CONTINUE_ON_ERROR); 
} 
task.run(); 
task.close(); 
+0

コードサンプルとログを入力してください。 –

答えて

0

新しいです。つまり、レポートで同じパラメータを使用して同じDataSetを再度呼び出すと、最初の呼び出しでキャッシュされた結果が使用されます。

BIRTレポートでスクリプト化されたDataSetを使用しているか、DataSetの実行間でDBの値を変更したり、DataSetのSQLを動的に変更することがあります。

これは通常素晴らしい機能ですが、DataSetの結果が何らかの理由でXに依存する場合は、必ずDataSetのパラメータにXを追加してください!

関連する問題