Created
July 18, 2016 18:21
-
-
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
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- 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