Author |
Topic |
Adam West
Constraint Violating Yak Guru
261 Posts |
Posted - 2010-01-13 : 09:09:06
|
HI I have to take 2 Expression fields I made and combine them into one. It is simply 2 dates that are column headings, from and to dates. The from date is this:=DateAdd("m",-4,DateAdd("d",1,Parameters!ENDDATE.Value))and then the "to" date is this:=DATEADD("d",-1,DateAdd("m",-3,DateAdd("d",1,Parameters!ENDDATE.Value)))I am not sure how to combine them to be one Expression field, with some spaces between them of course.Thank you for any help,Coops |
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2010-01-13 : 09:20:25
|
=Cstr(DateAdd("m",-4,DateAdd("d",1,Parameters!ENDDATE.Value))) & " " & Cstr(DATEADD("d",-1,DateAdd("m",-3,DateAdd("d",1,Parameters!ENDDATE.Value)))) |
 |
|
AdamWest
Constraint Violating Yak Guru
360 Posts |
Posted - 2010-01-13 : 09:49:34
|
Thank you very much Visak |
 |
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2010-01-13 : 10:24:30
|
welcome |
 |
|
AdamWest
Constraint Violating Yak Guru
360 Posts |
Posted - 2010-01-13 : 11:51:00
|
there is one more thing. one of the headings, i just use the parameters=Parameters!STARTDATE.Value & "-" !ENDDATE.Valuebut this is not correct syntax before it was just =Parameters!Startdate but now i must combine these 2 as well |
 |
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2010-01-13 : 11:55:40
|
use=Parameters!STARTDATE.Value & "-" & Parameters!ENDDATE.ValueSQL Server MVP |
 |
|
AdamWest
Constraint Violating Yak Guru
360 Posts |
Posted - 2010-01-13 : 13:27:09
|
thank you Vis i had only one &, now I know. |
 |
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2010-01-13 : 13:29:02
|
coolSQL Server MVP |
 |
|
AdamWest
Constraint Violating Yak Guru
360 Posts |
Posted - 2010-01-13 : 16:30:46
|
Hi I have a question. In my case, I have 4 reports that are variations of this one. It means I have to make the changes now in al..I am not complaining, but how if at all, could this become a more automated change for the future? |
 |
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2010-01-14 : 02:10:20
|
quote: Originally posted by AdamWest Hi I have a question. In my case, I have 4 reports that are variations of this one. It means I have to make the changes now in al..I am not complaining, but how if at all, could this become a more automated change for the future?
yup if they're using 4 separate rdls you need to change them all. alternatively you could make a template for all of them and make them reuse it based on parameters |
 |
|
|