Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Crystal Reports 2008 - Change currency symbol at runtime in vb.net

Posted on 2010-11-10
7
Medium Priority
?
1,919 Views
Last Modified: 2012-05-10
We are using Visual Basic 2008 and Crystal Reports 2008. At runtime, we need to change currency symbols, thousand separators and decimal symbols for amount fields in our reports. We allow our customers to specify this and do not use the regional settings. I can not find the means of doing this although we can customize a lot of other properties in crystal reports.

Any ideas?

Thanks
0
Comment
Question by:Sally_S
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
  • 2
7 Comments
 
LVL 101

Expert Comment

by:mlmcc
ID: 34106239
How are they specifying?

You could pass the values to the report in parameters and tghen use the conditional formatting to set the symbols.

Right click a field
Click FORMAT FIELD
On the NUMBER TAB choose CUSTOMiZE
Use the formula buttons to the right of the symbols to set the appropriate value

mlmcc
0
 

Author Comment

by:Sally_S
ID: 34106583
Thank you for your response but I want to be able to apply the formatting at run-time not at design time. We don't know what the settings are until the end user runs the report - at that point they specify the currency symbol, etc.
0
 
LVL 101

Accepted Solution

by:
mlmcc earned 600 total points
ID: 34106882
How are they going to specify the values to use?

If you can have those values passed in as parameters, you can use the conditional formatting to set the values using the parameters
See the attached report.

mlmcc
currencyFormat.rpt
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

Author Comment

by:Sally_S
ID: 34107141
Okay - I see where you're going. I can certainly have the values specified as parameters, but I think the conditional formatting is the problem. The CR properties that we see for setting the currency symbol, etc are not available as properties that I can set in VB.Net.
0
 
LVL 101

Expert Comment

by:mlmcc
ID: 34107636
Then you are probably out of luck.  you may need to use the full version.

The other way woul dbe to set the Windows regional settings and use those as Crystal wants to.

mlmcc
0
 
LVL 4

Assisted Solution

by:msd1305
msd1305 earned 400 total points
ID: 34108971
There is a solution.

Pass your Currency Symbol as a parameter. e.g. Rs.

now, right click on your field ->Format Field->go to Number tab-> click on Customize->click on Currency Symbol-> select the option Enable Currency Symbol-> in the bottom you will see an option to set currency symbol (filled with $ by default)-> click on the formula buttom  next to it and in the formula editor just select your parameter.

Now your currency symbol will change as per the parameter you pass in.

You can have more fliexibility by passing the ascii value of your currency symbol. e.g 36 for $.

and then you can generate the symbol in crystal by specifying chr(36).

I hope this is clear. Please feel free to ask if you have any doubts.
0
 
LVL 4

Expert Comment

by:msd1305
ID: 34109007
ASCII codes for the some popular currencies

$ - 36
£ - 163
€ - 128
¥ - 165
0

Featured Post

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction As chip makers focus on adding processor cores over increasing clock speed, developers need to utilize the features of modern CPUs.  One of the ways we can do this is by implementing parallel algorithms in our software.   One recent…
Creating an analog clock UserControl seems fairly straight forward.  It is, after all, essentially just a circle with several lines in it!  Two common approaches for rendering an analog clock typically involve either manually calculating points with…
Have you created a query with information for a calendar? ... and then, abra-cadabra, the calendar is done?! I am going to show you how to make that happen. Visualize your data!  ... really see it To use the code to create a calendar from a q…
We’ve all felt that sense of false security before—locking down external access to a database or component and feeling like we’ve done all we need to do to secure company data. But that feeling is fleeting. Attacks these days can happen in many w…
Suggested Courses

618 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question