Please help me resolving the next situasion:
I have to create 5 DCPs in a report that is using a stored procedure. For that, i've created a command that returns a table containing all the possible values for my parameters. But it doesn't work! Some of the values are lost in the sequence of choosing the parameters. In first step it's ok, all the possible values apears. The next step, the same! But further, some of the values are lost... in the last step i have only one value for the "submodel" parameter.
Another problem is that after first step, some of the values apears twice or more in the list of possible values..
My command is:
select distinct
isnull(VEH.CLASS,'None') [Class],
case when VIN.PROPERTY = 'C' then 'Stock'
when VIN.PROPERTY = 'P' then 'Demo Car'
when VIN.PROPERTY = 'L' then 'Auto leasing'
when VIN.PROPERTY = 'F' then 'Personal use'
when VIN.PROPERTY = 'M' then 'Another site'
else 'None' end [Type],
isnull(FUR.NAME,'None') [Suplier],
VEH.MAKE [Make],
isnull(VEH.MODEL,'')+' '+isnull(VEH.SUBMODEL,'') as [Submodel]
from VINSS01 VIN
left outer join VIBBS01 VIB on (VIN.VINSID = VIB.VINSID)
left outer join VEHI VEH on (VIN.VEHIID = VEH.VEHIID)
left outer join VSELS01 SEL on (SEL.VINSID = VIN.VINSID)
left outer join SUPL FUR on (VIB.SUPLNO = FUR.SUPLNO)
where VIB.RECNO is not null
Where did i go wrong?
Can anyone give me a hint?
Thx!!!