XSD file Decimal column displays 4 point after decimal

Hi to all,

             I have a xsd file with one table adapter, it has 4 column

id int

name string

class string

amount decimal

i drag and drop the columns into rdlc file but, the report displays 4 digit after decimal point but i want to display it as two decimal point.

How to do this experts please help me.

But i checked in my query from sql it is displays as it is in the table(there some data have four digit after decimal some data have two digit after decimal)

but when get it into DataSet object all data are converted into four digit .


If this post is answer of your question then don't forgot to Click Mark As Answer
0
jeyaseelan
12/12/2008 9:21:22 AM
asp.net.ssrs 4514 articles. 1 followers. Follow

6 Replies
1190 Views

Similar Articles

[PageSpeed] 22

Hello,

Format The Field  as N or N2

Then it will display 2 digit after decimal place


ShilpaReddy
http://www.ggktech.com
0
ShilpaReddyA
12/12/2008 11:02:48 AM

 Open your database and change Amount columns datatype 

decimal(18, 2)

change 2 or whatever decimal places u want 


Don't say thanks rather mark my reply as "Answer" if it helps you ,Doing so u'll get points too
amiT jaiN

C#.NET Articles
0
amit
12/12/2008 11:24:12 AM

Thanks SHilpha,

actually its decimal column so i wrote like this

=Fields!Amount.Value

now i changed like this

=Fields!Amount.Value.ToString("N2")

while run the application it displaying column like this

#Error

How to workout this and the same time i want to calculate the sum of this column also if convert into ToString then Sum() function shouldnt work,

could you tell me how to solve this?


If this post is answer of your question then don't forgot to Click Mark As Answer
0
jeyaseelan
12/12/2008 11:29:15 AM

 If you don't wanna make changes in database than use this formula in the reports field which u wanna to format

=Math.Round(Fields!YourFieldName.Value,2)

in youe case it would be 

=Math.Round(Fields!Amount.Value,2)

 

Check the sample code atatched

http://rapidshare.com/files/172668644/ReportViewerExample.rar.html


Don't say thanks rather mark my reply as "Answer" if it helps you ,Doing so u'll get points too
amiT jaiN

C#.NET Articles
0
amit
12/12/2008 11:40:05 AM

Hello,

Write like this to display 2 digits after decimal

=Format(Fields!Amount.Value,"N2")

 

To get the sum of the column, Insert a table Footer, and write =Format(SUM(Fields!Amount.Value),"N2")


ShilpaReddy
http://www.ggktech.com
0
ShilpaReddyA
12/12/2008 11:43:54 AM

Thanks Amit.jain and Shilpha

i use amit code like this

=Math.Round(Fields!YourFieldName.Value,2)

its working fine for me.

I have one more problem  and i posted in this path http://forums.asp.net/t/1359918.aspx could you please tell me the solution for this?


If this post is answer of your question then don't forgot to Click Mark As Answer
0
jeyaseelan
12/12/2008 12:04:23 PM
Reply:

Similar Artilces:

