cancel
Showing results for 
Search instead for 
Did you mean: 

CR XI - What is the issue with integer parameters?

Former Member
0 Kudos

Why is it that the report requires a value for parameters that are integer type, when the DB allows it to be null? This is just for integers. Other data types, such as bit or varchar(that accept nulls) are not required by the report.

Accepted Solutions (0)

Answers (3)

Answers (3)

0 Kudos

The RDC has limited functionality. Change the type in your code.

Please re-post if this is still an issue to the Legacy Application Development SDKs Forum or purchase a case and have a dedicated support engineer work with you directly

Former Member
0 Kudos

I don't have an explanation for the why, but I've encountered the same issue.

In my case, it's less of an issue because I have another platform layer between my application and Crystal Reports, so the solution in my case was to use strings for the parameters where this is an issue, and handle them in the app before they go to the report/stored procedure.

That's probably not a lot of help.

Former Member
0 Kudos

Wise approach.

It doesnt answer the question, but ateast I'm getting some consensus.

I guess we have to code around logic that isnt so logical.

Thanks!

Edited by: Ryan James on Oct 2, 2008 12:23 PM

Former Member
0 Kudos

Hi Ryan

1)Please let us know the exact version of Crystal Reports that you are using(HELP>>About Crystal Reports).

2) The type and version of databse

3) Are you connecting a table/stored procedure to the report

4)What is happening exactly(like are you getting incorect values or you are not able to set null values).

Thanks

Former Member
0 Kudos

1)Crystal Report Designer 11 RDC

2) MS SQL 2000

3) Store procedure

4)When I run the report, CR displays a window listing all of the parameters with input fields. I do not have to enter values for input fields that are of type varchar or boolean(and if, ofcourse, the stored procedure declares the parameter as nullable). However, this is not the case for integer type parameters. When the parameter is an integer, CR forces me to enter a value into the input field, even though the stored procedure declares the integer parameter to "allow nulls".

For example, say I have a report that is bound to a procedure called sp_GetNames. And this SP accepts two parameters that allow nulls. Lets say these parameters are @vName(varchar) and @ID(integer). If I run the stored procedure, directly from the database, I do not have to pass values to the stored procedure, because the SP allows for nulls. Now...., if I use this stored procedure in a report, and then run the report in CR, CR will not let me view the results without typing in parameter value for the integer parameter, which would be, in this example, @ID. Why is CR forcing me to supply a value here?