troubleshooting Question

SSRS 2005 The isNull function requires two arguments

Avatar of Sanjeet
SanjeetFlag for United States of America asked on
Microsoft SQL ServerDB Reporting Tools
13 Comments1 Solution611 ViewsLast Modified:
When I run a report in SSRS I get a "The isnull function requires 2 arguments (s)".

I do enter more then one value.

This is my SQL:

 
Select DI.PS,PD.BatchNo,tissloc.Tissue_Location_Name, DTH.Modified_DateTime --PB.BatchNo, PB.DonorPS,  
From DIST_Tissue_History DTH
Join setup_tissue_location tissloc on DTH.location = tissloc.tissue_loc_id
Join PR_Deposit PD on DTH.TissueDepositNo = PD.TissueDepositNo
Join DS_Donor_Info DI on PD.DonorId = DI.DonorId
Where (DTH.Modified_DateTime >= @ModifiedDateStart or @ModifiedDateStart is Null)  
And (DTH.Modified_DateTime < @ModifiedDateEnd or @ModifiedDateEnd is Null)  
AND (ISNULL(@LocationIdList, 'ALL') = 'ALL' or CHARINDEX(',' + cast(tissloc.Tissue_Loc_Id as varchar(max)) + ',', ',' + @LocationIdList + ',') > 0)

In the SSRS Visual Studio I set the location parameter as an integer. I tried with a string same error.
I use a multi value promt to populate a dropdow to pass the location id to the sql. The avlue field is Tissue Loc Id the lable field is the tissue location name. This is the SQL I use:

Select Tissue_Loc_Id,Tissue_Location_Name
From Setup_Tissue_Location
Where Status = 1

In the  data tab when I try with the following values it returns data.

Set @ModifiedDateStart = '1-5-14'  
Set @ModifiedDateEnd  =  '1-15-14'
Set @LocationIdList  =  '970,971'
ASKER CERTIFIED SOLUTION
Vitor Montalvão
IT Engineer
Join our community to see this answer!
Unlock 1 Answer and 13 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 13 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros