Docs
ServoyCloudSupportSamplesOpen SourceCommunity
  • Home
  • GUIDES
    • Platform Overview
    • Get Servoy
    • Get Started
      • Chapter 0
      • Chapter 1
      • Chapter 2
      • Chapter 3
      • Chapter 4
      • Chapter 5
    • Get Help
      • SuLA Instructions
      • SuLA Terms
    • Develop
      • Application Design
        • Forms
          • Layout Management
            • Simple Layout
            • Fully Responsive
              • Bootstrap 12-Grid
              • Flexbox
              • Custom Div
              • Collapsible Container
              • Simple Collapsible
              • Center Container
              • Inline Group Container
            • Abstract Form
          • Form Containers
            • Form Container
            • Tab Panel
            • Split Pane
            • Collapse
            • Accordion Panel
            • Form Component
            • List Form Component
          • Form Inheritance
          • Form Components
        • UI Components
          • Buttons and Text
            • Badge
            • Button
            • Data Label
            • Dropdown
            • Image
            • Label
          • Grids
            • Data Grid
            • Power Grid
            • Table
          • Input Controls
            • Calendar
            • Calendar Inline
            • Checkbox
            • Choice Group
            • Combobox
            • Group Buttons
            • Html Area
            • Input Group
            • Rating
            • Slider
            • Switch
            • Spinner
            • TextArea
            • Textbox
            • TextBoxGroup
            • Type Ahead
            • select2tokenizer
          • Media
            • Carousel
            • Embedded YouTube
            • File upload
            • Image label
            • Lightbox Gallery
            • MultiFile Upload
            • PDF JS Viewer
            • PDF Viewer
          • Mobile
            • Native Data List
            • Native Select
          • Navigation
            • Breadcrumbs
            • Navbar
            • sidenav
          • Visualization
            • DBTreeview
            • Progress Bar
            • Treeview
            • ChartJS
              • Data Labels Plugin
              • Funnel Chart
              • OutLabels Plugin
              • TreeMap
          • Specialized Components
            • Smart Document Editor
            • Servoy PDF Viewer
            • Fullcalendar Component
              • Fullcalendar
              • Fullcalendar Events
              • Migrating calendar from Smart and Web client to NG client
            • Fullcalendar Component 2
            • Canvas
            • Google Charts
            • Google Maps
            • svySignature
            • svywebcam
        • Styling and Themes
          • Default Theme Properties
          • CSS / LESS
          • Component Variants
          • Font Icons
        • Data Modeling
          • Databases
            • Tables
              • Columns
              • Calculations
              • Aggregations
              • Methods
              • Events / Triggers
              • Table security
            • Views
            • Procedures
          • Relations
          • Value Lists
          • Menus
          • In-Memory Databases
          • View Datasource
        • Modular Design
      • Programming Guide
        • Scripting the UI
          • Scripting Forms
          • Interacting with Components
          • Navigation
          • Windows, Dialogs and Popups
          • Events Manager
        • Working with Data
          • Concepts
          • Loading
          • Sorting
          • Iterating
          • Searching
            • Find mode
            • Query Builder
            • SQL String
          • Filtering
          • Editing
          • Validation
        • Automation and Scheduling
          • Batch Processor
          • Headless API
          • Scheduler API
        • Creating REST APIs
        • Consuming Webservices
        • Working with Files
          • File Plugin Basics
          • Images
          • Excel
          • PDF
          • JSON
        • Browser Utilities
          • Notifications
            • Web Notifications (Toastr)
            • Web Notifications (Native)
            • Block UI
          • Session Management
          • Keyboard Utilities
          • NG Utils
        • Sending and Receiving Email
        • Servoy Jasper Reports
          • Input Type
          • Display Mode
          • Output format
          • Jaspe Reports Viewer
        • Extensions
          • Modules
            • svyPhonegap
              • First Use Guide
              • Barcode Scanner
              • Browser
              • Camera
              • File
              • Fingerprint
              • Location
              • Network Interface
              • Phonegap
              • Printer
              • Push Notifications
            • svyAPI
              • Getting Started
            • svyLookup
              • Custom Templates
              • API Documentation
              • svyLookup v1
                • API Documentation v1.0.0
                • Base Form svyLookupTable v1.0.0
                • Base Form AbstractLookup v1.0.0
            • svyNavigation
              • API Documentation
                • API svyNavigation
                • API svyNavigationHistory
                • API svyNavigationUX
            • svyPopupFilter
              • Simple Filter Pickers
              • Custom Templates
              • API Documentation
                • API svyToolbarFilter
                • API svyPopupFilter
              • API Documentation v1
                • API svyToolbarFilter v1
                • API svyPopupFilter v1
            • svySearch
            • svySecurity
              • Overview
              • Token-based Auth and SSO (NEW!)
              • API Documentation
              • Getting Started
              • Tenant replication
              • Security Management Console
                • Classic Security Management Console
              • svySecurityUX
              • svyProperties
              • API Doc svyProperties
            • svyUtils
              • Log Manager
              • Log Manager Appenders
              • Smart Doc Editor Utils
              • Custom Dialogs
              • Excel Utils
                • Full API Reference
              • Crypto Utils
      • Security
        • Authentication
        • Permissions
          • UI Permissions
          • Data Permissions
          • Runtime Permissions
        • Audit Logging
        • OAuth
        • JWT
      • Multi-Language Support
      • Mobile Development
        • Getting Started
        • Mobile Design
        • Native Mobile Integrations
        • Building a Native Binary for the App Store
      • Native Desktop Development
        • NGDesktop UI plugin
        • NGDesktop Utils
        • NGDesktop File Plugin
    • Deploy
      • WAR Deployment
      • Docker Deployment
      • Server Configuration
        • Server Settings
        • Server Plugins
        • Database Servers
          • Locks
          • Transactions
          • Oracle
          • SQLServer
        • Client Sessions
        • Batch Processors
        • License Management
        • Monitoring
          • Server Log
          • Browser Console Log
          • Websocket Log
          • Query Performance
          • Client Performance
          • Client Event Tracing
          • Monitoring Servoy with JMX
      • NGClient deployment
      • Troubleshooting
      • Other Topics
        • Security: Cross-site Scripting
        • Running in an iFrame
    • Extend
    • Contribute
  • Reference
    • Servoy Core
      • Object Model
        • Database Server
          • Table
            • Column
            • Calculation
            • Method
            • Aggregation
          • View
          • Procedure
        • Solution
          • Form
          • Form Component
          • Relation
          • Relation Item
          • Table Node
          • Value List
          • Menu
          • Menu item
          • In-Memory Data Source
          • View Foundset Data Source
          • Variable
          • Column Info
          • Media
          • Layout Container
          • Method
        • i18n Message Key
      • Developer API
        • Globals
        • Forms
          • RuntimeForm
            • controller
            • containers
              • RuntimeContainer
            • elements
              • Component
              • RuntimeAccordionPanel
              • RuntimeBean
              • RuntimeButton
              • RuntimeCalendar
              • RuntimeCheck
              • RuntimeCombobox
              • RuntimeComponent
              • RuntimeDataButton
              • RuntimeDataLabel
              • RuntimeGroup
              • RuntimeHtmlArea
              • RuntimeImageMedia
              • RuntimeInsetList
              • RuntimeLabel
              • RuntimeListBox
              • RuntimePassword
              • RuntimePortal
              • RuntimeRadio
              • RuntimeChecks
              • RuntimeRadios
              • RuntimeRectangle
              • RuntimeRtfArea
              • RuntimeSpinner
              • RuntimeSplitPane
              • RuntimeTabPanel
              • RuntimeTextArea
              • RuntimeTextField
              • RuntimeWebComponent
        • JS Lib
          • Array
          • BigInt
          • Boolean
          • Date
          • Function
          • IterableValue
          • Iterator
          • JSON
          • Map
          • Set
          • Math
          • Namespace
          • Number
          • Object
          • Promise
          • QName
          • RegExp
          • Special Operators
          • Statements
          • String
          • XML
          • XMLList
        • Application
          • APPLICATION_TYPES
          • CLIENTDESIGN
          • DRAGNDROP
          • ELEMENT_TYPES
          • LOGGINGLEVEL
          • NGCONSTANTS
          • UICONSTANTS
          • CSSPosition
          • JSDimension
          • JSDNDEvent
          • JSEvent
          • JSLogger
          • JSLogBuilder
          • JSPoint
          • JSUpload
          • JSWindow
          • JSBounds
          • Renderable
          • UUID
        • SolutionModel
          • ALIGNMENT
          • ANCHOR
          • BEVELTYPE
          • CURSOR
          • DEFAULTS
          • FONTSTYLE
          • MEDIAOPTION
          • PAGEORIENTATION
          • PRINTSLIDING
          • SCROLLBAR
          • TITLEJUSTIFICATION
          • TITLEPOSITION
          • UNITS
          • JSBean
          • JSButton
          • JSCalculation
          • JSComponent
          • JSDataSourceNode
          • JSField
          • JSForm
          • JSLabel
          • JSMedia
          • JSMethod
          • JSPart
          • JSPortal
          • JSRelation
          • JSRelationItem
          • JSStyle
          • JSTab
          • JSTabPanel
          • JSValueList
          • JSVariable
          • JSTitle
          • JSChecks
          • JSCombobox
          • JSHeader
          • JSInsetList
          • JSList
          • JSPassword
          • JSRadios
          • JSText
          • JSTextArea
          • JSWebComponent
          • JSLayoutContainer
        • Database Manager
          • QUERY_COLUMN_TYPES
          • SQL_ACTION_TYPES
          • JSColumn
          • JSDataSet
          • JSBaseRecord
          • JSBaseSqlRecord
          • JSBaseFoundset
          • JSBaseSQLFoundset
          • JSFoundSet
          • JSFoundSetUpdater
          • JSRecord
          • JSRecordMarker
          • JSRecordMarkers
          • JSTable
          • JSTableFilter
          • MenuFoundSet
          • MenuItemRecord
          • QBAggregate
          • QBAggregates
          • QBCase
          • QBCaseWhen
          • QBColumn
          • QBColumns
          • QBCondition
          • QBFunction
          • QBFunctions
          • QBGroupBy
          • QBJoin
          • QBJoins
          • QBLogicalCondition
          • QBParameter
          • QBParameters
          • QBPart
          • QBResult
          • QBSearchedCaseExpression
          • QBSelect
          • QBSort
          • QBSorts
          • QBTableClause
          • QBWhereCondition
          • ViewFoundSet
          • ViewRecord
        • Events Manager
          • EVENTS_AGGREGATION_TYPES
          • EventType
        • Menus
          • JSMenu
          • JSMenuItem
        • JSMenuDatasource
        • Utils
        • Client Utils
          • JSBlobLoaderBuilder
        • History
        • Security
        • i18n
        • ServoyException
          • DataException
        • JSUnit
        • Datasources
          • DBDataSource
          • DBDataSourceServer
          • JSConnectionDefinition
          • JSDataSource
          • MemDataSource
          • MenuDataSource
          • SPDataSource
          • SPDataSourceServer
          • ViewDataSource
        • JSViewDatasource
        • servoyDeveloper
        • enum
    • Extensions
      • UI Components
        • Buttons and Text
          • Badge
          • Button
          • Data Label
          • Drop Down
          • Image
          • Label
        • Form Containers
          • Accordion Panel
          • Collapse
          • Form Container
          • Form Component Container
          • List Form Component
          • Default Loading Indicator
          • Error Bean
          • Portal
          • Responsive Container
          • Servoy Default Navigator
          • Slider
          • Split Pane
          • TabPanel
        • Grids
          • Data Grid
          • Power Grid
          • Table
        • Input Controls
          • Calendar
          • Calendar Inline
          • Checkbox
          • Choice Group
          • Combobox
          • Floatinglabel Calendar
          • Floatinglabel Combobox
          • Floatinglabel Textarea
          • Floatinglabel Textbox
          • Floatinglabel Type Ahead
          • Group Buttons
          • Html Area
          • Input Group
          • Rating
          • Select2tokenizer
          • Slider
          • Spinner
          • Switch
          • TextArea
          • TextBox
          • TextBox Group
          • Type Ahead
        • Media
          • Carousel
          • Embedded YouTube
          • File upload
          • Image label
          • Lightbox Gallery
          • MultiFile Upload
          • PDF JS Viewer
          • PDF Viewer
        • Mobile
          • Native Data List
          • Native Select
        • Navigation
          • Breadcrumbs
          • Navbar
          • sidenav
        • SmartDocEditor
          • Smart Document Editor
        • Visualization
          • Canvas
          • Chart
          • Custom List
          • DBTreeview
          • Foundset List
          • Fullcalendar
          • Gauge
          • Google Maps
          • Kanban
          • Progress Bar
          • Treeview
      • Server Plugins
        • amortization
          • AmortizationCalculation
          • Polynomial
        • clientmanager
          • Broadcaster
          • JSClientInformation (cm)
        • excelxport
        • file
          • JSFile
          • JSProgressMonitor
        • headlessclient
          • JSClient
        • http
          • HTTP_STATUS
          • Cookie
          • DeleteRequest
          • GetRequest
          • HeadRequest
          • HttpClient
          • HttpClientConfig
          • OptionsRequest
          • PostRequest
          • PutRequest
          • Response
          • TraceRequest
          • PatchRequest
          • JSFileUpload
        • images
          • JSImage
        • jwt
          • Algorithm
          • Builder
          • JWTClaims
        • mail
          • Attachment
          • MailMessage
        • maintenance
          • JSClientInformation
          • JSColumnObject
          • JSServer
          • JSTableObject
        • mobileservice
          • OfflineDataDescription
        • oauth
          • ClientAuthentication
          • CustomApiBuilder
          • OAuthProviders
          • OAuthRequest
          • OAuthResponse
          • OAuthResponseBinary
          • OAuthResponseJSON
          • OAuthResponseText
          • OAuthService
          • OAuthServiceBuilder
          • OAuthTokenExtractors
          • RequestType
        • pdf_output
        • rawSQL
        • RestWs plugin
        • rest_ws
          • WsContents
          • WsCookie
          • WsRequest
          • WsResponse
        • scheduler
        • serialize
        • textxport
          • DataProviderExport
          • TabExporter
        • udp
          • JSPacket
        • XmlReader
          • XmlNode
      • Browser Plugins
        • Block UI
        • Block UI (ref)
        • Dialogs Plugin
        • Idle
        • Idle (ref)
        • Key Listener
        • Key Listener (ref)
        • NGDesktop File
        • NGDesktop File (ref)
        • NGDesktop UI (ref)
        • NGDesktop Utils (ref)
        • NG Utils (ref)
        • Office Javascript API for Servoy
        • Phonegap
        • Web Notifications (Native)
        • Web Notifications (Toastr)
        • Window Plugin
        • Font Awesome
      • Modules
        • Smart Doc Editor Utils
        • svyAPI
          • Getting Started
        • svyLookup
          • Custom Templates
          • API Documentation
          • svyLookup v1
            • API Documentation v1.0.0
            • Base Form svyLookupTable v1.0.0
            • Base Form AbstractLookup v1.0.0
        • svyLookupExample
        • svyNavigation
          • API Documentation
            • API svyNavigation
            • API svyNavigationHistory
            • API svyNavigationUX
        • svyNavigationUX
        • svyNavigationUXSample
        • svyPopupFilter
          • Simple Filter Pickers
          • Custom Templates
          • API Documentation
            • API svyToolbarFilter
            • API svyPopupFilter
          • API Documentation v1
            • API svyToolbarFilter v1
            • API svyPopupFilter v1
        • svyProperties
        • svySearch
        • svySecurity
          • Overview
          • Token-based Auth and SSO (NEW!)
          • API Documentation
          • Getting Started
          • Tenant replication
          • Security Management Console
            • Classic Security Management Console
          • svySecurityUX
          • svyProperties
          • API Doc svyProperties
        • svySecurityConsole
        • svySecurityUX
        • svyUtils
          • Log Manager
          • Log Manager Appenders
          • Smart Doc Editor Utils
          • Custom Dialogs
          • Excel Utils
          • Full API Reference
          • Crypto Utils
        • svyUtils$Excel
        • svyUtils$NGClient
        • svyUtils$customDialogs
        • svyUtils$logManagerAppenders
        • svyUtils$tableGrid
      • Layout
        • Boostrap 12grid layout
          • Collapsible Container
          • Simple Collapsible
          • Center Container
          • Inline Group Container
          • Flexbox Layout
      • Solutions
        • Sample Application
          • Tutorial Part 1
          • Tutorial Part 2
      • Packages
        • UI Component Packages
          • Advanced Renderers
          • Bootstrap Components
          • Bootstrap Extra Components
          • Canvas
          • Chart JS
          • Fullcalendar Component
          • googlemaps
          • kanban
          • Servoy Core
          • Servoy Extra Components
          • Servoy NG-Grids
          • Servoy PDF Viewer
          • smartDocumentEditor
        • Browser Plugin Packages
          • Block UI
          • Core NG only Services
          • Key Listener
          • NGDesktop File
          • NGDesktop UI
          • NGDesktop Utils
          • Web Notifications
          • Idle Web Service
    • Servoy Developer
      • Menu
        • File
        • Edit
        • Source
        • Refactor
        • Navigate
        • Search
        • Project
        • Actions
        • Run
        • Window
        • Help
      • Toolbar
      • Solution Explorer
        • Resources
          • Database Servers
            • Database Server
              • Procedures
              • Tables
              • Views
          • Security
          • i18n
        • All Solutions
          • Solution
          • Active Solution
            • Scopes
              • Scope
                • Variables
            • Forms
              • Working Set
              • Form
                • Controller
                • Variables
                • Elements
                • Relations
            • Form Components
              • Form Component
            • Relations
              • Relation
            • ValueLists
              • ValueList
            • Menus
              • Menu
                • MenuItem
            • Media
              • Folder
              • File
            • DataSources
              • In Memory DataSources
                • In Memory DataSource
              • View Foundsets DataSources
                • View Foundset DataSources
            • Servoy Packages
              • Package
            • Modules
              • Module
        • Solution Explorer Contextual List
      • Views
        • Command Console
        • Console
        • Problems
        • Tasks
        • Bookmarks
        • Search
        • Form Hierarchy
        • Help
        • JUnit
        • Outline
        • Profiler
        • Properties
        • Project Explorer
        • Call Hierarchy
      • Editors and Wizards
        • Property configurator for columns
        • Relation Editor
        • Text Format Editor
        • Date Format Editor
        • Number Format Editor
        • Database Synchronization Wizard
        • Security Editor
        • SQL Editor
        • i18n Editor
        • File Import Wizard
        • File Export Wizard
        • WAR Export Wizard
        • NGDesktop Export Wizard
        • Table Editor
        • Metadata Synchronization Wizard
        • Database Server Connection Editor
        • Text Property Editor
        • Valuelist Editor
        • Form Editor
          • Parts of the Form Editor
          • Designing a Form
          • Layout Tools
          • Using Containers
          • Creating and Using Forms
          • Using Servoy Beans
          • Using Shapes
          • Form Editor Subtabs
          • [Tips and Shortcuts][reference/servoy-developer/object-editors/form-editor-tips_and_shortcuts.md]
          • Editong a Responsive LayoutForm
          • CSS Positioning
        • Form Hierarchy
        • Component Properties Editor
        • Variable Editor
        • Method Selection Wizard
        • New Solution Wizard
        • Application Event Types Editor
        • New Form Wizard
        • Form Dataproviders Configurator
        • Servoy Resource Locator
        • Datasource Selection Wizard
        • Sorting Fields Wizard
        • Scripting Editor
          • Getting Started-Overview of Script Editor
          • Code Writing Features
          • Code Navigation
          • Code Rewriting Tools
          • Refactoring
          • Code Formatting
          • Script Editor Tips and Shortcuts
          • Unit Tests
        • Theme Editor
          • General Properties
          • Sidenav Properties
          • Navbar Properties
          • Tabs Properties
          • Windows Properties
          • Dialogs Properties
          • Tables Properties
          • Breadcrumb specific style Properties
          • Brand colors Properties
          • Validations Properties
          • Margins and Padding Properties
        • Editor Selection
        • Run Configurations
        • Debug Configurations
        • Externalize Strings Wizard
        • Font Chooser Wizard
        • Color Chooser Wizard
        • Project Properties Configurator
        • Move Wizard
        • External Tools Configurations
        • About Servoy Developer
        • Servoy Developer Installation Details
        • Eclipse Marketplace Wizard
        • Install Available Software Wizard
        • Cheat Sheet Selection Wizard
        • Servoy Developer Help Wizard
        • Switch to Editor Wizard
        • Find Actions Wizard
        • Customize Perspective Configurator
        • Quick Search Wizard
        • Search Wizard
        • Encoding Wizard
        • Task Wizard
        • Find - Replace Wizard
        • Properties Editor
        • New Project Wizard
        • New Method Wizard
        • New Menu Wizard
          • New MenuItem Wizard
        • Menu Editor
        • ServoyMenu Selection Wizard
        • JSMenu compatible component selector
        • Permissions Configuration Dialog
      • Project File Structure
        • Servoy Installation Directory
          • servoy.properties
        • Workspace Folder
          • Resources Directory
            • Database Information (.dbi) Files
          • Solution Folder
      • Package Manager
      • Preferences
      • Property Types for components / services
      • Debugger
        • Debug Explorer
        • Breakpoints
          • Breakpoint Properties
        • Variables
        • Expressions
        • Interactive Console
    • Application Server
    • Servoy Cloud
      • Cloud Control Center
        • Home
          • Setup Namespace
          • User profile
            • My Profile
            • Support
        • Download IDE
        • Application Overview
          • Applications
            • Pipelines
              • Jobs
                • Packages
                  • Commits
                  • Artifacts
                  • Configuration
                  • Quality reports
                  • Build markers
                • Job Configuration
                  • Build and Deploy or Build
                  • Mobile
                  • Desktop
            • Environments
              • Metrics
                • Users
                • Databases
                  • Metrics
                • System Health
                • Log Activity
                • App performance
                • Query performance
              • Cloud reporting
            • Security
              • Permissions
              • Tenants
            • Reports
            • Security Login Designer
              • Single Sign-On
                • Sign in with Google
                • Sign in with Microsoft
          • Code Repositories
        • Project Management
          • Tickets
          • Backlog
          • Active Sprints
        • User Management
          • Users
          • Roles
        • Administration
          • Security
            • ServoyCloud Roles
          • Credentials
          • Settings
        • Add-Ons
      • Database Backup
      • E2E Cypress Testing
        • Using Cypress
      • On-Premise Deployment
      • Privacy policy (ServoyAI)
      • FAQ
      • Migrate to Servoy Cloud
    • Extensions Developement
      • Component and Services
        • Component Development
        • Service Development
        • Tools and Dev Tips to use for Component/Service developement
        • Manifest (.mf file)
        • Specification (.spec file)
          • Property Types
            • Array property types
            • Custom object property types
            • Findmode property type
            • Foundset property type
            • Tags
        • Directives And Filters
          • Sablotabsequence
        • Console (serverside)
        • ServoyApi (serverside)
      • Serverside Plugins
        • Data Convertors and Validators
        • UI Convertors
  • Release notes
    • Release notes
      • 2025.03
      • 2024.03 (LTS)
      • 2023.03 (LTS)
      • 2025.03 (Servoy Cloud)
      • 2024.12
      • 2024.12 (Servoy Cloud)
      • 2024.09
      • 2024.09 (Servoy Cloud)
      • 2024.06
      • 2024.06 (Servoy Cloud)
      • 2024.03 (Servoy Cloud)
      • 2023.12
      • 2023.12 (Servoy Cloud)
      • 2023.09
      • 2023.09 (Servoy Cloud)
      • 2023.06
      • 2022.03 (LTS)
      • 2022.12 What's new
      • 2022.12
      • 2022.09 What's new
      • 2022.09
      • 2022.06 What's new
      • 2022.06
      • 2021.03.3 (LTS)
