IReport xml and currency symbol

0

 Hi

Sorry if this is a silly question.

I am writing a simple report that uses an XML data source.  The contents of which is similar to 

<data>

<row idVoucher="1234"  issuedDate="02/02/2011"  issuedTo="Stuart Bloom"  expiryDate="02/02/2012"  amount="€22.00"  comapnyName="Company Name"  comapnyAdd1="Add1"  comapnyAdd2="Add2"  comapnyAdd3="Add3"  comapnyPhone="Phone"  comapnyFax="Fax"  />

</data>

The problem I am having is that is fails to parse the XML, however, if i remove the € symbol all is fine.  I need the € symbol as the output may be created in a different local to that of the users browser.
 
I would be extremely grateful for any assistance to be able to pass a € or £ to the report in the XML file.
 
Stuart
stuartbloom's picture
Joined: Jan 7 2011 - 7:13am
Last seen: 3 years 9 months ago

3 Answers:

0
search for the xml value of € google is friendly man.
notrolls's picture
Joined: Jan 31 2011 - 9:51pm
Last seen: 1 year 8 months ago
0

Notrolls 

Thanks for your reply, you are correct Google is good, however, it helps to know what you are actually looking for ;)

I have been searching all morning without success, however, I now have a file that looks like below, and although the parser doesn't fall over the Euro symbol is just not printed on the report.

Would you have any ideas?

Many thanks

Stuart

File Contents--------------------------------------------------------------------------

<?xml version="1.0" encoding="ISO-8859-15"?>

<data>

  <row

    idVoucher="1234"

    issuedDate="02/02/2011"

    issuedTo="Stuart Bloom"

    expiryDate="02/02/2012"

    amount="€22.00"

    comapnyName="Company Name"

    comapnyAdd1="Add1"

    comapnyAdd2="Add2"

    comapnyAdd3="Add3"

    comapnyPhone="Phone"

    comapnyFax="Fax"  

  />

</data>

 
stuartbloom's picture
Joined: Jan 7 2011 - 7:13am
Last seen: 3 years 9 months ago
0

Here's something to try:

 

I see that your XML Document is using 8859-15 encoding.

 

According to the current Wikipedia page, the 8859-15 encoded value of the Euro sign is  0x4A

 http://en.wikipedia.org/wiki/ISO/IEC_8859-15

 

So you could try escaping the Euro sign in your report XML  by using:

 

&#xA4;  in place of the euro sign.

 

as in 

amount="&#xA4 22.00"

 

I'm not sure about the environment that the XML document is processed in (yet), but this might work and could be worth a try.

 

=thorick

 

 



Post Edited by thorick at 02/03/2011 17:18
thorick's picture
Joined: Jan 31 2011 - 1:00pm
Last seen: 1 year 3 weeks ago
Feedback
randomness