I have a SSRS report I created that is using about 6 different parameters to help the user filter their results. I have the parameters set to allow blanks as well in case they want to run it wide-open.
My problem is when the report is ran wide open, I'm not getting all the results I should be.
If I delete the parameters entirely from the report, I get the expected number of returns.
I don't understand why just having the parameters in the report, even though they're blank, is affecting the output.
I agree, we need to see the code. What you are trying to do is very common but how it is implemented in SSRS is dependent on how you have your SQL written to filter rows.
**SELECT ** **invend.fac AS [Location], ** **invend.fpartno AS [PDI Part], ** **inmast.fdescript AS [PDI Desc], ** **invend.fpartrev AS [PDI Rev], ** inmast.fgroup AS [GC], **inmast.fprodcl AS [PC], ** apvend.fcompany AS [Vendor], **--invend.fvendno AS [Vend #], ** **invend.fvpartno AS [Vend Part], ** **invend.fvptdes AS [Vend Part Desc], ** mfr.fcmfrname as [MFG], mfrpart.fcmfrpart as [MFG Part], mfrpart.fmcomments as [MFG Comments], inmast.fstdmemo as [Item Master Memo] , **inmast.fcomment as [Item Master Comment] **
from invend
LEFT JOIN inmast ON (invend.fpartno + invend.fpartrev + invend.fac) = (inmast.fpartno + inmast.frev + inmast.fac)
LEFT JOIN mfrpart ON inmast.fpartno = mfrpart.fcpartno
LEFT JOIN mfr ON mfrpart.fcmfrno = mfr.fcmfrno
LEFT JOIN apvend ON invend.fvendno = apvend.fvendno
where (inmast.fdescript LIKE '%' + @pdiDesc + '%') and (mfrpart.fcmfrpart LIKE '%' + @mfgPart + '%') and (apvend.fcompany LIKE '%' + @vendName + '%') and (mfr.fcmfrname LIKE '%' + @mfgName + '%') and (inmast.fstdmemo LIKE '%' + @imMemo + '%') and (inmast.fcomment LIKE '%' + @imComment + '%')
Granted, if you need the wildcard matching, it complicates things. If you can get away from that and load values for parameters with specific values, it makes it easier and you get away from having to use LIKE.