Powered by GitBook
On this page
  • Overview
  • Returned Types
  • Properties Summarized
  • Methods Summarized
  • Properties Detailed
  • pluginVersion
  • relativeExtraDirectories
  • relativeReportsDirectory
  • viewerExportFormats
  • viewerIconURL
  • viewerTitle
  • Methods Detailed
  • compileReport(report)
  • compileReport(report, destination)
  • deleteFileFromReportsDir(fileName)
  • getReportParameters(report)
  • getReports()
  • getReports(filter)
  • mergeJasperPrint(printList, orientation, outputType, outputOptions, localeString)
  • readFileFromReportsDir(fileName)
  • runReport(reportDataSource, report, outputOptions, outputType, parameters)
  • runReport(reportDataSource, report, outputOptions, outputType, parameters, localeString)
  • runReport(reportDataSource, report, outputOptions, outputType, parameters, localeString, moveTableOfContent)
  • runReport(inputType, reportDataSource, inputOptions, report, outputOptions, outputType, parameters)
  • runReport(inputType, reportDataSource, inputOptions, report, outputOptions, outputType, parameters, localeString)
  • runReport(inputType, reportDataSource, inputOptions, report, outputOptions, outputType, parameters, localeString, moveTableOfContent)
  • writeFileToReportsDir(fileName, obj)

