Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

ASP.NET / C# Params for a Report?

Status
Not open for further replies.

DrSafety

Programmer
Apr 1, 2003
4
US
I have a report configured and it needs 2 params, aPage & aOpening to fetch data from a SQL2K sp.

Where do I pass it and how? Currently trying to use :

//object aPage = Session["ptPage"] ; //as string;
//object aOpening = Session["ptPage"] ; //as string ;
PtoReport1.ParameterFieldInfo.Add(Session["ptPage"]);
PtoReport1.ParameterFieldInfo.Add(Session["ptPage"]);

Erros with Invaid Object Type??

Any ideas?

TIA

__Stephen
 
Try this:

ParameterDiscreteValue discreteParam = new ParameterDiscreteValue();
ParameterFieldDefinition paramField;
ParameterValues currentValues;

paramField = report.DataDefinition.ParameterFields["parm1"];

discreteParam.Value = somevalue;
currentValues = paramField.CurrentValues;
currentValues.Add(discreteParam);
paramField.ApplyCurrentValues(currentValues);
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top