npm init -y
npm install @grapecity/ar-designer-ja @grapecity/ar-viewer-ja
index.html |
コードのコピー
|
---|---|
<!DOCTYPE html> <html> <head> <title>Webデザイナサンプル</title> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1"> <meta http-equiv="x-ua-compatible" content="ie=edge"> <style> body,html{width:100%;height:100%;margin:0;padding:0}@@keyframes arwd-loader{from{color:#fff}to{color:#205f78}}.ar-web-designer{width:100%;height:100%} .ar-web-designer__loader{display:flex;width:100%;height:100%;background-color:#205f78;color:#fff;font-size:18px;animation-name:arwd-loader;animation-duration:.62s;animation-timing-function:ease-in-out;animation-iteration-count:infinite;animation-direction:alternate;justify-content:center;align-items:center} </style> <link rel="stylesheet" href="vendor/css/fonts-googleapis.css" type="text/css"> <link rel="stylesheet" href="jsViewer.min.css" /> <link rel="stylesheet" href="web-designer.css" /> </head> <body> <!-- Webビューワに必要な設定 --> <script src="jsViewer.min.js"></script> <!-- デザイナ関連のjsファイル --> <script src="web-designer.js"></script> <!-- デザイナルートdiv --> <div id="ar-web-designer" class="ar-web-designer"> <span class="ar-web-designer__loader"><b>AR Web Designer</b></span> </div> <script> /* Webビューワに必要な設定 */ var viewer = null; GrapeCity.ActiveReports.Designer.create('#ar-web-designer', { appBar: { openButton: { visible: true }, saveButton: { visible: true }, saveAsButton: { visible: true } }, editor: { showGrid: false }, data: { dataSets: { canModify: true }, dataSources: { canModify: true } }, preview: { openViewer: (options) => { if (viewer) { viewer.openReport(options.documentInfo.id); return; } viewer = GrapeCity.ActiveReports.JSViewer.create({ element: '#' + options.element, renderFormat: 'svg', reportService: { url: 'api/reporting', }, reportID: options.documentInfo.id, settings: { zoomType: 'FitPage' } }); } } }); </script> </body> </html> |
Startup.cs or Program.cs |
コードのコピー
|
---|---|
app.UseReporting(config => config.UseFileStore(ResourcesRootDirectory)); |