[]
        
(Showing Draft Content)

DocumentsAPI

Type Alias: DocumentsAPI

type DocumentsAPI = object;

Properties

create

create: (options?) => Promise<CreateDocumentInfo>;

Creates a new report to be edited in Designer using the specified CreateReportOptions object.

Parameters

options?

CreateDocumentOptions

Returns

Promise<CreateDocumentInfo>

Examples

// 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.

Returns

boolean

Examples

// 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

info: () => CurrentDocumentInfo;

Returns information about the currently edited report.

Returns

CurrentDocumentInfo

Examples

// 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

isNew: () => boolean;

Indicates whether report was saved before at least once

Returns

boolean

Examples

// 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

open: () => void;

Shows open report dialog

Returns

void

Examples

// 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

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.

Parameters

id

string

type

SupportedDocumentType

name?

string

content?

any

Returns

Promise<OpenDocumentInfo>

Examples

// 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

save: () => void;

Saves the report currently edited in Designer, if report is new, then "Save As" dialog will be opened.

Returns

void

Examples

// 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

saveAs: () => void;

Opens "Save As" dialog

Returns

void

Examples

// 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

saveById: (id?, name?) => Promise<SaveDocumentInfo>;

Saves the report currently edited in Designer using the specified id.

Parameters

id?

string

name?

string

Returns

Promise<SaveDocumentInfo>

Examples

// 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

saveByName: (name) => Promise<SaveDocumentInfo>;

Saves the report currently edited in Designer using the specified name.

Parameters

name

string

Returns

Promise<SaveDocumentInfo>

Examples

// 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')