Hello,
I have a form where the user can choose from 1 to n countries from a list box and from there a report is run based on the countries the user has chosen.
I am using a stored procedure to pass these parameters to the report; however I am not able to get any records. Any ideas why ?
Thanks in advance for your help
Gloria
My stored procedure looks like this:
********
Alter PROCEDURE repcountry @country nvarchar(10) AS
SELECT dbo.brnch.addr + N' ' + dbo.brnch.suburb + N' ' + dbo.brnch.state + N' ' + dbo.brnch.PIN AS Expr1, dbo.individuals.posit, dbo.individuals.phn, dbo.company.name, dbo.company.brch_No, dbo.company.bus_typ, dbo.company.staffno
FROM dbo.company INNER JOIN
dbo.brnch ON dbo.company.ID = dbo.brnch.com_ID INNER JOIN
dbo.individuals ON dbo.brnch.br_ID = dbo.individuals.br_ID INNER JOIN
dbo.country ON dbo.brnch.country = dbo.country.country_ID
WHERE dbo.brnch.country in (@country)
order by dbo.company.name
*********
I have a form where the user can choose from 1 to n countries from a list box and from there a report is run based on the countries the user has chosen.
I am using a stored procedure to pass these parameters to the report; however I am not able to get any records. Any ideas why ?
Thanks in advance for your help
Gloria
My stored procedure looks like this:
********
Alter PROCEDURE repcountry @country nvarchar(10) AS
SELECT dbo.brnch.addr + N' ' + dbo.brnch.suburb + N' ' + dbo.brnch.state + N' ' + dbo.brnch.PIN AS Expr1, dbo.individuals.posit, dbo.individuals.phn, dbo.company.name, dbo.company.brch_No, dbo.company.bus_typ, dbo.company.staffno
FROM dbo.company INNER JOIN
dbo.brnch ON dbo.company.ID = dbo.brnch.com_ID INNER JOIN
dbo.individuals ON dbo.brnch.br_ID = dbo.individuals.br_ID INNER JOIN
dbo.country ON dbo.brnch.country = dbo.country.country_ID
WHERE dbo.brnch.country in (@country)
order by dbo.company.name
*********