Was this helpful?

  1. GUIDES
  2. Develop
  3. Programming Guide

Servoy Jasper Reports

PreviousSending and Receiving EmailNextInput Type

Last updated 3 months ago

Was this helpful?

(plugins.jasperReports)

Overview

This class serves as the primary implementation for managing JasperReports in a Servoy application. It provides functionalities for report generation, data source handling, file operations, and export customization. Using these, developers can seamlessly integrate JasperReports into Servoy projects for dynamic report creation and management. ## Key Functionalities The class facilitates running reports with various data sources and input types, including databases, XML, and CSV. Developers can define input and output parameters, customize locales, and specify the output format using predefined constants. File operations are supported for reading, writing, and deleting report files on the server. Reports can be compiled from .jrxml files to .jasper format for optimized performance. Additionally, the class includes methods for retrieving available reports, merging multiple reports, and accessing or modifying report parameters. The class also supports viewing, printing, and exporting reports in multiple formats such as PDF, HTML, Excel, and XML. Export options include setting custom parameters for advanced use cases, like embedding metadata or adjusting resource paths for specific output types. Advanced features include handling viewer configurations, moving table-of-content pages, and merging reports with consistent styles and orientations. Developers can also use locale-based i18n integration to produce reports in different languages. For external library dependencies, see https://community.jaspersoft.com/wiki/jasperreports-library-requirements.

Returned Types

,,,

Properties Summarized

Type
Name
Summary

Get the version of the Servoy JasperReports Plugin.

Property for retrieving and setting the paths to the extra resources directories.

Property for retrieving and setting the path to the reports directory, set by the current client, relative to the server reports directory.

Property used in order to get or set the Jasper Viewer's export formats.

Sets or gets the Jasper Viewer's icon URL.

Sets or gets the Jasper Viewer's title text.

Methods Summarized

Type
Name
Summary

Compile a Jasper Reports .

Compile a Jasper Reports .

Delete a report file from the Server.

Retrieve a JSDataSet with the report parameters, except the system defined ones.

Retrieve a String array of available reports, based on the reports directory.

Retrieve a String array of available reports, based on the reports directory.

Function to merge two or more reports into a single report file.

Retrieve a report file from the Server.

This method runs a specified (client) report according to the output format, parameters and locale.

This method runs a specified (client) report according to the output format, parameters and locale.

This method runs a specified (client) report according to the output format, parameters and locale.

This method runs a specified (client) report according to the output format, parameters and locale.

This method runs a specified (client) report according to the output format, parameters and locale.

This method runs a specified (client) report according to the output format, parameters and locale.

Store a reportFile on the Server.

Properties Detailed

pluginVersion

Get the version of the Servoy JasperReports Plugin.

Sample

application.output(plugins.jasperReports.pluginVersion);

relativeExtraDirectories

Property for retrieving and setting the paths to the extra resources directories. The paths are set per client and are relative to the server corresponding directories setting.

By default the value is read from the Admin Page: Server Plugins - the directories.jasper.extra property. If the client modifies the default property, this value will be used instead of the default one for the whole client session and only for this client. Each client session has it's own extraDirectories value.

NOTE: Extra directories are not searched recursively.

Sample

//setting the extra directories, relative to the server side location
plugins.jasperReports.relativeExtraDirectories = "extraDir1,extraDir2";

relativeReportsDirectory

Property for retrieving and setting the path to the reports directory, set by the current client, relative to the server reports directory.

By default the value is read from the admin page Server Plugins, the directory.jasper.report property. If no value has been set in the admin page for the report directory, the default location will be set to /path_to_install/application_server/server/reports. A client is only able to set a path relative to the server report directory. If the client modifies this property, its value will be used instead of the default one, for the whole client session and only for this client. Each client session has it's own relativeReportDirectory value.

Sample

plugins.jasperReports.relativeReportsDirectory = "/myReportsLocation";

viewerExportFormats

Property used in order to get or set the Jasper Viewer's export formats.

Sample

var defaultExportFormats = plugins.jasperReports.viewerExportFormats;
application.output(defaultExportFormats);

// use the default export constants of the plugin, of the OUTPUT_FORMAT constants node; 
// the following formats are available for setting the viewer export formats: 
// PDF, JRPRINT, RTF, ODT, HTML, XLS_1_SHEET, XLS, CSV, XML
// and there is an extra Xml with Embedded Images export type available for the Viewer, denoted by 'xml_embd_img'
// the first export format in the list will be the default one displayed in the Save dialog of the Viewer
plugins.jasperReports.viewerExportFormats = [OUTPUT_FORMAT.PDF, OUTPUT_FORMAT.RTF, 'xml_embd_img'];

viewerIconURL

Sets or gets the Jasper Viewer's icon URL.

Sample

plugins.jasperReports.viewerIconURL = 'myIcon.jpg'

viewerTitle

Sets or gets the Jasper Viewer's title text.

Sample

plugins.jasperReports.viewerTitle = 'My Title'

Methods Detailed

compileReport(report)

Compile a Jasper Reports .jrxml file to a .jasper file.

Parameters

Sample

// Compile the .jrxml jasper report file to a .jasper file. The name of the compiled file is given by the report name 
// The report name as an absolute path. Results the compiled c:\\temp\\samplereport.jasper file. 
var success = plugins.jasperReports.compileReport('c:\\\\temp\\\\samplereport.jrxml'); 
// The report name as a relative path. The file will be searched relative to the ReportDirectory. 
var success = plugins.jasperReports.compileReport('myCustomerReport1.jrxml'); 
var success = plugins.jasperReports.compileReport( '\\\\subdir\\\\myCustomerReport2.jrxml'); 
// To specify a different destination file than the original filaname, the second parameter can be incouded. 
// If it is relative, the file will be created relative to the ReportDirectory. 
var success = plugins.jasperReports.compileReport('c:\\\\temp\\\\samplereport.jrxml', 'd:\\\\temp2\\\\destreport.jasper');

compileReport(report, destination)

Compile a Jasper Reports .jrxml file to a .jasper file.

Parameters

Sample

// Compile the .jrxml jasper report file to a .jasper file. The name of the compiled file is given by the report name 
// The report name as an absolute path. Results the compiled c:\\temp\\samplereport.jasper file. 
var success = plugins.jasperReports.compileReport('c:\\\\temp\\\\samplereport.jrxml'); 
// The report name as a relative path. The file will be searched relative to the ReportDirectory. 
var success = plugins.jasperReports.compileReport('myCustomerReport1.jrxml'); 
var success = plugins.jasperReports.compileReport( '\\\\subdir\\\\myCustomerReport2.jrxml'); 
// To specify a different destination file than the original filaname, the second parameter can be incouded. 
// If it is relative, the file will be created relative to the ReportDirectory. 
var success = plugins.jasperReports.compileReport('c:\\\\temp\\\\samplereport.jrxml', 'd:\\\\temp2\\\\destreport.jasper');

deleteFileFromReportsDir(fileName)

Delete a report file from the Server.

Parameters

Sample

var reportFile2Delete = 'myCustomerReport.jrxml'; 
plugins.jasperReports.deleteFileFromReportsDir(reportFile2Delete);

getReportParameters(report)

Retrieve a JSDataSet with the report parameters, except the system defined ones.

Parameters

Sample

var ds = plugins.jasperReports.getReportParameters('sample.jrxml'); 
var csv = ds.getAsText(',','\\n','\"',true); 
application.output(csv);

getReports()

Retrieve a String array of available reports, based on the reports directory.

Sample

// COMPILED - only compiled reports, NONCOMPILED - only non-compiled reports 
// No parameter returns all the reports 
var result = plugins.jasperReports.getReports('NONCOMPILED'); 
application.output(result[0]); 
//using a string as the search filter 
//var result = plugins.jasperReports.getReports('*criteria*'); 
//for(var i=0; i<result.length; i++) 
//application.output(result[i]);

getReports(filter)

Retrieve a String array of available reports, based on the reports directory.

Parameters

Sample

// COMPILED - only compiled reports, NONCOMPILED - only non-compiled reports 
// No parameter returns all the reports 
var result = plugins.jasperReports.getReports('NONCOMPILED'); 
application.output(result[0]); 
//using a string as the search filter 
//var result = plugins.jasperReports.getReports('*criteria*'); 
//for(var i=0; i<result.length; i++) 
//application.output(result[i]);

mergeJasperPrint(printList, orientation, outputType, outputOptions, localeString)

Function to merge two or more reports into a single report file. The reports to merge must have been previously exported as JRPRINTs.

Parameters

Sample

