https://github.com/jsreport/jsreport-mssql-store
Extension allowing to store template in Microsoft SQL Server
https://github.com/jsreport/jsreport-mssql-store
Last synced: 8 months ago
JSON representation
Extension allowing to store template in Microsoft SQL Server
- Host: GitHub
- URL: https://github.com/jsreport/jsreport-mssql-store
- Owner: jsreport
- Created: 2016-01-13T19:30:31.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2021-08-20T16:37:32.000Z (almost 5 years ago)
- Last Synced: 2025-10-02T20:38:48.507Z (8 months ago)
- Language: JavaScript
- Size: 221 KB
- Stars: 4
- Watchers: 4
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
**⚠️ This repository has been moved to the monorepo [jsreport/jsreport](https://github.com/jsreport/jsreport)**
--
# jsreport-mssql-store
[](https://npmjs.com/package/jsreport-mssql-store)
[](https://travis-ci.org/jsreport/jsreport-mssql-store)
**[jsreport](https://github.com/jsreport/jsreport) template store extension allowing to persist data in [Microsoft SQL Server](https://www.microsoft.com/en/server-cloud/products/sql-server/)**
## Installation
> npm install jsreport-mssql-store
Then alter jsreport configuration
```js
{
"store": {
"provider": "mssql"
},
"extensions": {
"mssql-store": {
"user": "jsreport",
"password": "password",
"server": "janblaha-PC\\SQLEXPRESS",
"database": "jsreport",
"schema": "mycustomschema",
/* required for sql azure */
"options": {
"encrypt": true
}
}
}
}
```
Alternatively you can pass the connection string as uri
```js
"store": {
"provider": "mssql"
},
"extensions": {
"mssql-store": {
"uri": "Server=tcp:jsreport.database.windows.net,1433;Initial Catalog=jsreport;Persist Security Info=False;User ID=myuser;Password=password;MultipleActiveResultSets=False;Encrypt=True;"
}
}
```
**Make sure your TCP/IP protocol is enabled in the SQL Server Configuration Manager and the SQL Browser service is running.**
After jsreport initializes you should see tables like `jsreport.TemplateType` and others in `jsreport` database.
## Schema changes
If you do changes to the database schema by enabling additional extensions you need to drop the affected tables and let jsreport to reinitialize them.
## jsreport-core
You can apply this extension also manually to [jsreport-core](https://github.com/jsreport/jsreport-core)
```js
var jsreport = require('jsreport-core')()
jsreport.use(require('jsreport-mssql-store')({ server: '...'}))
```