Link to home
Start Free TrialLog in
Avatar of D Patel
D PatelFlag for India

asked on

Crystal Report : Currency Symbol not displayed after converting to PDF

Hi Experts,

While viewing the output in crystal report viewer currency symbols are displayed correctly.
But after converting to PDF its showing 'Square' in place.

Crystal Viewer :
User generated image
PDF :
User generated image
Please suggest the solution.

Regards,
D Patel
Avatar of Mike McCracken
Mike McCracken

What font are you using for the currency character?  It may not be loaded for PDF to use.
As I recall Crystal doesn't embed fonts.

mlmcc
Avatar of D Patel

ASKER

It's Currency Symbol :

User generated image
Foradian Rupee Font
Hi,
As mlmcc said, this is something to do with font type.
Do you have a specific requirement to use Foradian Rupee font?
Other fonts ( I think  Unicode fonts) like Arial and Times New Roman does support this. If that is fine, you can try changing the currency symbol font to one of those.
If there is a specific requirement to use Foradian Rupee, then we need to explore further on that.
Avatar of D Patel

ASKER

No Specific Requirement.

If it works with Arial or Times New Roman then it will be fine.

Can you suggest what I need to do?
Then you can change the font to Arial and check pdf output.
Avatar of D Patel

ASKER

See, Here Crystal report generated based on MySQL data in my ASP.NET Web application. In which I have following structure.

User generated image
Avatar of D Patel

ASKER

User generated image
When I included Rupee symbol in Crystal designer with font Arial and export to pdf, it works fine.
May be you need to check ASP.NET if you passing the font type manually.
Can you explain on your last 2 messages in this post? I mean the one with  currency name and currency sign and the other with html interpretation?
Ok, I understand that, you are having currency name and currency signs in asp.net code and passing those to a crystal formula using html interpretation and want to display symbols for the currency codes (e.g if &#8377 then indian rupee symbol). Is it?
Avatar of D Patel

ASKER

Yes True
Then you need to display the currency sign field values using a chrW in html interpreted formula.
E.g for displaying the currency symbol for Indian Rupee, use chrW(8377) . Note that you need to remove &# from your currency sign field value.

Hope this helps.
Avatar of D Patel

ASKER

Where do I put it?

Please suggest

I have tried it at here...

User generated image
The ChrW content has to be inside the formula with html interpretation.
Can you provide more details on how are you displaying now and getting those boxes instead of actual currency symbols?
Avatar of D Patel

ASKER

I just pasted currency symbol in the box provided.
Avatar of D Patel

ASKER

Also,

At here in formula field

if {rptinvoice1.sCurrencySign}="&#8377" then
    "<center>" & Totext("(" & {rptinvoice1.sCurrencyName} & " " & chrw(8377) & ")") & "</center>"
else
    "<center>" & Totext("(" & {rptinvoice1.sCurrencyName} & " " & {rptinvoice1.sCurrencySign} & ")") & "</center>"

Open in new window

Avatar of D Patel

ASKER

In both the case it is being displayed as square.
I think it's getting bit too complicated.
Wherever you want to display currency symbol, in those place, just make use of chrW(<currency code value>) with any conditional display if you want.
Can you make changes and generate report with some saved data and attach the report?
Avatar of D Patel

ASKER

Yes,

That I used...
Avatar of D Patel

ASKER

CR for VS does not save data with report.

I have try to preview the report but it's showing blank format.
Ok, Provide one without saved data if there is no option.
Just mention where and all the changes have been made for currency symbol display.
Not sure whether the same thing simulated on desktop version of Crystal Reports works with VS version of Crystal you have though, but we can give it a try.
Avatar of D Patel

ASKER

Sample Report file attached herewith.

Also find the marking where currencies are used.

User generated imageSample.rpt
Screenshots doesn't help much as it's the inline formula content and the settings to be checked. Report file sharing will help to verify the formulae and suggest further.
Avatar of D Patel

ASKER

Report also attached.
Modified report to include the currency symbol for Exchange Rate.
Can you check if that works fine in Crystal viewer and on pdf output?
I have just hardcoded the currency code of 8337.
Sample--1-.rpt
Avatar of D Patel

ASKER

It's 8377 not 8337.
BTW the result is same (with square).
ASKER CERTIFIED SOLUTION
Avatar of Raghavendra Hullur
Raghavendra Hullur
Flag of India image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of D Patel

ASKER

Hurrey!!!

It's perfectly working.

Many Thanks for your help....
Glad finally it worked.
Avatar of D Patel

ASKER

Yeah