// Merge two report files into a single output report file. Note that the list of reports to merge must jasper print exported reports.
// var $jp1 = plugins.jasperReports.runReport(plugins.jasperReports.INPUT_TYPE.XML, $xmlDataCombined, '/node/to/iterate', 'report1.jrxml', null, plugins.jasperReports.OUTPUT_FORMAT.JRPRINT, $parameters, $locale);
// var $jp2 = plugins.jasperReports.runReport(plugins.jasperReports.INPUT_TYPE.XML, $xmlDataCombined, '/node/to/iterate', 'report2.jrxml', null, plugins.jasperReports.OUTPUT_FORMAT.JRPRINT, $parameters, $locale);
// var $list = new java.util.ArrayList();
// $list.add($jp1);
// $list.add($jp2);
// var $jasper_result = plugins.jasperReports.mergeJasperPrint($list, 'landscape', plugins.jasperReports.OUTPUT_FORMAT.VIEW, null, $locale);

readFileFromReportsDir(fileName)

Retrieve a report file from the Server.

Parameters

Sample

var reportFileArray = plugins.jasperReports.readFileFromReportsDir('myCustomerReport.jasper'); 
// Subfolders can be used to read files. 
var reportFileArray = plugins.jasperReports.readFileFromReportsDir('\\\\subdir\\\\myCustomerReport.jasper');

runReport(reportDataSource, report, outputOptions, outputType, parameters)

This method runs a specified (client) report according to the output format, parameters and locale. If using a table of contents and if needed, the table of contents can be moved to a specified page. Please refer to the sample code for more details.

Parameters

Sample

