This is a migrated thread and some comments may be shown as answers.

Export Report Object to Database

5 Answers 157 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Ahmad
Top achievements
Rank 1
Ahmad asked on 28 Aug 2014, 08:31 AM
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.

5 Answers, 1 is accepted

Sort by
0
Peter
Telerik team
answered on 01 Sep 2014, 02:07 PM
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
 

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.
0
Accepted
Peter
Telerik team
answered on 02 Sep 2014, 02:24 PM
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
 

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.
0
Accepted
Stef
Telerik team
answered on 05 Sep 2014, 03:33 PM
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
 

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.

 
Tags
General Discussions
Asked by
Ahmad
Top achievements
Rank 1
Answers by
Peter
Telerik team
Ahmad
Top achievements
Rank 1
Stef
Telerik team
Share this question
or