Monday, March 12, 2012
Interactive Prompting
I am migrating few my oracle codes to T-SQL. Currently am using & (ampersand) interactive prompt of SQLPlus. Is there any equivalent for the above said in SQL Server.
-CheekuNope, not the way sqlplus does. But the Query Analyzer has an option to fill in parameters of a template.
Sunday, February 19, 2012
Integrating Rdl to webapplication with parameter passing
<p>
Hi,
i was created rdl and deployed it rdl is working fine and asked parameter prompt and i gave the value report is generated in rdl.
and i was Integrated to Reportviewer in my web application all things are ok.
But how to set the parameter in reportviewer.
could any one help to me.
regards
kumar
</p>
this is easy
First it is necessary to ccreate aReportParameter object (be sure you have a reference toMicrosoft.Reporting.WebForms).The contructor takes two string parameters one for the Name and one forthe Value. A new parameter would look like the code below.
ReportParameter myReportParameter = new ReportParameter("Id",
Request.QueryString["Id"]);
Next, parameters on the ReportViewer are set using theSetParameters method. It takes an array of ReportParameter, so you would have syntax like the following.
MyReportViewer.ServerReport.SetParameters(
new ReportParmeter[] { myReportParameter });
Integrating Rdl to webapplication with parameter passing
Hi,
i was created rdl and deployed it rdl is working fine and asked parameter prompt and i gave the value report is generated in rdl.
and i was Integrated to Reportviewer in my web application all things are ok.
But how to set the parameter in reportviewer.
could any one help to me.
regards
kumar
this is easy
First it is necessary to ccreate aReportParameter object (be sure you have a reference toMicrosoft.Reporting.WebForms).The contructor takes two string parameters one for the Name and one forthe Value. A new parameter would look like the code below.
ReportParameter myReportParameter = new ReportParameter("Id",
Request.QueryString["Id"]);
Next, parameters on the ReportViewer are set using theSetParameters method. It takes an array of ReportParameter, so you would have syntax like the following.
MyReportViewer.ServerReport.SetParameters(
new ReportParmeter[] { myReportParameter });
Integrating Rdl to webapplication with parameter passing
Hi,
i was created rdl and deployed it rdl is working fine and asked parameter prompt and i gave the value report is generated in rdl.
and i was Integrated to Reportviewer in my web application all things are ok.
But how to set the parameter in reportviewer.
could any one help to me.
regards
kumar
this is easy
First it is necessary to ccreate aReportParameter object (be sure you have a reference toMicrosoft.Reporting.WebForms).The contructor takes two string parameters one for the Name and one forthe Value. A new parameter would look like the code below.
ReportParameter myReportParameter = new ReportParameter("Id",
Request.QueryString["Id"]);
Next, parameters on the ReportViewer are set using theSetParameters method. It takes an array of ReportParameter, so you would have syntax like the following.
MyReportViewer.ServerReport.SetParameters(
new ReportParmeter[] { myReportParameter });
|||
Thanks lot Tamer Fathy you are nice and simply guide to me
It is working fine once again Thanks lot
regards
kumar
|||Mr. Tamer,
How do I pass 2 or more parameters to Report ??
Thanks,
Kusno
|||You welcome,
you can easily do this as the report parameters are list
ReportParameter(ReportParameterName, Value);
I.e.
string strTime = System.DateTime.Now.ToShortTimeString();RptParameters[0] =
new Microsoft.Reporting.WebForms.ReportParameter("ReportParameterName",Value);
RptParameters[1]=
new Microsoft.Reporting.WebForms.ReportParameter("ReportParameterName",Value);
and so on
|||
Yes, it works....
Thanks a lot man.