-
Notifications
You must be signed in to change notification settings - Fork 157
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
adc3274
commit 7be14b5
Showing
24 changed files
with
62,363 additions
and
1 deletion.
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
# Stimulsoft Reports.JS + React | ||
|
||
This simple demo illustrates integration of Stimulsoft Reports.JS into an React project. | ||
|
||
## Build & development | ||
|
||
* run ``` npm install ``` to install nmp modules | ||
|
||
* then run ``` npm start ``` for a dev server. Navigate to ``` http://localhost:8080/ ```. | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
|
||
<head> | ||
<meta charset="utf-8" /> | ||
<title>Hello React</title> | ||
<link rel="stylesheet" href="stimulsoft/stimulsoft.designer.office2013.whiteblue.css"> | ||
<link rel="stylesheet" href="stimulsoft/stimulsoft.viewer.office2013.whiteblue.css"> | ||
</head> | ||
|
||
<body> | ||
<div id="main"></div> | ||
|
||
<script crossorigin src="https://unpkg.com/react@16/umd/react.production.min.js"></script> | ||
<script crossorigin src="https://unpkg.com/react-dom@16/umd/react-dom.production.min.js"></script> | ||
<script src="https://cdnjs.cloudflare.com/ajax/libs/babel-standalone/6.25.0/babel.min.js"></script> | ||
<script src="stimulsoft/stimulsoft.reports.js"></script> | ||
<script src="stimulsoft/stimulsoft.viewer.js"></script> | ||
<script src="stimulsoft/stimulsoft.designer.js"></script> | ||
<script type="text/babel"> | ||
class Designer extends React.Component { | ||
render() { | ||
return <div id="designer"></div>; | ||
} | ||
|
||
componentDidMount(){ | ||
console.log('Loading Designer view'); | ||
|
||
console.log('Set full screen mode for the designer'); | ||
var options = new window.Stimulsoft.Designer.StiDesignerOptions(); | ||
options.appearance.fullScreenMode = false; | ||
|
||
console.log('Create the report designer with specified options'); | ||
var designer = new window.Stimulsoft.Designer.StiDesigner(options, 'StiDesigner', false); | ||
|
||
console.log('Create a new report instance'); | ||
var report = new window.Stimulsoft.Report.StiReport(); | ||
|
||
console.log('Load report from url'); | ||
report.loadFile('reports/SimpleList.mrt'); | ||
|
||
console.log('Edit report template in the designer'); | ||
designer.report = report; | ||
|
||
designer.renderHtml("designer"); | ||
} | ||
} | ||
ReactDOM.render( | ||
<Designer />, | ||
document.getElementById("main") | ||
) | ||
</script> | ||
</body> | ||
|
||
</html> |
Oops, something went wrong.