Showing posts with label negative. Show all posts
Showing posts with label negative. Show all posts

Friday, March 9, 2012

QA returning negative #s as positive

Hey guys,

I have a very peculiar issue going on. I have a table that contains a decimal(18,2) column called "Amount". Looking at this table through Enterprise Mgr, I can see that there are values in there that are negative. However, when I run a query in Query Analyzer, it displays all the negative values as positives.

The only workaround I've found right now is to change the column type to "real" and then change it back to decimal(18,2), and it starts showing the negatives as negative. However, without performing this absurd workaround, it doesn't work.

Is there a known bug in QA that would manifest itself as this? What is the cause for this?

Thanks in advance.I haven't had a problem with this. What does your query look like? Are the correct results being retuned to your ASP.NET application?

Terri|||Terri,

The query is a straight forward select, nothing tricky at all. Basically, if I look at the Amount values through the analyzer, it displays them as positive. However, one interesting to note is that it recognizes the number as being negative because if i add another column to the return so that it's "Amount * 1", it will return the correct (negative) value.

It basically seems to be a displaying issue. I google'd this issue, and came across a few posts from other forums where people were having the same issue, but none of the threads had an explanation.

Also, this is a problem only with this table. There are other tables in the warehouse that have decimal(18,2) columns with negative values, and they get displayed correctly. At the same time, though, there's nothing special about the table in question. The amount column is sourced from a different table with a column of number(21,6) type, which is really a glorified decimal, so that doesn't seem to be the problem.

I'm pretty much puzzled as to why this column would be displayed incorrectly like this. I welcome any suggestions/ideas.

Thanks|||Have you been able to resolve this issue? I have been out of town this past week and will jump back into this if you are still stuck.

Terri|||Hey Terri,

Actually, it's been sitting on the back burner, and I've been busy with other things. I would, ultimately, like to figure out what is happening, so if you have any ideas, I am all ears.

I did a search on Google groups, this forum, and a few others, and was unable to find an answer. I did find a few threads on various sources concerning this problem, but there was no resolution from anyone.

Thanks for the help.

Saturday, February 25, 2012

Q:conditional formating

Hello,
I am trying to color negative detail lines with the following.
=iif((Fields!Amt1.Value-Fields!Amt2.Value)<0,"Red","Black")}
It is working if the value is not zero. Some 0.00 values are black but some
of them are red. What is problem?
Jim.Hi Jim
I think the problem is because you haven't specified the text color for
the result value zero.
You can try specifying the condition as "<=0" if you want the zero
values in red like
=iif((Fields!Amt1.Value-Fields!Amt2.Value)<=0,"Red","Black")
Else if you want zero values in black you can try
=iif((Fields!Amt1.Value-Fields!Amt2.Value)>=0,"Black","Red")
Hope this solves your problem
Regards
Prathima.C
JIM.H. wrote:
> Hello,
> I am trying to color negative detail lines with the following.
> =iif((Fields!Amt1.Value-Fields!Amt2.Value)<0,"Red","Black")}
> It is working if the value is not zero. Some 0.00 values are black
but some
> of them are red. What is problem?
> Jim.|||I did that but it did not change anything. Some of zeros are blank, some are
red. Is there any precession issue?
"prathima.chandramouli@.gmail.com" wrote:
> Hi Jim
> I think the problem is because you haven't specified the text color for
> the result value zero.
> You can try specifying the condition as "<=0" if you want the zero
> values in red like
> =iif((Fields!Amt1.Value-Fields!Amt2.Value)<=0,"Red","Black")
> Else if you want zero values in black you can try
> =iif((Fields!Amt1.Value-Fields!Amt2.Value)>=0,"Black","Red")
> Hope this solves your problem
> Regards
> Prathima.C
>
>
>
> JIM.H. wrote:
> > Hello,
> > I am trying to color negative detail lines with the following.
> > =iif((Fields!Amt1.Value-Fields!Amt2.Value)<0,"Red","Black")}
> > It is working if the value is not zero. Some 0.00 values are black
> but some
> > of them are red. What is problem?
> > Jim.
>