cancel
Showing results for 
Search instead for 
Did you mean: 

eventhough I have passed value in .NET code, getting parameter panel

Former Member
0 Kudos
59

Hi,

I am developing crystal report 2008 with C# .NET 2010.

Environment:

OS : Windows 7

Report designed in CR2008

.NET Framework 4 (VS2010)

Running in CR for VS2010 (13_0_2)

I am passing a value to the report paramter filed through .NET code. (i.e. Name of the user who logged into the application - This I created a report parameter field in the report and pass value to it from .NET code using rpt.setParameterValue("UserName", "Mani") ) . What happens is When I run the application sometimes unpredictably I am getting parameter panel prompting for value eventhough I have passed value to it in the code. Do not know why?

How to resolve it?

Please help me Sir.

Regards,

Mani g.s.

Accepted Solutions (1)

Accepted Solutions (1)

Adam_Stone
Active Contributor
0 Kudos

You would only see the parameter prompting page if you either didn't pass a value, or the value you passed was not a valid value for that parameter, ie, you passed a string value to a parameter that expected a number.

Former Member
0 Kudos

Hi Adam,

I have passed value to the parameter the appropriate data type. There is no mismatch in data type while passing data from .net code to the report parameter.

Answers (1)

Answers (1)

former_member188030
Active Contributor
0 Kudos

Hi Mani,

Check if you are refreshing the reportdocument object after passing the parameter values, comment the refresh method.

Uncheck the Save data with repotr option in the designer.

- Bhushan.

Former Member
0 Kudos

Hi Bhushan,

In report option, Save data with report option is already unchecked and moreover I do not call Refresh method in my code.