March 17, 2010 at 10:33 am
Hello,
I have 2 datatypes that are Int that I need to put in the same field with a hyphen in between. I tried the following: =First(Fields!TaxFrom.Value, "CityCollection")& "-" & First(Fields!TaxTo.Value, "CityCollection") and it failed.
Thanks,
George
March 17, 2010 at 10:47 am
You'll need to convert to strings first.
- Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
Property of The Thread
"Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon
March 17, 2010 at 10:51 am
If you could explain how to convert to Strings within SSRS that would be helpful 😀 as I am not entirely sure how to go about that.
Thanks,
George
March 17, 2010 at 12:10 pm
I did an online search (Bing in this case) for "data type conversion ssrs", and the first hit was http://msdn.microsoft.com/en-us/library/cc281083.aspx. The second subhead on the page is "Converting Dataset Fields to a Different Data Type", which outlines how to do that, including an example for CStr, which is the conversion function to turn something into a string.
Does that help?
- Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
Property of The Thread
"Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon
March 17, 2010 at 12:31 pm
Yes it does thank you. I do have an odd issue though. My code is as follows =Cstr(Fields!TaxFrom.Value) & "-" & Cstr(Fields!TaxTo.Value) . For some reason ONLY the "-" and the second value are showing up even though both values exist. Any idea?
March 19, 2010 at 5:50 am
No clue on that one. Try padding it with a zero-length string before it, maybe?
- Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
Property of The Thread
"Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon
March 22, 2010 at 12:23 am
Hi,
Use ur own custome code(vb script) to get the desired output.I just thinking "cstr" will work the same but not sure ,why its not working in u r requirment.
Thanks
Veeren
Thanks & Regards,
Veeren.
Ignore this if you feel i am Wrong. 😉
March 22, 2010 at 6:24 am
I got it all figured out. I neglected to use the correct scope which resulted in the failure. Thanks all for your help.
March 22, 2010 at 6:28 am
You're welcome.
- Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
Property of The Thread
"Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon
Viewing 9 posts - 1 through 9 (of 9 total)
You must be logged in to reply to this topic. Login to reply