06-15-2015 12:13 PM
I am getting this error when I use the API to generate a table in a doc comp:
"Unable to cast object of type 'System.String' to type 'Hyland.Office.Services.DocumentComposition.Composer.TableData'."
The XML is a string that I pass into the API that looks like this:
<?xml version="1.0"?>
<Installs>
<Install>
<Bill>XXX</Bill>
<Date>ddmmyy</Date>
<Amount>000</Amount>
</Install>
<Install>
<Bill>XXX</Bill>
<Date>ddmmyy</Date>
<Amount>000</Amount>
</Install>
<Install>
<Bill>XXX</Bill>
<Date>ddmmyy</Date>
<Amount>000</Amount>
</Install>
<Installs>
Something like that (Sorry if there is a typo)
I tried different ways of building the XML but they all produce the same error
The columns in the Placeholder look like this:
Bill,Date,Amount
Any help would be appreciated
06-17-2015 06:53 AM
Well, I figured it out. Thanks for your help with this.
Here is my original post:
This is the actual Placeholder:
Enter PlaceHolder: data/rowdata
And there is the error.
The PlaceHolder should look like this:
Enter PlaceHolder: /data/rowdata
Do you see the difference?
Thanks again for taking a look. Took me half a day to realize I needed to start with a foward slash.
Jed Kaplowitz
06-16-2015 09:51 AM
Ok, let's see if it is something else on the template.
Is this a brand new template or on the existing template? If its on the existing template, did you delete the original placeholder that was giving you problems? If you did not delete the original placeholder, it would continue to give you the same error.
06-16-2015 10:51 AM
I have started from scratch... Everything is brand new.
So looking at that last XML I sent... the one that starts with <data><rowdata><column1>data1</column1...
I changed the placeholder to be just: data (was data/rowdata)
that got rid of the exception inside ComposeDocument and the "Document" property has data. This actually creates a new document but now the composed document shows a blank table placeholder. I created a non table placeholder with the same XPath: "data" and that shows: "data1data2data3".
I feel like I'm getting closer.
06-17-2015 06:53 AM
Well, I figured it out. Thanks for your help with this.
Here is my original post:
This is the actual Placeholder:
Enter PlaceHolder: data/rowdata
And there is the error.
The PlaceHolder should look like this:
Enter PlaceHolder: /data/rowdata
Do you see the difference?
Thanks again for taking a look. Took me half a day to realize I needed to start with a foward slash.
Jed Kaplowitz
12-25-2015 08:37 PM
Hello,
Where can I get more information regarding how to create an XML Path besides contacting my first line of support? Is it in any MRG's?
What I am trying to do is extract the keyword information from a MIKG in a document type and create a custom report with it using Doc Comp. I can create a XML file manually but where do I store it?
Thanks!
Kevin Ngo
Find what you came for
We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.