cancel
Showing results for 
Search instead for 
Did you mean: 

VS doen't show correct currency format, CR 2008 does.

Former Member
0 Kudos

Hi all,

I am using VB.NET 2008 with CR2008(SP1). I am trying to format a currency field (changing currency symbol depending on the value of the field) with the formula editor and when I run the program, it shows everything with default value. However, when I open the same report directly from Crystal Reports, the correct format (based on the formula) is shown. Any idea why?

Thanks.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

Can we see the report with proper data in the field if we do not make any changes to the field format? If yes then can you share how you apply the format with us?

Thanks.

Former Member
0 Kudos

Hi AG,

I am not sure if I understood you correctly. This is the formula that I used in the CR:

For currency symbol I used

IIF( {Labels.BasePrice} < 1 , "¢" , "$")

and for currency position

IIF ({Labels.BasePrice} > 1 , crLeadingCurrencyInsideNegative , crTrailingCurrencyOutsideNegative)

The formula that I use in Common and Font setions work just fine. The numbers is giving me a hard time.

I have posted screen shots of this problem at http://www.gdiscount.com/cr2008 and if you go there, you'll notice that in the Crystal Reports, the cent sign shows and it is also in the correct position. In the screen from Visual Studio, the format is not effecting anything.

Both programs are loading the same report file (CR9.rpt).

Former Member
0 Kudos

I believe what he's asking for is the data in the field with no formatting applied. To do this, you can just drag the {Label.BasePrice} field somewhere in your report temporarily so we can see exactly what data you have in there. Another screenshot of both the crystal designer and the .NET viewer with the addition would help us, too.

I've tried a very basic report with a single number field using Crystal 2008 and VS 2005 (I don't have 2008 to test on), but mine works exactly as I would expect (you should probably use "{Label.BasePrice} >= 1" in your positioning formula).

The difference between the actual numbers is concerning. I'm kind of confused as to why one displays as "99" and the other displays as " .99". Is there any other formatting of the field going on?

What kind of data source are you using?

-Chuck

Answers (1)

Answers (1)

Former Member
0 Kudos

I guess it had something to do with the form. I deleted the form and created a new one and everything works just fine.

Thanks all.