开发者

about embedded pentaho reporting Engine log query

I have integrated reporting engine in my Java application. I have recently upgraded petaho reporting to 3.8.2. I am facing a problem with this upgrade so I switched on the pentaho logs to see what is going on. and I got following relevant log. Can somebody please explain what is its meaning? I assumed from these logs that Data factory is not able to find the value of my query parameters and setting null instead. if it is the case, I dont understand, why it is so, because in code, I am setting these parameters values in Master report as shown below. similarly I am setting other parameters values.

vReport.getParameterValues().put("propertyId", pPropertyId);

the log I am talking about is here.

Sep 20 16:00:44,540 DEBUG SimpleSQLReportDataFactory - [ IP=0:0:0:0:0:0:0:1, Property=72, Req=6 ] - Detected parameter:[dateFormat, dateFormat, dateFormat, dateTimeFormat, dateTimeFormat, bookedFrom, bookedTo, propertyId]
Sep 20 16:00:44,561 DEBUG SimpleSQLReportDataFactory - [ IP=0:0:0:0:0:0:0:1, Property=72, Req=6 ] - Parametrize: 1 set to <null>
Sep 20 16:00:44,561 DEBUG SimpleSQLReportDataFactory - [ IP=0:0:0:0:0:0:0:1, Property=72, Req=6 ] - Parametrize: 2 set to <null>
Sep 20 16:00开发者_如何转开发:44,562 DEBUG SimpleSQLReportDataFactory - [ IP=0:0:0:0:0:0:0:1, Property=72, Req=6 ] - Parametrize: 3 set to <null>
Sep 20 16:00:44,562 DEBUG SimpleSQLReportDataFactory - [ IP=0:0:0:0:0:0:0:1, Property=72, Req=6 ] - Parametrize: 4 set to <null>
Sep 20 16:00:44,563 DEBUG SimpleSQLReportDataFactory - [ IP=0:0:0:0:0:0:0:1, Property=72, Req=6 ] - Parametrize: 5 set to <null>
Sep 20 16:00:44,563 DEBUG SimpleSQLReportDataFactory - [ IP=0:0:0:0:0:0:0:1, Property=72, Req=6 ] - Parametrize: 6 set to <null>
Sep 20 16:00:44,564 DEBUG SimpleSQLReportDataFactory - [ IP=0:0:0:0:0:0:0:1, Property=72, Req=6 ] - Parametrize: 7 set to <null>
Sep 20 16:00:44,564 DEBUG SimpleSQLReportDataFactory - [ IP=0:0:0:0:0:0:0:1, Property=72, Req=6 ] - Parametrize: 8 set to <null>

Thanks in Advance.


Pentaho Reporting will only use your parameter values if you also declare proper parameters on your report. Just adding random name-value pairs will not work.

So at least declare all parameter you want to use. In the most generic version, assuming you do proper validation of the user input yourself and that you can guarantee that the values you pass in are safe and valid, use this code with all your parameters:

final ModifiableReportParameterDefinition parameterDefinition =
    (ModifiableReportParameterDefinition) report.getParameterDefinition();
parameterDefinition.addParameterDefinition(new PlainParameter("dataFormat", Object.class));
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