[]
        
(Showing Draft Content)

PrintOptions

Interface: PrintOptions

The following options can be set at run time while working with the JS Viewer.

Extended by

Properties

error()

error: (error) => void;

The callback that is invoked when an error occurs in the process of displaying the report.

Parameters

error

ErrorInfo

Returns

void

Examples

// ESM usage
import { printReport } from './jsViewer.min.js';
printReport({
error: (error) => {
	if (error.message) {
		// show error message.
		alert("Internal error! Please ask administrator.");
	}
}
}):
// UMD usage
GrapeCity.ActiveReports.JSViewer.print({
error: (error) => {
	if (error.message) {
		// show error message.
		alert("Internal error! Please ask administrator.");
	}
}
}):

reportID

reportID: string;

The id of the report to be shown by the JS Viewer.

Examples

// ESM usage
import { printReport } from './jsViewer.min.js';
printReport({
reportID: 'AnnualReport.rdlx'
}):
// UMD usage
GrapeCity.ActiveReports.JSViewer.print({
reportID: 'AnnualReport.rdlx'
}):

reportParameters?

optional reportParameters: Parameter[];

The array of the {name, value} pairs that describe the parameters values used to run the report.

Examples

// ESM usage
import { printReport } from './jsViewer.min.js';
printReport({
reportParameters: [{ name: 'ReportParameter1', values: ['1']}]
}):
// UMD usage
GrapeCity.ActiveReports.JSViewer.print({
reportParameters: [{ name: 'ReportParameter1', values: ['1']}]
}):

reportService?

optional reportService: ReportServiceSettings;

Set up the settings to connect the Web API.

Examples

// ESM usage
import { printReport } from './jsViewer.min.js';
printReport({
reportService: {
	url: 'http://example.com/api/reporting',
	securityToken: '42A9CD80A4F3445A9BB60A221D042FCC',
}
}):
// UMD usage
GrapeCity.ActiveReports.JSViewer.print({
reportService: {
	url: 'http://example.com/api/reporting',
	securityToken: '42A9CD80A4F3445A9BB60A221D042FCC',
}
}):