[]
type DocumentsAPI = object;
create: (options?) => Promise<CreateDocumentInfo>;
Creates a new report to be edited in Designer using the specified CreateReportOptions object.
Promise<CreateDocumentInfo>
// ESM usage
import { arWebDesigner } from './web-designer.js';
const designer = arWebDesigner.apiOf('ar-web-designer');
var reportInfo = designer.documents.create().then(function() {
console.log('An empty RDL report is created.');
});
// UMD usage
const designer = GrapeCity.ActiveReports.Designer.apiOf('ar-web-designer');
var reportInfo = designer.documents.create().then(function() {
console.log('An empty RDL report is created.');
});
const designer = GrapeCity.ActiveReports.Designer.apiOf('ar-web-designer');
var reportInfo = designer.documents.create().then(() => {
console.log('An empty RDL report is created.');
});
**
@param options CreateReportOptions object
***
### hasUnsavedChanges()
```ts
hasUnsavedChanges: () => boolean;
Indicates whether report has unsaved changes.
boolean
// ESM usage
import { arWebDesigner } from './web-designer.js';
const designer = arWebDesigner.apiOf('ar-web-designer');
const val = designer.documents.hasUnsavedChanges();
if (val) console.log('Currently edited report has unsaved changes.');
// UMD usage
const designer = GrapeCity.ActiveReports.Designer.apiOf('ar-web-designer');
const val = designer.documents.hasUnsavedChanges();
if (val) console.log('Currently edited report has unsaved changes.');
const designer = GrapeCity.ActiveReports.Designer.apiOf('ar-web-designer');
const val = designer.documents.hasUnsavedChanges();
if (val) console.log('Currently edited report has unsaved changes.');
info: () => CurrentDocumentInfo;
Returns information about the currently edited report.
// ESM usage
import { arWebDesigner } from './web-designer.js';
const designer = arWebDesigner.apiOf('ar-web-designer');
var reportInfo = designer.documents.info();
console.log(`Report "${reportInfo.name}" is currently edited.`);
// UMD usage
const designer = GrapeCity.ActiveReports.Designer.apiOf('ar-web-designer');
var reportInfo = designer.documents.info();
console.log(`Report "${reportInfo.name}" is currently edited.`);
const designer = GrapeCity.ActiveReports.Designer.apiOf('ar-web-designer');
var reportInfo = designer.documents.info();
console.log(`Report "${reportInfo.name}" is currently edited.`);
isNew: () => boolean;
Indicates whether report was saved before at least once
boolean
// ESM usage
import { arWebDesigner } from './web-designer.js';
const designer = arWebDesigner.apiOf('ar-web-designer');
const val = designer.documents.isNew();
if (val) console.log('New document');
// UMD usage
const designer = GrapeCity.ActiveReports.Designer.apiOf('ar-web-designer');
const val = designer.documents.isNew();
if (val) console.log('New document');
const designer = GrapeCity.ActiveReports.Designer.apiOf('ar-web-designer');
const val = designer.documents.isNew();
if (val) console.log('New document');
open: () => void;
Shows open report dialog
void
// ESM usage
import { arWebDesigner } from './web-designer.js';
var api = arWebDesigner.apiOf('designer-id');
api.documents.open();
// UMD usage
var api = GrapeCity.ActiveReports.Designer.apiOf('designer-id');
api.documents.open();
var api = GrapeCity.ActiveReports.Designer.apiOf('designer-id');
api.documents.open();
openById: (id, type, name?, content?) => Promise<OpenDocumentInfo>;
Opens an existing report to be edited in Designer with specified id. Optionally you can pass name and content, else it will be loaded from server.
string
string
any
Promise<OpenDocumentInfo>
// ESM usage
import { arWebDesigner } from './web-designer.js';
var api = arWebDesigner.apiOf('designer-id');
api.documents.openById('MyReport.rdlx', { platform: 'rdlx', type: 'report', subType: 'msl'}).then(() => {
console.log('An existing report "MyReport.rdlx" is opened.');
});
var reportContent = { Width: '6.5in', ReportSections: [{ Type: 'Continuous' as any, Name: 'ContinuousSection1', Body: { ReportItems: [ {Type: 'textbox', Name: 'TextBox1', Width: '5in', Height: '1in' } ] }}]};
api.documents.openById('NewReport.rdlx', { platform: 'rdlx', type: 'report', subType: 'msl'}, 'NewReport', reportContent).then(() => {
console.log('New report with one textbox created and opened.');
});
// UMD usage
var api = GrapeCity.ActiveReports.Designer.apiOf('designer-id');
api.documents.openById('MyReport.rdlx', { platform: 'rdlx', type: 'report', subType: 'msl'}).then(() => {
console.log('An existing report "MyReport.rdlx" is opened.');
});
var reportContent = { Width: '6.5in', ReportSections: [{ Type: 'Continuous' as any, Name: 'ContinuousSection1', Body: { ReportItems: [ {Type: 'textbox', Name: 'TextBox1', Width: '5in', Height: '1in' } ] }}]};
api.documents.openById('NewReport.rdlx', { platform: 'rdlx', type: 'report', subType: 'msl'}, 'NewReport', reportContent).then(() => {
console.log('New report with one textbox created and opened.');
});
const api = GrapeCity.ActiveReports.Designer.apiOf('designer-id');
api.documents.openById('MyReport.rdlx', { platform: 'rdlx', type: 'report', subType: 'msl'}).then(() => {
console.log('An existing report "MyReport.rdlx" is opened.');
});
const reportContent = { Width: '6.5in', ReportSections: [{ Type: 'Continuous' as any, Name: 'ContinuousSection1', Body: { ReportItems: [ {Type: 'textbox', Name: 'TextBox1', Width: '5in', Height: '1in' } ] }}]};
api.documents.openById('NewReport.rdlx', { platform: 'rdlx', type: 'report', subType: 'msl'}, 'NewReport', reportContent).then(() => {
console.log('New report with one textbox created and opened.');
});
save: () => void;
Saves the report currently edited in Designer, if report is new, then "Save As" dialog will be opened.
void
// ESM usage
import { arWebDesigner } from './web-designer.js';
var api = arWebDesigner.apiOf('designer-id');
api.documents.save();
// UMD usage
var api = GrapeCity.ActiveReports.Designer.apiOf('designer-id');
api.documents.save();
var api = GrapeCity.ActiveReports.Designer.apiOf('designer-id');
api.documents.save();
saveAs: () => void;
Opens "Save As" dialog
void
// ESM usage
import { arWebDesigner } from './web-designer.js';
var api = arWebDesigner.apiOf('designer-id');
api.documents.save();
// UMD usage
var api = GrapeCity.ActiveReports.Designer.apiOf('designer-id');
api.documents.save();
var api = GrapeCity.ActiveReports.Designer.apiOf('designer-id');
api.documents.saveAs();
saveById: (id?, name?) => Promise<SaveDocumentInfo>;
Saves the report currently edited in Designer using the specified id.
string
string
Promise<SaveDocumentInfo>
// ESM usage
import { arWebDesigner } from './web-designer.js';
var api = arWebDesigner.apiOf('designer-id');
api.documents.saveById('MyReport.rdlx');
// UMD usage
var api = GrapeCity.ActiveReports.Designer.apiOf('designer-id');
api.documents.saveById('MyReport.rdlx');
var api = GrapeCity.ActiveReports.Designer.apiOf('designer-id');
api.documents.saveById('MyReport.rdlx');
saveByName: (name) => Promise<SaveDocumentInfo>;
Saves the report currently edited in Designer using the specified name.
string
Promise<SaveDocumentInfo>
// ESM usage
import { arWebDesigner } from './web-designer.js';
var api = arWebDesigner.apiOf('designer-id');
api.documents.saveByName('MyReport.rdlx')
// UMD usage
var api = GrapeCity.ActiveReports.Designer.apiOf('designer-id');
api.documents.saveByName('MyReport.rdlx')
var api = GrapeCity.ActiveReports.Designer.apiOf('designer-id');
api.documents.saveByName('MyReport.rdlx')