interface GrapeCity {
    ActiveReports: {
        JSViewer: {
            Themes?: {
                darkOled: undefined | UITheme<Record<string, string>>;
                default: undefined | UITheme<Record<string, string>>;
                defaultDark: undefined | UITheme<Record<string, string>>;
                highContrast: undefined | UITheme<Record<string, string>>;
                highContrastDark: undefined | UITheme<Record<string, string>>;
            };
            ToolbarButtonsKeys?: typeof ToolbarButtons;
            create?: ((params) => JSViewer);
            export: ((params, isCancelRequested?) => void);
            print: ((params, isCancelRequested?) => void);
            version: string;
        };
    };
}

Properties

Properties

ActiveReports: {
    JSViewer: {
        Themes?: {
            darkOled: undefined | UITheme<Record<string, string>>;
            default: undefined | UITheme<Record<string, string>>;
            defaultDark: undefined | UITheme<Record<string, string>>;
            highContrast: undefined | UITheme<Record<string, string>>;
            highContrastDark: undefined | UITheme<Record<string, string>>;
        };
        ToolbarButtonsKeys?: typeof ToolbarButtons;
        create?: ((params) => JSViewer);
        export: ((params, isCancelRequested?) => void);
        print: ((params, isCancelRequested?) => void);
        version: string;
    };
}

Type declaration

  • JSViewer: {
        Themes?: {
            darkOled: undefined | UITheme<Record<string, string>>;
            default: undefined | UITheme<Record<string, string>>;
            defaultDark: undefined | UITheme<Record<string, string>>;
            highContrast: undefined | UITheme<Record<string, string>>;
            highContrastDark: undefined | UITheme<Record<string, string>>;
        };
        ToolbarButtonsKeys?: typeof ToolbarButtons;
        create?: ((params) => JSViewer);
        export: ((params, isCancelRequested?) => void);
        print: ((params, isCancelRequested?) => void);
        version: string;
    }
    • Optional Themes?: {
          darkOled: undefined | UITheme<Record<string, string>>;
          default: undefined | UITheme<Record<string, string>>;
          defaultDark: undefined | UITheme<Record<string, string>>;
          highContrast: undefined | UITheme<Record<string, string>>;
          highContrastDark: undefined | UITheme<Record<string, string>>;
      }

      Pre-defined UI themes

      • darkOled: undefined | UITheme<Record<string, string>>
      • default: undefined | UITheme<Record<string, string>>
      • defaultDark: undefined | UITheme<Record<string, string>>
      • highContrast: undefined | UITheme<Record<string, string>>
      • highContrastDark: undefined | UITheme<Record<string, string>>
    • Optional ToolbarButtonsKeys?: typeof ToolbarButtons

      The keys of the standard toolbar buttons

    • Optional create?: ((params) => JSViewer)

      Create and initialize JS Viewer.

      Returns

      JS Viewer instance.

      Example: Usage example:

      var viewer = GrapeCity.ActiveReports.JSViewer.create({
      element: '#root',
      reportID: 'AnnualReport.rdlx',
      availableExports: ['Xml', 'Pdf'],
      // other properties
      });
    • export: ((params, isCancelRequested?) => void)

      Do export of the report without showing a viewer.

      Example: Usage example:

          reportID:'Invoice.rdlx',
       exportType: 'Pdf',
       saveAsDialog: true,
       settings : {
           EmbedFonts:'All',
              Title:'MyInvoice'
       }});
      
        • (params, isCancelRequested?): void
        • Parameters

          • params: ExportOptions

            The export options.

          • Optional isCancelRequested: (() => boolean)

            The function is periodically called with a check to cancel the export task.

              • (): boolean
              • Returns boolean

          Returns void

    • print: ((params, isCancelRequested?) => void)

      Print the report without showing a viewer.

      Example: Usage example:

          reportID: 'AnnualReport.rdlx'
       });
      
        • (params, isCancelRequested?): void
        • Parameters

          • params: PrintOptions

            The print options.

          • Optional isCancelRequested: (() => boolean)

            The function is periodically called with a check to cancel the export task.

              • (): boolean
              • Returns boolean

          Returns void

    • version: string

      A string representing the current version of the JS Viewer.

      Example: Usage example:

      console.log(GrapeCity.ActiveReports.JSViewer.version)