Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
peace
Constraint Violating Yak Guru
420 Posts |
Posted - 2012-02-13 : 04:13:37
|
Hi,I have 2 tables with 2 parameters.First table:Name AgeAmy 20Jason 25Second table:Name Age Country PhoneNoAmy 20 UK 12121Jason 25 US 45454I'm using Visual Studio 2008 to create the report.How can I apply the link when I click the 'Name' on the first report then it will drill down to the second report with more details?I have tried to apply the Action 'go to report hyperlink' but is not working. |
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2012-02-13 : 10:19:31
|
why its not working? can you explain how you created two reports? what are parameters you added for detail report? also what was code behind used?------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/ |
|
|
peace
Constraint Violating Yak Guru
420 Posts |
Posted - 2012-02-13 : 20:40:49
|
I created as store procedure and applied the dataset into the visual studio to create the report.User has the rights to select the name and age to view the list.When the name appeared, I would like to click on the 'Name' then it will drill down to second report which is more in details.But is not working.(@name nvarchar(500)@age int(3))beginselect ...from tablenamewhere name=@nameand age=@ageend |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2012-02-14 : 10:02:17
|
writing like this wont work if you're not passing any value for one of parameters (as of now the way its written both params are mandatory)try modifying it like below(@name nvarchar(500)='All'@age int(3)='All')beginselect ...from tablenamewhere (name=@name or @name = 'All')and (age=@age or @age ='All')end one small issue is if number of parameters are large and data involved is large the query above can cause bad execution plans to be created and performance can affect. in that case, alternative is to use dynamic sql to form query based on condition and use sp_executesql to execute it------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/ |
|
|
|
|
|