Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

correct the expression of the textbox field Expand / Collapse
Author
Message
Posted Tuesday, November 16, 2010 3:37 AM
SSC Veteran

SSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC Veteran

Group: General Forum Members
Last Login: Wednesday, June 19, 2013 11:21 PM
Points: 230, Visits: 157
hi... to all..

i've written the code in expression field...

=format(sum(fields!salary.value),"##\,##\,##\,##\,##\,##\,##0.00")

the code is for printing the number in this format(12,23,23,34,123.00)

now i got an problem i.e if i give 5 digit the it will print ,,,,,12,123.00 the remaining commas

are printed.. i dont want to print the extra commas.. how the word length is there that much it

should take..i.e( for 5 digit 12,123.00 and for 9 digit 12,23,23,123.00)...

i've tried by removing some of the #'s but it is for fixed number..

please help me...
Post #1021335
Posted Tuesday, November 16, 2010 4:04 AM
SSCrazy

SSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazy

Group: General Forum Members
Last Login: Saturday, March 15, 2014 4:31 AM
Points: 2,808, Visits: 7,173
I assume that you are trying to put the numbers into the Indian number format of ##,##,###.##

Rather than create your own custom format for this you can change the language of the report to hi-IN (or one of the other Indian languages), and then in the text-box properties, under number change the format to number and click on 'use regional formatting' and this will display your numbers using the indian format.
Post #1021351
Posted Tuesday, November 16, 2010 4:08 AM
SSC Veteran

SSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC Veteran

Group: General Forum Members
Last Login: Wednesday, June 19, 2013 11:21 PM
Points: 230, Visits: 157
thanku...
but where to write .. this... please send me the steps...
Post #1021352
Posted Tuesday, November 16, 2010 4:13 AM
SSCrazy

SSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazy

Group: General Forum Members
Last Login: Saturday, March 15, 2014 4:31 AM
Points: 2,808, Visits: 7,173
you don't really need to 'write' it anywhere.

steps would be

1. delete your existing format expression
2. click on your report in design mode
3. press F4 to bring up report properties
4. Under language change to hi-IN
5. right-click on your textbox
6. click text-box properties
7. click number
8. under category select number
9. check the box labeled 'use regional formatting'
10. preview report
Post #1021355
Posted Tuesday, November 16, 2010 4:33 AM
SSC Veteran

SSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC Veteran

Group: General Forum Members
Last Login: Wednesday, June 19, 2013 11:21 PM
Points: 230, Visits: 157
but... the steps belongs to ssrs2005..
i'm working with ssrs2008...
Post #1021362
Posted Tuesday, November 16, 2010 4:37 AM
SSCrazy

SSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazy

Group: General Forum Members
Last Login: Saturday, March 15, 2014 4:31 AM
Points: 2,808, Visits: 7,173
how do you know that?

i am using 2008r2
Post #1021365
Posted Tuesday, November 16, 2010 4:42 AM
SSC Veteran

SSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC Veteran

Group: General Forum Members
Last Login: Wednesday, June 19, 2013 11:21 PM
Points: 230, Visits: 157
thanku... stevb...

i got it.......

thanks...
Post #1021369
Posted Tuesday, November 16, 2010 4:52 AM
SSC Veteran

SSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC Veteran

Group: General Forum Members
Last Login: Wednesday, June 19, 2013 11:21 PM
Points: 230, Visits: 157
hi steveb...
one more doubt...
please tell me how to print the number in words...
i.e crores,lakhs, thousands... etc...

please help me
Post #1021374
Posted Tuesday, November 16, 2010 6:16 AM


SSC Veteran

SSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC Veteran

Group: General Forum Members
Last Login: Wednesday, May 09, 2012 10:59 PM
Points: 229, Visits: 870
Vinay,

Hope the below url will help you

http://www.demtron.com/blog/post/2009/02/02/VBNet-Converting-Number-to-Words.aspx

Use this in custom code


-----------------------------------------------------------------------------------------------------------------------------------------------------------
Please feel free to let me know if you are not clear or I’ve misunderstood anything.

Thanks,
Arunkumar S P

Post #1021423
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse