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

      <legend id='RXFaW'><style id='RXFaW'><dir id='RXFaW'><q id='RXFaW'></q></dir></style></legend>
      • <bdo id='RXFaW'></bdo><ul id='RXFaW'></ul>

        <small id='RXFaW'></small><noframes id='RXFaW'>

      1. 为 Crystal Reports 中的参数分配多个值

        时间:2023-07-09

              <tfoot id='5uJ8Q'></tfoot>

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

                <small id='5uJ8Q'></small><noframes id='5uJ8Q'>

                • <legend id='5uJ8Q'><style id='5uJ8Q'><dir id='5uJ8Q'><q id='5uJ8Q'></q></dir></style></legend>
                    <tbody id='5uJ8Q'></tbody>
                  本文介绍了为 Crystal Reports 中的参数分配多个值的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  我在报告中添加了一个参数,并勾选了允许多个值"选项.

                  I have added a parameter to my report with the option "Allow Multiple Values" checked.

                  这是一个状态列(IE、已提议、进行中、已完成、已取消),我希望用户能够选择要报告哪些(以及多少个)不同的 OrderStatus.

                  This is a status column (IE, Proposed, In Progress, Completed, Canceled), and I want the user to be able to select which (and how many) different OrderStatus to report on.

                  我通常如何设置参数是:

                  How I normally set parameters is:

                  report.SetParameterValue("@dtBegin", dtBegin.DateTime);
                  

                  我尝试为多个值做的事情是这样的:

                  What I tried to do for the multiple values was something like this:

                  //pseudo loop
                  foreach(int intOrderStatus in intSelectedOrderStatuses)
                  {
                      report.Parameter_OrderStatus.CurrentValues.AddValue(intOrderStatus);
                  }
                  

                  我检查过它确实将值添加到 OrderStatus 参数,但是当报表运行时,CrystalReports 对话框弹出并要求我输入 OrderStatus 参数的值.所以似乎这些值没有提交"到参数.我已经进行了多次搜索,但无法弄清楚为什么它不起作用.

                  I have checked it does add the values to the OrderStatus parameter, but when the report runs, the CrystalReports dialog pops up and asks me to enter values for the OrderStatus parameter. So it seems as though the values aren't "commited" to the parameter. I have done a number of searches and can't figure out why it's not working.

                  谢谢,

                  推荐答案

                  只需用int数组设置参数值即可.

                  Just set the parameter value with an array of ints.

                  report.SetParameterValue("@OrderStatus", new int[]{1,2,3});
                  

                  在选择专家中,您将使用 in 运算符.

                  in the select expert you would use the in operator.

                  {table.order_status_id} in {?@OrderStatus}
                  

                  这篇关于为 Crystal Reports 中的参数分配多个值的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  上一篇:我的代码中出现未知数据库连接器错误 下一篇:使用 URL 在 Crystal 报表中显示图像

                  相关文章

                    <bdo id='uXcD2'></bdo><ul id='uXcD2'></ul>

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

                  1. <tfoot id='uXcD2'></tfoot>

                      <small id='uXcD2'></small><noframes id='uXcD2'>

                      <legend id='uXcD2'><style id='uXcD2'><dir id='uXcD2'><q id='uXcD2'></q></dir></style></legend>