Question converting decimal value into currency text

jak

Member
Joined
Feb 21, 2009
Messages
19
Programming Experience
Beginner
Hello Experts,
I m using a reportviewer in vs2008 with vb. I have a database field(datatype decimal) on my reportviewer. I added a textbox from toolbox into the reportviewer. Now i want to show currency text into textbox equivalent to that database field value. In short i want to convert 155.75 into "one hunded fifty five dollars and seventy five cents". Here 155.75 is decimal value from database field and one hunded fifty five dollars and seventy five cents" the converted textbox value.
I have a private function in my module for conversion. but i m not getting idea how to implement that function on reportviewer or how to call that function to convert as i want.
please guide me step by step becoz i m nt very good in programming.

Have a nice day !
 
Just add an extra column to your DataTable after you've populated it, then loop through the records and set the new field to the currency string that corresponds to the numerical value.
 
hello jmcilhinney,
sir, actually i m newbie, so could u please describe ur above reply step by step with some more details...thanx in advance.
 
I got the solution of my problem.I just added my function to custom code and in textbox "=code.myfunction(fields!sal.value).;)
 
Back
Top