You are not logged in.
Pages: 1
I'm unable to find a sample of an XDoc template. Could someone point me in the right direction?
I assume when I create a template, it's simply a merge field with each field name from a dynamic list.
Any assistance is greatly appreciated!
Offline
I have literally tried every combination imaginable with an XDoc template to no avail. And just now, independently confirmed my XDoc template is valid using an implementation of XDoc external to report server. I'm running the last open source release of ReportServer or version 2.2.2.5639-1.
Does XDoc even function at all in the open source release? I noticed in the Datenwerke demo, that XDoc is not a template option. Thanks all.
Offline
Hi Tom,
sorry for the delay, it took me some time to figure this out myself. There is a mistake in our documentation: Do not include the square brackets into the definition of your mergefields. Please take a look at the screenshot below on how to set this up:
Cheers,
Thorsten
Thanks Thorsten and Karolina! Karolina was so kind to provide me with some examples via email.
The foreach iterator was the missing link for me. I'm having one other difficulty. Is there a limit to the length of the field name?
I'm using the following field name in my XDoc template:
$x.PHIL_TO_LIBRARY_2016
Offline
Hi Tom,
glad to hear you figured it out.
As for a length restriction: I don't think there is one. I tried it with "PHIL_TO_LIBRARY_2016" and it worked fine. Is there an error message or what is the result?
Cheers,
Thorsten
I think the problem may lie with NULL values. This field and another field may be null in some cases. However, no record in the resultant output contains any data.
Offline
I made a quick test and for me null values cause no problems - if the field has no value it just print the field expression.
It's definitely the NULL value. I have just confirmed. Perhaps I can do null checking within Velocity? Or I wonder if this is a problem in the implementation? I don't find any error messages in the tomcat logs.
Offline
In the interim, I will replace null values with a single space ' ' using the NVL function (an Oracle function) in my SQL code or NVL(x.fieldname,' ') Our database environment is Oracle 12g.
Offline
Maybe try this: https://velocity.apache.org/engine/rele … cenotation
Some other options are listed here: http://wiki.apache.org/velocity/CheckingForNull
Thank you, Thorsten. I found those as well during my Google searches. As always, the members of this forum are exceedingly kind and helpful. Thanks everyone!
Offline
Hi,
Note that we added a simple XDoc example to our reportserver-samples github:
https://github.com/infofabrik/reportserver-samples
Regards,
Eduardo
Offline
Pages: 1