Hello everyone,
I want to export report object to database.
The idea is to convert the object to byte array and then write to database.
But the problem is that the Telerik.Reporting.Report object cannot be converted to byte array because [Serializeable] attribute is not defined in the class.
My question is that, is there any solution to this. Can anyone give other solutions to export object to database or any workaround?
Thank you.
I want to export report object to database.
The idea is to convert the object to byte array and then write to database.
But the problem is that the Telerik.Reporting.Report object cannot be converted to byte array because [Serializeable] attribute is not defined in the class.
My question is that, is there any solution to this. Can anyone give other solutions to export object to database or any workaround?
Thank you.
5 Answers, 1 is accepted
0
Hi Ahmad,
Our recommendation is to serialize the report definition in XML as elaborated in the Serializing Report Definition in XML help article.
Regards,
Peter
Telerik
Our recommendation is to serialize the report definition in XML as elaborated in the Serializing Report Definition in XML help article.
Regards,
Peter
Telerik
Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.
0
Ahmad
Top achievements
Rank 1
answered on 02 Sep 2014, 02:40 AM
I have tried the method but I am facing another problem related to invalid name. The message is "Invalid name character in 'List`1'. The '`' character, hexadecimal value 0x60, cannot be included in a name." I have submitted a support ticket regarding to this problem. Until today, still no response.
Thank you.
Thank you.
0
Accepted
Hello Ahmad,
We have answered the thread in question. Here is the answer:
The reason for the error is you are trying to serialize the data with the rest of the report. The Reporting serializer can serialize only the report definition, excluding any events and custom data objects.
To serialize the report with the data, you need to use a data source component e.g., ObjectDataSource component which points to a type and data retrieval method (How to: Bind to a BusinessObject)
Regards,
Peter
Telerik
We have answered the thread in question. Here is the answer:
The reason for the error is you are trying to serialize the data with the rest of the report. The Reporting serializer can serialize only the report definition, excluding any events and custom data objects.
To serialize the report with the data, you need to use a data source component e.g., ObjectDataSource component which points to a type and data retrieval method (How to: Bind to a BusinessObject)
Regards,
Peter
Telerik
Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.
0
Ahmad
Top achievements
Rank 1
answered on 03 Sep 2014, 01:27 AM
Thank you for the reply,
It does not solve my problem because I need to save the current data information to database. What is your recommendation?
Thank you.
It does not solve my problem because I need to save the current data information to database. What is your recommendation?
Thank you.
0
Accepted
Hi Ahmad,
Below you can find my reply to your support ticket on the same question:
"You can use the report serializer and turn the report in XML, then separately save the data serialized as XML.
When you need the report and the data, just pull the XML contents, deserialize the report and the data and bind them at the client."
Regards,
Stef
Telerik
Below you can find my reply to your support ticket on the same question:
"You can use the report serializer and turn the report in XML, then separately save the data serialized as XML.
When you need the report and the data, just pull the XML contents, deserialize the report and the data and bind them at the client."
Regards,
Stef
Telerik
Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.