How to validate a decimal value with 2 digits after decimal point (de decimal point is a comma)
  I am a newbee, I have a Textbox where de user must write the price of an object. How can I validate de data entry in the Textbox (it must be a valid decimal with 2 digits after decimal point), and my pages are in  Portuguese so the decimal point to be accepted must be a comma   thanks  well you can do something like followig:  suppose TextBox1.Text = 123456,789 then you can say if(TextBox1.Text.Contains(",") ) {     int index1 = TextBox1.Text.IndexOf(",") +1;     int index2 = TextBox1.Text.IndexOf(...

Need to format float with no decimals or decimal point.
Is there a format for float that displays only the integer portion?  Or at the least, integer portion and decimal point but no digits to right? Eval("L_DistCalc", "{0:f}") Thank you, What about this: Eval("L_DistCalc", "{0:f0}")Limno Wow - thanks.  Is there a good reference book that has all the format forms, control structures and properties.  Everything I have has a the essentials but nothing in depth.  I know this kind of thing is simple but is sure is a lot to try and remember. Thank you,  You can sear...

CLR.NET datatype for decimal is System.String or Decimal
CLR.NET datatype for decimal is System.String or System.Decimal the documentation says System.string while it is mapped to DbType.decimal I need some understanding on this. any help thanks vsv ...

how to convert value with decimal point into value with decimal comma
Hello,  I like to know how I can change (for example) the value 55.55 into 55,55. (The system in my country is using comma's instead of points) I'm starting with  a string with the value "55.55" Then I will convert it to a double 55,55 Do I need the the system.Globalization namespace or is there just a simple solution?               Hi,If you are just going to use this format for display then it would be easy to do this:double dTemp;dTemp = 55.55;Response.Write(dTemp.ToString().Replace(".",","));H...

External datawindow with columns of type DECIMAL, number of decimals is not saved!!
Almost a year ago, I've posted this problem. It does not seem to be fix yet. When you create an external datawindow and you create a column of type decimal, you can fill in the number of decimals. That number is not saved. When I reopen the datawindow; the number of decimals is 0. The only workaround I've found is to go change it in the source code of the datawindow Greetings Note that posting a problem in one of the newsgroups will not fix it. Only if you open a case with Sybase it will be fixed. On 9 Nov 2004 01:39:15 -0800, in sybase.public.pocketpo...

inserting a decimal number from.net to stored proc. with decimal parameter
I'm trying to enter large number 99999999, (8 digits) converting to decimal in .NET, then using that as a parameter in stored proc. which has a decimal type (decimal(15,2) as a parameter. C#:if (txtAnnualizedSaving.Text.Trim() != string.Empty) {try { sdata.AnnualizedSaving = Convert.ToDecimal(txtAnnualizedSaving.Text); // only for testing ....scale = (System.Decimal.GetBits(sdata.AnnualizedSaving)[3] >> 16) & 31; }catch { sdata.AnnualizedSaving = 0; } }   ... In the business object I have the following code:private bool UpdateData() {bool ret = false; try ...

Display to X decimal points, no trim?
Hi there, any help would be greatly appreciated.I am trying to display a float/double to three decimal points...i.e. 0.901.  However, when it's .900 the display shortens to .9.I wish to have .9 displayed as .900.  How is this done?Thanks in advance for any help. Take a look at this article http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpguide/html/cpconcustomnumericformatstrings.asp JamesJames Hearst.NET Application Developer Many thanks!...

Display number with decimal point in DW
Dear all, I like to display number with three digits after the decimal point in a DW (column object). So, in the edit tab, the editmask define as follow: Masks: Number; Mask: #####.### The numbers with decimal point it display as I like to, but numbers that there are integers (i.g-no decimal point) it display like 15. It displays '.' even for integers. How can I avoid the decimal point when I display an integer? TIA & marry Xmas to all, Thanks for the quick reply but, Even if I use the format tab the number is displayed with unnecessary zero's for example, th...

Display format for decimal column object
In my datawindow I have a decimal column object with decimal = 2. When that column's data in the table is 0.00, using display format [General] it displays a 0. Is there a way to have it display nothing (blank)? (When the value is not 0.00, I'd like it to be formatted with commas as in 123,456,789.) Thanks. Hi Rick; May I suggest changing the Display Format to "#,##.##". Regards ... Chris President: OSUG / STD Inc. Blog: http://chrispollach.blogspot.com PBDJ: http://chrispollach.sys-con.com SourceForge: http://sourceforge.net/projects/stdfndclass &...

Datatype Money Displays 4 Decimals
I am using a datareader to retrieve a record from my db. However when I pass a money column into the TextBox, it displays the amount as 52.0000 and I really want 52.00. Also note I will need to use the amount later as an amount so I cannot convert to string. Any ideas? Joe It looks like you'll probably need to format it on the page itself - - you might check out: http://datawebcontrols.com/faqs/CustomizingAppearance/FormatNumericData.shtml How are you displaying it (in a datagrid/whatever, etc) on the page?David WierMCP/ASPInsiderASPNet101.com - where to look first!Please Vot...

convert varchar to decimal and display coln to 3 decimal places in gridview
  Hi  1. In SQL2005, i hv a 'table1' that has a field called 'Col1' of varchar type Now in a procedure, I declare variable '@Col2' of decimal(8,4) type,then fetch value of col1 into col1a(this is of varchar type) like: select @col1a=col1 from table1 where condition.  now i want to put value of @col1a into @col2, so I write: set @col2=cast(@col1a as decimal(8,2)) but its not wrkng,it gvs error:  unable to convert varchar to numeric data type. what is the problem????? 2.  I want to display field in gridview to 3 decimal places...

plz Help: Converting 4 decimal places to 1 decimal place
Hi,I would like to convert 4decimal places to single(1) decimal place.For that i wrote below code. Its working sometimes. ex1:Input: StrAnlPct = "3.0000,2.9833,3.6546,4.65+6,5.54986,81.dsfds"Output: "3.0,2.9,3.6,4.6,5.5,81.d"For first example its working,Ex2:Input: StrAnlPct = "476290.4762,120.0000"For this i m getting error. Error is:    "Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: startIndex "And    Source Error: At Line 590Line 588:            &...

Help with displaying a price to two decimal points
Hi, I was wondering if anyone could help me. I am doing some calculations in my code, behind. However I want the price to be calculated to 2 decimal places. Currently it is to 4, and I do not want this to dispaly to the user. Here is my piece of code, where I do the calculations:double ans1 = (c * d /10); LabelUnitRate2Total.Text = ans1.ToString(); Is there anything I can set to make it to two decimal places. I would also like to display a pound symbol (£) in front of the answer. Is there anyway to set this in my code behind?? Any help would be much appreciated Thanks, Hayley decim...

Issue with the display format of a decimal column in Datawindow
This is a multi-part message in MIME format. ---=_forums-1-dub4ad5aed9 Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 7bit Hi, I have the following issue with the display of a decimal column in a datawindow with Appeon 6.2 for .NET. I don't have whith my application launched in PB 11.5 In my datawindow the column is defined as a decimal(3) with a format format "#######0.000" and an edit format "#######0.000". In my SQL Server 2005 Database the column value for a line is 24.5 After the retrieve my datawindow w...

Web resources about - XSD file Decimal column displays 4 point after decimal - asp.net.ssrs

Samples of display typefaces - Wikipedia, the free encyclopedia
Text is available under the Creative Commons Attribution-ShareAlike License ;additional terms may apply. By using this site, you agree to the ...

Samsung Galaxy A9 officially announced w/ 4,000mAh battery, 6-inch display & octa-core processor
Having only recently been leaked online through unofficial and official sources, the largest of the Galaxy A-series family of devices has now ...

Display Advertising Is Hard to Quit
BuzzFeed has made waves in the worlds of media and advertising by eschewing display ads in favor of branded content created specifically for ...

On Display: Germaine Greer’s Life Magazine Outtakes
It’s a long way – in years and miles – from the cover of Life magazine in 1971 to the display spaces of the Ian Potter Museum of Art in Melbourne ...

Secular nativity display removed from Texas capitol after complaint from Governor Abbott
A secular “winter solstice” display has been removed from the Texas capitol basement following a complaint from Governor Greg Abbott, who in ...

Genius now displays song lyrics no matter what music app you use
Shutterstock Genius has unleashed an update that will give you live lyrics to whatever song you’re listening to. What’s particularly brilliant ...

‘Shatterproof’ Motorola display put to the ultimate test, survives 900-foot drop
... UnlockRiver.com this year decided to take Motorola's claim that its Droid Turbo 2 is the first smartphone ever to have a "shatterproof" display ...

Insta-Graham: With postseason on the line, Buffalo's display just sickening
Dysentery couldn't have run through the Buffalo Bills any faster than Washington did. Bills defensive end Mario Williams stayed home sick earlier ...


Extreme light displays brighten holiday season
'Tis the season across the country, where many people don't want a white Christmas as much as a multi-colored one

Resources last updated: 12/26/2015 4:15:56 AM