I am trying to save a Syncfusion Report designer XML to a DB column (AJAX call). How can I get the XML from the Designer?
I have added a function OnClientReportSaved
and tried getting data by using:
var designer = $('#designer').data('ejReportDesigner');
However I do not understand how I can extract XML from this.
<head>
<script type="text/javascript">
function save(args) {
alert("update db XML column where reportID");
var designer = $('#designer').data('ejReportDesigner');
alert(designer);
}
</script>
</head>
<body>
<form id="form1" runat="server">
<div style="height: 650px; width: 950px;">
<ej:ReportDesigner runat="server" ID="designer" OnClientCreate="controlInitialized" OnClientReportSaved="save" ServiceUrl="/api/ReportDesigner"></ej:ReportDesigner>
</div>
</form>
</body>
The default save will download the report to the client and OnClientReportSaved event has been provided to notify that the save has been invoked to save the report with client. If you want to save the report to the data base then we can able to achieve it by using the option of save to server since we have implemented server side functionalities to save the report using that option into the database for reference.
You can find the example sample that integrates the report designer with your requirement,
http://www.syncfusion.com/downloads/support/directtrac/general/ze/Syncfusion635363539.zip