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

Create a report in Visual Studio 2005, using a parameter multiple time

Status
Not open for further replies.

rogerzebra

Technical User
May 19, 2004
216
SE
Hi guys,
I have an issue with the reporting part in Visual Studio 2005. I’m trying to create a report with a script that runs fine in sql server but, not in the Visual Studio environment. The script uses parameters multiple times and that is what its complained about. Here is a simplified sample.
Code:
If @type = '1' then  select….where date between @Sdate and @Edate …

If @type = '2' then select….where date between @Sdate and @Edate …
As you can see the variable for @type is used twice and the same with the date parameters. The error I get is that it claims that the variable has already been declared. So, it stops with the next @type parameter due to that it has been declared. Anyone that knows how to create a report using a parameter multiple times? All help on this is as usual greatly appreciated.
thx
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top