Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save rms1000watt/5f6cdb864d7571e8cc79664c43c8aa86 to your computer and use it in GitHub Desktop.
Save rms1000watt/5f6cdb864d7571e8cc79664c43c8aa86 to your computer and use it in GitHub Desktop.
The missing HTML code for NodeJS backend connecting to SQL DB with Stimulsoft
<!-- The missing piece for: https://github.com/stimulsoft/Samples-JS/tree/master/Node.js/04.%20Start%20SQL%20Adapters%20from%20Http%20Server -->
<html>
<head>
<link href="stimulsoft.viewer.office2013.css" rel="stylesheet">
</head>
<body>
<h4>Hello World</h4>
<script src="stimulsoft.reports.js" type="text/javascript"></script>
<script src="stimulsoft.viewer.js" type="text/javascript"></script>
<script type="text/javascript">
StiOptions.WebServer.url = "http://127.0.0.1:9615";
var viewer = new Stimulsoft.Viewer.StiViewer();
viewer.onBeginProcessData = function (event) {
event.connectionString = "server=<IP>; uid=<USER>; password=<PASSWORD>; database=<DATABASE>;";
}
// Connection string in report.mrt should match above
var report = new Stimulsoft.Report.StiReport();
report.loadFile("report.mrt");
viewer.report = report; // this line run render report
</script>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment