Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
75 lines (66 sloc) 2.5 KB
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>Designer events</title>
<!-- Report designer Office2013 White Blue style -->
<link href="../css/stimulsoft.designer.office2013.whiteblue.css" rel="stylesheet">
<link href="../css/stimulsoft.viewer.office2013.whiteblue.css" rel="stylesheet">
<!-- Stimusloft Reports.JS -->
<script src="../scripts/stimulsoft.reports.js" type="text/javascript"></script>
<script src="../scripts/stimulsoft.viewer.js" type="text/javascript"></script>
<script src="../scripts/stimulsoft.designer.js" type="text/javascript"></script>
<!-- Report designer scripts, may be external -->
<script type="text/javascript">
// Set full screen mode for the designer
var options = new Stimulsoft.Designer.StiDesignerOptions();
options.appearance.fullScreenMode = true;
// Create the report designer with specified options
var designer = new Stimulsoft.Designer.StiDesigner(options, "StiDesigner", false);
Stimulsoft.Report.Dictionary.StiCustomDatabase.registerCustomDatabase({
serviceName: "MyDatabase",
sampleConnectionString: "123",
process: function (command, callback) {
if (command.command == "TestConnection") callback({ success: false, notice: "Error" });
if (command.command == "RetrieveSchema") callback({ success: true, data: demoData });
if (command.command == "RetrieveData") callback({ success: true, data: demoData[command.queryString]});
}
});
// Create a new report instance
var report = new Stimulsoft.Report.StiReport();
// Load report from url
report.loadFile("../reports/CustomAdapter.mrt");
// Edit report template in the designer
designer.report = report;
// Show the report designer in the 'content' element
designer.renderHtml("content");
var demoData = {
Table1: [{
Column1: "value1",
Column2: 1
}, {
Column1: "value2",
Column2: 2
}, {
Column1: "value3",
Column2: 3
}
],
Table2: [{
Column1: "value1",
Column2: 1
}, {
Column1: "value2",
Column2: 2
}, {
Column1: "value3",
Column2: 3
}
]
};
</script>
</head>
<body>
<div id="content"></div>
</body>
</html>
You can’t perform that action at this time.