Area and Lengths Task Create Dataset for Report Error
I am using the "(https://support.geocortex.com/create-a-dataset) Create a DataSet out of the results of the AreasAndLengths Task " workflow and can successfully create the dataset. I want to take the next step as mentioned in the description and add it to a TemplateReport but I Here is what I have done:
After the WriteXml Method I add a TemplateReport, then CreateTempFile and then DisplayHyperlink. The problem comes when the workflow finishes with the CreateTempFile and I get an error that says:
Type 'System.Data.DataRow' cannot be serialized. Consider marking it with the DataContractAttribute attribute and marking all of its members you want serialized with the DataMemberAttribute attribute. If the type is a collection, consider marking it with the CollectionDataContractAttribute....
Any suggestions as to how I should do this or how to avoid getting this error?
Aron
-
Aron,
Did you ever solve this issue with the "DataContractAttribute" attribute?
I now am trying to solve this problem.
Walter
0 -
Hi Aron
Are you trying to loop through the fields and report values?
I have had that sort of message before when tring to use a client based Activity such as an Alert Activity while a DataTable is in scope. Essentially you are unable to convert the datatable to a form that is able to be transmitted from the server to the client. Remember that this is what happens every time you step from a servecr based AActivity to a client based Activity or vice versa.
You can put the DataTable into a (sub)Sequence) where the scope of it is only the (sub)Sequence and convert the DataTable to a Featureset within the Sequence where the scope of the dataset is the 'outer' sequence. (If I recall correctly a Featureset is much more able to be serialized.)
Does that make sense?
Regards
Ralph
0
Bitte melden Sie sich an, um einen Kommentar zu hinterlassen.
Kommentare
2 Kommentare