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-15-2015 12:14 PM
Oops..
That first line is an IE thing and not in the actual XML. (xml version) line.
06-15-2015 12:40 PM
Good Afternoon Jed,
I was able to compose with the following changes to the XML provided.
<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>
I placed a "/" in front of the final Installs. Hopefully this helps out.
Derrick Maldonado
06-15-2015 12:46 PM
OK, sorry.. I typed that in really fast. That was a typo.
This is not the real XML, this is just a mock-up of the XML. The real XML has too much data I can't put up on a public forum.
Assume all the syntax is correct.
Thanks for your quick reply though.
If you were able to compose, can you tell me what your Placeholder looked like?
What was your XPath? What did your columns look like?
Thanks,
Jed K
06-15-2015 12:50 PM
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.