Jump to content
We've recently updated our Privacy Statement, available here ×

JaspersoftStudio: Load resource with ENTITY


libero

Recommended Posts

Hello,

I have a JasperReports jrxml file with the following entries:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE jasperReport PUBLIC "//JasperReports//DTD Report Design//EN"
                              "http://jasperreports.sourceforge.net/dtds/jasperreport.dtd" [
    <!ENTITY reportStyles SYSTEM "./ReportStyles.ent">
]>
<jasperReport
        name="..."
>
    <property name="ireport.scriptlethandling" value="0"/>
    <property name="ireport.encoding" value="UTF-8"/>
    <import value="java.util.*"/>
    <import value="net.sf.jasperreports.engine.*"/>
    <import value="net.sf.jasperreports.engine.data.*"/>
    &reportStyles;

If I load the jrxml file in the JaspersoftStudio I receive the following error:

converted-file.png.b65a7e6b6bcc4bbfa32c3b078e25206e.png

 

The file "ReportStyles.ent" exists in the folder "D:JaspersoftStudio-6.5.1.final".

I have additional set the jasperreport property "net.sf.jasperreports.xml.load.unknown.entities" to "true" in the JaspersoftStudio.

I think the property is ignored by the JaspersoftStudio.

Why the error message appears and how can I solve the problem?

In the iReport 5.6.0 its work fine. :-)

 

Many thanks.

orebil

 

Link to comment
Share on other sites

  • Replies 4
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

Posted Images

You won't be able to just use a jrxml report from ireport to jasperstudio. Libraries, classpath etc are different. 
You will have to look for if there is an option to convert ireport template to jasperstudio. 
Otherwise you need to look at the logic in the xml in ireport and copy pieces over to a standard jasperstudio report template. 
Test if works, if yo uget error, either see if yo ucan remove the given xml tag and test again or you need to see how jasperstudio implement the same elements in xml. 
Example if the table elements in xml in ireport is similar to the table elments xml in jasperstudio. If not edit the old ireport xml to suit the new jasperstudio xml. 
(That is if you cannot find convert option)
 Hope it helps. At least I tried to answer. 

Link to comment
Share on other sites

Thanks for your answer. But I known that there are many differences between iReport and jaspersoftStudio. That's not the problem. :-)

The problem is that the xml tag "ENTITY" doesn't work in the JaspersoftStudio (see Screenshot in the first question).

Why couldn't the JasperSoftstudio load the ReportStyles.ent file? That's the problem .

Have anybody else an answer or the same problem with the ENTITY tag?

Orebil

 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...