Sunday, February 19, 2012

Error between local development and production in a textbox

I have a textbox with the following:
=Fields!Distribution_Percentage.Value & "%"
It works fine on my local reportserver.
I deploy it to production and I get #Error instead.
I change it to
=Fields!Distribution_Percentage.Value
and it works fine on both except I want the % sign.
Since my numbers are like 100 or 25 instead of 1 or .25, I get the wrong
result if I select the Percent format for the textbox, 100,000%.
Any clues what is happening?
NeilUse the custom format and put in 0% I think that would do it. I used 0
instead of # because I assume that if it is 0 you want to show 0% instead of
just %
Bruce Loehle-Conger
MVP SQL Server Reporting Services
"Neil Gould" <NeilGould@.discussions.microsoft.com> wrote in message
news:5B5F6533-37DD-4A65-A0F4-737451563B71@.microsoft.com...
> I have a textbox with the following:
> =Fields!Distribution_Percentage.Value & "%"
> It works fine on my local reportserver.
> I deploy it to production and I get #Error instead.
> I change it to
> =Fields!Distribution_Percentage.Value
> and it works fine on both except I want the % sign.
> Since my numbers are like 100 or 25 instead of 1 or .25, I get the wrong
> result if I select the Percent format for the textbox, 100,000%.
> Any clues what is happening?
> Neil|||Thanks for replying but I didn't explain it well. At first I didn't have any
formatting specified. The # is part of the #Error displayed.
The real issue appears to be mixing field values.
In the header for this report, I have:
="From Fiscal " & Parameters!startdate.Value & " to " &
Parameters!enddate.Value
This also shows #Error on the prod server and shows the results expected
results locally. It sems to be complaining about mixing text and numeric
values.
The format for these textboxes is 'Default'. I wonder if there is some
configuration setting somewhere.
Thanks,
Neil
"Bruce L-C [MVP]" wrote:
> Use the custom format and put in 0% I think that would do it. I used 0
> instead of # because I assume that if it is 0 you want to show 0% instead of
> just %
>
> --
> Bruce Loehle-Conger
> MVP SQL Server Reporting Services
>
> "Neil Gould" <NeilGould@.discussions.microsoft.com> wrote in message
> news:5B5F6533-37DD-4A65-A0F4-737451563B71@.microsoft.com...
> > I have a textbox with the following:
> > =Fields!Distribution_Percentage.Value & "%"
> > It works fine on my local reportserver.
> > I deploy it to production and I get #Error instead.
> > I change it to
> > =Fields!Distribution_Percentage.Value
> > and it works fine on both except I want the % sign.
> > Since my numbers are like 100 or 25 instead of 1 or .25, I get the wrong
> > result if I select the Percent format for the textbox, 100,000%.
> >
> > Any clues what is happening?
> > Neil
>
>|||This should be working for you. I do this all the time. As a matter of fact,
you should also have no problems with appending a % on too.
When doing a string like this you do not need any formatting specified.
Ahh, just thought of something. Report parameters are case sensitive. What I
do is use the expression builder when doing this sort of thing.
--
Bruce Loehle-Conger
MVP SQL Server Reporting Services
"Neil Gould" <NeilGould@.discussions.microsoft.com> wrote in message
news:F810CF36-FF22-4679-BAB1-82E26D6DE67C@.microsoft.com...
> Thanks for replying but I didn't explain it well. At first I didn't have
any
> formatting specified. The # is part of the #Error displayed.
> The real issue appears to be mixing field values.
> In the header for this report, I have:
> ="From Fiscal " & Parameters!startdate.Value & " to " &
> Parameters!enddate.Value
> This also shows #Error on the prod server and shows the results expected
> results locally. It sems to be complaining about mixing text and numeric
> values.
> The format for these textboxes is 'Default'. I wonder if there is some
> configuration setting somewhere.
> Thanks,
> Neil
>
> "Bruce L-C [MVP]" wrote:
> > Use the custom format and put in 0% I think that would do it. I used 0
> > instead of # because I assume that if it is 0 you want to show 0%
instead of
> > just %
> >
> >
> > --
> > Bruce Loehle-Conger
> > MVP SQL Server Reporting Services
> >
> >
> > "Neil Gould" <NeilGould@.discussions.microsoft.com> wrote in message
> > news:5B5F6533-37DD-4A65-A0F4-737451563B71@.microsoft.com...
> > > I have a textbox with the following:
> > > =Fields!Distribution_Percentage.Value & "%"
> > > It works fine on my local reportserver.
> > > I deploy it to production and I get #Error instead.
> > > I change it to
> > > =Fields!Distribution_Percentage.Value
> > > and it works fine on both except I want the % sign.
> > > Since my numbers are like 100 or 25 instead of 1 or .25, I get the
wrong
> > > result if I select the Percent format for the textbox, 100,000%.
> > >
> > > Any clues what is happening?
> > > Neil
> >
> >
> >

No comments:

Post a Comment