Showing posts with label equal. Show all posts
Showing posts with label equal. Show all posts

Monday, March 12, 2012

formating in SqlServer vs Reporting Services

All else being equal, is it faster to use functions like ROUND and TRIM
in the SELECT statement of the query and let the db process it or to
set formating in the layout of the report and let Reporting Services
handle it?
In my case, all is not equal. We have the DB on a very powerful machine
that at sometimes is very overtaxed and runs smoothly at others. RS is
moving to a decently powerful server that it will have exclusively.
Thanks
Louis Ryder
SSRS Report DeveloperMy two cents. Formatting is a presentation concern. Rounding to 2 decimals
can be handled in the presentation layer (i.e., RS) using format strings.
TRIM isn't necessary unless you have some smokin' character columns...
-Tim
"Louis Ryder" <lroskind@.ryderauto.com> wrote in message
news:1152203807.627376.268390@.p79g2000cwp.googlegroups.com...
> All else being equal, is it faster to use functions like ROUND and TRIM
> in the SELECT statement of the query and let the db process it or to
> set formating in the layout of the report and let Reporting Services
> handle it?
> In my case, all is not equal. We have the DB on a very powerful machine
> that at sometimes is very overtaxed and runs smoothly at others. RS is
> moving to a decently powerful server that it will have exclusively.
> Thanks
> Louis Ryder
> SSRS Report Developer
>

Wednesday, March 7, 2012

Format Question (Currency)

I know that you can set a textbox to be of format Currency, but how
can I set the text of a textbox equal to a string that has formatted
strings within it?
What I mean is, lets say that I am getting back 2 values: MyFieldA and
MyFieldB, which are both floats (say 12.3123 and 43.2234). I want to
make the text "MyFieldA - MyFieldB", where both are formatted as
currency, so it would look like "$12.31 - $43.22".
Is there a way, with in the section where I specify
Fields!MyFieldA.Value to do something like
Fields!MyFieldA.Value.Format("C") or something like that? anyone
know?Chris,
Maybe something like this:
=(String.Format("{$###,##0.00}"),Fields!MyFieldA.Value) & " - " &
(String.Format("{$###,##0.00}"),Fields!MyFieldB.Value)
I had thought about using cdec, but I don't think that works in RS.
I'm pretty new to the RS world, so I don't know it this will help but
it doesn't hurt to try. Good Luck.
Jonathan
cmay@.walshgroup.com (Chris) wrote in message news:<44f6e099.0410261338.3f991c5@.posting.google.com>...
> I know that you can set a textbox to be of format Currency, but how
> can I set the text of a textbox equal to a string that has formatted
> strings within it?
> What I mean is, lets say that I am getting back 2 values: MyFieldA and
> MyFieldB, which are both floats (say 12.3123 and 43.2234). I want to
> make the text "MyFieldA - MyFieldB", where both are formatted as
> currency, so it would look like "$12.31 - $43.22".
> Is there a way, with in the section where I specify
> Fields!MyFieldA.Value to do something like
> Fields!MyFieldA.Value.Format("C") or something like that? anyone
> know?