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 |
JGaston
Starting Member
8 Posts |
Posted - 2013-09-11 : 17:28:51
|
Hi and thanks for helping an amateur.I want to use a value like this:=Fields!wghtX.Valuebut the X should be replaced the value of another field:=Fields!palletNum.Valueso...for palletnum 1 i would get wght1for palletnum 2 i would get wght2for palletnum 3 i would get wght3and so on...any help would be wonderful! thanks!-Jesse |
|
James K
Master Smack Fu Yak Hacker
3873 Posts |
Posted - 2013-09-11 : 17:43:53
|
As far as I know, SSRS does not support dynamic values for field identifiers. If the palletnum's are a known set, you could use a SWITCH expression. That is the best I can think of.Another option would be to modify your underlying SQL query to return the data in the correct form in a single column - i.e., wght1 for pallenum = 1, wght2 for pallentnum=2 and so on. |
|
|
JGaston
Starting Member
8 Posts |
Posted - 2013-09-11 : 19:19:04
|
thanks a bunch man. was able to use the switch expression to get what i needed. really appreciate it. |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2013-09-12 : 16:32:36
|
you can always make a parameter say XValue and map it to a dataset which returns palletNum values (1,2,3..). then you can simply use=Fields("wght" & Cstr(Parameters!XValue.Value)).Valuein the expressions------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/https://www.facebook.com/VmBlogs |
|
|
|
|
|