'Inserting Fields' Editing the XML To Include Word Fields

Our client found the article https://docs.aspose.com/words/jasperreports/inserting-fields/#jasperserver in the documentation that should allow us to enclose Word-specific fields in curly brackets (the example in the documentation is actually the functionality we wish to get out of this endeavor). The question we’re having is that the documentation doesn’t tell us what to edit and where, it just tells us to edit the XML. Is this a local property that gets added to the .jrxml file or is this a configuration setting that has to be changed somewhere in our JasperReports Server instance?

Apologies if this has been answered, but the documentation was not explicit and editing the file at /opt/jasperreports-server-8.2.0/apache-tomcat/webapps/jasperserver-pro/WEB-INF/flows/viewReportBeans.xml only caused reports to become unviewable.

If this is local and a per-report sort of deal, is this something I can do in Jaspersoft Studio?

Thank you

@sgannonccm

Could you please clarify what specific XML elements you are trying to edit and what outcome you expect from these changes?

That’s the issue, I’m not entirely sure what I’m meant to edit. What I had originally tried was adding

<bean id="aw_exportParameters" class="com.aspose.words.jasperreports.AWExportParametersBean">
    <property name="recognizeFields" value="true"/>
</bean>

to the file I mentioned above after the rest of the Aspose Export options that you add in the install, but that just caused errors.

But the documentation just tells me what to add and not where to add it. At least from what I’m reading from the documentation, I’m expecting to add this XML somewhere, wherever that may be, and be able to get Word to recognize field names like in the example listed. I’ll paste it again here for reference:

Page { `PAGE` } of { `NUMPAGES` }

@sgannonccm Could you please attach your .jrprint file that will allow us to reproduce the problem here for testing? We will check the issue and provide you more information.

Hi @sgannonccm

JasperServer-8.2.0 and JasperReports 7.0 changed API and stop support JRExporterParameter.
Aspose.Words for Jasper Reports use AWExportParameters for changing default options.

You can use JasperServer-8.2.0 with default AWExportParameters
You can use JasperServer-8.0.0 and custom AWExportParameters
Also you can wait WORDSJR-385 in this issue I will update Aspose.Words for Jasper Reports for support JasperServer-8.2.0 and JasperReports 7.0

@anatoly.sidorenko So I can use JasperServer-8.2.0 with these newer AWExportParameters? If so, where do I change these parameters, is it a per-report thing or are these global export parameters? If you know what file I’d have to change to modify these export parameters that would be greatly appreciated, that’s the main problem I’m facing at the moment.

@alexey.noskov The problem is not with the actual printing or production of the report, my issue is that the page that I linked above doesn’t tell me what file I have to change/add the provided XML in to get these settings working on my end.

@sgannonccm

You can see location of files to change in Installation Instruction
https://docs.aspose.com/words/jasperreports/installation/

For changing AWExportParameters you should update \apache-tomcat\webapps\jasperserver\WEB-INF\applicationContext.xml file.

@anatoly.sidorenko Thank you for this. I was not the user who originally installed so I was unaware of that step, so I greatly appreciate it. However, I think it might be useful to reiterate on the page I had linked in case someone else ends up in that scenario?

I have run into another issue though. Exporting using the option DOC - Word Document using Aspose.Word with the provided example did not yield the results I was expecting, as there are no page numbers present on the document, but I assume it’s attempting to work because the bracketed text disappeared. Am I missing some step here as well?

@sgannonccm
We have opened the following new ticket(s) in our internal issue tracking system and will deliver their fixes according to the terms mentioned in Free Support Policies.

Issue ID(s): WORDSJR-388

You can obtain Paid Support Services if you need support on a priority basis, along with the direct access to our Paid Support management team.

The issues you have found earlier (filed as WORDSJR-385) have been fixed in this Aspose.Words for JasperReports 22.5 update.