You are on page 1of 2

Contents

Contents

Script Guide

1 Introduction

2 Getting Started
2.1 Getting a Reference of the ReportServer Sources
2.2 Setting up Eclipse and Groovy . . . . . . . . . .
2.3 Setting up ReportServer in Eclipse . . . . . . . .
2.4 Setting up a Project for Scripts . . . . . . . . . .
2.5 Terminology and Extension Points . . . . . . . .
3 Basics
3.1 Executing Scripts . . . . . . . . . . . . . .
3.2 Executing Scripts via URL . . . . . . . . . .
3.3 The GLOBALS Object . . . . . . . . . . .
3.4 Working with Entities . . . . . . . . . . . .
3.5 Interpreting Script Error Messages . . . . .
3.6 Reading and Writing to Files . . . . . . . .
3.7 Nesting Scripts: Calling Scripts from Scripts

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

9
9
9
10
11
12

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

17
17
18
18
21
23
26
28

Techniques
. . . . . . .
. . . . . . .
. . . . . . .
. . . . . . .
. . . . . . .

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

31
31
32
32
34
36

5 Script Reporting
5.1 Basic Script Reports . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
5.2 Groovys Markup Builder . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

39
40
42

4 Monitoring, Multithreading, Scheduling


4.1 Execution of Scripts . . . . . . . . .
4.2 Starting scripts in the server thread .
4.3 Storing Values Between Scripts . . .
4.4 Multithreading in Scripts . . . . . .
4.5 Scheduling Scripts . . . . . . . . . .

.
.
.
.
.
.
.

.
.
.
.
.
.
.

and other
. . . . . .
. . . . . .
. . . . . .
. . . . . .
. . . . . .

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

Advanced
. . . . . .
. . . . . .
. . . . . .
. . . . . .
. . . . . .

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

Contents

5.3
5.4
5.5
5.6
5.7
5.8
5.9

Generating PDF and Word output . . . .


Running Script Reports from the Terminal
Testing via Browsers . . . . . . . . . . . .
Working with Parameters and Arguments
Working with Datasources . . . . . . . . .
Interactive Reports . . . . . . . . . . . . .
Script Datasources . . . . . . . . . . . .

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

43
43
45
45
46
46
49

6 Tapping into ReportServer


6.1 ReportServer Hooks Basics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
6.2 Registering Hooks on Start-up and on Login . . . . . . . . . . . . . . . . . . . . .
6.3 Which Hooks can I use? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

53
53
55
56

7 Extending the Client


7.1 UrlView - Incorporating Websites and More . . . . . . . . . . . . . . . . . . . . .
7.2 CommandResult - A Scripts Result . . . . . . . . . . . . . . . . . . . . . . . . .
7.3 ClientExtensionService . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

59
59
62
64

II Examples

71

8 Adding Additional Data Sources

73

9 Integrating ReportServer with an Active Directory


9.1 Synchronizing Users . . . . . . . . . . . . . . .
9.2 Authenticating Users . . . . . . . . . . . . . .
9.3 Possible Improvements . . . . . . . . . . . . . .

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

using LDAP
. . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . .

79
79
80
82

10 Additional Report Executors


10.1 Background . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
10.2 Adding the Output Generator to the Client . . . . . . . . . . . . . . . . . . . . . .

85
85
90

A AddFirebirdSupport.groovy

93

B hookldappam.groovy

97

C ldapimport.groovy

ii

101

You might also like