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 Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Boolean Parameter Field is passed being as NULL

Status
Not open for further replies.

Jimdeb03

IS-IT--Management
Dec 10, 2002
89
US
I have a report with a Parameter Field @LimitbyUserID
Type is Boolean
Value(s) are True, False

Prompt with Description Only is False
Default Value is True
Exclusive Group is False

When I run the report, it's not being passed correctly because

Go in Database/Show SQL Query and it shows
{CALL DYNS.dbo.SVC_SPROCExtract;1(NULL)}

SVC_SPROCExtract is the name of the sproc

However, the Parameter Field on the report does show True|False.

Run SVC_SPROCExtract true|false in Query Analyzer and it works ok so I'm assuming nothing is wrong on that end. Variable '@LimitbyUserID' in the sproc is declared as a bit. Could this be the problem?


Why does the Parameter Field show True|False on the report 'Show SQL Query' lists it as NULL?


I'm using CR 11

thanks
Jim
 
I'm not sure I follow the question. But since no one else has answered, I'll try.

Crystal shows boolians as True or False. If a test hit a null without an IsNull being done, then it would return nothing.

I'm not an SQL expert, but I think it handles matters differently. You've also not said what the intended outcome is.

[yinyang] Madawc Williams (East Anglia, UK). Using Windows XP & Crystal 10 [yinyang]
 
This problem has been solved.
It had nothing to do with the type of Parameter being passed nor how the stored procedure (sproc) was configured.

It simply was a matter of updating the report with a newer version of said sproc via Set DataSource Location.
In Database/Set Database Location, the Current Data Source is Replaced with the identical sproc by selecting a sproc in each window and hitting the Update button.

Usually, this process will prompt you with the 'Enter Values' window of parameters the sproc is expecting. My problem started here; this window was not appearing and for the life of me, was at a loss determining how a created Parameter Field is associated with the sproc. (Originally, I would go into Parameter Fields and create a New with the same name and type as required in my sproc. This doesn't work.)

When in fact, at least in my experience, the sproc is what sets and/or creates the parameters in the report for it to function properly.

So my original approach to this problem was doomed from the start. My created Parameter Field had no association to the stored procedure.

I still experience issues updating reports in regard to stored procedures passing parameters. I can remove all Parameter Fields from a report, update Datasource with the new improved sproc and CR still will not recognize all parameters. My only solution when this occurs is to slightly rename the parameter variable within the sproc, then will CR recognize it and correctly add it to the report.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top