如何从 Syncfusion 报告设计器中获取 XML 保存时
How can I get XML from Syncfusion Report designer On save
我正在尝试将 Syncfusion 报告设计器 XML 保存到数据库列(AJAX 调用)。我怎样才能从设计师那里得到 XML?
我添加了一个函数 OnClientReportSaved
并尝试使用以下方法获取数据:
var designer = $('#designer').data('ejReportDesigner');
但是我不明白如何从中提取 XML。
<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>
默认保存会将报告下载到客户端,并且已提供 OnClientReportSaved 事件以通知已调用保存以与客户端一起保存报告。如果您想将报告保存到数据库,那么我们可以通过使用保存到服务器的选项来实现它,因为我们已经实现了服务器端功能,可以使用该选项将报告保存到数据库中以供参考。
您可以找到将报表设计器与您的要求集成在一起的示例,
http://www.syncfusion.com/downloads/support/directtrac/general/ze/Syncfusion635363539.zip
我正在尝试将 Syncfusion 报告设计器 XML 保存到数据库列(AJAX 调用)。我怎样才能从设计师那里得到 XML?
我添加了一个函数 OnClientReportSaved
并尝试使用以下方法获取数据:
var designer = $('#designer').data('ejReportDesigner');
但是我不明白如何从中提取 XML。
<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>
默认保存会将报告下载到客户端,并且已提供 OnClientReportSaved 事件以通知已调用保存以与客户端一起保存报告。如果您想将报告保存到数据库,那么我们可以通过使用保存到服务器的选项来实现它,因为我们已经实现了服务器端功能,可以使用该选项将报告保存到数据库中以供参考。
您可以找到将报表设计器与您的要求集成在一起的示例,
http://www.syncfusion.com/downloads/support/directtrac/general/ze/Syncfusion635363539.zip