#1 2018-07-17 07:59:52

saroshmk
Member
From: Palampur, India
Registered: 2018-07-17

Jasper Style Template - XML Parse Error

Dear All

I'm facing an issue getting a Jasper Report to work with a Jasper Style Template. I use the Jasper Studio plugin in Eclipse to develop the Report and the Style Template. This works in the Eclipse environment.

I then deployed the report and the style template in RS:
+ In ReportServer, I uploaded the style template into the File System and generated the URL
+ The Jasper Report uses a parameter that I setup as a Global Parameter with the File System URL (above).

When I run the report, i see an XML parse exception - reproduced below:

Would you help me diagnose what's wrong. It seems like it's the template that the parser is complaining about. One of the errors in the trace below is

columnNumber: 280; Document root element "jasperTemplate", must match DOCTYPE root "null". at org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseException(Unknown Source) at

Is it an XSD issue?

I'm running ReportServer 3.0.2-5855

With regards,
Sarosh

-----------------------------------------------------------------
Error: An error occurred during report execution.
The report could not be executed: Error parsing template XML.
To get help please contact an administrator.
Details
net.datenwerke.rs.core.service.reportmanager.exceptions.ReportExecutorException: The report could not be executed: Error parsing template XML. at net.datenwerke.rs.core.service.reportmanager.ReportExecutorServiceImpl.execute(ReportExecutorServiceImpl.java:218) at net.datenwerke.rs.core.service.reportmanager.ReportExecutorServiceImpl.execute(ReportExecutorServiceImpl.java:119) at net.datenwerke.rs.core.server.reportexport.ReportExportServlet.exeucteReport(ReportExportServlet.java:535) at net.datenwerke.rs.core.server.reportexport.ReportExportServlet.doExportReport(ReportExportServlet.java:416) at net.datenwerke.rs.core.server.reportexport.ReportExportServlet.exportReport(ReportExportServlet.java:346) at net.datenwerke.rs.core.server.reportexport.ReportExportServlet.exportReportViaSession(ReportExportServlet.java:339) at net.datenwerke.rs.core.server.reportexport.ReportExportServlet.doGet(ReportExportServlet.java:168) at net.datenwerke.rs.core.server.reportexport.ReportExportServlet$$EnhancerByGuice$$2e2a4492.CGLIB$doGet$0() at net.datenwerke.rs.core.server.reportexport.ReportExportServlet$$EnhancerByGuice$$2e2a4492$$FastClassByGuice$$ff74d15c.invoke() at com.google.inject.internal.cglib.proxy.$MethodProxy.invokeSuper(MethodProxy.java:228) at com.google.inject.internal.InterceptorStackCallback$InterceptedMethodInvocation.proceed(InterceptorStackCallback.java:72) at com.google.inject.persist.jpa.JpaLocalTxnInterceptor.invoke(JpaLocalTxnInterceptor.java:66) at com.google.inject.internal.InterceptorStackCallback$InterceptedMethodInvocation.proceed(InterceptorStackCallback.java:72) at net.datenwerke.security.service.security.aop.SecurityCheckInterceptor.invoke(SecurityCheckInterceptor.java:109) at com.google.inject.internal.InterceptorStackCallback$InterceptedMethodInvocation.proceed(InterceptorStackCallback.java:72) at com.google.inject.internal.InterceptorStackCallback.intercept(InterceptorStackCallback.java:52) at net.datenwerke.rs.core.server.reportexport.ReportExportServlet$$EnhancerByGuice$$2e2a4492.doGet() at javax.servlet.http.HttpServlet.service(HttpServlet.java:620) at javax.servlet.http.HttpServlet.service(HttpServlet.java:727) at net.datenwerke.rs.core.server.reportexport.ReportExportServlet$$EnhancerByGuice$$2e2a4492.CGLIB$service$17() at net.datenwerke.rs.core.server.reportexport.ReportExportServlet$$EnhancerByGuice$$2e2a4492$$FastClassByGuice$$ff74d15c.invoke() at com.google.inject.internal.cglib.proxy.$MethodProxy.invokeSuper(MethodProxy.java:228) at com.google.inject.internal.InterceptorStackCallback$InterceptedMethodInvocation.proceed(InterceptorStackCallback.java:72) at net.datenwerke.security.service.security.aop.SecurityCheckInterceptor.invoke(SecurityCheckInterceptor.java:109) at com.google.inject.internal.InterceptorStackCallback$InterceptedMethodInvocation.proceed(InterceptorStackCallback.java:72) at com.google.inject.internal.InterceptorStackCallback.intercept(InterceptorStackCallback.java:52) at net.datenwerke.rs.core.server.reportexport.ReportExportServlet$$EnhancerByGuice$$2e2a4492.service() at com.google.inject.servlet.ServletDefinition.doService(ServletDefinition.java:263) at com.google.inject.servlet.ServletDefinition.service(ServletDefinition.java:178) at com.google.inject.servlet.ManagedServletPipeline.service(ManagedServletPipeline.java:91) at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:62) at com.google.inject.persist.PersistFilter.doFilter(PersistFilter.java:89) at com.google.inject.servlet.FilterDefinition.doFilter(FilterDefinition.java:163) at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:58) at com.google.inject.servlet.FilterDefinition.doFilter(FilterDefinition.java:168) at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:58) at com.google.inject.servlet.FilterDefinition.doFilter(FilterDefinition.java:168) at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:58) at com.google.inject.servlet.ManagedFilterPipeline.dispatch(ManagedFilterPipeline.java:118) at com.google.inject.servlet.GuiceFilter.doFilter(GuiceFilter.java:113) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:220) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:122) at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:501) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:170) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:98) at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:950) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:408) at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1041) at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:607) at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:315) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) at java.lang.Thread.run(Thread.java:745) Caused by: net.sf.jasperreports.engine.JRRuntimeException: Error parsing template XML. at net.sf.jasperreports.engine.xml.JRXmlTemplateLoader.loadTemplate(JRXmlTemplateLoader.java:219) at net.sf.jasperreports.engine.xml.JRXmlTemplateLoader.load(JRXmlTemplateLoader.java:256) at net.sf.jasperreports.engine.xml.JRXmlTemplateLoader.loadTemplate(JRXmlTemplateLoader.java:115) at net.sf.jasperreports.engine.fill.JRFillReportTemplate.loadTemplate(JRFillReportTemplate.java:110) at net.sf.jasperreports.engine.fill.JRFillReportTemplate.evaluate(JRFillReportTemplate.java:88) at net.sf.jasperreports.engine.fill.JRBaseFiller.collectTemplates(JRBaseFiller.java:696) at net.sf.jasperreports.engine.fill.JRBaseFiller.collectTemplateStyles(JRBaseFiller.java:719) at net.sf.jasperreports.engine.fill.JRBaseFiller.collectStyles(JRBaseFiller.java:667) at net.sf.jasperreports.engine.fill.JRBaseFiller.loadStyles(JRBaseFiller.java:636) at net.sf.jasperreports.engine.fill.JRBaseFiller.fill(JRBaseFiller.java:528) at net.sf.jasperreports.engine.fill.BaseReportFiller.fill(BaseReportFiller.java:396) at net.sf.jasperreports.engine.fill.JRFiller.fill(JRFiller.java:91) at net.sf.jasperreports.engine.JasperFillManager.fill(JasperFillManager.java:456) at net.datenwerke.rs.base.service.reportengines.jasper.JasperReportEngine.executeReport(JasperReportEngine.java:291) at net.datenwerke.rs.base.service.reportengines.jasper.JasperReportEngine.doExecute(JasperReportEngine.java:104) at net.datenwerke.rs.core.service.reportmanager.engine.ReportEngine.execute(ReportEngine.java:148) at net.datenwerke.rs.core.service.reportmanager.ReportExecutorServiceImpl.execute(ReportExecutorServiceImpl.java:186) ... 55 more Caused by: org.xml.sax.SAXParseException; lineNumber: 3; columnNumber: 280; Document root element "jasperTemplate", must match DOCTYPE root "null". at org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseException(Unknown Source) at org.apache.xerces.util.ErrorHandlerWrapper.error(Unknown Source) at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source) at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source) at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source) at org.apache.xerces.impl.dtd.XMLDTDValidator.rootElementSpecified(Unknown Source) at org.apache.xerces.impl.dtd.XMLDTDValidator.handleStartElement(Unknown Source) at org.apache.xerces.impl.dtd.XMLDTDValidator.startElement(Unknown Source) at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanStartElement(Unknown Source) at org.apache.xerces.impl.XMLDocumentScannerImpl$ContentDispatcher.scanRootElementHook(Unknown Source) at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source) at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source) at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source) at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source) at org.apache.xerces.parsers.XMLParser.parse(Unknown Source) at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source) at org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source) at org.apache.commons.digester.Digester.parse(Digester.java:1916) at net.sf.jasperreports.engine.xml.JRXmlTemplateLoader.loadTemplate(JRXmlTemplateLoader.java:207) ... 71 more

