<small id='9ilwT'></small><noframes id='9ilwT'>

  • <i id='9ilwT'><tr id='9ilwT'><dt id='9ilwT'><q id='9ilwT'><span id='9ilwT'><b id='9ilwT'><form id='9ilwT'><ins id='9ilwT'></ins><ul id='9ilwT'></ul><sub id='9ilwT'></sub></form><legend id='9ilwT'></legend><bdo id='9ilwT'><pre id='9ilwT'><center id='9ilwT'></center></pre></bdo></b><th id='9ilwT'></th></span></q></dt></tr></i><div id='9ilwT'><tfoot id='9ilwT'></tfoot><dl id='9ilwT'><fieldset id='9ilwT'></fieldset></dl></div>

      <bdo id='9ilwT'></bdo><ul id='9ilwT'></ul>

        <tfoot id='9ilwT'></tfoot><legend id='9ilwT'><style id='9ilwT'><dir id='9ilwT'><q id='9ilwT'></q></dir></style></legend>
      1. Java Crystal Report SDK - 报表和子报告

        时间:2023-09-28
            <bdo id='IuUen'></bdo><ul id='IuUen'></ul>

                <tbody id='IuUen'></tbody>
              <legend id='IuUen'><style id='IuUen'><dir id='IuUen'><q id='IuUen'></q></dir></style></legend>
            • <small id='IuUen'></small><noframes id='IuUen'>

              <tfoot id='IuUen'></tfoot>
                • <i id='IuUen'><tr id='IuUen'><dt id='IuUen'><q id='IuUen'><span id='IuUen'><b id='IuUen'><form id='IuUen'><ins id='IuUen'></ins><ul id='IuUen'></ul><sub id='IuUen'></sub></form><legend id='IuUen'></legend><bdo id='IuUen'><pre id='IuUen'><center id='IuUen'></center></pre></bdo></b><th id='IuUen'></th></span></q></dt></tr></i><div id='IuUen'><tfoot id='IuUen'></tfoot><dl id='IuUen'><fieldset id='IuUen'></fieldset></dl></div>

                • 本文介绍了Java Crystal Report SDK - 报表和子报告的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

                  问题描述

                  我正在尝试使用 Java 中的 Crystal Report SDK 生成一个由主报表和子报表组成的报表.

                  I'm trying to generate a report using Crystal Report SDK in Java composed by a main report and a subreport.

                  我只想在我的存储过程返回某些内容时生成报告,为此我手动执行 proc 并仅在我的 ResultSet != null 时启动报告生成.

                  I do want to generate the report only if there is something returns by my stored procedure and for doing that I execute the proc manually and launch the report generation only if my ResultSet != null.

                  但是,我的子报表必须通过 Crystal 生成.

                  But, my subreport has to be generated through Crystal.

                  • 我将 setTablesDatasource() 方法用于我的主报告以使用我的 ResultSet
                  • 对于我的子报告:

                  _ 我使用 setTableslocation() 获取值并通过水晶生成报告

                  _ I use the setTableslocation() for getting the values and generating the report through crystal

                  _ 我在子报表的 ParameterFieldController 中设置了所有需要的参数.

                  _ I set all the parameters needed in the ParameterFieldController of my subreport.

                  但是,我在控制台中收到此错误:

                  However, I'm getting this error in my console :

                  缺少参数值.---- 错误代码:-2147217394 错误代码名称:missingParameterValueError

                  Missing parameter values.---- Error code:-2147217394 Error code name:missingParameterValueError

                  即使子报表的参数设置正确.

                  Even though the subreport's parameters are correctly setted.

                  如果我生成我的报告时没有子报告或报告并且不需要参数,那么生成就可以了.

                  If I generate my report with no subreport or with report and no needed parameter, the generation is just fine.

                  我是否以错误的方式设置参数?

                  Am I setting my parameters in a wrong way ?

                  推荐答案

                  在尝试了很多东西来集成我的子报表而不使用另一个 ResultSet 之后,这里是设置子报表参数的方法:

                  After trying a lot of stuff for integrating my subreport without using another ResultSet, here is the way for setting the parameters for the subreport :

                  您必须使用主报表的 ParameterFieldController 而不是子报表的...逻辑.

                  You have to use the ParameterFieldController of the main report and not the one of the subreport... Logic.

                  ParameterFieldController paramFieldController =rptClientDoc.getDataDefController().getParameterFieldController();paramFieldController.setCurrentValue(subreport_name, parameter_name,参数值);

                  ParameterFieldController paramFieldController = rptClientDoc.getDataDefController().getParameterFieldController(); paramFieldController.setCurrentValue(subreport_name, parameter_name, parameter_value);

                  现在,它工作得很好!

                  这篇关于Java Crystal Report SDK - 报表和子报告的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持html5模板网!

                  上一篇:在 java 中将 Crystal 报表导出为 PDF 下一篇:是否可以使用 Java 8 进行 Android 开发?

                  相关文章

                  最新文章

                • <small id='857Mz'></small><noframes id='857Mz'>

                        <bdo id='857Mz'></bdo><ul id='857Mz'></ul>
                      <i id='857Mz'><tr id='857Mz'><dt id='857Mz'><q id='857Mz'><span id='857Mz'><b id='857Mz'><form id='857Mz'><ins id='857Mz'></ins><ul id='857Mz'></ul><sub id='857Mz'></sub></form><legend id='857Mz'></legend><bdo id='857Mz'><pre id='857Mz'><center id='857Mz'></center></pre></bdo></b><th id='857Mz'></th></span></q></dt></tr></i><div id='857Mz'><tfoot id='857Mz'></tfoot><dl id='857Mz'><fieldset id='857Mz'></fieldset></dl></div>
                      <legend id='857Mz'><style id='857Mz'><dir id='857Mz'><q id='857Mz'></q></dir></style></legend>
                      <tfoot id='857Mz'></tfoot>