SQL Server Forums
Profile | Register | Active Topics | Members | Search | Forum FAQ
Register Now and get your question answered!
Save Password
Forgot your Password?

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 Using a field within a field for a value?
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

Starting Member

8 Posts

Posted - 09/11/2013 :  17:28:51  Show Profile  Reply with Quote
Hi and thanks for helping an amateur.

I want to use a value like this:


but the X should be replaced the value of another field:



for palletnum 1 i would get wght1
for palletnum 2 i would get wght2
for palletnum 3 i would get wght3
and so on...

any help would be wonderful! thanks!


James K
Flowing Fount of Yak Knowledge

3865 Posts

Posted - 09/11/2013 :  17:43:53  Show Profile  Reply with Quote
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.
Go to Top of Page

Starting Member

8 Posts

Posted - 09/11/2013 :  19:19:04  Show Profile  Reply with Quote
thanks a bunch man. was able to use the switch expression to get what i needed. really appreciate it.
Go to Top of Page

Very Important crosS Applying yaK Herder

52326 Posts

Posted - 09/12/2013 :  16:32:36  Show Profile  Reply with Quote
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)).Value

in the expressions

SQL Server MVP
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.05 seconds. Powered By: Snitz Forums 2000