Quantcast
Viewing all articles
Browse latest Browse all 3636

Crystal Report get and Set default parameter to report in Asp.net C#

Hi All,

I want to get the parameter from the Crystal report file and set parameter values to the particular Filed.

It always getting exception this occurs because of the Subreport also containing the similar parameter.

My Source code below,

 if (ParameterArrayList.Count != 0)        {            int ParamArrayCount = (ParameterArrayList.Count / 2);            //Getting Value From the Report (Parameter and Formula Feild)            int ParameterFieldCount = cryRptdocUMENT.DataDefinition.ParameterFields.Count;            for (int i = 0; i < ParameterFieldCount; i++)            {                string paramname = cryRptdocUMENT.DataDefinition.ParameterFields[i].Name;                var myValue = ParameterArrayList.FirstOrDefault(x => x.Key.ToUpper() == paramname.ToUpper());                         cryRptdocUMENT.SetParameterValue(paramname, myValue.Value);            }        }

 

I found i missed something to get value from the parameter.


Viewing all articles
Browse latest Browse all 3636

Trending Articles