Offline

#2 2018-07-17 08:51:57

eduardo
Administrator
Registered: 2016-11-01
Website

Re: Jasper Style Template - XML Parse Error

Hi saroshmk,

can you please post a *minimal* report (delete everything unnecessary) that shows this behavior? And some screenshots showing your configuration ( use http://imgbb.com ).

Regards,
Eduardo

Offline

#3 2018-07-17 10:21:05

saroshmk
Member
From: Palampur, India
Registered: 2018-07-17

Re: Jasper Style Template - XML Parse Error

Hello Eduardo

Thank you for the prompt response. A minimal report, style template and screenshots are included below:

------------------------------------------
JRXML
------------------------------------------

<?xml version="1.0" encoding="UTF-8"?>
<!-- Created with Jaspersoft Studio version 6.6.0.final using JasperReports Library version 6.6.0  -->
<jasperReport xmlns="http://jasperreports.sourceforge.net/jasperreports" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://jasperreports.sourceforge.net/jasperreports http://jasperreports.sourceforge.net/xsd/jasperreport.xsd" name="Revenue_Breakup_Report" pageWidth="842" pageHeight="595" orientation="Landscape" columnWidth="744" leftMargin="56" rightMargin="42" topMargin="42" bottomMargin="42" uuid="d532c1f1-3e7b-435c-8633-998b6d336727">
    <property name="com.jaspersoft.studio.data.defaultdataadapter" value="DataAdapter.xml"/>
    <property name="com.jaspersoft.studio.data.sql.tables" value=""/>
    <property name="com.jaspersoft.studio.data.sql.SQLQueryDesigner.sash.w1" value="171"/>
    <property name="com.jaspersoft.studio.data.sql.SQLQueryDesigner.sash.w2" value="822"/>
    <property name="com.jaspersoft.studio.unit.pageHeight" value="pixel"/>
    <property name="com.jaspersoft.studio.unit.pageWidth" value="pixel"/>
    <property name="com.jaspersoft.studio.unit.columnWidth" value="pixel"/>
    <property name="com.jaspersoft.studio.unit.columnSpacing" value="pixel"/>
    <template><![CDATA[$P{stylepath}]]></template>
    <style name="Table_TH" mode="Opaque" backcolor="#F8F8FF">
        <box>
            <topPen lineWidth="0.5" lineColor="#CCCCCC"/>
            <bottomPen lineWidth="0.5" lineColor="#CCCCCC"/>
        </box>
    </style>
    <style name="Table_CH" mode="Opaque" backcolor="#BFBFFF">
        <box>
            <topPen lineWidth="0.5" lineColor="#CCCCCC"/>
            <bottomPen lineWidth="0.5" lineColor="#CCCCCC"/>
        </box>
    </style>
    <style name="Table_TD" mode="Opaque" backcolor="#FFFFFF">
        <box>
            <topPen lineWidth="0.5" lineColor="#CCCCCC"/>
            <bottomPen lineWidth="0.5" lineColor="#CCCCCC"/>
        </box>
    </style>
    <parameter name="startdate" class="java.util.Date">
        <parameterDescription><![CDATA[]]></parameterDescription>
    </parameter>
    <parameter name="enddate" class="java.util.Date"/>
    <parameter name="_RS_USER_USERNAME" class="java.lang.String" isForPrompting="false">
        <parameterDescription><![CDATA[]]></parameterDescription>
    </parameter>
    <parameter name="cust_logo" class="java.lang.String" isForPrompting="false"/>
    <parameter name="stylepath" class="java.lang.String" isForPrompting="false">
        <defaultValueExpression><![CDATA["trunk/modules/Templates/SocIT_Style_Template.jrtx"]]></defaultValueExpression>
    </parameter>
    <queryString>
        <![CDATA[select value as HospitalName
from orgparameters
where name = 'ORG_NAME']]>
    </queryString>
    <field name="hospitalname" class="java.lang.String">
        <property name="com.jaspersoft.studio.field.label" value="hospitalname"/>
    </field>
    <variable name="Main_Tot_Collected" class="java.math.BigDecimal"/>
    <variable name="Main_Tot_Charity" class="java.math.BigDecimal"/>
    <variable name="Main_Tot_Billed" class="java.math.BigDecimal"/>
    <variable name="Main_Tot_Tax" class="java.math.BigDecimal"/>
    <background>
        <band splitType="Stretch"/>
    </background>
    <title>
        <band height="131" splitType="Stretch">
            <line>
                <reportElement x="0" y="47" width="743" height="1" uuid="688ce181-ed22-4086-acb6-b2802be6f065"/>
                <graphicElement>
                    <pen lineStyle="Dotted"/>
                </graphicElement>
            </line>
            <staticText>
                <reportElement style="SocIT_ReportTitle" mode="Transparent" x="0" y="55" width="496" height="21" uuid="fad5deb0-680c-4a56-a6b6-f9792ef1527a"/>
                <text><![CDATA[Report Title]]></text>
            </staticText>
            <staticText>
                <reportElement style="SocIT_ReportTitleText" x="0" y="77" width="496" height="15" uuid="cd9c0ef0-5842-4dc1-bf89-c59306cb45d0"/>
                <text><![CDATA[Report Title Text]]></text>
            </staticText>
        </band>
    </title>
    <pageHeader>
        <band height="25" splitType="Stretch">
            <printWhenExpression><![CDATA[$V{PAGE_COUNT}>1]]></printWhenExpression>
        </band>
    </pageHeader>
    <detail>
        <band height="95" splitType="Stretch">
            <property name="com.jaspersoft.studio.unit.height" value="pixel"/>
            <property name="com.jaspersoft.studio.layout" value="com.jaspersoft.studio.editor.layout.FreeLayout"/>
        </band>
        <band height="155"/>
    </detail>
    <pageFooter>
        <band height="22" splitType="Stretch">
            <textField>
                <reportElement style="SocIT_HeaderFooterText" x="0" y="0" width="620" height="20" uuid="881659df-7647-4c7e-aaca-ddf0940589ee"/>
                <textFieldExpression><![CDATA["Report Footer"]]></textFieldExpression>
            </textField>
            <textField>
                <reportElement style="SocIT_HeaderFooterText" x="626" y="0" width="70" height="20" uuid="05279fcc-d61a-4d3e-97ac-0492f34c0395"/>
                <textElement textAlignment="Right"/>
                <textFieldExpression><![CDATA["Page " + $V{PAGE_NUMBER}]]></textFieldExpression>
            </textField>
            <staticText>
                <reportElement style="SocIT_HeaderFooterText" x="698" y="0" width="8" height="20" uuid="9c417904-40ed-46c9-bd23-fd59175d3be0"/>
                <text><![CDATA[of]]></text>
            </staticText>
            <textField>
                <reportElement style="SocIT_HeaderFooterText" x="708" y="0" width="35" height="20" uuid="2d74706d-e1c5-406f-b2dd-832f8a3c3ab9"/>
                <textFieldExpression><![CDATA[$V{PAGE_NUMBER}]]></textFieldExpression>
            </textField>
        </band>
    </pageFooter>
</jasperReport>


------------------------------------------
JASPER STYLE TEMPLATE
------------------------------------------

<?xml version="1.0" encoding="UTF-8"?>
<!-- Created with Jaspersoft Studio -->
<jasperTemplate xmlns="http://jasperreports.sourceforge.net/jasperreports/template" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://jasperreports.sourceforge.net/jasperreports/template http://jasperreports.sourceforge.net/xsd/jaspertemplate.xsd">
:
:
:
    <style name="SocIT_ReportTitle" mode="Opaque" forecolor="#008050" hTextAlign="Left" vTextAlign="Middle" fontName="Open Sans" fontSize="14" isBold="false"/>
    <style name="SocIT_ReportTitleText" mode="Opaque" forecolor="#000000" hTextAlign="Left" vTextAlign="Middle" fontName="Open Sans" fontSize="10" isBold="false"/>
    <style name="SocIT_SubHeading" mode="Opaque" forecolor="#006633" hTextAlign="Left" vTextAlign="Middle" fontName="Open Sans SemiBold" fontSize="10" isBold="false"/>
    <style name="SocIT_ReportText" mode="Opaque" forecolor="#000000" hTextAlign="Left" vTextAlign="Middle" fontName="Open Sans" fontSize="8" isBold="false"/>
    <style name="SocIT_HeaderFooterText" mode="Opaque" forecolor="#545454" hTextAlign="Left" vTextAlign="Middle" fontName="Open Sans" fontSize="8" isBold="false"/>
</jasperTemplate>


------------------------------------------
CONFIG SCREEN SHOTS
------------------------------------------
https://ibb.co/bRXDYd
https://ibb.co/drdWKJ

Offline

#4 2018-07-17 10:58:54

eduardo
Administrator
Registered: 2016-11-01
Website

Re: Jasper Style Template - XML Parse Error

Hi saroshmk,

have you defined $P{stylepath} as a reportserver parameter on your report ?

I would recommend you two steps:
1. Use the direct URL without parameter. So replace
<template><![CDATA[$P{stylepath}]]></template>
With your url. This should work in eclipse and in Reportserver. Only when this works continue to step 2.

2. Create the ReportServer parameter. Check here for more details: https://reportserver.net/en/guides/admi … arameters/
You can also use the "suggest parameter" functionality available for jasper. It is located in the toolbar (up) in the parameters tab.  Here, ReportServer will support you by automatically creating parameters from the master report. We note that the automatic extraction of parameters is rudimentary and for may need manual adjustments for more complex parameter settings.

Regards,
Eduardo

Offline

#5 2018-07-17 11:19:43

saroshmk
Member
From: Palampur, India
Registered: 2018-07-17

Re: Jasper Style Template - XML Parse Error

eduardo wrote:

I would recommend you two steps:
1. Use the direct URL without parameter. So replace
<template><![CDATA[$P{stylepath}]]></template>
With your url. This should work in eclipse and in Reportserver. Only when this works continue to step 2.

Step 1 works in Eclipse (I provided the Style Template URL, directly in the report), but when I upload and run the JRXML in RS, it throws up the same XML Parse error.

    <template><![CDATA["http://192.168.250.113:8099/reportserver3/reportserver/fileServerAccess?id=1494234"]]></template>

I'm beginning to wonder if the the Style Template XML is right?

Are the XSDs loaded elsewhere in ReportServer?

With regards,
Sarosh

Last edited by saroshmk (2018-07-17 11:20:42)

Offline

#6 2018-07-17 12:05:05

eduardo
Administrator
Registered: 2016-11-01
Website

Re: Jasper Style Template - XML Parse Error

Hi saroshmk,

is the folder where you have your template "web accessible"? Check the checkbox "share folder for web access".

I still see some things that are not necessary in your report/ template:
You have many styles in your template. Delete all but one.
You have many parameters: startdate, stylepath (what is this? I see an URL here), etc. Delete them all: as we saw, we don't need parameters for this test.
You have many variables: Main_Tot_Collected, etc. Delete them all.

For me to be able to test I require a minimal, importable jrxml file and its respective minimal template. You did not send the complete template ( ... ).
So no variables, no parameters, only one style. It would also be nice to have a screenshot of the expected behavior (what you see when you run your report in jasper). Remember, only 1 style. Choose a style that is visible in the expected result and delete all other styles.

Regards,
Eduardo

Offline

#7 2018-07-17 15:02:24

saroshmk
Member
From: Palampur, India
Registered: 2018-07-17

Re: Jasper Style Template - XML Parse Error

Hello Eduardo

Thank you for your patience! I've stripped the JRXML and JRTX down fully. Here's the code:

JRXML:

<?xml version="1.0" encoding="UTF-8"?>
<!-- Created with Jaspersoft Studio version 6.6.0.final using JasperReports Library version 6.6.0  -->
<jasperReport xmlns="http://jasperreports.sourceforge.net/jasperreports" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://jasperreports.sourceforge.net/jasperreports http://jasperreports.sourceforge.net/xsd/jasperreport.xsd" name="Revenue_Breakup_Report" pageWidth="842" pageHeight="595" orientation="Landscape" columnWidth="744" leftMargin="56" rightMargin="42" topMargin="42" bottomMargin="42" uuid="d532c1f1-3e7b-435c-8633-998b6d336727">
    <property name="com.jaspersoft.studio.data.defaultdataadapter" value="One Empty Record"/>
    <property name="com.jaspersoft.studio.data.sql.tables" value=""/>
    <property name="com.jaspersoft.studio.data.sql.SQLQueryDesigner.sash.w1" value="171"/>
    <property name="com.jaspersoft.studio.data.sql.SQLQueryDesigner.sash.w2" value="822"/>
    <property name="com.jaspersoft.studio.unit.pageHeight" value="pixel"/>
    <property name="com.jaspersoft.studio.unit.pageWidth" value="pixel"/>
    <property name="com.jaspersoft.studio.unit.columnWidth" value="pixel"/>
    <property name="com.jaspersoft.studio.unit.columnSpacing" value="pixel"/>
    <template><![CDATA["http://192.168.250.113:8099/reportserver3/reportserver/fileServerAccess?id=1496417"]]></template>
    <background>
        <band splitType="Stretch"/>
    </background>
    <title>
        <band height="46" splitType="Stretch">
            <staticText>
                <reportElement style="SocIT_ReportTitle" mode="Transparent" x="0" y="10" width="496" height="21" uuid="fad5deb0-680c-4a56-a6b6-f9792ef1527a"/>
                <text><![CDATA[Report Title]]></text>
            </staticText>
        </band>
    </title>
</jasperReport>


JRTX:

<?xml version="1.0" encoding="UTF-8"?>
<!-- Created with Jaspersoft Studio -->
<jasperTemplate xmlns="http://jasperreports.sourceforge.net/jasperreports/template" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://jasperreports.sourceforge.net/jasperreports/template http://jasperreports.sourceforge.net/xsd/jaspertemplate.xsd">
    <style name="SocIT_ReportTitle" mode="Opaque" forecolor="#008050" hTextAlign="Left" vTextAlign="Middle" fontName="Open Sans" fontSize="14" isBold="false"/>
</jasperTemplate>


The expected output - The text "Report Title" in font size 14, Open Sans and coloured green. This works in the Eclipse environment.
https://ibb.co/cNnNRy

But, when I deploy to ReportServer, I get an exception, with the same stack trace.
https://ibb.co/dfiqDd

With regards,
Sarosh

Offline

#8 2018-07-17 15:45:48

eduardo
Administrator
Registered: 2016-11-01
Website

Re: Jasper Style Template - XML Parse Error

Hi Sarosh,

thanks for the stripped file, it seems much better to test wink I will take a look.

Can you please answer this question:
is the folder where you have your template "web accessible"? Check the checkbox "share folder for web access".

Regards,
Eduardo

Offline

#9 2018-07-17 16:49:34

saroshmk
Member
From: Palampur, India
Registered: 2018-07-17

Re: Jasper Style Template - XML Parse Error

Hello Eduardo

Yes, the folders are shared for web access. I did check on that.

Thanks once again.

With regards,
Sarosh

Offline

#10 2018-07-19 11:30:41

Rodion
Member
Registered: 2017-05-17

Re: Jasper Style Template - XML Parse Error

Hello saroshmk,

i tried this example and got no error. i figured out, that i had to mention the <queryString> section although i don't use it.
Please try this also :

<?xml version="1.0" encoding="UTF-8"?>
<!-- Created with Jaspersoft Studio version 6.4.0.final using JasperReports Library version 6.4.1  -->
<jasperReport xmlns="http://jasperreports.sourceforge.net/jasperreports" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://jasperreports.sourceforge.net/jasperreports http://jasperreports.sourceforge.net/xsd/jasperreport.xsd" name="Revenue_Breakup_Report" pageWidth="842" pageHeight="595" orientation="Landscape" columnWidth="744" leftMargin="56" rightMargin="42" topMargin="42" bottomMargin="42" uuid="d532c1f1-3e7b-435c-8633-998b6d336727">
	<property name="com.jaspersoft.studio.data.defaultdataadapter" value="One Empty Record"/>
	<property name="com.jaspersoft.studio.data.sql.tables" value=""/>
	<property name="com.jaspersoft.studio.data.sql.SQLQueryDesigner.sash.w1" value="171"/>
	<property name="com.jaspersoft.studio.data.sql.SQLQueryDesigner.sash.w2" value="822"/>
	<property name="com.jaspersoft.studio.unit.pageHeight" value="pixel"/>
	<property name="com.jaspersoft.studio.unit.pageWidth" value="pixel"/>
	<property name="com.jaspersoft.studio.unit.columnWidth" value="pixel"/>
	<property name="com.jaspersoft.studio.unit.columnSpacing" value="pixel"/>
	<template><![CDATA["http://192.168.250.113:8099/reportserver3/reportserver/fileServerAccess?id=1496417"]]></template>
	<queryString>
		<![CDATA[select 1]]>
	</queryString>
	<background>
		<band splitType="Stretch"/>
	</background>
	<title>
		<band height="46" splitType="Stretch">
			<staticText>
				<reportElement style="SocIT_ReportTitle" mode="Transparent" x="0" y="10" width="496" height="21" uuid="fad5deb0-680c-4a56-a6b6-f9792ef1527a"/>
				<text><![CDATA[Report Title]]></text>
			</staticText>
		</band>
	</title>
</jasperReport>

Best regards,
Rodion

Last edited by Rodion (2018-07-19 11:37:31)

Offline

#11 2018-07-19 12:54:41

saroshmk
Member
From: Palampur, India
Registered: 2018-07-17

Re: Jasper Style Template - XML Parse Error

Hello Rodion

Thanks for confirming that it works. I'll need to check my environment. The error I'm getting points to the style template XML not getting validated by the parser.

I'll get back either ways!

With regards,
Sarosh

Offline

#12 2018-07-19 13:31:33

eduardo
Administrator
Registered: 2016-11-01
Website

Re: Jasper Style Template - XML Parse Error

Hi Sarosh,

we tested and it works, we only added this:

<queryString>
	<![CDATA[select 1]]>
</queryString>

The rest, including the template, is exactly as you posted it here: https://forum.reportserver.net/viewtopi … 4728#p4728

Please try this exact configuration.

Regards,
Eduardo

Offline

#13 2018-07-19 14:00:55

eduardo
Administrator
Registered: 2016-11-01
Website

Re: Jasper Style Template - XML Parse Error

I also noticed:
<!-- Created with Jaspersoft Studio version 6.6.0.final using JasperReports Library version 6.6.0  -->

Note that the actual ReportServer uses Jasper 6.4.0 (which RS Version are you using? rsversion.properties)

Try to create the report with 6.4.0

Regards,
Eduardo

Offline

#14 2018-07-19 14:06:11

saroshmk
Member
From: Palampur, India
Registered: 2018-07-17

Re: Jasper Style Template - XML Parse Error

Hello Eduardo

That's what it must be! I'll downgrade and retry.

Thanks once again.

Sarosh

Offline

#15 2018-07-19 14:08:25

eduardo
Administrator
Registered: 2016-11-01
Website

Re: Jasper Style Template - XML Parse Error

Hi Sarosh,

note that you still need the <queryString>. Without it you will get a blank page. I raised ticket RS-2976 for investigating.

Regards,
Eduardo

Offline

#16 2018-07-21 10:21:05

eduardo
Administrator
Registered: 2016-11-01
Website

Re: Jasper Style Template - XML Parse Error

Correction: the current ReportServer user Jasper 6.4.1 (not 6.4.0).

Regards,
Eduardo

Offline

Board footer

Powered by FluxBB