显示参数提示报表查看器VS 2008 [英] Display Parameter Prompt Report Viewer VS 2008

查看:110
本文介绍了显示参数提示报表查看器VS 2008的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,
我的Report1(rdlc)具有一个参数(像这样添加:Report-> Report Parameters-> Add).该应用程序在本地模式下运行,而不在Oracle的服务器模式下运行.

现在,我要显示参数提示.我所做的:
1.添加参数时填写提示字段(对我不起作用)
2.将此代码添加到MyWindows.cs(甚至在MyWindows.Designer.cs中)

Hello all,
I have my Report1(rdlc) with one Parameter (added like this: Report -> Report Parameters -> Add). The application is working in Local Mode, not Server Mode with Oracle.

Now I want to display the Paramter Prompt. What I''ve done:
1. Fill the Prompt Field when Added the parameter (doesn''t work for me)
2. Add this code in MyWindows.cs (even in MyWindows.Designer.cs)

this.reportViewer1.ShowParameterPrompts = true;
this.reportViewer1.ShowPromptAreaButton = true;



我已经在论坛上阅读到Visual Studio 2008不会显示参数提示,因为它不是必需的.

请给我任何解决方案或帮助.
预先感谢.



I have read in forums that Visual Studio 2008 does not show the Parameter Prompt because it is not necessary.

Please give me any solution or help.
Thanks in advance.

推荐答案

ok :)谢谢大家阅读我的问题,但我解决了问题.解决该问题的代码如下:

ok :) Thank you everyone for reading my question, but I solved the problem. The code that solves the problem it''s following:

//MyWindow.cs
using Microsoft.Reporting.WinForms;
//now the code 
ReportParameter[] param = new ReportParameter[1];
param[0] = new ReportParameter("ParameterName", "ParameterValue", false);
reportViewer1.LocalReport.GetParameters();
reportViewer1.LocalReport.SetParameters(param);



就这样.

祝你有美好的一天,
三都



That''s all.

Have a great day,
Sandu


这篇关于显示参数提示报表查看器VS 2008的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