// The method runs a client report specified by the second parameter acording to the output format. 
// The report can be a compiled jasper file or a jrxml file from a relative path to the reportDirectory or an absolute one. 
// To view the result of the customers report in the Jasper Report viewer in the SmartClient or as PDF in the WebClient. 
// Note: the parameters argument is used to send additional parameters into the report. For example: 
// {pcustomerid: forms.customers.customer_id} to send just 1 parameter called pcustomerid, which contains the value 
// of dataprovider customer_id in the selected record on the customers form 
// The parameters argument is an Object, which can be instantiated in two ways: 
// var o = new Object(); 
// o.pcustomerid = forms.customers.customer_id; 
// or: 
// var o = {pcustomerid: forms.customers.customer_id}; 
application.updateUI(); //to make sure the Servoy window doesn't grab focus after showing the Jasper Viewer var
ds = foundset.getDataSource(); 
var d = ds.split('/); 
var myServer = d[1];
plugins.jasperReports.runReport(myServer, 'myCustomerReport.jasper',null,OUTPUT_FORMAT.VIEW,{pcustomerid: forms.customers.customer_id});

// To request a report in a different Language than the current language of the client, it's possible to specify a Locale string
// as the locale argument. For example: 'en_US' or 'es_ES' or 'nl_NL' 
// When the locale argument is not specified, the report will be in the current langauge of the Client 
// i18n keys of Servoy can be used inside Jasper Reports using the $R{i18n-key} notation 
//plugins.jasperReports.runReport(myServer,'myCustomerReport.jasper',null,OUTPUT_FORMAT.VIEW,{pcustomerid: forms.customers.customer_id},'nl_NL');

// To print the result of the customers report in the SmartClient (to a specified printer), 
// the outputType should be specified as 'print' (OUTPUT_FORMAT.PRINT). 
// The third parameter can contain the name of the printer to  which the report needs to be printed 
// or can contain true (boolean value) to show a print dialog before printing. 
// If false (boolean value) or null is specified, it will print without showing the print dialog to the default printer. 
// Note: In the WebClient a PDF will be pushed to the Client when the outputType is specified as 'print' (OUTPUT_FORMAT.PRINT). 
//plugins.jasperReports.runReport(myServer,'myCustomerReport.jasper',null,OUTPUT_FORMAT.PRINT,{pcustomerid: forms.customers.customer_id});

// To generate the report in the specified output format and save the result to 'myReport.html' in the root of the C drive: 
// Supported output formats are: xhtml, html, pdf, excel( or xls), xls_1_sheet (1 page per sheet), xlsx, ods, rtf, txt, csv, odt, docx, jrprint and xml. 
// These are available as constants in the OUTPUT_FORMAT node of the plugin's tree. 
// Note: in the WebClient, the file will be saved serverside, so the specified path needs to be valid serverside 
//plugins.jasperReports.runReport(myServer,'myCustomerReport.jasper','c:/myReport.xhtml',OUTPUT_FORMAT.XHTML,{pcustomerid: forms.customers.customer_id}); 
//plugins.jasperReports.runReport(myServer,'myCustomerReport.jasper','c:/myReport.html',OUTPUT_FORMAT.HTML,{pcustomerid: forms.customers.customer_id});
//plugins.jasperReports.runReport(myServer,'myCustomerReport.jasper','c:/myReport.pdf',OUTPUT_FORMAT.PDF,{pcustomerid: forms.customers.customer_id});
//plugins.jasperReports.runReport(myServer,'myCustomerReport.jasper','c:/myReport.rtf',OUTPUT_FORMAT.RTF,{pcustomerid: forms.customers.customer_id});
//plugins.jasperReports.runReport(myServer,'myCustomerReport.jasper','c:/myReport.jrprint',OUTPUT_FORMAT.JRPRINT,{pcustomerid: forms.customers.customer_id}); 
//plugins.jasperReports.runReport(myServer,'myCustomerReport.jasper','c:/myReport.txt',OUTPUT_FORMAT.TXT,{pcustomeri d : forms.customers.customer_id});
//plugins.jasperReports.runReport(myServer,'myCustomerReport.jasper','c:/myReport.csv',OUTPUT_FORMAT.CSV,{pcustomeri d : forms.customers.customer_id});
//plugins.jasperReports.runReport(myServer,'myCustomerReport.jasper','c:/myReport.odt',OUTPUT_FORMAT.ODT,{pcustomeri d : forms.customers.customer_id});
//plugins.jasperReports.runReport(myServer,'myCustomerReport.jasper','c:/myReport.docx',OUTPUT_FORMAT.DOCX,{pcustomerid: forms.customers.customer_id});
//plugins.jasperReports.runReport(myServer,'myCustomerReport.jasper','c:/myReport.xls',OUTPUT_FORMAT.XLS,{pcustomerid: forms.customers.customer_id});
//plugins.jasperReports.runReport(myServer,'myCustomerReport.jasper','c:/myReport.xlsx',OUTPUT_FORMAT.XLSX,{pcustomerid: forms.customers.customer_id});
//plugins.jasperReports.runReport(myServer,'myCustomerReport.jasper','c:/myReport.xls',OUTPUT_FORMAT.XLS_1_SHEET,{pcustomerid: forms.customers.customer_id}); 
//plugins.jasperReports.runReport(myServer,'myCustomerReport.jasper','c:/myReport.ods',OUTPUT_FORMAT.ODS,{pcustomerid: forms.customers.customer_id});
//plugins.jasperReports.runReport(myServer,'myCustomerReport.jasper','c:/myReport.xml',OUTPUT_FORMAT.XML,{pcustomerid: forms.customers.customer_id});

// Jasper Reports supports queries with IN operators through the following notation: 
// X${IN,columnName,parameterName} like 'select * from customers where X$(IN,customer_id,pcustomeridlist) 
// When using this notation, the pcustomeridlist parameter needs to contain one or more values in the following way:
//var idlist = new Array(); 
//idlist[0] = 1; 
//idlist[1] = 26 ;
//plugins.jasperReports.jasperReport(myServer,'myCustomerReport.jasper',null,OUTPUT_FORMAT.VIEW,{pcustomeridlist: idlist}); 

//The return value is a byte array with the content of the file generated that can be further used. 
//var res = plugins.jasperReports.runReport(myServer,'samplereport.jrxml', null, OUTPUT_FORMAT.PDF, null);
//plugins.file.writeFile('e:\\\\sample.pdf', res);

// In order to run the report and move the table of contents(marked with the string: \"HIDDEN TEXT TO MARK THE BEGINNING OF THE TABEL OF CONTENTS\") 
// to the Insert page, which has to be identified by the string: \"HIDDEN TEXT TO MARK THE INSERT PAGE\" 
//plugins.jasperReports.runReport(myServer,'myCustomerReport.jasper','c:/myReport.xml',OUTPUT_FORMAT.XML,{pcustomerid: forms.customers.customer_id}, null,true);

// Pass exporter parameters to the export process in runReport 
//var params = new Object();
//params["EXPORTER_PARAMETER:net.sf.jasperreports.export.pdf.metadata.title"] =  "Test title"; 
//params["EXPORTER_PARAMETER:net.sf.jasperreports.export.pdf.metadata.author" ] = "Test Author";
//params["EXPORTER_PARAMETER:net.sf.jasperreports.export.pdf.metadata.creator"] =  "Test creator"; 
//params["EXPORTER_PARAMETER:net.sf.jasperreports.export.pdf.metadata.keywords" ] = "Test keywords";
//params["EXPORTER_PARAMETER:net.sf.jasperreports.export.pdf.metadata.subject"] =  "Test subject";
//var r = plugins.jasperReports.runReport("myServer","someReport.jrxml","path/to/someReportExported.pdf",OUTPUT_FORMAT.PDF,params);

// Using an XML/CSV file as the datasource of the report.
//var $parameters = null; //...
//var $repfile = 'report.jrxml';
//var $xmlDataCombined = plugins.file.readTXTFile('/path/to/datasource.xml');
//var $locale = 'en';
//plugins.jasperReports.runReport(plugins.jasperReports.INPUT_TYPE.XML, $xmlDataCombined, '/node/to/iterate/on', $repfile, null, OUTPUT_FORMAT.VIEW, $parameters, null)

runReport(reportDataSource, report, outputOptions, outputType, parameters, localeString)

This method runs a specified (client) report according to the output format, parameters and locale. If using a table of contents and if needed, the table of contents can be moved to a specified page. Please refer to the sample code for more details.

Parameters

Sample

// The method runs a client report specified by the second parameter acording to the output format. 
// The report can be a compiled jasper file or a jrxml file from a relative path to the reportDirectory or an absolute one. 
// To view the result of the customers report in the Jasper Report viewer in the SmartClient or as PDF in the WebClient. 
// Note: the parameters argument is used to send additional parameters into the report. For example: 
// {pcustomerid: forms.customers.customer_id} to send just 1 parameter called pcustomerid, which contains the value 
// of dataprovider customer_id in the selected record on the customers form 
// The parameters argument is an Object, which can be instantiated in two ways: 
// var o = new Object(); 
// o.pcustomerid = forms.customers.customer_id; 
// or: 
// var o = {pcustomerid: forms.customers.customer_id}; 
application.updateUI(); //to make sure the Servoy window doesn't grab focus after showing the Jasper Viewer var
ds = foundset.getDataSource(); 
var d = ds.split('/); 
var myServer = d[1];
plugins.jasperReports.runReport(myServer, 'myCustomerReport.jasper',null,OUTPUT_FORMAT.VIEW,{pcustomerid: forms.customers.customer_id});

// To request a report in a different Language than the current language of the client, it's possible to specify a Locale string
// as the locale argument. For example: 'en_US' or 'es_ES' or 'nl_NL' 
// When the locale argument is not specified, the report will be in the current langauge of the Client 
// i18n keys of Servoy can be used inside Jasper Reports using the $R{i18n-key} notation 
//plugins.jasperReports.runReport(myServer,'myCustomerReport.jasper',null,OUTPUT_FORMAT.VIEW,{pcustomerid: forms.customers.customer_id},'nl_NL');

// To print the result of the customers report in the SmartClient (to a specified printer), 
// the outputType should be specified as 'print' (OUTPUT_FORMAT.PRINT). 
// The third parameter can contain the name of the printer to  which the report needs to be printed 
// or can contain true (boolean value) to show a print dialog before printing. 
// If false (boolean value) or null is specified, it will print without showing the print dialog to the default printer. 
// Note: In the WebClient a PDF will be pushed to the Client when the outputType is specified as 'print' (OUTPUT_FORMAT.PRINT). 
//plugins.jasperReports.runReport(myServer,'myCustomerReport.jasper',null,OUTPUT_FORMAT.PRINT,{pcustomerid: forms.customers.customer_id});

// To generate the report in the specified output format and save the result to 'myReport.html' in the root of the C drive: 
// Supported output formats are: xhtml, html, pdf, excel( or xls), xls_1_sheet (1 page per sheet), xlsx, ods, rtf, txt, csv, odt, docx, jrprint and xml. 
// These are available as constants in the OUTPUT_FORMAT node of the plugin's tree. 
// Note: in the WebClient, the file will be saved serverside, so the specified path needs to be valid serverside 
//plugins.jasperReports.runReport(myServer,'myCustomerReport.jasper','c:/myReport.xhtml',OUTPUT_FORMAT.XHTML,{pcustomerid: forms.customers.customer_id}); 
//plugins.jasperReports.runReport(myServer,'myCustomerReport.jasper','c:/myReport.html',OUTPUT_FORMAT.HTML,{pcustomerid: forms.customers.customer_id});
//plugins.jasperReports.runReport(myServer,'myCustomerReport.jasper','c:/myReport.pdf',OUTPUT_FORMAT.PDF,{pcustomerid: forms.customers.customer_id});
//plugins.jasperReports.runReport(myServer,'myCustomerReport.jasper','c:/myReport.rtf',OUTPUT_FORMAT.RTF,{pcustomerid: forms.customers.customer_id});
//plugins.jasperReports.runReport(myServer,'myCustomerReport.jasper','c:/myReport.jrprint',OUTPUT_FORMAT.JRPRINT,{pcustomerid: forms.customers.customer_id}); 
//plugins.jasperReports.runReport(myServer,'myCustomerReport.jasper','c:/myReport.txt',OUTPUT_FORMAT.TXT,{pcustomeri d : forms.customers.customer_id});
//plugins.jasperReports.runReport(myServer,'myCustomerReport.jasper','c:/myReport.csv',OUTPUT_FORMAT.CSV,{pcustomeri d : forms.customers.customer_id});
//plugins.jasperReports.runReport(myServer,'myCustomerReport.jasper','c:/myReport.odt',OUTPUT_FORMAT.ODT,{pcustomeri d : forms.customers.customer_id});
//plugins.jasperReports.runReport(myServer,'myCustomerReport.jasper','c:/myReport.docx',OUTPUT_FORMAT.DOCX,{pcustomerid: forms.customers.customer_id});
//plugins.jasperReports.runReport(myServer,'myCustomerReport.jasper','c:/myReport.xls',OUTPUT_FORMAT.XLS,{pcustomerid: forms.customers.customer_id});
//plugins.jasperReports.runReport(myServer,'myCustomerReport.jasper','c:/myReport.xlsx',OUTPUT_FORMAT.XLSX,{pcustomerid: forms.customers.customer_id});
//plugins.jasperReports.runReport(myServer,'myCustomerReport.jasper','c:/myReport.xls',OUTPUT_FORMAT.XLS_1_SHEET,{pcustomerid: forms.customers.customer_id}); 
//plugins.jasperReports.runReport(myServer,'myCustomerReport.jasper','c:/myReport.ods',OUTPUT_FORMAT.ODS,{pcustomerid: forms.customers.customer_id});
//plugins.jasperReports.runReport(myServer,'myCustomerReport.jasper','c:/myReport.xml',OUTPUT_FORMAT.XML,{pcustomerid: forms.customers.customer_id});

// Jasper Reports supports queries with IN operators through the following notation: 
// X${IN,columnName,parameterName} like 'select * from customers where X$(IN,customer_id,pcustomeridlist) 
// When using this notation, the pcustomeridlist parameter needs to contain one or more values in the following way:
//var idlist = new Array(); 
//idlist[0] = 1; 
//idlist[1] = 26 ;
//plugins.jasperReports.jasperReport(myServer,'myCustomerReport.jasper',null,OUTPUT_FORMAT.VIEW,{pcustomeridlist: idlist}); 

//The return value is a byte array with the content of the file generated that can be further used. 
//var res = plugins.jasperReports.runReport(myServer,'samplereport.jrxml', null, OUTPUT_FORMAT.PDF, null);
//plugins.file.writeFile('e:\\\\sample.pdf', res);

// In order to run the report and move the table of contents(marked with the string: \"HIDDEN TEXT TO MARK THE BEGINNING OF THE TABEL OF CONTENTS\") 
// to the Insert page, which has to be identified by the string: \"HIDDEN TEXT TO MARK THE INSERT PAGE\" 
//plugins.jasperReports.runReport(myServer,'myCustomerReport.jasper','c:/myReport.xml',OUTPUT_FORMAT.XML,{pcustomerid: forms.customers.customer_id}, null,true);

// Pass exporter parameters to the export process in runReport 
//var params = new Object();
//params["EXPORTER_PARAMETER:net.sf.jasperreports.export.pdf.metadata.title"] =  "Test title"; 
//params["EXPORTER_PARAMETER:net.sf.jasperreports.export.pdf.metadata.author" ] = "Test Author";
//params["EXPORTER_PARAMETER:net.sf.jasperreports.export.pdf.metadata.creator"] =  "Test creator"; 
//params["EXPORTER_PARAMETER:net.sf.jasperreports.export.pdf.metadata.keywords" ] = "Test keywords";
//params["EXPORTER_PARAMETER:net.sf.jasperreports.export.pdf.metadata.subject"] =  "Test subject";
//var r = plugins.jasperReports.runReport("myServer","someReport.jrxml","path/to/someReportExported.pdf",OUTPUT_FORMAT.PDF,params);

// Using an XML/CSV file as the datasource of the report.
//var $parameters = null; //...
//var $repfile = 'report.jrxml';
//var $xmlDataCombined = plugins.file.readTXTFile('/path/to/datasource.xml');
//var $locale = 'en';
//plugins.jasperReports.runReport(plugins.jasperReports.INPUT_TYPE.XML, $xmlDataCombined, '/node/to/iterate/on', $repfile, null, OUTPUT_FORMAT.VIEW, $parameters, null)

runReport(reportDataSource, report, outputOptions, outputType, parameters, localeString, moveTableOfContent)

This method runs a specified (client) report according to the output format, parameters and locale. If using a table of contents and if needed, the table of contents can be moved to a specified page. Please refer to the sample code for more details.

Parameters

Sample

// The method runs a client report specified by the second parameter acording to the output format. 
// The report can be a compiled jasper file or a jrxml file from a relative path to the reportDirectory or an absolute one. 
// To view the result of the customers report in the Jasper Report viewer in the SmartClient or as PDF in the WebClient. 
// Note: the parameters argument is used to send additional parameters into the report. For example: 
// {pcustomerid: forms.customers.customer_id} to send just 1 parameter called pcustomerid, which contains the value 
// of dataprovider customer_id in the selected record on the customers form 
// The parameters argument is an Object, which can be instantiated in two ways: 
// var o = new Object(); 
// o.pcustomerid = forms.customers.customer_id; 
// or: 
// var o = {pcustomerid: forms.customers.customer_id}; 
application.updateUI(); //to make sure the Servoy window doesn't grab focus after showing the Jasper Viewer var
ds = foundset.getDataSource(); 
var d = ds.split('/); 
var myServer = d[1];
plugins.jasperReports.runReport(myServer, 'myCustomerReport.jasper',null,OUTPUT_FORMAT.VIEW,{pcustomerid: forms.customers.customer_id});

// To request a report in a different Language than the current language of the client, it's possible to specify a Locale string
// as the locale argument. For example: 'en_US' or 'es_ES' or 'nl_NL' 
// When the locale argument is not specified, the report will be in the current langauge of the Client 
// i18n keys of Servoy can be used inside Jasper Reports using the $R{i18n-key} notation 
//plugins.jasperReports.runReport(myServer,'myCustomerReport.jasper',null,OUTPUT_FORMAT.VIEW,{pcustomerid: forms.customers.customer_id},'nl_NL');

// To print the result of the customers report in the SmartClient (to a specified printer), 
// the outputType should be specified as 'print' (OUTPUT_FORMAT.PRINT). 
// The third parameter can contain the name of the printer to  which the report needs to be printed 
// or can contain true (boolean value) to show a print dialog before printing. 
// If false (boolean value) or null is specified, it will print without showing the print dialog to the default printer. 
// Note: In the WebClient a PDF will be pushed to the Client when the outputType is specified as 'print' (OUTPUT_FORMAT.PRINT). 
//plugins.jasperReports.runReport(myServer,'myCustomerReport.jasper',null,OUTPUT_FORMAT.PRINT,{pcustomerid: forms.customers.customer_id});

// To generate the report in the specified output format and save the result to 'myReport.html' in the root of the C drive: 
// Supported output formats are: xhtml, html, pdf, excel( or xls), xls_1_sheet (1 page per sheet), xlsx, ods, rtf, txt, csv, odt, docx, jrprint and xml. 
// These are available as constants in the OUTPUT_FORMAT node of the plugin's tree. 
// Note: in the WebClient, the file will be saved serverside, so the specified path needs to be valid serverside 
//plugins.jasperReports.runReport(myServer,'myCustomerReport.jasper','c:/myReport.xhtml',OUTPUT_FORMAT.XHTML,{pcustomerid: forms.customers.customer_id}); 
//plugins.jasperReports.runReport(myServer,'myCustomerReport.jasper','c:/myReport.html',OUTPUT_FORMAT.HTML,{pcustomerid: forms.customers.customer_id});
//plugins.jasperReports.runReport(myServer,'myCustomerReport.jasper','c:/myReport.pdf',OUTPUT_FORMAT.PDF,{pcustomerid: forms.customers.customer_id});
//plugins.jasperReports.runReport(myServer,'myCustomerReport.jasper','c:/myReport.rtf',OUTPUT_FORMAT.RTF,{pcustomerid: forms.customers.customer_id});
//plugins.jasperReports.runReport(myServer,'myCustomerReport.jasper','c:/myReport.jrprint',OUTPUT_FORMAT.JRPRINT,{pcustomerid: forms.customers.customer_id}); 
//plugins.jasperReports.runReport(myServer,'myCustomerReport.jasper','c:/myReport.txt',OUTPUT_FORMAT.TXT,{pcustomeri d : forms.customers.customer_id});
//plugins.jasperReports.runReport(myServer,'myCustomerReport.jasper','c:/myReport.csv',OUTPUT_FORMAT.CSV,{pcustomeri d : forms.customers.customer_id});
//plugins.jasperReports.runReport(myServer,'myCustomerReport.jasper','c:/myReport.odt',OUTPUT_FORMAT.ODT,{pcustomeri d : forms.customers.customer_id});
//plugins.jasperReports.runReport(myServer,'myCustomerReport.jasper','c:/myReport.docx',OUTPUT_FORMAT.DOCX,{pcustomerid: forms.customers.customer_id});
//plugins.jasperReports.runReport(myServer,'myCustomerReport.jasper','c:/myReport.xls',OUTPUT_FORMAT.XLS,{pcustomerid: forms.customers.customer_id});
//plugins.jasperReports.runReport(myServer,'myCustomerReport.jasper','c:/myReport.xlsx',OUTPUT_FORMAT.XLSX,{pcustomerid: forms.customers.customer_id});
//plugins.jasperReports.runReport(myServer,'myCustomerReport.jasper','c:/myReport.xls',OUTPUT_FORMAT.XLS_1_SHEET,{pcustomerid: forms.customers.customer_id}); 
//plugins.jasperReports.runReport(myServer,'myCustomerReport.jasper','c:/myReport.ods',OUTPUT_FORMAT.ODS,{pcustomerid: forms.customers.customer_id});
//plugins.jasperReports.runReport(myServer,'myCustomerReport.jasper','c:/myReport.xml',OUTPUT_FORMAT.XML,{pcustomerid: forms.customers.customer_id});

// Jasper Reports supports queries with IN operators through the following notation: 
// X${IN,columnName,parameterName} like 'select * from customers where X$(IN,customer_id,pcustomeridlist) 
// When using this notation, the pcustomeridlist parameter needs to contain one or more values in the following way:
//var idlist = new Array(); 
//idlist[0] = 1; 
//idlist[1] = 26 ;
//plugins.jasperReports.jasperReport(myServer,'myCustomerReport.jasper',null,OUTPUT_FORMAT.VIEW,{pcustomeridlist: idlist}); 

//The return value is a byte array with the content of the file generated that can be further used. 
//var res = plugins.jasperReports.runReport(myServer,'samplereport.jrxml', null, OUTPUT_FORMAT.PDF, null);
//plugins.file.writeFile('e:\\\\sample.pdf', res);

// In order to run the report and move the table of contents(marked with the string: \"HIDDEN TEXT TO MARK THE BEGINNING OF THE TABEL OF CONTENTS\") 
// to the Insert page, which has to be identified by the string: \"HIDDEN TEXT TO MARK THE INSERT PAGE\" 
//plugins.jasperReports.runReport(myServer,'myCustomerReport.jasper','c:/myReport.xml',OUTPUT_FORMAT.XML,{pcustomerid: forms.customers.customer_id}, null,true);

// Pass exporter parameters to the export process in runReport 
//var params = new Object();
//params["EXPORTER_PARAMETER:net.sf.jasperreports.export.pdf.metadata.title"] =  "Test title"; 
//params["EXPORTER_PARAMETER:net.sf.jasperreports.export.pdf.metadata.author" ] = "Test Author";
//params["EXPORTER_PARAMETER:net.sf.jasperreports.export.pdf.metadata.creator"] =  "Test creator"; 
//params["EXPORTER_PARAMETER:net.sf.jasperreports.export.pdf.metadata.keywords" ] = "Test keywords";
//params["EXPORTER_PARAMETER:net.sf.jasperreports.export.pdf.metadata.subject"] =  "Test subject";
//var r = plugins.jasperReports.runReport("myServer","someReport.jrxml","path/to/someReportExported.pdf",OUTPUT_FORMAT.PDF,params);

// Using an XML/CSV file as the datasource of the report.
//var $parameters = null; //...
//var $repfile = 'report.jrxml';
//var $xmlDataCombined = plugins.file.readTXTFile('/path/to/datasource.xml');
//var $locale = 'en';
//plugins.jasperReports.runReport(plugins.jasperReports.INPUT_TYPE.XML, $xmlDataCombined, '/node/to/iterate/on', $repfile, null, OUTPUT_FORMAT.VIEW, $parameters, null)

runReport(inputType, reportDataSource, inputOptions, report, outputOptions, outputType, parameters)

This method runs a specified (client) report according to the output format, parameters and locale. If using a table of contents and if needed, the table of contents can be moved to a specified page. Please refer to the sample code for more details.

Parameters

Sample

// The method runs a client report specified by the second parameter acording to the output format. 
// The report can be a compiled jasper file or a jrxml file from a relative path to the reportDirectory or an absolute one. 
// To view the result of the customers report in the Jasper Report viewer in the SmartClient or as PDF in the WebClient. 
// Note: the parameters argument is used to send additional parameters into the report. For example: 
// {pcustomerid: forms.customers.customer_id} to send just 1 parameter called pcustomerid, which contains the value 
// of dataprovider customer_id in the selected record on the customers form 
// The parameters argument is an Object, which can be instantiated in two ways: 
// var o = new Object(); 
// o.pcustomerid = forms.customers.customer_id; 
// or: 
// var o = {pcustomerid: forms.customers.customer_id}; 
application.updateUI(); //to make sure the Servoy window doesn't grab focus after showing the Jasper Viewer var
ds = foundset.getDataSource(); 
var d = ds.split('/); 
var myServer = d[1];
plugins.jasperReports.runReport(myServer, 'myCustomerReport.jasper',null,OUTPUT_FORMAT.VIEW,{pcustomerid: forms.customers.customer_id});

// To request a report in a different Language than the current language of the client, it's possible to specify a Locale string
// as the locale argument. For example: 'en_US' or 'es_ES' or 'nl_NL' 
// When the locale argument is not specified, the report will be in the current langauge of the Client 
// i18n keys of Servoy can be used inside Jasper Reports using the $R{i18n-key} notation 
//plugins.jasperReports.runReport(myServer,'myCustomerReport.jasper',null,OUTPUT_FORMAT.VIEW,{pcustomerid: forms.customers.customer_id},'nl_NL');

// To print the result of the customers report in the SmartClient (to a specified printer), 
// the outputType should be specified as 'print' (OUTPUT_FORMAT.PRINT). 
// The third parameter can contain the name of the printer to  which the report needs to be printed 
// or can contain true (boolean value) to show a print dialog before printing. 
// If false (boolean value) or null is specified, it will print without showing the print dialog to the default printer. 
// Note: In the WebClient a PDF will be pushed to the Client when the outputType is specified as 'print' (OUTPUT_FORMAT.PRINT). 
//plugins.jasperReports.runReport(myServer,'myCustomerReport.jasper',null,OUTPUT_FORMAT.PRINT,{pcustomerid: forms.customers.customer_id});

// To generate the report in the specified output format and save the result to 'myReport.html' in the root of the C drive: 
// Supported output formats are: xhtml, html, pdf, excel( or xls), xls_1_sheet (1 page per sheet), xlsx, ods, rtf, txt, csv, odt, docx, jrprint and xml. 
// These are available as constants in the OUTPUT_FORMAT node of the plugin's tree. 
// Note: in the WebClient, the file will be saved serverside, so the specified path needs to be valid serverside 
//plugins.jasperReports.runReport(myServer,'myCustomerReport.jasper','c:/myReport.xhtml',OUTPUT_FORMAT.XHTML,{pcustomerid: forms.customers.customer_id}); 
//plugins.jasperReports.runReport(myServer,'myCustomerReport.jasper','c:/myReport.html',OUTPUT_FORMAT.HTML,{pcustomerid: forms.customers.customer_id});
//plugins.jasperReports.runReport(myServer,'myCustomerReport.jasper','c:/myReport.pdf',OUTPUT_FORMAT.PDF,{pcustomerid: forms.customers.customer_id});
//plugins.jasperReports.runReport(myServer,'myCustomerReport.jasper','c:/myReport.rtf',OUTPUT_FORMAT.RTF,{pcustomerid: forms.customers.customer_id});
//plugins.jasperReports.runReport(myServer,'myCustomerReport.jasper','c:/myReport.jrprint',OUTPUT_FORMAT.JRPRINT,{pcustomerid: forms.customers.customer_id}); 
//plugins.jasperReports.runReport(myServer,'myCustomerReport.jasper','c:/myReport.txt',OUTPUT_FORMAT.TXT,{pcustomeri d : forms.customers.customer_id});
//plugins.jasperReports.runReport(myServer,'myCustomerReport.jasper','c:/myReport.csv',OUTPUT_FORMAT.CSV,{pcustomeri d : forms.customers.customer_id});
//plugins.jasperReports.runReport(myServer,'myCustomerReport.jasper','c:/myReport.odt',OUTPUT_FORMAT.ODT,{pcustomeri d : forms.customers.customer_id});
//plugins.jasperReports.runReport(myServer,'myCustomerReport.jasper','c:/myReport.docx',OUTPUT_FORMAT.DOCX,{pcustomerid: forms.customers.customer_id});
//plugins.jasperReports.runReport(myServer,'myCustomerReport.jasper','c:/myReport.xls',OUTPUT_FORMAT.XLS,{pcustomerid: forms.customers.customer_id});
//plugins.jasperReports.runReport(myServer,'myCustomerReport.jasper','c:/myReport.xlsx',OUTPUT_FORMAT.XLSX,{pcustomerid: forms.customers.customer_id});
//plugins.jasperReports.runReport(myServer,'myCustomerReport.jasper','c:/myReport.xls',OUTPUT_FORMAT.XLS_1_SHEET,{pcustomerid: forms.customers.customer_id}); 
//plugins.jasperReports.runReport(myServer,'myCustomerReport.jasper','c:/myReport.ods',OUTPUT_FORMAT.ODS,{pcustomerid: forms.customers.customer_id});
//plugins.jasperReports.runReport(myServer,'myCustomerReport.jasper','c:/myReport.xml',OUTPUT_FORMAT.XML,{pcustomerid: forms.customers.customer_id});

// Jasper Reports supports queries with IN operators through the following notation: 
// X${IN,columnName,parameterName} like 'select * from customers where X$(IN,customer_id,pcustomeridlist) 
// When using this notation, the pcustomeridlist parameter needs to contain one or more values in the following way:
//var idlist = new Array(); 
//idlist[0] = 1; 
//idlist[1] = 26 ;
//plugins.jasperReports.jasperReport(myServer,'myCustomerReport.jasper',null,OUTPUT_FORMAT.VIEW,{pcustomeridlist: idlist}); 

//The return value is a byte array with the content of the file generated that can be further used. 
//var res = plugins.jasperReports.runReport(myServer,'samplereport.jrxml', null, OUTPUT_FORMAT.PDF, null);
//plugins.file.writeFile('e:\\\\sample.pdf', res);

// In order to run the report and move the table of contents(marked with the string: \"HIDDEN TEXT TO MARK THE BEGINNING OF THE TABEL OF CONTENTS\") 
// to the Insert page, which has to be identified by the string: \"HIDDEN TEXT TO MARK THE INSERT PAGE\" 
//plugins.jasperReports.runReport(myServer,'myCustomerReport.jasper','c:/myReport.xml',OUTPUT_FORMAT.XML,{pcustomerid: forms.customers.customer_id}, null,true);

// Pass exporter parameters to the export process in runReport 
//var params = new Object();
//params["EXPORTER_PARAMETER:net.sf.jasperreports.export.pdf.metadata.title"] =  "Test title"; 
//params["EXPORTER_PARAMETER:net.sf.jasperreports.export.pdf.metadata.author" ] = "Test Author";
//params["EXPORTER_PARAMETER:net.sf.jasperreports.export.pdf.metadata.creator"] =  "Test creator"; 
//params["EXPORTER_PARAMETER:net.sf.jasperreports.export.pdf.metadata.keywords" ] = "Test keywords";
//params["EXPORTER_PARAMETER:net.sf.jasperreports.export.pdf.metadata.subject"] =  "Test subject";
//var r = plugins.jasperReports.runReport("myServer","someReport.jrxml","path/to/someReportExported.pdf",OUTPUT_FORMAT.PDF,params);

// Using an XML/CSV file as the datasource of the report.
//var $parameters = null; //...
//var $repfile = 'report.jrxml';
//var $xmlDataCombined = plugins.file.readTXTFile('/path/to/datasource.xml');
//var $locale = 'en';
//plugins.jasperReports.runReport(plugins.jasperReports.INPUT_TYPE.XML, $xmlDataCombined, '/node/to/iterate/on', $repfile, null, OUTPUT_FORMAT.VIEW, $parameters, null)

runReport(inputType, reportDataSource, inputOptions, report, outputOptions, outputType, parameters, localeString)

This method runs a specified (client) report according to the output format, parameters and locale. If using a table of contents and if needed, the table of contents can be moved to a specified page. Please refer to the sample code for more details.

Parameters

Sample

// The method runs a client report specified by the second parameter acording to the output format. 
// The report can be a compiled jasper file or a jrxml file from a relative path to the reportDirectory or an absolute one. 
// To view the result of the customers report in the Jasper Report viewer in the SmartClient or as PDF in the WebClient. 
// Note: the parameters argument is used to send additional parameters into the report. For example: 
// {pcustomerid: forms.customers.customer_id} to send just 1 parameter called pcustomerid, which contains the value 
// of dataprovider customer_id in the selected record on the customers form 
// The parameters argument is an Object, which can be instantiated in two ways: 
// var o = new Object(); 
// o.pcustomerid = forms.customers.customer_id; 
// or: 
// var o = {pcustomerid: forms.customers.customer_id}; 
application.updateUI(); //to make sure the Servoy window doesn't grab focus after showing the Jasper Viewer var
ds = foundset.getDataSource(); 
var d = ds.split('/); 
var myServer = d[1];
plugins.jasperReports.runReport(myServer, 'myCustomerReport.jasper',null,OUTPUT_FORMAT.VIEW,{pcustomerid: forms.customers.customer_id});

// To request a report in a different Language than the current language of the client, it's possible to specify a Locale string
// as the locale argument. For example: 'en_US' or 'es_ES' or 'nl_NL' 
// When the locale argument is not specified, the report will be in the current langauge of the Client 
// i18n keys of Servoy can be used inside Jasper Reports using the $R{i18n-key} notation 
//plugins.jasperReports.runReport(myServer,'myCustomerReport.jasper',null,OUTPUT_FORMAT.VIEW,{pcustomerid: forms.customers.customer_id},'nl_NL');

// To print the result of the customers report in the SmartClient (to a specified printer), 
// the outputType should be specified as 'print' (OUTPUT_FORMAT.PRINT). 
// The third parameter can contain the name of the printer to  which the report needs to be printed 
// or can contain true (boolean value) to show a print dialog before printing. 
// If false (boolean value) or null is specified, it will print without showing the print dialog to the default printer. 
// Note: In the WebClient a PDF will be pushed to the Client when the outputType is specified as 'print' (OUTPUT_FORMAT.PRINT). 
//plugins.jasperReports.runReport(myServer,'myCustomerReport.jasper',null,OUTPUT_FORMAT.PRINT,{pcustomerid: forms.customers.customer_id});

// To generate the report in the specified output format and save the result to 'myReport.html' in the root of the C drive: 
// Supported output formats are: xhtml, html, pdf, excel( or xls), xls_1_sheet (1 page per sheet), xlsx, ods, rtf, txt, csv, odt, docx, jrprint and xml. 
// These are available as constants in the OUTPUT_FORMAT node of the plugin's tree. 
// Note: in the WebClient, the file will be saved serverside, so the specified path needs to be valid serverside 
//plugins.jasperReports.runReport(myServer,'myCustomerReport.jasper','c:/myReport.xhtml',OUTPUT_FORMAT.XHTML,{pcustomerid: forms.customers.customer_id}); 
//plugins.jasperReports.runReport(myServer,'myCustomerReport.jasper','c:/myReport.html',OUTPUT_FORMAT.HTML,{pcustomerid: forms.customers.customer_id});
//plugins.jasperReports.runReport(myServer,'myCustomerReport.jasper','c:/myReport.pdf',OUTPUT_FORMAT.PDF,{pcustomerid: forms.customers.customer_id});
//plugins.jasperReports.runReport(myServer,'myCustomerReport.jasper','c:/myReport.rtf',OUTPUT_FORMAT.RTF,{pcustomerid: forms.customers.customer_id});
//plugins.jasperReports.runReport(myServer,'myCustomerReport.jasper','c:/myReport.jrprint',OUTPUT_FORMAT.JRPRINT,{pcustomerid: forms.customers.customer_id}); 
//plugins.jasperReports.runReport(myServer,'myCustomerReport.jasper','c:/myReport.txt',OUTPUT_FORMAT.TXT,{pcustomeri d : forms.customers.customer_id});
//plugins.jasperReports.runReport(myServer,'myCustomerReport.jasper','c:/myReport.csv',OUTPUT_FORMAT.CSV,{pcustomeri d : forms.customers.customer_id});
//plugins.jasperReports.runReport(myServer,'myCustomerReport.jasper','c:/myReport.odt',OUTPUT_FORMAT.ODT,{pcustomeri d : forms.customers.customer_id});
//plugins.jasperReports.runReport(myServer,'myCustomerReport.jasper','c:/myReport.docx',OUTPUT_FORMAT.DOCX,{pcustomerid: forms.customers.customer_id});
//plugins.jasperReports.runReport(myServer,'myCustomerReport.jasper','c:/myReport.xls',OUTPUT_FORMAT.XLS,{pcustomerid: forms.customers.customer_id});
//plugins.jasperReports.runReport(myServer,'myCustomerReport.jasper','c:/myReport.xlsx',OUTPUT_FORMAT.XLSX,{pcustomerid: forms.customers.customer_id});
//plugins.jasperReports.runReport(myServer,'myCustomerReport.jasper','c:/myReport.xls',OUTPUT_FORMAT.XLS_1_SHEET,{pcustomerid: forms.customers.customer_id}); 
//plugins.jasperReports.runReport(myServer,'myCustomerReport.jasper','c:/myReport.ods',OUTPUT_FORMAT.ODS,{pcustomerid: forms.customers.customer_id});
//plugins.jasperReports.runReport(myServer,'myCustomerReport.jasper','c:/myReport.xml',OUTPUT_FORMAT.XML,{pcustomerid: forms.customers.customer_id});

// Jasper Reports supports queries with IN operators through the following notation: 
// X${IN,columnName,parameterName} like 'select * from customers where X$(IN,customer_id,pcustomeridlist) 
// When using this notation, the pcustomeridlist parameter needs to contain one or more values in the following way:
//var idlist = new Array(); 
//idlist[0] = 1; 
//idlist[1] = 26 ;
//plugins.jasperReports.jasperReport(myServer,'myCustomerReport.jasper',null,OUTPUT_FORMAT.VIEW,{pcustomeridlist: idlist}); 

//The return value is a byte array with the content of the file generated that can be further used. 
//var res = plugins.jasperReports.runReport(myServer,'samplereport.jrxml', null, OUTPUT_FORMAT.PDF, null);
//plugins.file.writeFile('e:\\\\sample.pdf', res);

// In order to run the report and move the table of contents(marked with the string: \"HIDDEN TEXT TO MARK THE BEGINNING OF THE TABEL OF CONTENTS\") 
// to the Insert page, which has to be identified by the string: \"HIDDEN TEXT TO MARK THE INSERT PAGE\" 
//plugins.jasperReports.runReport(myServer,'myCustomerReport.jasper','c:/myReport.xml',OUTPUT_FORMAT.XML,{pcustomerid: forms.customers.customer_id}, null,true);

// Pass exporter parameters to the export process in runReport 
//var params = new Object();
//params["EXPORTER_PARAMETER:net.sf.jasperreports.export.pdf.metadata.title"] =  "Test title"; 
//params["EXPORTER_PARAMETER:net.sf.jasperreports.export.pdf.metadata.author" ] = "Test Author";
//params["EXPORTER_PARAMETER:net.sf.jasperreports.export.pdf.metadata.creator"] =  "Test creator"; 
//params["EXPORTER_PARAMETER:net.sf.jasperreports.export.pdf.metadata.keywords" ] = "Test keywords";
//params["EXPORTER_PARAMETER:net.sf.jasperreports.export.pdf.metadata.subject"] =  "Test subject";
//var r = plugins.jasperReports.runReport("myServer","someReport.jrxml","path/to/someReportExported.pdf",OUTPUT_FORMAT.PDF,params);

// Using an XML/CSV file as the datasource of the report.
//var $parameters = null; //...
//var $repfile = 'report.jrxml';
//var $xmlDataCombined = plugins.file.readTXTFile('/path/to/datasource.xml');
//var $locale = 'en';
//plugins.jasperReports.runReport(plugins.jasperReports.INPUT_TYPE.XML, $xmlDataCombined, '/node/to/iterate/on', $repfile, null, OUTPUT_FORMAT.VIEW, $parameters, null)

runReport(inputType, reportDataSource, inputOptions, report, outputOptions, outputType, parameters, localeString, moveTableOfContent)

This method runs a specified (client) report according to the output format, parameters and locale. If using a table of contents and if needed, the table of contents can be moved to a specified page. Please refer to the sample code for more details.

Parameters

Sample

// The method runs a client report specified by the second parameter acording to the output format. 
// The report can be a compiled jasper file or a jrxml file from a relative path to the reportDirectory or an absolute one. 
// To view the result of the customers report in the Jasper Report viewer in the SmartClient or as PDF in the WebClient. 
// Note: the parameters argument is used to send additional parameters into the report. For example: 
// {pcustomerid: forms.customers.customer_id} to send just 1 parameter called pcustomerid, which contains the value 
// of dataprovider customer_id in the selected record on the customers form 
// The parameters argument is an Object, which can be instantiated in two ways: 
// var o = new Object(); 
// o.pcustomerid = forms.customers.customer_id; 
// or: 
// var o = {pcustomerid: forms.customers.customer_id}; 
application.updateUI(); //to make sure the Servoy window doesn't grab focus after showing the Jasper Viewer var
ds = foundset.getDataSource(); 
var d = ds.split('/); 
var myServer = d[1];
plugins.jasperReports.runReport(myServer, 'myCustomerReport.jasper',null,OUTPUT_FORMAT.VIEW,{pcustomerid: forms.customers.customer_id});

// To request a report in a different Language than the current language of the client, it's possible to specify a Locale string
// as the locale argument. For example: 'en_US' or 'es_ES' or 'nl_NL' 
// When the locale argument is not specified, the report will be in the current langauge of the Client 
// i18n keys of Servoy can be used inside Jasper Reports using the $R{i18n-key} notation 
//plugins.jasperReports.runReport(myServer,'myCustomerReport.jasper',null,OUTPUT_FORMAT.VIEW,{pcustomerid: forms.customers.customer_id},'nl_NL');

// To print the result of the customers report in the SmartClient (to a specified printer), 
// the outputType should be specified as 'print' (OUTPUT_FORMAT.PRINT). 
// The third parameter can contain the name of the printer to  which the report needs to be printed 
// or can contain true (boolean value) to show a print dialog before printing. 
// If false (boolean value) or null is specified, it will print without showing the print dialog to the default printer. 
// Note: In the WebClient a PDF will be pushed to the Client when the outputType is specified as 'print' (OUTPUT_FORMAT.PRINT). 
//plugins.jasperReports.runReport(myServer,'myCustomerReport.jasper',null,OUTPUT_FORMAT.PRINT,{pcustomerid: forms.customers.customer_id});

// To generate the report in the specified output format and save the result to 'myReport.html' in the root of the C drive: 
// Supported output formats are: xhtml, html, pdf, excel( or xls), xls_1_sheet (1 page per sheet), xlsx, ods, rtf, txt, csv, odt, docx, jrprint and xml. 
// These are available as constants in the OUTPUT_FORMAT node of the plugin's tree. 
// Note: in the WebClient, the file will be saved serverside, so the specified path needs to be valid serverside 
//plugins.jasperReports.runReport(myServer,'myCustomerReport.jasper','c:/myReport.xhtml',OUTPUT_FORMAT.XHTML,{pcustomerid: forms.customers.customer_id}); 
//plugins.jasperReports.runReport(myServer,'myCustomerReport.jasper','c:/myReport.html',OUTPUT_FORMAT.HTML,{pcustomerid: forms.customers.customer_id});
//plugins.jasperReports.runReport(myServer,'myCustomerReport.jasper','c:/myReport.pdf',OUTPUT_FORMAT.PDF,{pcustomerid: forms.customers.customer_id});
//plugins.jasperReports.runReport(myServer,'myCustomerReport.jasper','c:/myReport.rtf',OUTPUT_FORMAT.RTF,{pcustomerid: forms.customers.customer_id});
//plugins.jasperReports.runReport(myServer,'myCustomerReport.jasper','c:/myReport.jrprint',OUTPUT_FORMAT.JRPRINT,{pcustomerid: forms.customers.customer_id}); 
//plugins.jasperReports.runReport(myServer,'myCustomerReport.jasper','c:/myReport.txt',OUTPUT_FORMAT.TXT,{pcustomeri d : forms.customers.customer_id});
//plugins.jasperReports.runReport(myServer,'myCustomerReport.jasper','c:/myReport.csv',OUTPUT_FORMAT.CSV,{pcustomeri d : forms.customers.customer_id});
//plugins.jasperReports.runReport(myServer,'myCustomerReport.jasper','c:/myReport.odt',OUTPUT_FORMAT.ODT,{pcustomeri d : forms.customers.customer_id});
//plugins.jasperReports.runReport(myServer,'myCustomerReport.jasper','c:/myReport.docx',OUTPUT_FORMAT.DOCX,{pcustomerid: forms.customers.customer_id});
//plugins.jasperReports.runReport(myServer,'myCustomerReport.jasper','c:/myReport.xls',OUTPUT_FORMAT.XLS,{pcustomerid: forms.customers.customer_id});
//plugins.jasperReports.runReport(myServer,'myCustomerReport.jasper','c:/myReport.xlsx',OUTPUT_FORMAT.XLSX,{pcustomerid: forms.customers.customer_id});
//plugins.jasperReports.runReport(myServer,'myCustomerReport.jasper','c:/myReport.xls',OUTPUT_FORMAT.XLS_1_SHEET,{pcustomerid: forms.customers.customer_id}); 
//plugins.jasperReports.runReport(myServer,'myCustomerReport.jasper','c:/myReport.ods',OUTPUT_FORMAT.ODS,{pcustomerid: forms.customers.customer_id});
//plugins.jasperReports.runReport(myServer,'myCustomerReport.jasper','c:/myReport.xml',OUTPUT_FORMAT.XML,{pcustomerid: forms.customers.customer_id});

// Jasper Reports supports queries with IN operators through the following notation: 
// X${IN,columnName,parameterName} like 'select * from customers where X$(IN,customer_id,pcustomeridlist) 
// When using this notation, the pcustomeridlist parameter needs to contain one or more values in the following way:
//var idlist = new Array(); 
//idlist[0] = 1; 
//idlist[1] = 26 ;
//plugins.jasperReports.jasperReport(myServer,'myCustomerReport.jasper',null,OUTPUT_FORMAT.VIEW,{pcustomeridlist: idlist}); 

//The return value is a byte array with the content of the file generated that can be further used. 
//var res = plugins.jasperReports.runReport(myServer,'samplereport.jrxml', null, OUTPUT_FORMAT.PDF, null);
//plugins.file.writeFile('e:\\\\sample.pdf', res);

// In order to run the report and move the table of contents(marked with the string: \"HIDDEN TEXT TO MARK THE BEGINNING OF THE TABEL OF CONTENTS\") 
// to the Insert page, which has to be identified by the string: \"HIDDEN TEXT TO MARK THE INSERT PAGE\" 
//plugins.jasperReports.runReport(myServer,'myCustomerReport.jasper','c:/myReport.xml',OUTPUT_FORMAT.XML,{pcustomerid: forms.customers.customer_id}, null,true);

// Pass exporter parameters to the export process in runReport 
//var params = new Object();
//params["EXPORTER_PARAMETER:net.sf.jasperreports.export.pdf.metadata.title"] =  "Test title"; 
//params["EXPORTER_PARAMETER:net.sf.jasperreports.export.pdf.metadata.author" ] = "Test Author";
//params["EXPORTER_PARAMETER:net.sf.jasperreports.export.pdf.metadata.creator"] =  "Test creator"; 
//params["EXPORTER_PARAMETER:net.sf.jasperreports.export.pdf.metadata.keywords" ] = "Test keywords";
//params["EXPORTER_PARAMETER:net.sf.jasperreports.export.pdf.metadata.subject"] =  "Test subject";
//var r = plugins.jasperReports.runReport("myServer","someReport.jrxml","path/to/someReportExported.pdf",OUTPUT_FORMAT.PDF,params);

// Using an XML/CSV file as the datasource of the report.
//var $parameters = null; //...
//var $repfile = 'report.jrxml';
//var $xmlDataCombined = plugins.file.readTXTFile('/path/to/datasource.xml');
//var $locale = 'en';
//plugins.jasperReports.runReport(plugins.jasperReports.INPUT_TYPE.XML, $xmlDataCombined, '/node/to/iterate/on', $repfile, null, OUTPUT_FORMAT.VIEW, $parameters, null)

writeFileToReportsDir(fileName, obj)

Store a reportFile on the Server.

Parameters

Sample

// .jasper or .jrxml files can be used var 
file = plugins.file.readFile('\\\\temp\\\\sample.jasper');
plugins.jasperReports.writeFileToReportsDir('myCustomerReport.jasper', file); 
// Writes to a subfolder from the reports directory. All the folders from the path must exist. 
plugins.jasperReports.writeFileToReportsDir('\\\\subdir\\\\myCustomerReport.jasper', file);

Type the plugin's version

Type the path to the extra directories relative to the server side set location

Type the location of the reports directory, relative to the server set path

Type the list of desired export formats; the first one will be the default export format.

Type

Type

report the .jrxml jasper report file

Returns: the compiled jasper report file

report the .jrxml jasper report file

destination the destination file for the compiled report

Returns: the compiled jasper report file

fileName the name of the report file to delete

Returns: true if the file was successfully deleted, false otherwise

report the name of the report file to get the parameters for

Returns: the JSDataSet with the report parameters

Returns: the String array of available reports

filter the string to be used as a search filter

Returns: the String array of available reports

printList the list of reports to merge; the objects in the list must be jasperPrint objects (or reports exported as jasper print)

orientation the orientation of the result report

outputType the output type of the result report

outputOptions the output options of the report, as provided for the runReport function

localeString localeString the string which specifies the locale

Returns: the result report as an Object

fileName the name of the file to read from the reports directory

Returns: the report file retrieved as a byte array

reportDataSource the server name or foundset to run the report on

report the report file (relative to the reports directory)

outputOptions the output file (must specify an absolute path) or null if not needed

outputType the output format; use the constants node for available output formats

parameters a parameter map to be used when running the report

Returns: the generated reported as a byte array

reportDataSource the server name or foundset to run the report on

report the report file (relative to the reports directory)

outputOptions the output file (must specify an absolute path) or null if not needed

outputType the output format; use the constants node for available output formats

parameters a parameter map to be used when running the report

localeString the string which specifies the locale

Returns: the generated reported as a byte array

reportDataSource the server name or foundset to run the report on

report the report file (relative to the reports directory)

outputOptions the output file (must specify an absolute path) or null if not needed

outputType the output format; use the constants node for available output formats

parameters a parameter map to be used when running the report

localeString the string which specifies the locale

moveTableOfContent true in order to move the table of contents, false otherwise

Returns: the generated reported as a byte array

inputType the type of the datasource, as one of the constants in INPUT_TYPE

reportDataSource the server name or foundset to run the report on

inputOptions additional input options (e.g. which node to iterate in the xml datasource document)

report the report file (relative to the reports directory)

outputOptions the output file (must specify an absolute path) or null if not needed

outputType the output format; use the constants node for available output formats

parameters a parameter map to be used when running the report

Returns: the generated reported as a byte array

inputType the type of the datasource, as one of the constants in INPUT_TYPE

reportDataSource reportDataSource the server name or foundset to run the report on

inputOptions additional input options (e.g. which node to iterate in the xml datasource document)

report the report file (relative to the reports directory)

outputOptions the output file (must specify an absolute path) or null if not needed

outputType the output format; use the constants node for available output formats

parameters a parameter map to be used when running the report

localeString a string which indicates the locale

Returns: the generated reported as a byte array

inputType the type of the datasource, as one of the constants in INPUT_TYPE

reportDataSource the server name or foundset to run the report on

inputOptions additional input options (e.g. which node to iterate in the xml datasource document)

report the report file (relative to the reports directory)

outputOptions the output file (must specify an absolute path) or null if not needed

outputType the output format; use the constants node for available output formats

parameters a parameter map to be used when running the report

localeString a string which indicates the locale

moveTableOfContent true in order to move the table of contents, false otherwise

Returns: the generated reported as a byte array

fileName the name of the file to write to

obj the object file to write

Returns: true if the write was successful, false otherwise

INPUT_TYPE
OUTPUT_FORMAT
JR_SVY_VIEWER_DISPLAY_MODE
String
String
String
Array
String
String
String
Boolean
String
String
Boolean
String
Boolean
String
JSDataSet
Array
String
Array
Array
String
String
Object
String
Object
String
Array
Object
String
Object
String
Object
Array
Object
String
Object
String
Object
String
Array
Object
String
Object
String
Object
String
Boolean
Array
String
Object
String
String
Object
String
Object
Array
String
Object
String
String
Object
String
Object
String
Array
String
Object
String
String
Object
String
Object
String
Boolean
Array
String
Object
Boolean
String
String
String
Array
String
String
Boolean
Boolean
Boolean
JSDataSet
Array
Array
Object
Array
Array
Array
Array
Array
Array
Array
Boolean
pluginVersion
relativeExtraDirectories
relativeReportsDirectory
viewerExportFormats
viewerIconURL
viewerTitle
compileReport(report)
compileReport(report, destination)
deleteFileFromReportsDir(fileName)
getReportParameters(report)
getReports()
getReports(filter)
mergeJasperPrint(printList, orientation, outputType, outputOptions, localeString)
readFileFromReportsDir(fileName)
runReport(reportDataSource, report, outputOptions, outputType, parameters)
runReport(reportDataSource, report, outputOptions, outputType, parameters, localeString)
runReport(reportDataSource, report, outputOptions, outputType, parameters, localeString, moveTableOfContent)
runReport(inputType, reportDataSource, inputOptions, report, outputOptions, outputType, parameters)
runReport(inputType, reportDataSource, inputOptions, report, outputOptions, outputType, parameters, localeString)
runReport(inputType, reportDataSource, inputOptions, report, outputOptions, outputType, parameters, localeString, moveTableOfContent)
writeFileToReportsDir(fileName, obj)