E-Node SuperReport Pro Developer Manual

E-Node SuperReport Pro Developer Manual
Add to My manuals

Below you will find brief information for SuperReport Pro. This manual provides a comprehensive guide to the features and functionality of SuperReport Pro, a powerful reporting tool for 4D developers. Discover how to create dynamic reports, customize templates, and integrate SuperReport Pro seamlessly into your 4D applications. Explore the various commands, properties, and scripting capabilities to unleash the full potential of SuperReport Pro.

advertisement

Assistant Bot

Need help? Our chatbot has already read the manual and is ready to assist you. Feel free to ask any questions about the device, but providing details will make the conversation more productive.

SuperReport Pro Developer Manual | Manualzz

3.3

SuperReport

Pro

Developer

Manual

Version 3.3

e-Node

30 rue de la République

33150 Cenon

France www.e-node.net

TOC

SuperReport Pro

2

TOC

Contents

About SuperReport Pro 9

What is SuperReport Pro, and what can I do with it? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9

SuperReport Pro Features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10

Technical Details . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10

Compatibility Information. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10

Technical Support . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10

Installation 11

Installing the plugin . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11

Using SuperReport Pro in Demo mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11

Licensing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12

Definitions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12

Regular and merged . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12

License keys . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12

Free updates. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12

License types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13

Registering your SuperReport Pro License . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14

Quick and easy way – End-user online instant activation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14

Quick and easy way – Developer online instant activation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14

The Demonstration mode dialog . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15

Retrieving the serial / machine information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15

Using the “Register” button . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15

Registering Server licenses . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16

Registering in Remote mode. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16

Registering on 4D Server . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16

Merged licenses notes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17

Using a text file . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18

Using SR_Register . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18

Combining methods . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18

Online registration. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19

“Master” keys . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19

Table of Contents

TOC

SuperReport Pro

3

Process. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19

User interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20

eMail notification . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21

Getting Started with SuperReport Pro 22

Creating SuperReport Pro Areas . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22

Using an External Window . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22

Using a 4D Form. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23

Basic Integration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24

External Window . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24

Plug-in Area . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25

Offscreen areas . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26

Upgrading from Previous Versions. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27

Major differences from previous versions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27

Compatibility Mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27

What’s Changed . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27

Updating Commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28

Obsolete Commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29

Registering SuperReport Pro . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29

What’s New in SuperReport Pro Version 3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29

Adjust Object Size by Style . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29

Count Pages . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29

Dynamic Text. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29

Group object . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29

HTML Export . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29

Multiple headers / footers. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30

Native drawing of Text. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30

Multistyle (attributed) text . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30

Object Properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30

Scripts. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30

Table object. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30

Unicode. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30

Watermark section . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30

XML. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30

Unlimited Undo / Redo support . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31

Other Improvements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31

Table of Contents

TOC

SuperReport Pro

4

Programming

SuperReport Pro 32

SuperReport Pro Objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32

Object Kinds . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32

Area / Report Identification. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33

SR_NewObjectFromXML . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33

Report reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34

Area reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34

Printed report reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34

Which Area / Report reference to use? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34

Object Identification . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35

Object number. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35

Object ID. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35

Object name . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36

Object print reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36

Commands and Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37

Properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37

Commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37

SR_SetLongProperty . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37

Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38

SR_GetLongProperty . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38

Getters and Setters. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39

When to use the commands and functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39

Anatomy of a SuperReport Pro Command . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39

Debugger . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40

Customizing the SuperReport Pro Area . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40

SuperReport Pro Variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41

Additional notes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42

Table objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43

Commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43

Object kinds . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43

Table properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43

Extending SuperReport Pro with Scripts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44

Execution Cycle scripts. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44

Object Scripts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44

SuperReport Pro Script Limitations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45

Understanding the SuperReport Pro Event Cycle . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46

Section Processing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46

Dealing with multi-platform Issues . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47

Dealing with platform pathnames . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47

Dealing with Print Drivers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47

Table of Contents

TOC

SuperReport Pro

5

HTML Support . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48

Using Custom Tag Variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49

The SuperReport Pro Execution Cycle . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49

Exporting to HTML . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50

Creating Reports Procedurally . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52

Printing AreaList Pro Areas with SuperReport Pro . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56

How it works . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56

Command and property . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56

AL_SuperReport . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56

Creating the report . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57

Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57

Custom templates . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57

Demonstration database code examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58

Print with SuperReport Pro (default template). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58

Print with SuperReport Pro (custom template) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58

Editing a custom template. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58

SuperReport Pro Text Style Tags . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59

Commands by Theme 61

Using the Command Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61

SR_ConvertReportToXML . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61

Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61

Name of the command . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62

Parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62

Result / Error Codes. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62

Parameter Descriptions. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62

Command Description. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62

Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62

Command Themes. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63

Access . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64

%SuperReport. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64

SR_ConvertReportToXML . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64

SR_DeleteReport . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65

SR_LoadReport . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65

SR_NewReport . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 66

Example 1 – Create a new offscreen report, load a report from a file selected by the user. . . . . . . . . . . . 66

Example 2 – Create a new offscreen report, load a report from a blob field . . . . . . . . . . . . . . . . . . . . . . . 66

SR_NewReportBLOB . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 66

SR_Register . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67

Basic example. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68

Example with multiple calls . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68

Force check example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68

Table of Contents

TOC

SuperReport Pro

6

Online registration examples. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69

SR_SaveReport . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69

Example – Save a report to a field . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69

Getters. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 70

SR_GetLongProperty . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 70

SR_GetObjectXML . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71

SR_GetProperties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71

SR_GetPtrProperty . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72

Example 1 – Using a blob . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72

Example 2 – Using a pointer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72

SR_GetRealProperty . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72

SR_GetTextProperty . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 73

Setters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 74

SR_SetLongProperty . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 74

SR_SetProperties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 75

SR_SetPtrProperty . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 76

SR_SetRealProperty . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 77

SR_SetTextProperty . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 78

Objects. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 79

SR_ChangeObjectParent . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 79

SR_DeleteObject . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 81

SR_FindObjectByID . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 82

SR_GetObjects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 82

SR_GetObjectsByPropertyValue . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 83

SR_GetParent . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 84

SR_ModifyTable . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 85

SR_NewObject . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 86

SR_NewObjectFromXML . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 87

Printing. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 88

SR_AbortPrinting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 88

SR_CloseSession . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 88

SR_Export . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 89

Example 1 – Export the Body section of a report to an XML file . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 89

Example 2 – Export the Body section of a report to a CSV text file. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 89

SR_ExportBLOB . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 90

SR_ExportBLOBIntoBLOB . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 90

SR_ExportIntoBLOB . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 90

SR_OpenSession . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 91

SR_OpenSessionBLOB . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 92

SR_Print . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 92

SR_PrintBLOB . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 93

SR_PrintBLOBIntoPICT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 94

Table of Contents

TOC

SuperReport Pro

7

SR_PrintIntoPICT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 95

SR_PrintSettings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 96

Miscellaneous . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 97

SR_Area_Redo . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 97

SR_Area_SaveUndo . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 97

SR_Area_Undo . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 98

SR_ColorPicker . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 98

Example 1 – Use the native color picker . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 98

Example 2 – Use the 4D form color picker . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 98

Example 3 – Use the 4D form color picker, return the mixed value . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 98

SR_DetokenizeScript . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 99

SR_ExecuteScript . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 99

SR_RunScript . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 100

SR_RunTokenizedScript . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 100

SR_TokenizeScript . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 100

Properties by Theme 101

Property themes. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 101

Property Table Columns. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 102

Common properties: Objects and Styles . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 103

Object Common Properties. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 103

Style Properties. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 106

Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 106

Common Object Properties used in Styles . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 107

Properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 107

Plugin / Area / Event. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 110

Plugin Properties. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 110

Style Property used. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 110

Properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 110

Area Properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 112

Common Object Property used . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 112

Properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 112

Event Properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 114

Report . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 117

Common Object Properties used . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 117

Report Properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 117

Report Editor Properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 118

Section / Guide . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 121

Section Properties. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 121

Common Object Properties used . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 121

Section General Properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 121

Section Header / Footer Properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 122

Table of Contents

TOC

SuperReport Pro

8

Section Break Properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 122

Section Watermark Properties. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 123

Guide Properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 123

Common Object Properties used . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 123

Properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 124

Group / Line / Oval / Rectangle . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 124

Group Properties. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 124

Common Object Properties used . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 124

Property . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 125

Line Properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 125

Common Object Properties used . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 125

Properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 126

Oval Properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 126

Common Object Properties used . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 126

Properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 127

Rectangle Properties. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 128

Common Object Properties used . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 128

Properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 129

Picture / Text . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 130

Picture Properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 130

Common Object Properties used . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 130

Properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 131

Text Properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 131

Common Object Properties used . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 131

Style Properties used . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 133

Properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 133

Variable / Field / Data source . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 134

Variable Properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 134

Common Object Properties used . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 134

Style Properties used . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 135

Properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 136

Field Properties. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 137

Common Object Properties used . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 137

Style Properties used . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 138

Properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 138

Data source Properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 139

Common Object Properties used . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 139

Properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 140

Table / Header / Column / Footer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 141

Table Properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 141

Common Object Properties used . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 141

Properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 142

Table of Contents

TOC

SuperReport Pro

9

Table Header Properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 143

Common Object Properties used . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 143

Style Properties used . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 143

Properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 144

Table Column Properties. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 145

Common Object Properties used . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 145

Style Properties used . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 145

Properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 146

Table Footer Properties. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 147

Common Object Properties used . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 147

Style Properties used . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 147

Properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 148

Get Objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 149

Properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 149

Print flags 150

Constants. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 150

Print settings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 151

Preview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 152

Preview flags. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 152

Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 153

Print . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 153

Preview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 153

Programming a preview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 153

Editor and command mapping . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 153

File name . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 153

Unique name on Windows . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 154

Windows File format . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 154

Using Microsoft XPS Document Writer on Windows . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 154

Printing to PDF on Windows . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 155

PDF File size. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 155

Using PDFCreator. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 155

Working with Colors 156

Specifying Colors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 156

Color values passed as string values . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 156

Color passed in longint values . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 157

Converting RGB values . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 157

Patterns . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 158

Table of Contents

TOC

SuperReport Pro

10

Appendixes 159

Appendix 1: Troubleshooting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 159

Localised Formats. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 159

Debugger window . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 159

Missing strings on 4D v11 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 159

Object visibility . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 160

Forcing empty space at the top of the page . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 160

Appendix 2: Hints and Tips . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 161

Quotes and Double Quotes. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 161

Setting the font attributes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 161

Modifying the font size during printing. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 161

Components . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 161

Platform native settings and printing destination. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 162

Embedding variables in HTML export text. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 163

Setting multiple objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 164

Appendix 3: Frequently Asked Questions. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 165

User environment . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 165

Compatibility . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 165

Repeating Objects and Relationships . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 165

Virtual structure. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 166

Headers and footers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 166

Plug-in Area type. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 167

Menus . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 167

Watermarks. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 168

Multiple Undos . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 168

SRArea variable and Area / Report reference during printing. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 168

Appendix 4: Property Values, Constants and XML Names. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 170

Appendix 5: Other Constants . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 178

Version 3 API constants . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 178

SRP Object Kinds . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 178

SRP Section Types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 178

SRP Create Object Types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 179

SRP Area Tools . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 179

SRP Get Objects Types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 180

SRP Object Binding . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 180

SRP Style Features. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 180

SRP Error Codes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 181

SRP Export Flags . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 181

SRP Print Picture . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 182

SRP Print Flags. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 182

Legacy constants . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 183

Table of Contents

TOC

SuperReport Pro

11

SR Pro Event Codes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 183

SR Pro Menu IDs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 183

SR Pro Sections . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 186

SR Pro Errors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 187

SR Pro Editor Codes. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 187

SR Pro Options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 190

Copyrights and

Trademarks 193

Index 194

Table of Contents

1

About SuperReport Pro

9

1

About SuperReport Pro

What is SuperReport Pro, and what can I do with it?

SuperReport Pro is a plugin for 4D which provides an enhanced report creation and printing tool for developers and end-users.

Using the SuperReport Pro Editor and plug-in routines, developers can create sophisticated reports that support a variety of data formats, including 4D fields, variables, and arrays.

In addition, SuperReport Pro can be integrated into any 4D application’s user interface, providing your users with the ability to create reports using a number of advanced features not available using the standard reporting tool built into 4D.

SuperReport Pro's greatest benefit is the fact that it provides the ability for users to create and modify report designs long after a

4D database application has been completed without requiring any code changes to the database.

This benefit is further enhanced in the case of compiled databases, where SuperReport Pro allows reports to be changed without requiring either database changes or recompilation.

SuperReport Pro reports can be held as documents on disk, or be contained within the data file belonging to the database. Thus vertical market applications sold to many customers can be supplied with standard reports, which can later be customized by the user.

Since these reports are held in the data file or external files, program updates installed at a later date will have no impact on the users' systems - the same program update can be sent to all users and each user's customized reports are preserved!

SuperReport Pro's power does not come at the expense of simplicity. Most users will be able to grasp the concepts involved in designing reports, since the editor is so similar to a drawing program.

Report operations like break processing, which can be cumbersome and complex in 4D, are also made simpler, with the user able to specify when breaks occur and which objects are to be totalled, without requiring any code.

Items that are new or modified in SuperReport Pro version 3.2 are displayed in pink (magenta) characters.

Items that are new or modified in SuperReport Pro version 3.3 are displayed in green characters.

What is SuperReport Pro, and what can I do with it?

1

About SuperReport Pro

10

SuperReport Pro Features

SuperReport Pro includes a wide variety of features for creating fully customizable reports. Using the full-featured plug-in area, you can quickly and easily enhance your application's reporting capabilities.

If the standard functionality is not enough, you can take advantage of the complete developer API to further extend the power of

SuperReport Pro.

Included in SuperReport Pro™ are the following features:

â–  â– 

Compatibility with 4D v11 to v15, including 64-bit 4D Server.

Note: on Mac, only Intel processors are supported.

â–  â– 

Include a full-featured reporting tool in any application, quickly and easily

â–  â– 

Enhance reporting capabilities using the SuperReport Pro developer API

â–  â– 

Complete support for creating HTML formatted reports

â–  â– 

Repeating objects for printing related many records

â–  â– 

Supports printing 4D arrays, including direct access to specific array elements

â–  â– 

Support for executing callback routines and object scripts when printing reports

â–  â– 

Support for executing custom scripts for enhanced script management

â–  â– 

Support for custom structure views – great for isolating which tables and fields the user can access

â–  â– 

Developer API for customizing end-user functionality

â–  â– 

Enhanced Editor Customization

â–  â– 

Print SuperReport Pro areas, or save them as HTML

Technical Details

Compatibility Information

SuperReport Pro Version 3 is compatible with 4D v11 to v15, for both MacOS and Windows (including 32-bit and 64-bit servers).

It requires MacOS 10.7.5 or higher and Windows 7 or better.

Technical Support

Technical support for SuperReport Pro is provided via the online web forums .

SuperReport Pro Features – Technical Details

2

Installation

11

2

Installation

Installing the plugin

SuperReport Pro is provided as a bundle for both Windows and MacOS: there is just one version for both platforms. To install it, simply copy the file SRP.bundle into your Plugins folder.

Plugins folders can be located in one of two locations:

â–  â– 

In the 4D application folder (4D or 4D Server). When plugins are installed in this location, they will be available to every database that is opened with that application.

â–  â– 

Next to the database structure file for your project: in this case, the plugin will only be available to that database. On MacOS, this means that the Plugins folder must be placed within the database package or folder. To open a package, ctrl-click on the package and choose

Show Package Contents from the contextual menu.

Using SuperReport Pro in Demo mode

You can use SuperReport Pro in Demo mode for 20 minutes, after which time it will cease to work. When this becomes annoying, it’s time to buy a license, which you can do on our website .

Licenses are either linked to the 4D product number, the workstation or the company name as described below.

Installing the plugin – Using SuperReport Pro in Demo mode

2

Installation

12

Licensing

Like all e-Node plug-ins, SuperReport Pro offers several license types. There are no such things as MacOS vs Windows or

Development vs Deployment.

For current pricing, please see the ordering page on our website .

Definitions

â– 

Regular and merged

â–  â– 

Regular licenses are used for applications that are opened with 4D Standalone or 4D SQL Desktop, or with 4D Server, either in interpreted or compiled mode (doesn’t make a difference regarding plugin licensing).

These can be either single user or server databases and they are linked to the 4D or 4D Server license: you need to provide the number returned by the “Copy” or “eMail” buttons from the plugin demonstration mode alert (this number is actually the 4D command

GET SERIAL INFORMATION

first parameter). This number is a negative long integer such as -1234567.

â–  â– 

Merged licenses are used for double-clickable applications built with 4D Volume Desktop (single user) or with 4D Server by means of the 4D Compiler module.

These licenses are linked to the machine ID (single user workstation or server): you need to provide the number returned by the “Copy” or “eMail” buttons from the plugin demonstration mode alert (this number is calculated from the single user or server machine UUID). On 4D Server any remote client will return the server number. This number is a positive long integer such as

1234567.

In both cases the demonstration mode dialog will display the proper number according to the current setup (regular or merged) and

the “Copy” and “eMail” buttons will use it as well.

â– 

License keys

â–  â– 

Final licenses keys are delivered by e-Node once you have provided the associated number as described above (4D serial information or machine ID). They activate the plugin either though

4D code

or the Register button from the demonstration mode dialog .

â–  â– 

Master keys are delivered upon order if you opt for the

Online instant activation system. The final license key is self-generated

by the plugin and stored into the license file , so you don’t have to bother with 4D serial information or machine IDs.

Free updates

â–  â– 

Regular licenses. A new license will be supplied for free at any time (maximum once a year) if you change your 4D version or get a new 4D registration key for the same version, provided that your previous license match the current public version at exchange time. This rule applies whether you are already using the new version or not: just specify that you also want a key for the older version as well as the current one when you order an upgrade.

â–  â– 

Merged licenses. These licenses are independent from the 4D versions and product numbers. They will remain functional if you upgrade e.g. from 4D v14 to 4D v15 on the same machine (single user workstation or server).

You’ll only need to update a merged license if your machine or motherboard is replaced (a new license will be supplied for free in this case, provided that your previous license match the current public version at the exchange time), or if you install a paid upgrade of the plugin.

Note: if you are using several concurrent versions of 4D you will need one plugin license for each version.

Licensing

2

Installation

13

License types

â–  â– 

Single-user. This license allows development (interpreted mode) or deployment (interpreted or compiled mode, including merged) of applications that are opened with 4D Standalone or 4D SQL Desktop or built with 4D Volume Desktop.

â–  â– 

Server. These licenses allow development (interpreted mode) or deployment (interpreted or compiled mode, including merged servers / remotes) on 4D Server with up to 10 users (“small server”), 11 to 20 users (“medium server”) or more (“large server”).

â–  â– 

Unlimited Single User. This license allows development (interpreted mode) or deployment (interpreted or compiled mode, including merged) on any number of 4D Standalone (or single user merged applications built with 4D Volume Desktop) that run your 4D application(s).

It is a yearly license, which expires after the date when it is to be renewed. Expiration only affects interpreted mode.

Compiled

applications using an obsolete license will never expire.

A single license key will unlock all setups on all compatible 4D versions and all versions of the plugin. The license key is linked to the developer/company name.

This license allows deployment (selling new application licenses, updates or subscriptions) while the license is valid.

No new

deployment may occur after expiry without a specific license (merged or regular). End-users running deployments sold during the license validity period remain authorized without time limit, provided that they are no longer charged for the application using the plug-in (including maintenance or upgrades).

â–  â– 

OEM. This license allows development (interpreted mode) or deployment (interpreted or compiled mode, including merged) on any number of 4D Servers (any number of users), 4D Standalone or single user/remote merged instances that run your 4D application(s).

It is a yearly license, under the exact same terms as the Unlimited Single User license described above, except that it also covers server deployments.

â–  â– 

Unlimited OEM. This license is a global OEM license, covering any combination of the plug-ins published by e-Node , including

AreaList Pro , PrintList Pro , SuperReport Pro , CalendarSet and Internet ToolKit in all configurations.

â–  â– 

Partner license. This license matches 4D’s annual Partner subscription and covers all the plug-ins published by e-Node , including AreaList Pro , PrintList Pro , SuperReport Pro , CalendarSet and Internet ToolKit .

For each product, a single registration key allows development (interpreted mode) or deployment (interpreted or compiled mode, except merged) on all 4D Standalones and 4D Servers (2 users) regardless of 4D product numbers, OS and versions. No merged applications.

This is a yearly license, expiring on February 1 st

(same date as 4D Partner licenses). Expiration only affects interpreted mode.

Compiled applications using an obsolete license will never expire.

Note: you don’t have to be a 4D Partner subscriber to subscribe to the e-Node Partner license.

Licensing

2

Installation

14

Registering your SuperReport Pro License

Once you have purchased your license, you will receive a registration key. This code must be registered each time the database is started.

There are three ways to register your license:

â–  â–  using the Demo mode dialog

“Register” button ,

â–  â– 

though a text file

,

â–  â– 

in your 4D code with a command

.

Both Register button and 4D code registrations can be performed in one single step through the Online registration

system.

Yearly licenses such as Unlimited single user

,

OEM and Partner

licenses do not require any serial information or online instant activation. The only way to register these licenses is through the

SR_Register

command.

Quick and easy way – End-user online instant activation

1.

Make sure that the machine where the plugin will be used is connected to the Internet (single user workstation or in server mode the first remote client that will connect to the server).

2.

Launch your application . Displaying any layout that uses the plugin will trigger the demonstration mode dialog .

3.

Enter the Master key

that was delivered by e-Node .

4.

The plugin will display an alert indicating that it is now registered.

Note: this method does not require your source code to be modified or recompiled.

Quick and easy way – Developer online instant activation

1.

Put the following lines of code into your

On Startup database method, with the Master key that you received and your email address:

C_LONGINT

( $result )

$result := SR_Register ("yourMasterKey";0;"[email protected]") // 0 if successful

2.

Make sure that the machine where the plugin will be used is connected to the Internet (single user workstation or in server mode the first remote client that will connect to the server).

3.

Install your application .

4.

Launch your application . Displaying any layout that uses the plugin will silently (no dialog) register it.

5.

You will receive an email with the final key that was issued and the IP address of the user site.

If the site has no Internet connection or if you want to use the plugin license system to help protect your own software copy, you can manage the final key registration yourself using one of the following methods.

Registering your SuperReport Pro License

2

Installation

15

The Demonstration mode dialog

The demonstration mode dialog is used for both

Online instant activation

and manual registration, unless the plugin is registrered with a

final key

or

master key through the 4D code.

When using manual registration, single user and server licenses require that you first send us the relevant information (serial or

machine ID, see Definitions ).

Note: sending the serial information or machine ID is not needed with the

Online instant activation

system .

This action is performed from the Demo mode dialog, which is displayed upon the first call to the plugin.

To trigger this display and enable your users to register without actually calling a command or setting up an area, you can also pass an

empty string to SR_Register

and the dialog will show:

C_LONGINT

( $result )

$result := SR_Register ("") // display the dialog

Note: calling SR_Register with any key (valid or invalid) will not display the dialog.

â– 

Retrieving the serial / machine information

The Demo mode dialog includes all relevant information (serial or machine ID, see

Definitions ) to obtain your license, as well

as a “Copy” button to put this information into your clipboard or a text file, an “eMail” button to email the information to e-Node’s registration system and a “Register” button to enter your license key once received:

â– 

Using the “Register” button

Clicking on this button will display a standard 4D request to enter your registration key:

Registering your SuperReport Pro License

2

Installation

16

Paste or drag and drop your registration key and, if correct, the plug-in will be registered for all future uses on this workstation:

Note: if 4D does not activate the

Edit > Paste menu item click Abort and Register again, or try drag and drop.

Note: you can directly paste the

Master key

that was delivered when using the

Online instant activation .

Registering Server licenses

Similarly, server licenses can be registered from the demonstration mode dialog without having to modify your code and use

SR_Register (which of course you can do with any license type). In this case, the 4D Licenses folder, serial information or machine

ID used will only be the 4D Server information, not the client workstation’s.

Server licenses can be registered on any client workstation (remote mode), or on 4D Server itself.

â– 

Registering in Remote mode

The server and all workstations can be registered from any single client workstation connected to the server. As in Single user mode, the Demo mode dialog will be displayed on a client workstation when one of the following conditions are met:

â–  â– 

Calling a SuperReport Pro command other than SR_Register with a non-empty parameter

â–  â– 

Calling SR_Register with an empty string

Use the Copy, eMail and Register buttons just as above and your server will be registered for all workstations.

Note: any other workstations previously connected (before registration occurred) will need to re-connect to the server to be functional.

â– 

Registering on 4D Server

To directly register the server and all workstations from the server machine itself, you need to display the Demo mode dialog on the server.

Call

SR_Register with an empty string in the On Server Startup base method:

C_LONGINT

( $result )

$result :=

SR_Register ("") // display the dialog

Registering your SuperReport Pro License

2

Installation

17

Use the Copy, eMail and Register buttons just as above and your server will be registered for all workstations.

Note: the dialog will automatically be dismissed on the server after one minute in order not to block client connections (the server is only available to client workstations once the On Server Startup method has completed).

â– 

Merged licenses notes

Both methods can be either used with regular or merged

servers and client workstations.

â–  â– 

Regular licenses are linked to the 4D Server serial information

â–  â– 

Merged licenses are linked to the 4D Server machine ID

Note: merged licenses will keep working if your 4D Server serial information is modified (upgrading or 4D Partner yearly updates), or if any client workstation hardware is changed.

It will only need to be updated if the 4D Server hardware is changed, or if the plugin itself requires a new key (paid upgrades upon major version changes).

You may want to register your merged server without having to turn off the database to modify the code. We have created a utility database to manage this - it’s called Get Serial Info and you can download the appropriate version for your 4D version from the e-Node server.

This is possible using any 4D setup on the server machine (such as a standard developer single user 4D). Keeping your production server alive, open the Get Serial Info database with 4D on the same server machine. Ignore the demonstration mode dialog (if your single user 4D is not registered for the plugin) and wait for the next Alert:

A text file is also saved with the same information.

The last line “Machine ID” is the number that you need to send in order to receive your merged server registration key.

You can also check the machine ID in standalone mode (or on any remote client with the built-client application or in interpreted mode as long as it is running on the same server machine) with AreaList Pro using the following call:

C_LONGINT

( $machineID )

$machineID := AL_GetAreaLongProperty (0;"mach")

Note: you don’t need an AreaList Pro license to do this.

Registering your SuperReport Pro License

Using a text file

Alternately, you can place a plain text file into your 4D Licenses folder.

To open this folder from 4D use the 4D Menu Help > Update licenses, then click the Licenses Folder button:

2

Installation

18

The text file must be called “SRP3.license4Dplugin” and be a plain text type file.

Just paste all your licenses for SuperReport Pro v3.x, one per line, e.g.:

MyLicense1

MyLicense2

MyLicense3

Any license type can be included into this document, except unlimited single user, OEM and Partner licenses.

Note: the Demo mode dialog Register button actually does this: create the text file and include the license key, or add the license key to the existing document if any.

Note: when using the

Online instant activation

system, the

Master key is automatically converted to a

Final key

according to the current environment and this final key is stored into the license file.

Using SR_Register

1.

Open the

On Startup database method

2.

Call the SR_Register function with your registration key - for example:

$result :=

SR_Register ("YourRegistrationKey") // result = 0 means registration was successful

If you have several licenses for different 4D setups you can call SR_Register multiple times in a row without further testing. See the

Example with multiple calls .

Combining methods

When such a file exists in the Licenses folder SuperReport Pro will check for valid licenses from this document as a first action before anything else (including checking any SR_Register command).

If a valid license is included into the “SRP3.license4Dplugin” document any calls to SR_Register will return zero (for “OK”).

Therefore you can mix modes and use the text file (or

Register button) as well as the command.

Unlimited single user, OEM, temporary and Partner licenses can only be entered through the SR_Register command.

Registering your SuperReport Pro License

2

Installation

19

Online registration

As of version 5.3, SuperReport Pro provides an automated solution to register itself using an Internet connection.

This feature can be helpful whenever you don’t want to bother your end user with plugin registration, or want to save the time to collect the serial / machine ID, or any other reason when you expect the process to be entirely and automatically managed from the client site.

It can also be used for your own development tools, removing the need to modify your 4D code to include or update registration licenses.

Note: the site must have an open outgoing HTTP Internet connection available.

â– 

“Master” keys

The basic principle is that we deliver a non-assigned license key, called master key

, which you use in your call to

SR_Register in

your

On Startup database method. This key will be used to generate valid keys for the plugin and environment, called

final keys .

One single master key can generate as many final keys as you need, in case you order several licenses of the same kind (regular or merged, single user licenses or server licenses of the same size).

A master key looks like a final key, except that the second part is the plugin code name (same as the

license file name) instead of

the serial / machine ID, e.g. “123456-SRP3-xyz”.

Passing a master key as the first parameter to SR_Register when the plugin has not been previously registered by any of the methods above will result in a connection attempt to e-Node’s license server as described below.

Master keys can also be entered by the user through the registration dialog. See Quick and easy way – End-user online instant activation

.

â– 

Process

If the plugin has not been previously registered (through online registration, text file, register button or SR_Register

with a final key), and if SR_Register receives a master key in its first parameter, it will recognize it a such, then:

1.

Connect to e-Node’s license server.

2.

Ask the server if the master key has not been assigned yet (or if the master key is designed to generate several final keys, if there is any unassigned key up to that number).

3.

Send the serial information (regular licenses) or the machine ID (merged licenses) to the license server.

4.

If an error is detected (such as master key not matching the current setup) return an error to

SR_Register.

5.

If the master key is valid, receive its final key from the license server then register itself (writing into the license file).

Note: if a final key has already been issued for this serial / machine ID using this master key, it is simply resent.

Registering your SuperReport Pro License

2

Installation

20

â– 

User interface

In addition, SR_Register

second parameter allows optional settings regarding the user interface in the online registration process.

C_LONGINT

( $result )

$result :=

SR_Register ("Master key";0 ?+1 ?+2 ?+3;"[email protected]") // all dialogs

Display a confirmation dialog before step 1

Display an alert at step 4

Display an alert at step 5

Registering your SuperReport Pro License

2

Installation

21

â– 

eMail notification

The third parameter to

SR_Register

(optional) is the developer email to whom the information will be sent (if this parameter is used and non empty, of course).

The emailed information includes both the final key issued and the IP address from where it was requested (and to where it was sent for registration).

â–  â– 

When a key is issued:

Title: SRP3 license

Body:

License 123456-123456789-abcdefgh issued to 12.34.56.78

â–  â– 

When a key is resent:

Title: SRP3 license

Body:

License 123456-123456789-abcdefgh resent to 12.34.56.78

The default mode (master key being passed as the only parameter) is silent: no confirmation, no alert, no email.

Registering your SuperReport Pro License

3

Getting Started with SuperReport Pro

22

3

Getting Started with SuperReport Pro

This chapter outlines the fundamentals of using SuperReport Pro, including:

â–  â– 

An overview of creating SuperReport Pro areas

â–  â– 

Customizing the SuperReport Pro area

â–  â– 

Extending SuperReport Pro with object scripts

â–  â– 

Understanding the SuperReport Pro Event Cycle

â–  â– 

Dealing with multi-platform issues.

â–  â– 

HTML support

For detailed information on using the SuperReport Pro commands, please refer to the

Command Reference section.

See the Tutorial section in the User Guide to learn more about getting started with SuperReport Pro.

Creating SuperReport Pro Areas

There are two ways in which a SuperReport Pro area can be presented to your users:

1.

Using the 4D

Open external window

command

2.

Displaying a 4D form (either via a dialog or input form)

In addition, you can create and use offscreen areas

, for programmed actions such as printing or exporting without user interaction.

Using an External Window

If you wish to use SuperReport Pro in an external window, you simply need to call the 4D

Open external window

routine:

C_LONGINT

( $areaRepRef )

$areaRepRef :=

Open external window

(50;50;400;400;8;"SuperReport Pro";"%SuperReport")

Creating SuperReport Pro Areas

3

Getting Started with SuperReport Pro

23

Using a 4D Form

The most common way of using SuperReport Pro is to place a plug-in object on your input form or dialog. To do this:

1.

Select the Plugin Area option from the tool palette on your form:

2.

Draw a rectangle on the form in the size that you want your report to appear.

3.

In the Properties palette, choose

SuperReport Pro from the Type dropdown menu

4.

Assign a name to the object variable

Your SuperReport Pro area will look like this:

Note that if you have a field in the table that has the same name as the report variable followed by an underscore, the comment changes:

The field must be a Blob or Text field. Otherwise, you'll see the following comment:

For more detailed information on using SuperReport Pro on an input form, please refer to the Tutorial section in the SuperReport

Pro User Guide .

You can use the commands and functions to configure every aspect of an SuperReport Pro area, and to get information about an area. The commands and functions are grouped into themes such as Getters, Setters, Printing, etc.

Creating SuperReport Pro Areas

3

Getting Started with SuperReport Pro

24

Basic Integration

SuperReport Pro can be integrated into your applications via two different methods.

The first method uses a 4D external window; the second uses a 4D form that can be displayed in a dialog or input form.

All examples discussed in this section assume you have a custom table for storing the various reports you create. In our examples, we’ll use the following table structure, which is defined in the Demo Database that is supplied with SuperReport Pro:

External Window

Using the 4D

Open external window

command, you can display the SuperReport Pro editor in a fashion similar to the

New process

command.

1.

Open the SuperReport Pro editor in an external window using the following code.

C_LONGINT

( $areaRepRef )

$areaRepRef :=

Open external window

(50;50; Screen width -50; Screen height -50;8;"New Report";"%SuperReport")

When you display SuperReport Pro in an external window, you should use a Window type of 8 so that the window can be resized by the user and the close box is available. If you use a modal window (type 1 or type 5), the user will not be able to close the window.

2.

If you wish to communicate with the SuperReport Pro editor in an external window, you can use the window reference ( $areaRepRef ) as the Area / Report reference parameter for those routines which interact with the plug-in area.

C_TEXT

( reportPath ) reportPath :="Hard Disk:myReport.srp"

$error := SR_NewReport ( $areaRepRef ; reportPath ;1)

Basic Integration

3

Getting Started with SuperReport Pro

25

Plug-in Area

The second (and most common) way to use SuperReport Pro is to place the plug-in area on an input form, then provide access to the input form either via the

DIALOG

command or through the standard

MODIFY SELECTION

command (or User Mode access).

1.

Create a new input form, or modify an existing input form, in which you wish to display the SuperReport Pro plug-in area.

2.

Create a new plug-in object using the 4D Object List:

3.

Select the SuperReport Pro object from the Plug-in Area popup menu to create a SuperReport Pro area.

4.

Assign a name to your variable, which will be used by the related SuperReport Pro command to reference your report area.

If you define the name of the report area which is the same name followed by an underscore of a field which is in the table which contains the form you have created, SuperReport Pro will automatically load and save the report when the record is loaded.

For example, if you have a field entitled [Reports]ReportData_ when creating the SuperReport Pro area, using a name of

“ReportData” will instruct SuperReport Pro to automatically load / save the report when the record is loaded and the form is displayed.

The type of this field should be a blob field.

If you are using the auto save feature of SuperReport Pro, you may proceed to Step 7

.

If you are not using a “report” table, you will need to procedurally load / save the reports using the appropriate SuperReport Pro routines (Step 5 and Step 6).

Basic Integration

3

Getting Started with SuperReport Pro

26

5.

The next step is to create the report data so that your users can access it. The first

If

test determines if it's a new record. If so, we create a new report using the

SR_LoadReport command. If it's an existing record, we load the data from the saved report record

with SR_LoadReport (we’ll cover how to save report data in a bit).

C_LONGINT

( $error )

Case of

:(

Form event

= On Load )

If

(

Is new record

([ Customer ])) // it's a new record

$error := SR_LoadReport ( $areaRepRef ; SR_GetTextProperty (0;0; SRP_Area_NewReport ))

Else

$error := SR_LoadReport ( $areaRepRef ;

BLOB to text

( [RM_Reports]RM_ReportData ; \

UTF8 Text without length ))

End case

At this point, we are ready to begin using the SuperReport Pro editor. However, before we proceed, let’s add the code necessary for saving your report information to our report data field so that we can access it again.

6.

The last step we need to complete is saving our reports to the SuperReport Pro data field. The easiest way to do this is to make sure

you have a field, appropriately named, to auto-save the report (see the discussion on this topic

).

When you are retrieving information from a SuperReport Pro plug-in area, you must use a 4D text variable; passing a text field

will not work correctly. Once the SR_SaveReport

routine has completed successfully, you can copy the variable to your storage field as we have above.

7.

Now you are ready to begin using the SuperReport Pro editor. Enter the User Mode (or however you have configured access to the

[Report_Mgr] table) and create a new record. You should see something similar to the following input form:

Offscreen areas

An offscreen area is a plugin area that is only available in memory, not visible to the user.

Offscreen areas can be used for printing or exporting without any user interaction.

Such reports are created with

SR_NewReport or SR_NewReportBLOB .

Make sure to always delete offscreen reports in order to free memory after you've finished with them, using SR_DeleteReport

.

See for example

Creating Reports Procedurally

.

Basic Integration

3

Getting Started with SuperReport Pro

27

Upgrading from Previous Versions

SuperReport Pro version 3 is compatible with 4D versions 11 to 15.

To upgrade to SuperReport Pro version 3.x, simply install it as described in the

Installation section of this manual, replacing your

older version.

Major differences from previous versions

â– 

Compatibility Mode

You do not have to update all your SuperReport Pro areas and code immediately; SuperReport Pro version 3 will automatically run in compatibility mode.

Compatibility Mode Behaviour

When running in compatibility mode, the following behaviours are different:

1.

SR RELATIONS sets compatibility mode on (in SuperReport Pro 3 it is a persistent property of a report, not a global one).

In compatibility mode SRP_DataSource_RelateOne and SRP_DataSource_RelateMany are ignored in the report; the global settings are used

2.

SR Set Script Callback when used with area = 0 sets compatibility mode on (in SuperReport Pro 3 it is a persistent property of the report, not a global one). In compatibility mode, SRP_DataSource_Callback in the report is ignored; the global setting is used.

â– 

What’s Changed

Native Look

Now the appearance is always native.

New API

SuperReport Pro version 3 introduces a completely new API which is based on a full list of properties that the developer can get / set.

There are now fewer commands that you use to set and get an area’s properties.

Each command affects just one property for the area, making your code much easier to understand and debug.

The new commands are organised into themes which relate to a particular part of the SuperReport Pro area, and some miscellaneous Utility commands.

For each theme there is a group of “Getter” functions and “Setter” commands, each targeting a different property type. For

example, you can use the SR_GetRealProperty command to get the value of a property that has a real number value as its result.

Note that Boolean properties are called as longints (1 = True, 0=False). Don’t worry though - you will not need to re-write all your

SuperReport code.

Most of your existing commands will still work; the old commands act as wrappers for the new ones.

In fact you will still be able to write new code using the old commands, but if you want to take advantage of the new features, you’ll need to use the new commands.

Some of the old commands are now obsolete or are no longer relevant and should be removed from your code.These are listed in the table below, along with details about how they should be replaced, where appropriate.

You can find a description of the new syntax in the Anatomy of a SuperReport Pro Command topic.

Upgrading from Previous Versions

3

Getting Started with SuperReport Pro

28

Saving Reports - now in XML

Looking at historical versions of SuperReport Pro, the earliest version saved reports as picture files. This was subsequently replaced with blobs, and now, in Version 3, they are saved as XML.

â– â– 

You can use the

SR_ConvertReportToXML

command to convert existing reports from the old blob format into the new XML one.

SR_ConvertReportToXML is used internally when needed - you don't have to convert all old reports to use them.

â– â– 

SR_SaveReport creates an XML file or fills a variable with XML.

â– â– 

SR_NewReport

expects a text: the report as XML text or a path to the report in a file, which can be in old 2.x blob format.

â– â– 

SR_NewReportBLOB

expects a blob, which can be in old binary format.

Instead of

BLOB to text

, always use SR_ConvertReportToXML if there is any chance the blob contains old binary report.

If the report is already converted, it is immediately returned without conversion.

Or always use the blob API.

Using reports stored on disk is similar:

DOCUMENT TO BLOB

will work, but

BLOB to text

will fail if it is in old 2.x blob format.

But using SuperReport Pro's both old and new API to load a file will work.

Note that all the API using report as text is unusable in non-unicode mode due to the TEXT limit (32000 characters).

In such case, use the old API for loading / saving the report (or the new API when using files) and either old API or new blob API for printing / export.

To convert even older picture format documents first use the old command SR Report To BLOB to convert it from picture to

BLOB:

$reportBlob := SR Report To BLOB( [Reports]PictureReport )

Updating Commands

The new API supports many more options and object types. You may want to replace calls to old functions with their new versions.

Following are some examples:

Old Command

SR Get Scripts

SR Get Object Properties

How to replace it

Use the SR_GetPtrProperty command with the appropriate property:

$error :=

SR_GetPtrProperty

( $areaRepRef ; $objNum ; SRP_Object_Script ;

-> objScript )

(See the Properties by Theme section for a list of all properties.)

Use SR_GetPtrProperty with the appropriate property - for example, to get the position of the top of an object: objTop :=0

$error := SR_GetPtrProperty ( $areaRepRef ; $objNum ; SRP_Object_PosTop ;

-> objTop )

You can find a list of all the object property options in the Object Common Properties section.

SR Get Sections

Use SR_GetPtrProperty with the appropriate property. For example, to get the name of a section: sectionName :=""

$error := SR_GetPtrProperty ( $areaRepRef ; $objNum ; SRP_Object_Name ;

-> sectionName )

You can find a list of all the section property options in the Section Properties section.

Upgrading from Previous Versions

3

Getting Started with SuperReport Pro

29

Obsolete Commands

If you are using any of the following commands, you will need to remove them from your code or modify them as explained in the

Comments:

Old Command

SR Print PICT

SR File Types

SR RELATIONS

SR Set Script Callback

SR SetPrinter

SR Print Disk & SR Print HTML

SR Power Menu

SR Package

SR Get Free Memory

SR SWAP HANDLES

Comments

Use

SR_PrintIntoPICT

or

SR_PrintBLOBIntoPICT

.

Supports only Windows extensions (Creator / Type is not used on Mac anymore).

Sets compatibility mode on (in SuperReport Pro 3 it is a persistent property of the report, not a global one).

When used with area = 0 sets compatibility mode on (in SuperReport Pro 3 it is a persistent property of report, not a global one).

Does not check for valid printer name.

Use

SR_Export

or its variants.

Not implemented.

Returns 0 and invokes the debugger if this has been enabled.

Not implemented.

Not implemented.

Registering SuperReport Pro

The

SR_Register command takes just one

license key

, and it returns 0 if successful and an integer between 1 and 12 if not OK.

There is a list of the registration error codes in the command description .

What’s New in SuperReport Pro Version 3

â– 

Adjust Object Size by Style

A new menu item Object > Adjust Object Size by Style computes an object's height according to the style specified for that object. In

SuperReport 2 when you resized a text, variable, or field object, the height was adjusted to show full line(s)); in SuperReport Pro 3 you have to do it manually. The keyboard shortcut is shift-double-click.

â– 

Count Pages

A count pages option ( SRP_Report_CountPages ) has been added, so now you can use "Page 1 of 9" for example (however, note that the report is processed three times).

â– 

Dynamic Text

Text objects can use "<% [+] [=] variable [ ; format ] %>" when SRP_Text_Dynamic = 1

â– 

Group object

Objects can now be grouped together by selecting them and clicking on the

Group Object tool in the toolbar.

â– 

HTML Export

The HTML export has been improved.

Upgrading from Previous Versions

3

Getting Started with SuperReport Pro

30

â– 

Multiple headers / footers

A multiple headers / footers option has been added (first page / second+ pages / last page).

To function properly on the last page, SRP_Report_CountPages must be set to 1 (if count pages is 0, it will never print).

â– 

Native drawing of Text

SuperReport Pro uses CoreText on MacOS and GDI+ on Windows. This restricts the version of OS that SuperReport Pro can run on: SuperReport Pro version 3.x requires MacOS 10.5 or higher and Windows XP SP2 or newer.

Only fonts and font faces supported by these technologies can be used in SuperReport Pro.

In particular, GDI+ does not support non-TrueType fonts on some Windows versions.

GDI+ (Windows) does not support OTF fonts.

â– 

Multistyle (attributed) text

SuperReport Pro supports the

multistyled

text feature of 4D v12 and above.

â– 

Object Properties

Objects have new properties - name, id - which can be used in XML / HTML exports.

â– 

Scripts

Scripts now support flow control structures (but you must not use local variables).

Scripts are stored tokenized, eliminating problems between various localized 4D versions (e.g. the English version no longer fails to run the French demo due to the command names).

â– 

Table object

A new object has been added to the toolbar: the Table Tool. Use this to create

tables within your report.

â– 

Unicode

SuperReport Pro supports Unicode.

â– 

Watermark section

A Watermark section has been added. The watermark will be printed on every page, either underneath or on top of all other printing.

â– 

XML

An area’s settings can be saved as XML into a variable or field. Note that if 4D is run in non-Unicode mode, the size of any text is restricted to 32k characters. This may be enough as long as you don't have any large pictures in the report, however, it is recommended that you use the application in Unicode mode.

Use the old commands for loading / saving reports (using blobs) if you have to run in non-Unicode mode.

Upgrading from Previous Versions

3

Getting Started with SuperReport Pro

31

â– 

Unlimited Undo / Redo support

SuperReport Pro supports unlimited undos and redos for all user actions (to be precise, up to 65536 possible consecutive actions).

â– 

Other Improvements

You'll also notice many additional little improvements and new features such as "center object on page", "bind object to bottom of a group / section", "print break footer at bottom of page, not below body", and other goodies.

Upgrading from Previous Versions

4

Programming SuperReport Pro

32

4

Programming

SuperReport Pro

SuperReport Pro Objects

There are several object types, called "Object kinds" and several ways to identify a SuperReport Pro object.

Object kinds and their respective properties are accessed through

Property Constants , e.g. specific properties for objet kind “Line”

are available as Line Properties

.

Object Kinds

Here is the list of all possible object kinds, accessed through the SRP_Object_Kind text property:

â–  â– 

SRP_ObjectKind_Style

Styles can be predefined for various object kinds, including text attributes, colors, rotation, etc.

â–  â– 

SRP_ObjectKind_Area

A SuperReport Pro plugin area, in a

4D form

or an

external window .

â–  â– 

SRP_ObjectKind_Report

The SuperReport Pro report object itself, in a

4D form , an

external window

or

offscreen

.

â–  â– 

SRP_ObjectKind_Section

A section of the report. Sections include Header, Body, Break Header, Break Footer (where Total is a Break Footer with Break Level

= 0), Footer and Watermark.

â–  â– 

SRP_ObjectKind_Group

A group of objects.

SuperReport Pro Objects

4

Programming SuperReport Pro

33

Static objects

â– â– â– 

SRP_ObjectKind_Line

â– â– â– 

SRP_ObjectKind_Oval

â– â– â– 

SRP_ObjectKind_Rectangle

â– â– â– 

SRP_ObjectKind_Picture

â– â– â– 

SRP_ObjectKind_Text (not fully static, since values can be embedded as <%variable%>)

4D objects

â– â– â– 

SRP_ObjectKind_Variable

â– â– â– 

SRP_ObjectKind_Field

Table objects

â– â– â– 

SRP_ObjectKind_Table

â– â– â– 

SRP_ObjectKind_Header

â– â– â– 

SRP_ObjectKind_Column

â– â– â– 

SRP_ObjectKind_Footer

â– â– â– 

SRP_ObjectKind_Guide

The guide lines displayed in the SuperReport Pro design editor.

â–  â– 

SRP_ObjectKind_DataSource

Source of data (variables, records or fields). The

Data Source Properties

include information regarding the interface to the 4D database, such as the variable name, relate one / relate many, SuperReport Pro

callback scripts , etc.

Area / Report Identification

Many

SuperReport Pro commands expect a reference as their first parameter:

â– 

SR_NewObjectFromXML

(areaReportRef:L; objNum:L; XML:T; parent:L) → error:L

This reference is called “Area / Report reference” and specifies where to apply the command, i.e. which SuperReport Pro report displayed in a window (4D form or external), or

offscreen is involved.

It is documented as “areaReportRef” in the Command description

and as $areaRepRef in examples.

Depending on the context (as explained below), this value can either be the Report reference, the Area reference or the Printed report reference.

SuperReport Pro Objects

4

Programming SuperReport Pro

34

â– 

Report reference

For offscreen areas, this value is returned by the

SR_NewReport or SR_NewReportBLOB commands used to create the report.

It uniquely references the report being edited (programmatically since it is an offscreen).

This reference also exists in edited on screen areas (use the SRP_Area_Report property), but you don't really need it since this type of area has an Area reference, which should be used instead.

â– 

Area reference

This reference always exists in edited on screen areas: it is the value of the 4D variable assigned to the

Plugin area

in design mode.

Simply pass this variable as your first parameter to the commands that expect an Area / Report reference.

Note: the Area reference is unusable on 64-bit servers but who wants to edit a report on a server anyway?

â– 

Printed report reference

This is the internal reference of the report being printed or exported. This number is temporary and only valid during printing or exporting.

It is not to be confused with the Report and Area references used to refer to the report itself when building it programmatically or in the design editor.

The internal SuperReport Pro variable

SRArea used in any report script contains this value (the name of the variable can be modified through the SRP_Area_VarArea property).

â– 

Which Area / Report reference to use?

All commands accept both Area and Report references.

SR_GetXXXProperty / SR_SetXXXProperty work with commands only with Variable, Field,

Table and Table Column object kinds

during printing or exporting (i.e. in

SuperReport Pro scripts

) therefore potentially accept all three references: Area, Report, Printed report ( SRArea ).

â–  â– 

Always use the Printed report reference when print / export is in progress: pass SRArea to the commands that you are calling in a script, or in a 4D method called by a script

â–  â– 

Use the Area reference for an edited on screen area: pass the plugin area 4D variable

â–  â– 

Use the Report reference for offscreen reports when modifying them programmatically: pass the value that was returned in the

first parameter of

SR_NewReport or SR_NewReportBLOB

SuperReport Pro Objects

4

Programming SuperReport Pro

35

Object Identification

â– 

Object number

This long integer value is assigned internally by SuperReport Pro and uniquely references any object from the report, including the report itself (which always has the value 1 as an object - not to be confused with the Area / Report reference).

Note that this number, although always unique, is not static. It may change on the fly as the report definition is modified.

Here is the technical explanation: initially the objects are numbered sequentially, but the order can change at any time, e.g. removing an object, including ungrouping a group object (which deletes the group as an object).

Internally, the Object number is the index to the objects array. This is a single array for all objects in the report, thus the position is not modified when you move objects, group them or change their print order. It does change, however, when an object is deleted.

Therefore, when you get an array of objects and you manipulate one object having the effect of renumbering others, you must refetch the array.

When used in commands, where appropriate:

â–  â– 

0 = selected objects

â–  â– 

1 = the report itself

â–  â– 

Any other number = a specific object

This number is documented as “objNum” in the Command description

. and $objNum in the examples.

â– 

Object ID

This is a text value for most objects, except

Styles

, which have a long integer ID.

The value is either set by you as the developer, or automatically by SuperReport Pro for long integer style IDs in the design editor.

For other object kinds, when a new object is created in the editor, the ID is set to the (localized) object kind and a sequence number, e.g. "Text_4". Otherwise the default ID is an empty string.

The Object ID is accessed through the SRP_Object_ID property.

Note: this value is not unique. You can set the same ID to different objects, it is up to you to check the uniqueness as needed.

See for example

Warning: Style ID Uniqueness

in the

Properties by Theme section.

Duplicate values can be used e.g. for XML formatting (like using the ID as a class ID for those object-minded programmers out there).

The Object ID is generally used only by

XML / HTML export

. The only exception is Style (long integer ID), where text objects (and

tables ) can use a style from the Styles set by ID.

To get the Object ID from the Object number

:

SR_GetTextProperty ( $areaRepRef ; $objNum ; SRP_Object_ID )

To get the Object number from the Object ID (see also the

SR_GetObjectsByPropertyValue

command):

$error :=

SR_FindObjectByID(

$areaRepRef ; $objectID ; $objNum )

Because the Object ID is not necessarily unique, it will return the first Object number having the requested ID.

SuperReport Pro Objects

4

Programming SuperReport Pro

36

â– 

Object name

This is a text value, available for many objects, set by you as the developer.

When a new object is created in the editor, the Object name defaults to an empty string, except for Styles, where names are initialized to “New Style” when added in this context.

The Object name is accessed through the SRP_Object_Name property.

Note: this value is not unique. You can set the same Object name to different objects, it is up to you to check the uniqueness as needed.

To get the Object name from the

Object number :

$objectName := SR_GetTextProperty ( $areaRepRef ; $objNum ; SRP_Object_Name )

â– 

Object print reference

This is the internal reference of each object being printed or exported. These numbers are temporary and only valid during printing or exporting.

They are not to be confused with the

Object number used to reference objects in the report itself when building it programmatically

or in the design editor.

The internal

SuperReport Pro variable

SRObjectPrintRef used in the object script (not in Start / Body / End or Section scripts) contains this value (the name of the variable can be modified through the SRP_Area_VarObject property). SRObjectPrintRef is a

4D variable for use in the object script, analog to the 4D

Self

pointer.

Note: the SRObjectPrintRef variable replaces the old SRObjectID , which is maintained for compatibility. See

SuperReport Pro variables

.

Similarly, as

previously described the internal SuperReport Pro variable

SRArea

contains the Printed report reference of the report

being printed or exported.

In other words, SRObjectPrintRef (object while printing / exporting) is to the Object number (object in edited or modified report) what

SRArea

( Printed report reference

) is to the Area reference or Report reference (edited or modified report).

To get the Object name from the Object print reference while printing or exporting:

SR_GetTextProperty ( SRArea ; SRObjectPrintRef ; SRP_Object_Name )

Note: printed (or exported) reports support the SR_GetXXXProperty / SR_SetXXXProperty commands only with the following

object kinds: Variable, Field, Table

and Table Column. Use the Printed report reference and the Object print reference in this context.

SuperReport Pro Objects

4

Programming SuperReport Pro

37

Commands and Functions

SuperReport Pro has its own collection of commands and functions that you use to control your SuperReport Pro areas, to find out what actions the user has taken, and to do whatever processing is needed as a result.

Properties

Each command theme has its own set of properties that can be used to get or set various aspects of the report, and for each property a 4D constant has been defined.

You’ll find a complete reference in the

Properties by Theme

section.

Commands

The commands are organised into themes which relate to a particular part of the SuperReport Pro functionality: Access

,

Getters ,

Setters

,

Objects ,

Printing and

Miscellaneous .

The “Getter” and “Setter” commands are used to set the various properties of the report, and to find out what the specific settings are, or what action the user has taken.

For example, you can find out the name of a specified object on a report with the SR_GetPtrProperty "getter":

$error := SR_GetPtrProperty ( $areaRepRef ; $objNum ; SRP_Object_Name ;-> $objName )

A SuperReport Pro command syntax looks like this:

â– 

SR_SetLongProperty

(areaReportRef:L; objNum:L;property:T; value:L)

areaReportRef

is the SuperReport Pro Area / Report reference.

objNum

is the

Object number you want to access.

property

is a constant that tells SuperReport Pro exactly what information you want to set (see the

Properties by Theme

, Appendix 4

and Appendix 5 sections to find out what the possible constants are).

Each parameter is followed by a colon and a letter indicating the type of data required for that parameter:

:L

= longint

:O

- blob

:P

- picture

:R

= real

:T

= text

:Z

= pointer

Array types are prefixed with an “A”: AT stands for text array.

Note that Boolean values are passed or returned as longints, where 1 = true and 0 = false.

Commands and Functions

4

Programming SuperReport Pro

38

Each is preceded by one of three arrow signs, which indicate whether it is a value that you pass to the command or one that the command returns to you, or a value that is passed, then modified and returned by the command in the same parameter:

ª parameter

© parameter

A value that you pass to the command

A value that is returned by the command

Note: when calling a plugin command, all omitted parameters are initialized to the NULL of the respective types (0, 0.0, "",

!00:00:00!, …).

You can find complete descriptions of the commands, along with examples, in the Command Reference

section, and descriptions of all the properties in the

Properties by Theme section.

The Properties by Theme section includes details of how to use each property; the Type column tells you what type of data it requires, and this is matched to the command variant.

Functions

Functions return a result code when they are called. Usually this will be the information you requested.

Their syntax looks like this:

â– 

SR_GetLongProperty

(areaReportRef:L; objNum:L; property:T) → value:L

areaReportRef

is the SuperReport Pro Area / Report reference.

objNum

is the

Object number you want to access.

For example, you can get all sections from a report using

$error := SR_GetObjects ( $areaRepRef ;1; SRP_ReportSections ; $objectNums ) and then access the first section's name using

$objectName := SR_GetTextProperty ( $areaRepRef ; $objectNums {1}; SRP_Object_Name )

property

is a constant that tells SuperReport Pro exactly what information you want to get (see the

Properties by Theme ,

Appendix 4

and Appendix 5 sections to find out what the possible constants are).

value

is the result that the function returns.

For example, suppose we want to find out which tool the user selected. We can use the SR_GetLongProperty “getter” function to find out:

C_LONGINT

( $toolSelected )

$toolSelected :=

SR_GetLongProperty (

$areaRepRef ;1; SRP_Area_Tool )

Commands and Functions

4

Programming SuperReport Pro

39

Getters and Setters

Most of the commands are either “getters” or “setters”: they either get information about a specific property, or they set a specific property.

The Getters and Setters are each available in five variants, which allow for the different data types of the properties: Long integer,

Pointer, Real, Text, and Text Arrays.

For example, to set the “show ruler” property for a report, you use the

SR_SetLongProperty command along with the

SRP_Report_

ShowRuler property:

SR_SetLongProperty ( $areaRepRef ;1; SRP_Report_ShowRuler ;1)

The pointer options ( SR_GetPtrProperty

and

SR_SetPtrProperty ) must be used to manipulate pictures and blobs.

Also, they enable you to use just one version of the command for getting and setting all the relevant properties; you pass a pointer to the variable instead of the actual value.

When to use the commands and functions

Most SuperReport Pro commands and functions need to be passed an Area / Report reference

to the report on which they will act.

Since SuperReport Pro areas are initialised in the On Load phase of a layout, the commands must be called during this phase or afterwards; if you try to call any SuperReport Pro commands before the form has been loaded, you’ll get an error message because

4D does not recognise the area reference.

Anatomy of a SuperReport Pro Command

Each command you write must adhere to a specific syntax in order for it to be correctly understood by SuperReport Pro. Some

commands (the “getters” and the pointer variants) return a result code: these are functions. See the Command Reference section

for the requirements for each command.

You can check the result code to find out if a function executed OK or if there was a problem and, if so, get some information about what that problem was.

For example, SR_GetProperties is a function which returns information about all properties of the referenced report or object into two or, optionally, three text arrays:

ARRAY TEXT

( $propertyIDs ;0)

ARRAY TEXT

( $propertyValues ;0)

ARRAY TEXT

( $propertyNames ;0) // (this is the optional one)

$error :=

SR_GetProperties (

$areaRepRef ;0; $propertyIDs;$propertyValues ; $propertyNames )

If the function executed successfully, $error will be 0; if not, $error will contain an error number. You can check the meanings of the

error codes in the Result Codes list.

Every command consists of the command name followed by two or more parameters. The first parameter is always a reference to the SuperReport Pro area. For example, the

SR_SetRealProperty

command sets a specific property that requires a real number:

SR_SetRealProperty ( $areaRepRef ;1; SRP_Report_Zoom ; $zoomRatio )

This command sets the scaling for the SuperReport Pro report in $areaRepRef to the value specified in the $zoomRatio variable.

Commands and Functions

4

Programming SuperReport Pro

40

Commands that get or set properties for an object all include the property that you want to affect, and a value to use to specify an option (if it’s a “setter”) or to receive the result (if it’s a “getter”).

All SuperReport Pro commands are described in the Command Reference

section along with examples of how to use them.

Debugger

When the SRP_Area_TraceOnError property's bit 0 is set to true in interpreted mode (the default), if there is an error in a command that does not return an error code, and you are using 4D in interpreted mode, the 4D debugger window will automatically open with the line immediately following the problem line highlighted.

In compiled mode, if SRP_Area_TraceOnError property's bit 1 is set to true an alert is displayed with the error code, the SuperReport

Pro command, the calling 4D method and the property used (selector, see Property Values, Constants and XML Names

).

Customizing the SuperReport Pro Area

There are a variety of ways you can customize the SuperReport Pro area to suit your application's needs.

For example, you may want to disable access to the Scripting option for end-users, or hide the menu altogether. These options are controlled through the use of the "setter" commands and the appropriate properties.

We will give a few examples below; you can find full details of the available properties in the Properties by Theme section.

In your form's On Load event, call one or more of the Setter commands with the properties you want to set.

The following example will hide SuperReport Pro's ruler:

SR_SetLongProperty ( $areaRepRef ;1; SRP_Report_ShowRuler ;0)

The following example will disable the zoom window:

SR_SetLongProperty ( $areaRepRef ;1; SRP_Report_ShowZoom ;0)

This example will set the report's zoom to 50%:

SR_SetRealProperty ( $areaRepRef ;1; SRP_Report_Zoom ;.5)

Customizing the SuperReport Pro Area

4

Programming SuperReport Pro

41

SuperReport Pro Variables

There are a number of internal variables used by SuperReport Pro. Following is a description of each variable and their usage during reporting operations.

In addition, most of these variables can be used in any script which is executed by SuperReport Pro during print or export (

HTML

or other). This is the “Scope column”:

â–  â– 

SRP means that it is not a 4D variable, therefore cannot be used in a script or a 4D method. However these values can be included in the report as variable objects or embedded into a text inside variable placeholders (<%variable%>)

â–  â– 

4D means that, in addition to the above, these variables can be accessed as regular 4D process variables in SuperReport Pro scripts or 4D methods

The variable names below can be accessed (including modified) through the

SRP_Area_VarXXX

properties (“Property for name” column):

Variable name

SRArea

SRBegHTML

SRDate

SRDateTime

SREndHTML

SRName

SRObjectPrintRef

SRPrintSection

SRPage

SRPages

SRRecord

SRTime

SRCurrentRun

SRRepeatNum

Type Scope Property for name

C_LONGINT

4D SRP_Area_VarArea

SRP_Area_VarBegHTML

C_TEXT

C_DATE

4D

4D

C_LONGINT

SRP

SRP_Area_VarDate

SRP_Area_VarDateTime

C_TEXT

C_TEXT

4D

SRP

SRP_Area_VarEndHTML

C_LONGINT

C_LONGINT

4D

4D

Description

Current

Printed report reference

HTML “header”. See

Contains the current date.

Contains the current date and time. See note below.

HTML “footer”. See

.

Exporting to HTML

Exporting to HTML

.

.

SRP_Area_VarName Contains the SRP_Object_Name of the report being printed or exported.

SRP_Area_VarObject

Contains the current Object print reference

for which you have a script attached. See note below.

SRP_Area_VarPrintSection Set to 1 (print - default value) or to 0 (don't print) in the section

- or any object - script to include the current section in the print / export or to skip it.

SRP_Area_VarPage Contains the current page.

C_LONGINT

4D

C_LONGINT

4D

C_LONGINT

4D

C_LONGINT

4D

C_LONGINT

4D

SRP_Area_VarPages

SRP_Area_VarRecord

SRP_Area_VarTime

Contains the printed report total page count.

Contains the current record number or iteration value.

Contains the current time.

C_LONGINT

4D

SRP_Area_VarCurrentRun Possible values 1, 2, 3.

When using “calculate number of pages”, the report is processed three times. If you need to use Request or

QUERY

, check for

SRCurrentRun =1 to execute it only the first time.

SRP_Area_VarRepeat Only valid during execution of a script associated with a repeating object.

When using repeating objects, the script can know which iteration of the repeating object has to be handled (especially when using arrays).

SuperReport Pro Variables

4

Programming SuperReport Pro

42

Additional notes

â–  â– 

The SRObjectPrintRef variable replaces the old SRObjectID

, which name was misleading since it refers to the Object print reference

, not to the Object ID

. SRObjectID is maintained for compatibility, but only the name SRObjectPrintRef can be modified with SRP_Area_VarObject .

â–  â– 

Longint, time and date values can be embedded with a standard 4D format e.g. <%SRDate;7%>

â–  â– 

Printing is the only valid context for SRPage and SRPages (not export)

â–  â– 

SRPages will default to -1 if page counting is not activated ( SRP_Report_CountPages property set to zero or when exporting)

â–  â– 

Date and time variables are set upon print startup, therefore they will display the same value on all pages or instances within a given print or export session

â–  â– 

SRDateTime is limited to the SuperReport Pro scope (not a 4D variable). This long integer value is in UNIX time format (seconds since 1/1/1970). The default format is "%Y-%m-%d %H:%M:%S %Z".

SuperReport Pro Variables

4

Programming SuperReport Pro

43

Table objects

SuperReport Pro version 3 provides a unique, powerful feature: table objects.

Very similarly to AreaList Pro , SuperReport Pro table objects can display 4D arrays (including 2D arrays) or fields. Tables include

columns with headers, body and footers. As a matter of fact AreaList Pro's tables can directly be printed using SuperReport Pro

with the AL_SuperReport command.

Commands

You can also create and modify your own SuperReport Pro tables using the following commands:

â–  â– 

SR_NewObject (with the

SRP_Table property)

â–  â– 

SR_GetObjects

(with the SRP_TableHeaderRowMask , SRP_TableColumns and SRP_TableFooterRowMask properties)

â–  â– 

SR_ModifyTable

Object kinds

SuperReport Pro tables use the following object kinds:

â–  â– 

SRP_ObjectKind_Table

â–  â– 

SRP_ObjectKind_Header

â–  â– 

SRP_ObjectKind_Column

â–  â– 

SRP_ObjectKind_Footer

Table properties

The following properties are associated to SuperReport Pro tables:

â–  â– 

Table / Header / Column / Footer

â–  â– 

Table Properties

â–  â– 

Table Header Properties

â–  â– 

Table Column Properties

â–  â– 

Table Footer Properties

See for example

Creating Reports Procedurally .

Table objects

4

Programming SuperReport Pro

44

Extending SuperReport Pro with Scripts

You can add scripts to your SuperReport Pro reports and to objects on a report.

Execution Cycle scripts

Scripts can be added to the start of the report, the body, and the end of the report. To add one of these, choose Scripts from the

Database menu, and then select one of the three sub-menu options:

The checkmark next to the Start Script... option in this example indicates that a Start Script has been added.

To abort printing from a SuperReport Pro script (Start or Body script, or any object script, see below):

SR_AbortPrinting

The above line can either be inserted into the script itself or in a 4D project method called by the script.

You can find other examples of using scripts in the Tutorial section of the User Guide .

Object Scripts

Like standard 4D reports created using the Form Editor, SuperReport Pro objects may contain scripts which may call any 4D command, method, or plug-in command. Using SuperReport Pro scripts, you can further customize your reports to produce output which cannot be created using standard SuperReport Pro objects.

For example, let’s say you wanted to create a report with a listing of sales, broken down by customer, and provide an average sale for each customer as well as an overall invoice average. While SuperReport Pro can handle most of these tasks for you, utilizing the advanced break processing capabilities built-in to SuperReport Pro, the extended averaging requirements would not be possible without the support of object scripts.

Using SuperReport Pro’s object scripts, you can place custom code on just about any SuperReport Pro object, providing a very complete and flexible reporting system. Scripts can be attached to the following

object kinds

: Datasource (the Report's

Start / Body / End scripts), Section, Variable, Field,

Table and Table Column.

Note: printed (or exported) reports support the SR_GetXXXProperty / SR_SetXXXProperty commands only with the following object

kinds: Variable, Field, Table and Table Column. Use the Printed report reference

and the

Object print reference in this context.

For example, programming a variable object's script to display its value in bold red if negative, using the SRArea and SRObjectPrintRef standard variable names:

If

( myVariable <0) // negative number

SR_SetTextProperty ( SRArea ; SRObjectPrintRef ; SRP_Style_TextColor ;"red")

SR_SetLongProperty ( SRArea ; SRObjectPrintRef ; SRP_Style_Bold ;1)

End if

Extending SuperReport Pro with Scripts

4

Programming SuperReport Pro

45

To add a script to an object, double-click on the object. The object properties dialog will open; the exact contents of the dialog vary depending upon the type of object, but they will all have a Script option.

For example, the Field Properties dialog looks like this, with the Script tab selected:

Note: option double-click on a scriptable object will directly open the object script editor.

SuperReport Pro Script Limitations

While SuperReport Pro provides the ability to easily create custom scripts, there are a few limitations that you should be aware of when creating your scripts.

1.

SuperReport Pro scripts are not executed in compiled form, regardless of your application's compiled status. While this typically won’t be a noticeable issue, you should be aware that scripts are slower than compiled code.

2.

All scripts are executed in the same fashion as if the 4D

EXECUTE FORMULA

command had been called.

3.

When selecting a table or field which has been customized (using SuperReport Pro’s structure customization feature), the script editor will display the actual table / field information as configured at the structure level.

4.

You must not use local variables ( $var ) in compiled mode.

5.

You cannot manipulate sections or report in a script, or remove / add objects. You can only modify existing objects in this context.

6.

You use SQL code with

Begin SQL

/

End SQL

statements.

Extending SuperReport Pro with Scripts

4

Programming SuperReport Pro

46

Understanding the SuperReport Pro Event Cycle

Due to the extensive reporting features offered by SuperReport Pro, there is the potential for some level of confusion for even the seasoned 4D programmer. The following information outlines the standard SuperReport Pro Event Cycle.

SuperReport Pro generates reports in the following sequence (in pseudo-code):

Execute StartProcedure

Determine how many iterations are required

While

(Current Iteration < Maximum Iterations) do

Execute BodyProcedure

If

(Break Values have changed)

Process appropriate Break Header sections

Process appropriate Break Footer sections

End if

Process Body section

End while

Process Total section

Execute EndProcedure

Section Processing

In processing any section, the following sequence of events takes place:

Execute section script

For

(i = 1 to number of objects in this section) do

Execute object script

Get object (field / variable / array) value

End for

Understanding the SuperReport Pro Event Cycle

4

Programming SuperReport Pro

47

Dealing with multi-platform Issues

Fortunately, SuperReport Pro does a good job of conditionally handling most multi-platform issues. However, there are some cases when some additional developer control is necessary to support multi-platform issues:

â–  â– 

Dealing with platform pathnames

â–  â– 

Dealing with Print Drivers

Dealing with platform pathnames

All MacOS files use a directory delimiter of “:” (ASCII 58), while Windows directories are delimited with a “\” character. One approach to dealing with these differences is to use a 4D variable, which contains the delimiter.

$delim :=

Get 4D folder

Length

(

Get 4D folder

)≥

Then you could use the 4D function

Application file

or

Structure file

to return the pathname to either the application or structure file as a starting point to determine the pathname to a “Reports” directory.

For some useful routines for obtaining the parent pathname for an application or structure file, refer to the 4D Language Reference.

Dealing with Print Drivers

Due the large number of print drivers available, configuring reports for most printers can be a very difficult task. Following is a list of some tips which can make designing your reports a manageable job.

1.

Try to leave at least 1/4" margin on the edges of your reports to account for a wide variety of print drivers

2.

Stick with common fonts.

3.

Be careful when using enhanced font formatting attributes such as Bold, Italic, Underline, etc. Make sure that your print driver knows how to deal with multiple styles. Also MacOS does not support “synthetic” styles: you can only print those typefaces that are available in your system fonts.

4.

Test, test, test! Try to test your reports on as many different printers as possible… you would be surprised at the differences between drivers.

If you have a tip that would be useful to other SuperReport Pro users, please let us know so that we can post this information in future documentation and release notes, as well as on our web site.

Send tips to the SuperReport Pro forum .

Dealing with multi-platform Issues

4

Programming SuperReport Pro

48

HTML Support

SuperReport Pro provides the ability to create standard HTML reports.

Each SuperReport Pro object may contain custom HTML tags, which are inserted before and after the corresponding data object is sent to the HTML content when exporting the report in HTML format.

Using the HTML Data Tab, you can supply the following items:

â–  â– 

Begin Tag

The begin tag information is sent to the HTML content before the corresponding data is sent.

â–  â– 

End Tag

The end tag information is sent to the HTML content after the corresponding data is sent.

These values are specific to the edited object. Each set of HTML Begin / HTML End Tags is used with each respective object every time it is exported.

A general set of begin / end tags for the report itself is available as standard SuperReport Pro SRBegHTML and SREndHTML variables (see below,

Exporting to HTML

):

SRBegHTML :="<html><body bgcolor='#ffffff'>" // sample start file tag

SREndHTML :="</body></html>" // sample end file tag

HTML Support

4

Programming SuperReport Pro

49

Using Custom Tag Variables

In addition to entering static HTML tags in the HTML Dialog, you can also embed custom HTML tag variables, which are actually

4D variables which may contain any valid HTML tag (or group of tags).

For example, if you have a set of HTML tags which you insert at the beginning of some (or all) of your report objects, you could place all the HTML data into a 4D variable, then reference the variable from within SuperReport Pro by using the custom variable tags.

To use a 4D variable within your HTML tags, enclose the variable with “<%” and “%>” markers. When the report is printed,

SuperReport Pro will take the data between these markers, retrieve the data from the actual variable and insert it into the HTML stream as the file is created.

Using a 4D variable instead of static HTML tags in each object allows modifying all the HTML tags at once: for example, use

"<%tMyHTMLPrefix%>" as the HTML Begin Tag in all relevant objects then assign the desired value to tMyHTMLPrefix.

Following is an example of a 4D variable that is inserted using the variable tags:

<h1>" or "<%vH1%>" with 4D variable vH1:="<h1>" will produce "<h1>" in the HTML stream

Note: the example above stands for non-attributed text, see

Embedding variables in HTML export text .

The SuperReport Pro Execution Cycle

When creating HTML reports, it is important that you understand the 4D execution cycle as this is how you will determine when specific tags should be included so that your HTML files will be correctly structured.

For more information on the SuperReport Pro Execution Cycle, please refer to the Understanding the SuperReport Pro Event Cycle

section earlier in this chapter.

HTML Support

4

Programming SuperReport Pro

50

Exporting to HTML

To export to HTML, use

SR_Export

,

SR_ExportBLOB

,

SR_ExportIntoBLOB or SR_ExportBLOBIntoBLOB .

Specify either SRP_Export_XML or SRP_Export_HTML (among other flags) in the second parameter.

Note: Lines, Rectangles and Ovals are not exported.

At the start of processing, the "header" is written:

â–  â– 

If the SRBegHTML variable exists and is not empty, it is written as-is; otherwise, the standard prolog is written (declarations +

<html><head><title>report name</title></head><body>).

At the end, the "footer" is written:

â–  â– 

If the SREndHTML variable exists and is not empty, it is written as-is; otherwise, the standard epilog is written (</body></html>).

Sections are written as follows:

â–  â– 

If the SRP_Object_HTMLPrefix property exists (is not empty), it is written as is; otherwise, a simple <DIV> is written.

â–  â– 

All objects are exported.

â–  â– 

If the SRP_Object_HTMLSuffix property exists (is not empty), it is written as-is, otherwise a simple </DIV> is written.

Objects are written as follows:

â–  â– 

If the HTML prefix or suffix property is not empty, the prefix is written as-is, the object is written, the suffix is written; otherwise a simple <span> is written using the name and id attributes of the respective object, the object is written.

â–  â– 

Table objects are exported as HTML tables using the tags <thead><th><td> for headers and <tbody><tr><td> for data.

â–  â– 

Picture object exports the SRP_Picture_HTMLReplace property instead of the actual data.

â–  â– 

How the respective objects are written depends on the SRP_Text_Attributed property of the object and the SRP_Export_PlainText bit in the

Options

parameter of the export command.

HTML prefix refers to SRP_Object_HTMLPrefix .

The HTML suffix means SRP_Object_HTMLSuffix .

Note: the font is not exported (SuperReport Pro 2.5 used <font face="xxx">).

HTML Support

4

Programming SuperReport Pro

51

There are three ways to export your reports in HTML format. The first method uses the SuperReport Pro Editor.

1.

Select Export… from the File menu.

2.

Select Output As HTML File in the Output Options section:

The second method is to use the

SR_Export

command with the SRP_Export_HTML option - for example:

$error := SR_Export ( $areaRepRef ; SRP_Export_HTML | SRP_Export_Body | SRP_Export_Breaks | \

SRP_Export_Total | SRP_Export_Headers | SRP_Export_StaticText ;9;"full path to a file to create.html";13)

The third method is to use the SR_ExportIntoBLOB

command - for example:

C_BLOB

( $reportBlob )

SET BLOB SIZE

( $reportBlob ;0)

$error := SR_ExportIntoBLOB ( $areaRepRef ; SRP_Export_HTML | SRP_Export_Body ;9; $reportBlob ;13)

In addition:

â–  â– 

SR_ExportBLOB is the same as

SR_Export, except that the source is a blob.

â–  â– 

SR_ExportBLOBIntoBLOB

is the same as SR_ExportBLOB, except that both the source and the destination are blobs.

Note: exporting to XML is very similar to the HTML export, using <Report>, <section>, <variable>, <text>, <picture> and <group> tags with name and id attributes, ignoring HTML prefix / suffix properties.

HTML Support

4

Programming SuperReport Pro

52

Creating Reports Procedurally

It's possible to use SuperReport Pro commands to create entire reports procedurally.

The following example creates a report template that could be used for printing an AreaList Pro area using the

AL_SuperReport command (see

the next section

on using SuperReport Pro to print AreaList Pro areas).

// Start by creating a new empty report:

// $areaRepRef is either an AreaList Pro plugin area or an

offscreen SuperReport Pro area

C_LONGINT

( $error ; $i )

C_LONGINT

( $areaRepRef ; $objNum ; $section )

$error := SR_NewReport ( $areaRepRef ;"";0)

SR_SetTextProperty ( $areaRepRef ;1; SRP_Object_Name ;"ALP")

SR_SetLongProperty ( $areaRepRef ;1; SRP_Report_PageWidth ;595) // A4

SR_SetLongProperty ( $areaRepRef ;1; SRP_Report_PageHeight ;842) // A4

SR_SetTextProperty ( $areaRepRef ;1; SRP_Report_Margins ;"12.5;12.5;12.5;12.5")

// Modify the data source:

// $objNum is the object that you want to manipulate

$objNum := SR_GetLongProperty ( $areaRepRef ;1; SRP_Report_DataSource )

SR_SetLongProperty ( $areaRepRef ; $objNum ; SRP_DataSource_Source ;SR Iterations Fixed)

SR_SetLongProperty ( $areaRepRef ; $objNum ; SRP_DataSource_Iterations ;1)

// Create two new styles:

$error := SR_NewObject ( $areaRepRef ; $objNum ; SRP_Style ;0)

$error := SR_NewObject ( $areaRepRef ; $objNum ; SRP_Style ;0)

// Modify styles - the default and the two added:

ARRAY LONGINT

( $aStyles ;0)

$error := SR_GetObjects ( $areaRepRef ;1; SRP_ReportStyleSet ; $aStyles )

ARRAY LONGINT

( $aStyleIDs ;

Size of array

( $aStyles ))

For

( $i ;1;

Size of array

( $aStyles ))

$objNum := $aStyles { $i }

SR_SetTextProperty (

$areaRepRef ; $objNum ; SRP_Style_FontName ;"Helvetica")

SR_SetRealProperty (

$areaRepRef ; $objNum ; SRP_Style_Size ;8)

SR_SetLongProperty (

$areaRepRef ; $objNum ; SRP_Style_Wrap ;1)

SR_SetRealProperty (

$areaRepRef ; $objNum ; SRP_Style_LineSpacing ;1)

$aStyleIDs { $i }:=

SR_GetLongProperty (

$areaRepRef ; $objNum ; SRP_Object_StyleID ) // should be 0, 1 & 2

Case of

: =1) // first is the Default

SR_SetTextProperty ( $areaRepRef ; $objNum ; SRP_Object_Name ;"Default")

: =2) // second will be used for headers

Creating Reports Procedurally

4

Programming SuperReport Pro

53

SR_SetTextProperty ( $areaRepRef ; $objNum ; SRP_Object_Name ;"Headers")

SR_SetLongProperty ( $areaRepRef ; $objNum ; SRP_Style_Bold ;1)

: =3) // third will be used for data columns

SR_SetTextProperty ( $areaRepRef ; $objNum ; SRP_Object_Name ;"Columns")

End case

End for

// Create header section:

$error := SR_NewObject ( $areaRepRef ; $section ; SRP_Header ;0)

SR_SetTextProperty ( $areaRepRef ; $section ; SRP_Object_Name ;"Header")

SR_SetLongProperty ( $areaRepRef ; $section ; SRP_Section_Height ;40)

SR_SetLongProperty ( $areaRepRef ; $section ; SRP_Section_LabelPos ;575)

// Create a Text object in the header - our title:

$error := SR_NewObject ( $areaRepRef ; $objNum ; SRP_Text ; $section )

SR_SetTextProperty ( $areaRepRef ; $objNum ; SRP_Object_Name ;"Title") // needed for AL_SuperReport

SR_SetLongProperty ( $areaRepRef ; $objNum ; SRP_Object_PosWidth ;570)

SR_SetLongProperty ( $areaRepRef ; $objNum ; SRP_Object_PosHeight ;40)

SR_SetLongProperty ( $areaRepRef ; $objNum ; SRP_Object_VariableSizeH ;1)

SR_SetLongProperty ( $areaRepRef ; $objNum ; SRP_Object_VariableSizeV ;1)

SR_SetLongProperty ( $areaRepRef ; $objNum ; SRP_Text_DrawEmpty ;1) // remove if empty

SR_SetLongProperty ( $areaRepRef ; $objNum ; SRP_Object_StyleID ;0) // this should not be needed

SR_SetLongProperty ( $areaRepRef ; $objNum ; SRP_Style_Size ;14)

SR_SetLongProperty ( $areaRepRef ; $objNum ; SRP_Style_BaseLineShift ;3)

SR_SetTextProperty ( $areaRepRef ; $objNum ; SRP_Text_Data ;"Some Title")

SR_SetLongProperty ( $areaRepRef ; $objNum ; SRP_Style_HorAlign ;2) // center on page

// Create the body section:

$error := SR_NewObject ( $areaRepRef ; $section ; SRP_Body ;0)

SR_SetTextProperty ( $areaRepRef ; $section ; SRP_Object_Name ;"Body")

SR_SetLongProperty ( $areaRepRef ; $section ; SRP_Section_Height ;40)

SR_SetLongProperty ( $areaRepRef ; $section ; SRP_Section_LabelPos ;575)

// Create a

Table object in the body - the table which will be filled by AL_SuperReport

$error := SR_NewObject ( $areaRepRef ; $objNum ; SRP_Table ; $section )

SR_SetLongProperty ( $areaRepRef ; $objNum ; SRP_Object_PosWidth ;570)

SR_SetLongProperty ( $areaRepRef ; $objNum ; SRP_Object_PosHeight ;40)

SR_SetLongProperty ( $areaRepRef ; $objNum ; SRP_Table_NumHeadings ;1)

// one line in header - this should not be needed

SR_SetLongProperty ( $areaRepRef ; $objNum ; SRP_Table_NumColumns ;1)

// one column - this should not be needed

SR_SetLongProperty ( $areaRepRef ; $objNum ; SRP_Object_Align ;2) // center on page

Creating Reports Procedurally

4

Programming SuperReport Pro

54

ARRAY LONGINT

( $aObjects ;0)

$error := SR_GetObjects ( $areaRepRef ; $objNum ;

String

(1; SRP_TableHeaderRowMask ); $aObjects )

// get the first header line objects

SR_SetLongProperty (

$areaRepRef ; $aObjects {1}; SRP_Object_StyleID ;1)

$error :=

SR_GetObjects (

$areaRepRef ; $objNum ; SRP_TableColumns ; $aObjects ) // get the columns

SR_SetLongProperty (

$areaRepRef ; $aObjects {1}; SRP_Object_StyleID ;2)

// Create the footer section

$error := SR_NewObject ( $areaRepRef ; $section ; SRP_Footer ;0)

SR_SetTextProperty ( $areaRepRef ; $section ; SRP_Object_Name ;"Footer")

SR_SetLongProperty ( $areaRepRef ; $section ; SRP_Section_Height ;13)

SR_SetLongProperty ( $areaRepRef ; $section ; SRP_Section_LabelPos ;575)

// Create a Variable object in the footer - Date:

$error := SR_NewObject ( $areaRepRef ; $objNum ; SRP_Variable ; $section )

SR_SetTextProperty ( $areaRepRef ; $objNum ; SRP_Variable_Source ;"SRDate")

SR_SetLongProperty ( $areaRepRef ; $objNum ; SRP_Object_PosTop ;3)

SR_SetLongProperty ( $areaRepRef ; $objNum ; SRP_Object_PosWidth ;200)

SR_SetLongProperty ( $areaRepRef ; $objNum ; SRP_Object_PosHeight ;10)

SR_SetLongProperty ( $areaRepRef ; $objNum ; SRP_Object_VariableSizeV ;1)

SR_SetLongProperty ( $areaRepRef ; $objNum ; SRP_Object_Align ;1) // left on page

SR_SetLongProperty ( $areaRepRef ; $objNum ; SRP_Object_StyleID ;0) // this is the default

// Create a Variable object in the footer - Page

$error := SR_NewObject ( $areaRepRef ; $objNum ; SRP_Variable ; $section )

SR_SetTextProperty ( $areaRepRef ; $objNum ; SRP_Variable_Source ;"SRPage")

SR_SetLongProperty ( $areaRepRef ; $objNum ; SRP_Object_PosLeft ;470)

SR_SetLongProperty ( $areaRepRef ; $objNum ; SRP_Object_PosTop ;3)

SR_SetLongProperty ( $areaRepRef ; $objNum ; SRP_Object_PosWidth ;100)

SR_SetLongProperty ( $areaRepRef ; $objNum ; SRP_Object_PosHeight ;10)

SR_SetLongProperty ( $areaRepRef ; $objNum ; SRP_Object_VariableSizeH ;0x0001)

SR_SetLongProperty ( $areaRepRef ; $objNum ; SRP_Object_VariableSizeV ;1)

SR_SetLongProperty ( $areaRepRef ; $objNum ; SRP_Object_Align ;3) // right on page

SR_SetLongProperty ( $areaRepRef ; $objNum ; SRP_Object_StyleID ;0) // this is the default

// Clear page setup (automatically created):

C_BLOB

( $blob )

$error := SR_SetPtrProperty ( $areaRepRef ; SRP_Report_PageFormat ;-> $blob ) // MacOS

$error := SR_SetPtrProperty ( $areaRepRef ; SRP_Report_PrintSettings ;-> $blob )

$error := SR_SetPtrProperty ( $areaRepRef ; SRP_Report_DevMode ;-> $blob ) // Windows

$error := SR_SetPtrProperty ( $areaRepRef ; SRP_Report_DeviceNames ;-> $blob )

Creating Reports Procedurally

// Get the XML and destroy the report

C_TEXT

( $XML )

$error := SR_SaveReport ( $areaRepRef ; $XML ;0)

$error := SR_DeleteReport ( $areaRepRef )

// Test it

C_LONGINT

( $areaRepRef )

$areaRepRef :=

Open external window

(100;100;800;800; Plain form window ;"SRP";"%SuperReport")

$error := SR_LoadReport ( $areaRepRef ; $XML ;0)

4

Programming SuperReport Pro

55

Creating Reports Procedurally

4

Programming SuperReport Pro

56

Printing AreaList Pro Areas with SuperReport Pro

SuperReport Pro v3 can also be used in conjunction with AreaList Pro version 9.4 and above to print AreaList Pro areas.

How it works

AreaList Pro v9.4 and above allows printing or saving as HTML through SuperReport Pro v3. It only takes two lines of code to print an AreaList Pro area.

Additional options are available, such as automatic column width and use of SuperReport Pro style properties instead of the existing

AreaList Pro area settings.

You can either use the built-in SuperReport Pro template to print an AreaList Pro area “on the fly” or create your own.

The AreaList Pro Demonstration database includes a “Print with SuperReport Pro” button in the

AreaList Pro > Configuration

Options… dialog. It also includes a SuperReport menu, allowing printing with the default template or a custom template, and editing

/ creating your own templates.

In addition, AreaList Pro v9.7 and above allow table footers printing with SuperReport Pro.

Command and property

Use the following command to print with SuperReport Pro:

â– 

AL_SuperReport

(areaRef:L; template:T; options:L; styleOptions:L; title:T)

ª

result:T

Parameter

ªâ–  areaRef

ªâ–  template

ªâ–  options

ªâ–  styleOptions

ªâ–  title

©â–  result

Type

longint text longint longint text text

Description

Reference of AreaList Pro object on layout.

XML SuperReport template or full path to a XML template or empty to use AreaList Pro’s built-in template.

0 = use current columns widths; 1 = use automatic width.

Style properties that should not be overtaken by AreaList Pro - see constants in

SuperReport Pro manual,

Style Features

.

Optional text centered in the header.

Use the following AreaList Pro property with AL_GetAreaTextProperty to retrieve the default template in XML format:

Constant

ALP_Area_SRPTableTemplate

Get Set Per Type Default Min Max Comments

✔ text Get the SuperReport Pro template used for report creation

(stored in Resources/TableReport.XML) as XML

Printing AreaList Pro Areas with SuperReport Pro

4

Programming SuperReport Pro

57

Creating the report

Creating a XMLreport from an AreaList Pro area is performed by the AL_SuperReport command:

AL_SuperReport (AreaRef:L; Template:T; Options:L; StyleOptions:L; Title:T) → result:T

â–  â– 

Template

can be an XML template or full path to an XML template or empty to use AreaList Pro’s built-in SuperReport Pro template

â–  â– 

Options

: 0 → use current columns widths; 1 → use automatic width

â–  â– 

StyleOptions

: bit-field - which style properties should not be overtaken from AreaList Pro - see constants in SuperReport Pro

Style

Features

â–  â– 

Title

: optional text centered in the header

If you want to use your own SuperReport Pro template:

â–  â– 

Title

will replace any text in all text objects named “Title” in the first header (must not be grouped - only direct children of the header)

â–  â–  in the body section, the first

Table object will be filled with headers / columns / footers; the table must have exactly one column

(used as the template for all printed columns)

Example

$reportXML := AL_SuperReport ( $alpAreaRef ;"";1; SRP_Style_HasFontName | SRP_Style_HasFontSize ;\

"My first AreaList Pro area printed using SuperReport Pro")

The code above means: fill the template but don’t use the font name and font size defined in AreaList Pro (use the one stored in the template default style), columns will be auto-sized by SuperReport Pro (because the fonts are different, the AreaList Pro widths must be ignored).

Then use SuperReport Pro to edit the resulting report, save it, export it as HTML or print it:

$result := SR_Print ( $reportXML ;0; SRP_Print_DestinationPreview | SRP_Print_AskPageSetup ; "";0;"")

Custom templates

AreaList Pro’s built-in SuperReport Pro template is obtained by the ALP_Area_SRPTableTemplate property, which gets the

SuperReport Pro template that will be used for report creation by

AL_SuperReport (stored in Resources/TableReport.XML) as

XML:

$tableReportTemplate := AL_GetAreaTextProperty (0; ALP_Area_SRPTableTemplate )

// get the built-in SRP template from ALP

Then in SuperReport Pro you can edit and save your own template anywhere (in the data file or a document) for future use with

AL_SuperReport, e.g.:

$error := SR_LoadReport ( $areaRepRef ; $tableReportTemplate ;0)

// load the SRP report and display it, save the custom template somewhere with the File menu

Printing AreaList Pro Areas with SuperReport Pro

4

Programming SuperReport Pro

58

Demonstration database code examples

â– 

Print with SuperReport Pro (default template)

C_TEXT

( $reportXML )

C_LONGINT

( $result )

$reportXML := AL_SuperReport ( eArea ;"";0;0; vTitle )

$result := SR_Print ( $reportXML ;0; SRP_Print_DestinationPreview | SRP_Print_AskPageSetup ;"";0;"")

â– 

Print with SuperReport Pro (custom template)

C_TEXT

( $reportXML ; $path )

C_LONGINT

( $result )

$path :=

Select document

("";"XML";"Select a SuperReport Pro template for ALP";0)

$path := Document // we actually need the full path

If

( $path #"")

$reportXML := AL_SuperReport ( eArea ; $path ;0;0; vTitle )

$result := SR_Print ( $reportXML ;0; SRP_Print_DestinationPreview | SRP_Print_AskPageSetup ;"";0;"")

End if

â– 

Editing a custom template

C_TEXT

( $tableReportTemplate )

C_LONGINT

( $srpError )

C_LONGINT

( $window )

$tableReportTemplate := AL_GetAreaTextProperty (0; ALP_Area_SRPTableTemplate )

// get the built-in SRP template from ALP

If

( $tableReportTemplate #"")

$window :=

Open external window

(100;100;800;800; Plain form window ;\

"SuperReport Pro template for AreaList Pro";"%SuperReport") //open the window for editing

$srpError := SR_LoadReport ( $window ; $tableReportTemplate ;0)

// load the SuperReport Pro report and display it, save the custom template somewhere with the File menu

End if

// closing the window will prompt for save if modified

Printing AreaList Pro Areas with SuperReport Pro

4

Programming SuperReport Pro

59

SuperReport Pro Text Style Tags

If the Attributed option has been set ( SRP_Column_Attributed , SRP_Field_Attributed , SRP_Footer_Attributed , SRP_Header_

Attributed , SRP_Text_Attributed , SRP_Variable_Attributed ) special tags can also be used in any text contained in a SuperReport

Pro area to display styled characters.

Note: the tags described below are exacty the same as in AreaList Pro .

These tags work just like HTML tags: <tag> styled text </tag> .

Style

Bold

Italic

Underline

Strike-through

Set font size to # points

Increase font size by # quarters (1/4) of current size

Decrease font size by # quarters (1/4) of current size

Set font by name

Set color (any format can be used, e.g. <c 0xFFFF0000> <c 1.0,0,0>

<c P123> <c dark orange>)

Tag

<b>

<i>

<u> or <ins>

<del>

<s #>

<s +#>

<s -#>

<f "font name">

(needs to be quoted if the name contains more than one word)

<c color name>

4D v12 (and above) internal format for styled text is stored as <SPAN STYLE="style attributes"> where the style attributes used by SuperReport Pro are:

â–  â–  font-family

â–  â–  font-size

â–  â–  font-weight (bold/normal)

â–  â–  font-style (italic/normal)

â–  â–  text-decoration (underline/ line-through/none)

â–  â–  color (#RRGGBB).

â–  â–  background color (#RRGGBB)

It is also possible to set the format as attributed, and specify the style attributes using the SRP_Variable_Attributed and SRP_Variable_

Format properties.

This feature is usable with Variable, Field and Table Column types objects.

Example:

C_TEXT

( $format )

SR_SetLongProperty ( $areaRepRef ; $objNum ; SRP_Variable_Attributed ;1) // the object is "attributed"

$format := "<c blue>+## ###</c>;<i><c red>-## ###</c></i>;<s +1><c green><b>ZERO</b></c></s>"

SR_SetTextProperty ( $areaRepRef ; $objNum ; SRP_Variable_Format ; $format )

SuperReport Pro Text Style Tags

4

Programming SuperReport Pro

60

With the above settings:

â–  â– 

Positive numbers will be printed in blue roman characters with a plus sign.

â–  â– 

Negative numbers will be printed in red italic characters with a minus sign.

â–  â– 

Zeros will be printed in green bold, font size increased by 25%, with the text "ZERO".

Here is the result, using a repeating variable / field with that format, or as one column in a

Table object (with variable row height to

hold the taller ZERO value):

Note that if the number format is too “small” to hold the number, 4D (and SuperReport Pro) will display it as “<<<<<<<<<<<<<<<<<<”, which will interfere with the opening tag character “<” if the column is attributed (multistyled).

In the example above (using “## ###” as a number format), this will be the case for all numbers exceeding 99,999.

Make sure that the format used will not cause the number to overflow, lest unexpected results might ensue.

SuperReport Pro Text Style Tags

5

Commands by Theme

61

5

Commands by Theme

Using the Command Reference

Each SuperReport Pro command is described in detail in this section.

Each description contains the following elements:

Name of the command

Parameters

â– 

SR_ConvertReportToXML

Result or Error

(blob:O; XML:T; name:T; callback:T) → error:L

Parameter

ª

blob

©

XML

ª

name

ª

callback

Type

blob text text text

Descriptions of the parameters

Description

Blob to convert to text.

XML output from the

blob

.

SRP_Object_Name property.

SRP_DataSource_Callback property.

Convert a SuperReport Pro report template from blob to text in XML format.

be aware of

Blob

can be a SuperReport Pro v2.x document or SuperReport Pro v3.x XML in a blob (UTF8 or UTF16LE).

Note: SR_ConvertReportToXML is used internally when needed – you don't have to convert all old reports to use them.

If the report is already converted, it is immediately returned without conversion.

â– 

Example

One or more examples showing how to use the command

Convert a report that has been saved in a blob field into XML:

C_TEXT

( $reportXML )

$error := SR_ConvertReportToXML( [Reports]ReportBlob ; $reportXML ;"MyReport";"CallbackMethod")

Using the Command Reference

5

Commands by Theme

62

Name of the command

This is what tells SuperReport Pro what you want to do.

The command name must always be entered exactly as shown.

Parameters

Every command requires at least one parameter. Most require the first parameter to be the Area / Report reference

.

Result / Error Codes

Functions return a result after they have been called.

Unless otherwise specified in the parameter description table, the result codes are long integers, 0 meaning "no error".

Constants

are available for these error codes.

Parameter Descriptions

Each command has its own set of parameters, and they are each described in the parameter descriptions table. The tables comprise three columns:Parameter, Type, and Description.

Parameter:

The name of the parameter, as shown in the Parameter list. Each is preceded by one of two arrows which indicate whether it is a value that you pass to the command or one that the command returns to you:

ª

A value that you pass to the command

©

A value that is returned by the command

1

A value that you pass to the command and / or that can be modified by the command

Type:

The type of the parameter. Note that if your database is running in non-Unicode mode, text objects are limited to 32k characters.

Description:

Information about the parameter.

Note: when calling a plugin command, all omitted parameters are initialized to the NULL of the respective types (0, 0.0, "",

!00:00:00!, …).

Command Description

An explanation of what the command does and how to use it.

Examples

One or more examples demonstrating how the command might be used.

See also Commands and Functions .

Using the Command Reference

Command Themes

The commands are organised into six themes:

Access

: Commands that affect the entire SuperReport Pro area or the plugin itself

Getters : Commands for getting information about certain aspects of the report

Setters

: Commands for setting properties of objects on the report

Objects

: Commands for managing the various objects on the report

Printing : Commands to manage the printing of SuperReport Pro reports

Miscellaneous

: Some additional tools and utilities.

For each theme there is a set of properties that can be used with that theme’s commands.

You will find a complete list of properties in the

Properties by Theme

section.

5

Commands by Theme

63

Command Themes

5

Commands by Theme

64

Access

The commands in this theme affect the overall SuperReport Pro plugin, report or area.

â– 

%SuperReport

The actual plug-in area object, which is placed on the 4D form in which you wish to display the SuperReport Pro area.

In addition, you use the %SuperReport routine when using the 4D

Open external window

function, which provides the ability to display the SuperReport Pro editor in a standard 4D external window. For example:

$areaRepRef :=

Open external window

(50;50; Screen width -50; Screen height -50;8;\

"New Report";"%SuperReport")

â– 

SR_ConvertReportToXML

(blob:O; XML:T; name:T; callback:T) → error:L

Parameter

ªâ–  blob

©â– 

XML

ªâ–  name

ªâ–  callback

Type

blob text text text

Description

Blob to convert to text.

XML output from the

blob

.

SRP_Object_Name property.

SRP_DataSource_Callback property.

Convert a SuperReport Pro report template from blob to text in XML format.

Blob

can be a SuperReport Pro v2.x document or SuperReport Pro v3.x XML in a blob (UTF8 or UTF16LE).

Note: SR_ConvertReportToXML is used internally when needed – you don't have to convert all old reports to use them. If the report is already converted, it is immediately returned without conversion.

Example

Convert a report that has been saved in a blob field into XML:

C_TEXT

( $reportXML )

$error := SR_ConvertReportToXML( [Reports]ReportBlob ; $reportXML ;"MyReport";"CallbackMethod")

Access

5

Commands by Theme

65

â– 

SR_DeleteReport

(areaReportRef:L) → error:L

Parameter

ª

areaReportRef

Type

longint

Description

Area / Report reference.

Delete an offscreen report created with

SR_NewReport or SR_NewReportBLOB

. You should be sure to always delete offscreen reports after you've finished with them.

Example

$error :=SR_DeleteReport ( $areaRepRef )

â– 

SR_LoadReport

(areaReportRef:L; src:T; options:L) → error:L

Parameter

ªâ–  areaReportRef

ªâ–  src

ªâ–  options

Type

longint text longint

Description

Area / Report reference.

Report XML description or path to the report file.

src

="",

options

=0: empty XML, empty report – does not contain any section, only contains

2 objects: data source and default style

src

="",

options

=1: empty path, ask for file

src

="<?XML@",

options

is irrelevant: XML is implicit otherwise

src

is a path to load the report from.

Open a saved report and display it in the report area.

Example

This example opens a report that has been saved in a text field:

If

(

Length

( [Reports]ReportText )>0)

$error := SR_LoadReport ( $areaRepRef ; [Reports]ReportText ;0)

End if

Compatibility note: this will only work for already converted / new reports.

Old 2.x blob reports must use

SR_ConvertReportToXML

in Unicode mode only, or the old v2.x API command

SR Set Area (see

SuperReport Pro 2.9 manual ).

Access

5

Commands by Theme

66

â– 

SR_NewReport

(areaReportRef:L;src:T;options:L) → error:L

Parameter

©â–  areaReportRef

ªâ–  src

ªâ–  options

Type

longint text longint

Description

Area / Report reference.

Report XML description or path to the report file.

src

="",

options

=0: empty XML, empty report – does not contain any section, only contains

2 objects: data source and default style

src

="",

options

=1: empty path, ask for file

src

="<?XML@",

options

is irrelevant: XML is implicit otherwise

src

is a path to load the report from.

Create a new

offscreen

report, optionally loading a report template.

SR_NewReport expects a text in

src

– the report XML description or a path to the report file. A report loaded from a file can be in old v2.x blob format.

â– 

Example 1 – Create a new offscreen report, load a report from a file selected by the user

C_LONGINT

( $error ; $areaRepRef )

$error := SR_NewReport ( $areaRepRef ;"";1) // empty source path, ask for a file

â– 

Example 2 – Create a new offscreen report, load a report from a blob field

C_LONGINT

( $error ; $areaRepRef )

C_TEXT

( $areaXML )

$areaXML :=

BLOB to text

( [Reports]ReportData ; UTF8 text without length )

$error := SR_NewReport ( $areaRepRef ; $areaXML ;0) // creates empty report if the XML text is empty

â– 

SR_NewReportBLOB

(areaReportRef:L; src:O) → error:L

Parameter

©â–  areaReportRef

ªâ–  src

Type

longint blob

Description

Area / Report reference.

Report template (blob) to load.

Create a new

offscreen

report, optionally loading a report template from a blob.

SR_NewReportBLOB expects a blob, which can be in old v2.x blob format.

Access

5

Commands by Theme

67

â– 

SR_Register

(registrationCode:T ; options:L; email:T )

ª

result

Parameter

â– 

ªâ–  registrationCode

ª

â–  options

ª

â–  email

Type

text longint text

Description

Pass the registration key to register your copy of SuperReport Pro. The key is either linked to the 4D or

4D Server serial number (individual licenses), to the machine ID (merged licenses), to the name of the company / developer (unlimited annual licenses)

or to the product ( master key for Online registration

).

An optional longint combining up to 4 bits.

Online registration option: developer email to

notify

when a license is issued or resent.

©â–  result longint 0 or error code.

SR_Register is used to register the SuperReport Pro plugin for standalone or server use.

Please see the

License Types section for detailed information about the licensing options available for SuperReport Pro.

Multiple calls to SR_Register are allowed. The plugin will be activated if at least one valid key is used, and all subsequent calls to

SR_Register will return 0, unless the force check bit is set to true in the

options

parameter.

registrationCode

— You must call SR_Register with a valid registration key, otherwise SuperReport Pro will operate in demonstration mode – it will cease to function after 20 minutes. In case a

master key is used the plugin will attempt a connection

to e-Node’s license server for

Online registration

.

options

— Optional. This parameter combines up to 4 bits as described below. The default mode (

registrationCode

being a passed as the only parameter) is silent: no force check, no confirmation, no alert, no email.

1

2

Bit number Description

0 Force check: if this bit is is on (true),

registrationCode

is tested regardless of current registration state. If the plugin was not previously registered and the result is 0, it is registered the same way as if the bit was off (or the whole

options

parameter omitted)

If the plugin was previously successfully registered, a registration error will be returned in

result

in case

registrationCode

is invalid, but the plugin will remain registered

3

Online registration

Online registration

Online registration

option: confirm connection “Is it OK to connect to e-Node’s license server to register SuperReport Pro?”

option: display alert if registration error

option: display alert if registered

email

— Optional. The developer email address

where to send Online registration

information.

result

— 0 or error code:

9

10

11

12

4

5

2

3

6

7

8

Result code Description

0 OK

1 Beta license has expired

Invalid license

The license has expired

The OEM license has expired

The maximum number of users has been exceeded

The license is for a different environment (e.g. the licence is for a single-user version, but you are using it with 4D Server)

The license is linked to a different

Invalid

merged license

4D license

Only serial / ID licenses are allowed in text license files (includes Register button

and

Online registration

)

Unauthorized

master key

(

Online registration

)

Can't connect to e-Node's license server to perform Online registration

No

Online registration license available for this master key (unknown or all used)

Access

5

Commands by Theme

68

When SR_Register is called with an empty string, the license dialog will be displayed if SuperReport Pro is not registered and the dialog was not yet displayed. This allows you to show the registration dialog to your users without effectively calling a SuperReport

Pro command or displaying a SuperReport Pro area.

Note: alternately to SR_Register, you can place a

plain text file into your 4D Licenses folder or use the

Demo mode dialog

“Register” button . This is only valid for non-unlimited licenses.

â– 

Basic example

C_LONGINT

( $result )

$result :=

SR_Register ("YourRegistrationKey")

Case of

:( $result =2)

ALERT

("The SuperReport Pro licence is invalid.")

:( $result =3)

ALERT

("The SuperReport Pro licence has expired.")

etc.

End case

â– 

Example with multiple calls

C_LONGINT

( $result ) // ignored in this case

$result := SR_Register ("Registration key one")

$result := SR_Register ("Registration key two")

$result := SR_Register ("Registration key three") etc.

If

( $result #0) // registration failed on all keys

ALERT

("SuperReport Pro could not be registered.")

End if

â– 

Force check example

In this example we assume that only "Registration key two" is valid, but you want to check the other keys status.

C_LONGINT

( $result )

$result :=

SR_Register ("Registration key one";1) // invalid, will return an error, the plugin isn’t registered

$result :=

SR_Register ("Registration key two";1) // valid, will return 0, the plugin is registered

$result :=

SR_Register ("Registration key three";1) // invalid, will return an error, the plugin is still registered

Access

â– 

Online registration examples

Confirm connection, alert if successful, alert if failed, send email notification to [email protected]:

C_LONGINT

( $result )

$result := SR_Register ("Master key";0 ?+1 ?+2 ?+3;"[email protected]")

Silent connection, alert if successful, alert if failed, no email notification:

C_LONGINT

( $result )

$result := SR_Register ("Master key";0 ?+2 ?+3)

5

Commands by Theme

69

â– 

SR_SaveReport

(areaReportRef:L; dstpath / XML:T; options:L) → error:L

Parameter

ªâ–  areaReportRef

ªâ–  dstpath /

©â– 

XML

ªâ–  options

Type

longint text longint

Description

Area / Report reference.

The full pathname to a new (will be created) or existing document, or a valid text variable to receive the XML. If the parameter is a null string, the standard Save File dialog will be displayed.

0:

dstpath / XML

will be filled with XML

1:

dstpath / XML

is a path, ask if empty.

Save the contents of the defined report to a file or as XML in a variable.

Using this command with a document pathname does the same as getting SRP_Object_XML from the report / area and saving it to the disk.

This is similar to selecting the

Save to Disk menu item from the File menu in the SuperReport Pro report area, except that using the menu modifies the document name ( SRP_Report_Document

) and changes the window title if using an external window

.

â– 

Example – Save a report to a field

$areaXML :=""

$error := SR_SaveReport ( $areaRepRef ; $areaXML ;0) // save the report data to a variable

If

( $error =0) // if the command completed successfully

[Customer]customer_report := $areaXML

End if

Access

Getters

Use these commands to get information about a report or object.

The properties that can be used with these commands can be found in the

Properties by Theme

section.

Use

areaReportRef

= 0 to access a global plugin property (such as SRP_Area_Path or SRP_Area_Version ).

â–  â– 

areaReportRef

= 0 means “access workstation global settings”.

â–  â– 

areaReportRef

# 0 means “access this area's settings”.

areaReportRef

is the SuperReport Pro Area / Report reference .

objNum

is 0 = selected objects, 1 = the report itself, any other number = the Object number .

Note: not every object supports every property.

5

Commands by Theme

70

â– 

SR_GetLongProperty

(areaReportRef:L; objNum:L; property:T) → value:L

Parameter

ªâ–  areaReportRef

ªâ–  objNum

ªâ–  property

©â–  value

Type

longint longint text longint

Description

Area / Report reference.

1 = the report itself any other value: the object number.

Property constant.

Property value.

Get a longint property

value

of a report or object.

Example 1

Find out which tool in SuperReport Pro's toolbar the user has selected:

$toolID := SR_GetLongProperty ( $areaRepRef ;1; SRP_Area_Tool )

Example 2

Get the number of footer rows for a Table object (

Object number

$tableobjNum ):

$numFooterRows := SR_GetLongProperty ( $areaRepRef ; $tableobjNum ; SRP_Table_NumFooters )

Getters

5

Commands by Theme

71

â– 

SR_GetObjectXML

(areaReportRef:L; objNum:L; XML:T) → error:L

Parameter

ªâ–  areaReportRef

ªâ–  objNum

©â– 

XML

Type

longint longint text

Description

Area / Report reference.

1 = the report itself any other value: the object number.

The XML of the specified object.

Get the

XML

value of a report or object and store it into a text variable.

This command is equivalent to the following:

SR_GetTextProperty( $areaReportRef ; $objNum ; SRP_Object_XML )

â– 

SR_GetProperties

(areaReportRef:L; objNum:L; properties:AT; values:AT; names:AT) → error:L

Parameter

ªâ–  areaReportRef

ªâ–  objNum

©â–  properties

©â–  values

©â–  names

Type

longint longint text array text array text array

Description

Area / Report reference.

0 = selected objects

1 = the report itself any other value: the object number.

Array of property constants.

Array of property values (converted to text as needed).

(Optional) array of property names.

Get all (relevant)

Properties of a report, object or object selection into parallel arrays.

Note: because a text array is used for values, pictures and blobs are unusable and real numbers use a decimal point regardless of the current system settings.

Also, when operating on multiple objects (selection:

objNum

=0), only properties common to all objects are returned and when there are different values for a property, "<multiple values>" is returned.

Example

Get the

properties

of all objects on the report:

ARRAY TEXT

( $propertyIDs ;0)

ARRAY TEXT

( $propertyValues ;0)

ARRAY TEXT

( $propertyNames ;0)

$error := SR_GetProperties ( $areaRepRef ;1; $propertyIDs ; $propertyValues ; $propertyNames )

See also SR_SetProperties

and its example.

Getters

â– 

SR_GetPtrProperty

(areaReportRef:L; objNum:L;property:T; value;P) → error:L

Parameter

ªâ–  areaReportRef

ªâ–  objNum

ªâ–  property

©â–  value

Type

longint longint text pointer

Description

Area / Report reference.

1 = the report itself any other value: the object number.

Property constant.

Pointer to an object (4D variable or field) containing the property value.

Get a

property value

of a report or object using a pointer.

â– 

Example 1 – Using a blob

C_BLOB

( $blob )

$error :=

SR_GetPtrProperty (

$areaRepRef ;1; SRP_Report_UserBLOB ;-> $blob )

â– 

Example 2 – Using a pointer

C_POINTER

( $ptr ) // pointer to the area

$error := SR_GetPtrProperty ( $areaRepRef ;1; SRP_Area_Self ;-> $ptr ) // pointer to the $ptr pointer

5

Commands by Theme

72

â– 

SR_GetRealProperty

(areaReportRef: L;objNum:L; property:T) →value:R

Parameter

ªâ–  areaReportRef

ªâ–  objNum

ªâ–  property

©â–  value

Type

longint longint text real

Description

Area / Report reference.

1 = the report itself any other value: the object number.

Property constant.

Property value.

Get a real

property value

of a report or object.

Example

Get the current step for moving / resizing objects with arrow keys in points for the report:

C_REAL

( $step )

$step := SR_GetRealProperty( $areaRepRef ;1; SRP_Area_Moving )

Getters

5

Commands by Theme

73

â– 

SR_GetTextProperty

(areaReportRef:L; objNum:L; property:T) →value:T

Parameter

ªâ–  areaReportRef

ªâ–  objNum

ªâ–  property

©â–  value

Type

longint longint text text

Description

Area / Report reference.

1 = the report itself any other value: the object number.

Property constant.

Property value, converted to text as needed.

Get a text

property value

of a report or object.

Note: because a text conversion is used for numeric property values, pictures and blobs are unusable and real numbers use a decimal point regardless of the current system settings.

Example

Get the name of the area object (the area's variable name used on the 4D form):

C_TEXT

( $areaVariableName )

$areaVariableName := SR_GetTextProperty( $areaRepRef ;1; SRP_Area_Name )

Getters

5

Commands by Theme

74

Setters

Use these commands to set information about a report or object.

For a list of properties, see the Properties

section.

Note: not every object supports every property.

â– 

SR_SetLongProperty

(areaReportRef:L; objNum:L;property:T; value:L)

Parameter

ªâ–  areaReportRef

ªâ–  objNum

ªâ–  property

ªâ–  value

Type

longint longint text longint

Description

Area / Report reference.

0 = selected objects

1 = the report itself any other value: the object number.

Property constant.

Property value.

Set a longint

property value

of a report or object selection.

Example 1

Hide the SuperReport Pro menu bar:

SR_SetLongProperty ( $areaRepRef ;1; SRP_Report_ShowMenubar ;0)

Example 2

Use PDF for preview, don't embed fonts on Windows:

SR_SetLongProperty (0; 0; SRP_Area_PreviewFlags ; SRP_Print_WinPDFPreview | SRP_Print_WinPDFNoFonts )

Note: preview always means “Open the file after creation” – see

Preview .

Example 3

Create an OXPS preview on Windows 8 (will open after creation) unless SRP_Print_WinPDFPreview has been set:

SR_SetTextProperty (0; 0;

SRP_Area_WinPreviewName ; "MyGreatestAppPreview.oxps")

Note: Windows 7 does not support OXPS!

Setters

5

Commands by Theme

75

â– 

SR_SetProperties

(areaReportRef:L; objNum:L; properties:AT; values:AT) → error:L

Parameter

ªâ–  areaReportRef

ªâ–  objNum

ªâ–  properties

ªâ–  values

Type

longint longint text array text array

Description

Area / Report reference.

0 = selected objects

1 = the report itself any other value: the object number.

Array of property constants.

Array of property values (as text).

Set Properties

of a report, object or object selection from parallel arrays. You can set one or multiple

properties

.

Note: because a text array is used for

values

, pictures and blobs are unusable and real numbers use a decimal point regardless of the current system settings.

Example

Let's get report boolean information such as grid, margins, menu bar, borders and ruler show / hide, displaying a custom dialog or palette so that the user can modify these

properties

using checkboxes then apply the changes to the report.

//Dialog form method

ARRAY TEXT

( $propertyIDs ;0)

ARRAY TEXT

( $propertyValues ;0)

C_LONGINT

( $i ; $error )

C_LONGINT

( cbxGrid ; cbxMargins ; cbxMenu ; cbxBorders ; cbxRuler ) // checkboxes for the dialog

Case of

: (

Form event

= On Load )

$error := SR_GetProperties ( $areaRepRef ;1; $propertyIDs ; $propertyValues ) // get the values

For

( $i ;1;

Size of array

( $propertyIDs ))

: { $i }= SRP_Report_ShowGrid )

cbxGrid :=

Num

( $propertyValues { $i }) // 0 or 1

: { $i }= SRP_Report_ShowMargins )

cbxMargins :=

Num

( $propertyValues { $i })

: { $i }= SRP_Report_ShowMenubar )

cbxMenu :=

Num

( $propertyValues { $i })

: { $i }= SRP_Report_ShowObjBorders )

cbxBorders :=

Num

( $propertyValues { $i })

: { $i }= SRP_Report_ShowRuler )

cbxRuler :=

Num

( $propertyValues { $i })

Setters

: (

Form event

= On Validate )

ARRAY

( $propertyIDs ;0) // reset the arrays

ARRAY

( $propertyValues ;0)

TO

( $propertyIDs ; SRP_Report_ShowGrid )

TO

( $propertyValues ;

String

( cbxGrid )) // "0" or "1"

TO

( $propertyIDs ; SRP_Report_ShowMargins )

TO

( $propertyValues ;

String

( cbxMargins ))

TO

( $propertyIDs ; SRP_Report_ShowMenubar )

TO

( $propertyValues ;

String

( cbxMenu ))

TO

( $propertyIDs ; SRP_Report_ShowObjBorders )

TO

( $propertyValues ;

String

( cbxBorders ))

TO

( $propertyIDs ; SRP_Report_ShowRuler )

TO

( $propertyValues ;

String

( cbxRuler ))

$error := SR_SetProperties ( $areaRepRef ;1; $propertyIDs ; $propertyValues ) // set the values

End case

See also SR_GetProperties and its example.

â– 

SR_SetPtrProperty

(areaReportRef:L; objNum:L; property:T; value:P) → error:L

Parameter

ªâ–  areaReportRef

ªâ–  objNum

ªâ–  property

ªâ–  value

Type

longint longint text pointer

Description

Area / Report reference.

0 = selected objects

1 = the report itself.

Property constant.

Pointer to an object (4D variable or field) containing the property value.

Set a

property value

of a report or object selection using a pointer.

Example 1

Clear the page setup settings for a report prior to saving it:

C_BLOB

( $blob )

$error := SR_SetPtrProperty ( $areaRepRef ;1; SRP_Report_PageFormat ;-> $blob ) // MacOS

$error := SR_SetPtrProperty ( $areaRepRef ;1; SRP_Report_PrintSettings ;-> $blob )

$error := SR_SetPtrProperty ( $areaRepRef ;1; SRP_Report_DevMode ;-> $blob ) // Windows

$error := SR_SetPtrProperty ( $areaRepRef ;1; SRP_Report_DeviceNames ;-> $blob )

5

Commands by Theme

76

Setters

Example 2

Get, then restore the print settings:

C_LONGINT

( $error )

C_BLOB

( $blob )

$error := SR_GetPtrProperty ( $areaRepRef ;1; SRP_Report_PrintSettings ;-> $blob )

// do something

$error := SR_SetPtrProperty ( $areaRepRef ;1; SRP_Report_PrintSettings ;-> $blob )

â– 

SR_SetRealProperty

(areaReportRef:L; objNum:L; property:T; value:R)

Parameter

ªâ–  areaReportRef

ªâ–  objNum

ªâ–  property

ªâ–  value

Type

longint longint text real

Description

Area / Report reference.

0 = selected objects

1 = the report itself.

Property constant.

Property value.

Set a real

property value

of a report or object selection.

Example

Zoom the report in the editor to 150 %

SR_SetRealProperty (

$areaRepRef ;1; SRP_Report_Zoom ;1.5)

5

Commands by Theme

77

Setters

5

Commands by Theme

78

â– 

SR_SetTextProperty

(areaReportRef:L; objNum:L; property:T; value:T)

Parameter

ªâ–  areaReportRef

ªâ–  objNum

ªâ–  property

ªâ–  value

Type

longint longint text text

Description

Area / Report reference.

0 = selected objects

1 = the report itself.

Property constant.

Property value.

Set a text

property value

of a report or object selection.

Note: because a text conversion is used for numeric property values, pictures and blobs are unusable and real numbers use a decimal point regardless of the current system settings.

Example

Set a text object font to Arial:

SR_SetTextProperty ( $areaRepRef ; $objNum ; SRP_Style_FontName ;"Arial")

Setters

5

Commands by Theme

79

Objects

â– 

SR_ChangeObjectParent

(areaReportRef:L; objNum:L; newParent:L) → error:L

Parameter

ªâ–  areaReportRef

ªâ–  objNum

ªâ–  newParent

Type

longint longint longint

Description

Area / Report reference.

The object number (value > 1).

Reference number of the new parent object.

Move an object from one section / group into another section / group.

Note: this command does not support

objNum

=1 for the report itself. It will return the error code -5 if used.

SuperReport Pro version 3 uses a real object hierarchy – the objects are contained in the section / group.

When you programmatically change the position, it will not move to a different parent.

An object's position is relative to the parent, so when you change an object's parent, the relative position will be the same.

Example

In this example we will create a new group as an object, in which we'll include the current object selection.

// Group selected objects

C_LONGINT

( $1 ) // report

C_LONGINT

( $error ; $group ; $i ; $parent ; $areaRepRef ; $lock )

C_REAL

( $top ; $left ; $bottom ; $right ; $lineWidth )

C_REAL

( $gtop ; $gleft ; $gbottom ; $gright )

C_TEXT

( $kind )

$areaRepRef := $1

ARRAY LONGINT

( $objectNums ;0)

$error := SR_GetObjects ( $areaRepRef ;1; SRP_ReportSelectedObjects ; $objectNums )

// Eliminate unsupported objects

For

( $i ;

Size of array

( $objectNums );1;-1)

$kind := SR_GetTextProperty ( $areaRepRef ; $objectNums { $i }; SRP_Object_Kind )

If

(( $kind = SRP_ObjectKind_Report )\

| = SRP_ObjectKind_Style )\

| = SRP_ObjectKind_Guide )\

| = SRP_ObjectKind_Section )\

| = SRP_ObjectKind_Header )\

| = SRP_ObjectKind_Column )\

| = SRP_ObjectKind_Footer ))

Objects

FROM

( $objectNums ; $i ;1)

End if

End for

If

(

Size of array

( $objectNums )>1)

// Get bounding box

For

( $i ;1;

Size of array

( $objectNums ))

$top :=

SR_GetRealProperty (

$areaRepRef ; $objectNums { $i }; SRP_Object_PosTop )

$left :=

SR_GetRealProperty (

$areaRepRef ; $objectNums { $i }; SRP_Object_PosLeft )

$bottom :=

SR_GetRealProperty (

$areaRepRef ; $objectNums { $i }; SRP_Object_PosBottom )

$right :=

SR_GetRealProperty (

$areaRepRef ; $objectNums { $i }; SRP_Object_PosRight )

$lineWidth :=0

$error :=

SR_GetPtrProperty (

$areaRepRef ; $objectNums { $i }; SRP_Line_Thickness ;-> $lineWidth )

If

( $i =1)

$gtop := $top $lineWidth

$gleft := $left $lineWidth

$gright := $right + $lineWidth

$gbottom := $bottom + $lineWidth

Else

If

( $gtop >( $top $lineWidth ))

$gtop := $top $lineWidth

If

( $gleft >( $left $lineWidth ))

$gleft := $left $lineWidth

If

( $gbottom <( $bottom + $lineWidth ))

$gbottom := $bottom + $lineWidth

If

( $gright <( $right + $lineWidth ))

$gright := $right + $lineWidth

End for

$error := SR_Area_SaveUndo ( $areaRepRef ;219) // start undo block for "Group"

// Create the group object

$error := SR_GetParent ( $areaRepRef ; $objectNums {1}; $parent )

$error := SR_NewObject ( $areaRepRef ; $group ; SRP_Group ; $parent )

SR_SetRealProperty ( $areaRepRef ; $group ; SRP_Object_PosTop ;$gtop)

SR_SetRealProperty ( $areaRepRef ; $group ; SRP_Object_PosLeft ; $gleft )

5

Commands by Theme

80

Objects

5

Commands by Theme

81

SR_SetRealProperty ( $areaRepRef ; $group ; SRP_Object_PosBottom ; $gbottom )

SR_SetRealProperty ( $areaRepRef ; $group ; SRP_Object_PosRight ; $gright )

SR_SetLongProperty ( $areaRepRef ; $group ; SRP_Object_VariableSizeV ;1)

SR_SetLongProperty ( $areaRepRef ; $group ; SRP_Object_Selected ;1)

// Move objects into the group

$gtop :=$gtop

$gleft :=$gleft

$lock :=2 // locked mode

For

( $i ;1;

Size of array

( $objectNums ))

SR_SetRealProperty ( $areaRepRef ; $objectNums { $i }; SRP_Object_RelMoveH ; $gleft )

SR_SetRealProperty ( $areaRepRef ; $objectNums { $i }; SRP_Object_RelMoveV ; $gtop )

SR_SetLongProperty ( $areaRepRef ; $objectNums { $i }; SRP_Object_Selected ;0)

$error := SR_ChangeObjectParent ( $areaRepRef ; $objectNums { $i }; $group )

SR_SetLongProperty ( $areaRepRef ; $objectNums { $i }; SRP_Object_Locked ; $lock )

End for

$error := SR_Area_SaveUndo ( $areaRepRef ;0) // end undo block

End if

Note that the above action can also be performed directly with an Object > Group menu call using the old v2 API SR Do Command:

$error := SR Do Command ( $1 ;219;1) // Object > Group menu

â– 

SR_DeleteObject

(areaReportRef:L; objNum:L) → error:L

Parameter

ªâ–  areaReportRef

ªâ–  objNum

Type

longint longint

Description

Area / Report reference.

The object number (value > 1).

Delete the specified object.

Example

$error := SR_DeleteObject( $areaRepRef ;3) // delete object number 3 from the report

Objects

â– 

SR_FindObjectByID

(areaReportRef:L; objID:T; objNum:L) → error:L

Parameter

ªâ–  areaReportRef

ªâ–  objID

©â–  objNum

Type

longint text longint

Description

Area / Report reference.

Object ID.

Object number.

Return (in

objNum

) the

Object number

of the first object in a report having its

Object ID equal to

objID.

The comparison is strictly equal: it is case and diacritical sensitive.

Example

C_LONGINT

( $objNum )

$error := SR_FindObjectByID( $areaRepRef ;"Header"; $objNum )

â– 

SR_GetObjects

(areaReportRef:L; objNum:L; mode:T; objNumArray:AL) → error:L

Parameter

ªâ– 

ªâ– 

ªâ–  areaReportRef objNum mode

Type

longint longint text

Description

Area / Report reference.

Refers to report, section, group or a table object.

1 = the report itself any other value: the object number.

SRP_ReportAllObjects

SRP_ReportSelectedObjects

SRP_ReportEditorStyles

SRP_ReportDataSource

SRP_ReportGuides

SRP_ReportStyleSet

SRP_ReportSections

SRP_GroupObjects

SRP_TableHeaderRowMask *

SRP_TableColumns

SRP_TableFooterRowMask *

©â–  objNumArray longint array Array containing all Object numbers.

* Use that mask and add the header row number (starting at 1):

String

( $row ; SRP_TableHeaderRowMask ). So for example the third header line is "H003".

See for example

Creating Reports Procedurally

.

Get the

Object numbers

of the objects included in a report, section, group or

Table object

.

5

Commands by Theme

82

Objects

5

Commands by Theme

83

Example 1

Get the table ( Object number

$tableobjNum ) columns, and then set the style ID for the column header of the first column to 2:

ARRAY LONGINT

( $objectNums ;0)

$error := SR_GetObjects ( $areaRepRef ; $tableobjNum ; SRP_TableColumns ; $objectNums ) // get the columns

SR_SetLongProperty ( $areaRepRef ; $objectNums {1}; SRP_Object_StyleID ;2)

Example 2

Get cells in the footer row 1:

ARRAY LONGINT

( $objectNums ;0)

$error := SR_GetObjects ( $areaRepRef ; $tableobjNum ;

String

(1; SRP_TableFooterRowMask ); $objectNums ) // "F001"

â– 

SR_GetObjectsByPropertyValue

(areaReportRef:L; property:T; value:T; objNumArray:AL; comparisonMode:L) → error:L

Parameter

ªâ–  areaReportRef

ªâ–  property

ªâ–  value

©â–  objNumArray

ªâ–  comparisonMode

Type

longint text text longint array longint

Description

Area / Report reference.

Property constant.

Value to look for (converted to text as needed).

Array containing the Object numbers of the objects matching the property value.

Comparison mode (optional):

2

3

Mode

0

1

Description

Smooth (ignore case & diacritics) – default value

Case insensitive (ignore case)

Accentless (ignore diacritics)

Strictly equal

Get the

Object numbers

of the objects matching the

value

for the specified

property

.

Note: the

Property

can be any property accepting a type that can be converted to text. Because a text conversion is used for numeric property values, pictures and blobs are unusable and real numbers use a decimal point regardless of the current system settings.

Example

Get all instances of a given 4D variable on the report:

ARRAY LONGINT

( $objectNums ;0) // will contain the Object numbers

$error := SR_GetObjectsByProperty ( $areaRepRef ; SRP_Variable_Source ; "vVarName"; $objectNums )

Objects

Note that the above equals to the following:

$property := SRP_Variable_Source

$value :="vVarName" // name of the 4D variable we're looking for

ARRAY LONGINT

( $allObjectNums ;0)

SR_GetObjects ( $areaRepRef ; SRP_ReportAllObjects ; $allObjectNums ) // get all Object numbers

ARRAY LONGINT

( $objectNums ;0)

C_TEXT

( $v )

For

( $i ;1;

Size of array

( $allObjectNums ))

If

( SR_GetPtrProperty ( $areaRepRef ; $allObjectNums { $i }; $property ;-> $v )=0) // object property value

If

( $v = $value ) // requested value

APPEND TO ARRAY

( $objectNums ; $allObjectNums { $i })

End if

End for

5

Commands by Theme

84

â– 

SR_GetParent

(areaReportRef:L; objNum:L; parentObjNum:L) → error:L

Parameter

ªâ–  areaReportRef

ªâ–  objNum

©â–  parentObjNum

Type

longint longint longint

Description

Area / Report reference.

1 = the report itself (will return 0) any other value: the object number.

The object's parent object number.

Return (in

parentObjNum

) the Object number of the object's parent.

Example

C_LONGINT

( $parentobjNum )

$error := SR_GetParent ( $areaRepRef ;3; $parentobjNum ) // get the parent object number to the object number 3.

Objects

5

Commands by Theme

85

â– 

SR_ModifyTable

(areaReportRef:L; objNum:L; action:L; from:L; numColumns:L; to:L) → error:L

Parameter

ªâ–  areaReportRef

ªâ–  objNum

ªâ–  action

Type

longint longint longint

Description

Area / Report reference.

Table object to modify.

1 = insert

numColumns

(> 0) columns before column

from

(> 0, <= number of columns in the table)

2 = move

numColumns

(> 0) columns at position

from

(> 0, <= number of columns in the table) after column

to

3 = delete

numColumns

(> 0) columns at position

from

.

ªâ–  from

ªâ–  numColumns

ªâ–  to longint longint longint

Insert, move or delete column(s) of the specified Table

.

Example

$error := SR_ModifyTable ( $areaRepRef ;6;2;3;2;5) // move the table (object number 6) columns 3 and 4 after column 5.

Objects

5

Commands by Theme

86

â– 

SR_NewObject

(areaReportRef:L; objNum:L; type:T; parentObjNum:L) → error:L

Parameter

ªâ–  areaReportRef

©â–  objNum

ªâ–  type

ªâ–  parentObjNum

Type

longint longint text longint

Description

Area / Report reference.

The returned new object number.

SRP_Group

SRP_Line

SRP_Oval

SRP_Rectangle

SRP_Picture

SRP_Text

SRP_Variable

SRP_Field

SRP_Table

SRP_Header

SRP_BreakHeader

SRP_Body

SRP_BreakFooter

SRP_Footer

SRP_Watermark

SRP_Scrap

SRP_HorizontalGuide

SRP_VerticalGuide

SRP_DataSource

SRP_Style

Parent section or group object number, must be provided for “normal” objects (not guide, style, section).

Create a new object within the given parent object.

Example

Create a new header section, get its

Object number

, then assign a name to it and set its height to 40 points:

$error := SR_NewObject ( $areaRepRef ; $objNum ; SRP_Header ;0) // 0 is ignored (section)

SR_SetTextProperty ( $areaRepRef ; $objNum ; SRP_Object_Name ;"Header")

SR_SetLongProperty ( $areaRepRef ; $objNum ; SRP_Section_Height ;40)

Objects

5

Commands by Theme

87

â– 

SR_NewObjectFromXML

(areaReportRef:L; objNum:L; XML:T; parentObjNum:L) → error:L

Parameter

ªâ–  areaReportRef

©â–  objNum

ªâ– 

XML

ªâ–  parentObjNum

Type

longint longint text longint

Description

Area / Report reference.

The returned new object number.

XML defining the object.

Parent section or group object number, must be provided for “normal” objects (not guide, style, section).

Create a new object from an

XML

snippet within the given parent.

You can create an object's

XML

programmatically and then use it to create a new object. It can be any kind of object except the report itself.

The result is the same as creating an object using SR_NewObject and then setting all the needed properties.

Example

The creation of styles in the

Creating Reports Procedurally

example could be rewritten this way:

$XML :="<Style id=1 name=Headers font=Helvetica size=8 qdStyle=1 wrap=1 lineSpacing=1/>"

$error :=

SR_NewObjectFromXML (

$areaRepRef ; $objNum ; $XML ;0) // create style 1

$XML :="<Style id=2 name=Headers font=Helvetica size=8 wrap=1 lineSpacing=1/>"

$error :=

SR_NewObjectFromXML (

$areaRepRef ; $objNum ; $XML ;0) // create style 2

Note: the above XML is not strictly orthodox – attributes must normally use the syntax attribute="value" or attribute='value'.

SuperReport Pro supports omission of quotes (as above) but multi-word values must be quoted.

Setters

Printing

â– 

SR_AbortPrinting

Cancels current printing (no parameters, no result value).

This command can only be called from a script (Report or Object) or a 4D project method called from a script.

Does nothing if no printing is in progress.

Example

See the example for

Execution Cycle scripts .

5

Commands by Theme

88

â– 

SR_CloseSession

(session:L) → error:L

Parameter

ªâ–  session

Type

longint

Close a printing session.

Example

See the example for

SR_OpenSession

.

Description

Print session ID.

Printing

5

Commands by Theme

89

â– 

SR_Export

(src:T;options:L; fieldDelimiter:L; dstPath:T; recordDelimiter:L) → error:L

Parameter

ªâ–  src

ªâ–  options

ªâ–  fieldDelimiter

ªâ–  dstPath

ªâ–  recordDelimiter

©â–  error

Type

text longint longint text longint longint

Description

Report XML description or path to the report file.

src

="",

options

bit 0=0: empty XML

src

="",

options

bit 0=1: empty path, ask for file

src

="<?XML@",

options

bit 0 is irrelevant: XML is implicit otherwise

src

is a path to load the report from.

For other bits, use

SuperReport Pro Export Flags :

- set exactly one of SRP_Export_Text , SRP_Export_XML , or SRP_Export_HTML

- for text export, SRP_Export_CSVFormat can be used (export 1,2 as "1,2") to escape special characters

- set at least one of SRP_Export_Body , SRP_Export_Breaks ,

SRP_Export_Total , SRP_Export_Headers , SRP_Export_Watermark.

- set SRP_Export_StaticText to export static texts

- set SRP_Export_Sorted to export in print order, not visual order (position on page).

ASCII code of the field delimiter.

A valid document pathname.

If it is a null string, the standard Save File dialog will be displayed.

A long integer which can contain 2 characters where the first character is put in low-order word. The default is "\r\n" which is equivalent to

Carriage Return | ( Line Feed << 16).

The record delimiter is always CR+LF in XML and HTML modes.

See the error numbers listed for SR_Print

.

Export a SuperReport Pro report without requiring a SuperReport Pro area – the output written to the specified document is a text interpretation of the report.

Note: the Header and Footer sections are only used once as the report is generated since the concept of pages don’t exist when exporting the report to a document.

â– 

Example 1 – Export the Body section of a report to an XML file

$error := SR_Export ( $areaRepRef ; SRP_Export_XML | SRP_Export_Body ;9;\

"Macintosh Disk:ProjectFolder:Report:MyReport.XML";13)

â– 

Example 2 – Export the Body section of a report to a CSV text file

$error := SR_Export ( $areaRepRef ; SRP_Export_Text | SRP_Export_CSVFormat | SRP_Export_Body ;9;\

"Macintosh Disk:ProjectFolder:Report:MyReport.csv";13)

Printing

â– 

SR_ExportBLOB

(src:O;options:L; fieldDelimiter:L; dstPath:T; recordDelimiter:L) → error:L

This is the same as

SR_Export

, except that the source is a blob and

options

bit 0 is not used.

â– 

SR_ExportBLOBIntoBLOB

(src:O;options:L; fieldDelimiter:L; dstBlob:O; recordDelimiter:L) → error:L

This is the same as

SR_ExportBLOB, except that both the source and the destination are blobs.

â– 

SR_ExportIntoBLOB

(src:T;options:L; fieldDelimiter:L; dstBlob:O; recordDelimiter:L) → error:L

This is the same as SR_Export, except that the destination is a blob instead of a file.

Example

Export a report into a blob as HTML.

C_BLOB

( $blob )

SET BLOB SIZE

( $blob ;0)

$options := SRP_Export_HTML

$error := SR_ExportIntoBLOB ( [Report]ReportData ; $options ;9; $blob ;13)

5

Commands by Theme

90

Printing

5

Commands by Theme

91

â– 

SR_OpenSession

(session:L; dstFlags:L; dstPath:T; XML:T; jobName:T; printer:T) → error:L

Parameter

©â–  session

ªâ–  dstFlags

ªâ–  dstPath

ªâ– 

XML

ªâ–  jobName

ªâ–  printer

Type

longint longint text text text text

Description

Print session ID.

Destination flags – see

Print Flags for the options.

Document path when printing to PDF or file.

A template used just for Page setup

/

Job setup.

Printer job name.

Printer name (optional):

- used if non empty

- otherwise and if SRP_Print_NoDefaultPrinter is set to true in

dstFlags

, the printer stored in the template is used

- otherwise the default printer is used.

Start a new printing

session

. Sessions are a way to print multiple reports as one print job.

Note: preview always means “Open the file after creation” – see

Preview .

The SRP_Print_DestinationPDF and SRP_Print_DestinationFile option bits (destination flags in

dstFlags

) require a file path in

dstPath

.

If it is empty, on Windows SR_OpenSession will behave the same as if SRP_Print_DestinationPrinter was used and nothing will happen on MacOS.

Example

Print reports of your top 20 customers and your top 50 customers as one print job:

$dest := SRP_Print_AskPageSetup

$error :=

SR_OpenSession (

$session ; $dest ;""; [Reports]RM_ReportData ;"Top customers";"LaserJet")

QUERY

([ Reports ]; [RM_Reports]RM_ReportName ="Top 20 Customers")

$error :=

SR_Print (

[Reports]RM_ReportData ;0;0;""; $session )

QUERY

( [Reports] ; [Reports]RM_ReportName ="Top 50 Customers")

$error :=

SR_Print (

[Reports]RM_ReportData ;0;0;""; $session )

$error :=

SR_CloseSession (

$session )

Printing

5

Commands by Theme

92

â– 

SR_OpenSessionBLOB

(session:L; dstFlags:L; dstPath:T; XML:O; jobName:T; printer:T) → error:L

Parameter

©â–  session

ªâ–  dstFlags

ªâ–  dstPath

ªâ– 

XML

ªâ–  jobName

ªâ–  printer

Type

longint longint text blob text text

Description

Print session ID.

Destination flags – see

Print Flags for the options.

Document path when printing to PDF or file.

A template used just for Page setup

/

Job setup.

Printer job name.

Printer name.

Same as SR_OpenSession but with default PageSetup / JobSetup XML stored into a blob instead of a text variable or field.

â– 

SR_Print

(src:T; options:L; dstFlags:L; dstPath:T; session:L; printer:T; count:L) → error:L

Parameter

ªâ–  src

ªâ–  options

ªâ–  dstFlags

ªâ–  dstPath

ªâ–  session

ªâ–  printer

1 count

©â–  error

Type

text longint longint text longint text longint longint

Description

Report XML description or path to the report file.

src

="",

options

=0: empty XML

src

="",

options

=1: empty path, ask for file

src

="<?XML@",

options

is irrelevant: XML is implicit otherwise

src

is a path to load the report from.

Destination flags – see

Print Flags for the options.

Document path when the destination is a file.

If not null, it will be used for printing and

dstFlags

/

dstPath

/

printer

will be ignored (and

PageSetup / JobSetup in

src

will be ignored).

Printer name.

If not null, the report is not printed; instead, the number of pages is returned into this parameter.

-205: Header / Footer section does not fit on a page.

-206: object does not fit into section / group (probably is outside the bounds of a fixed height section / group)

-207: object does not fit into fixed-size group (outside the bounds of a group)

-210: Header section does not fit on a page

-211: section does not fit on a page

-212: too many sub-pages (horizontal splitting of a

Table object

)

-213: too many pages (probably requesting a new page infinitely)

-214: section does not fit on a new page

Start a new printing session if

session

is zero, produces a report within the new or specified

session

, ends the printing session if

session

is zero.

Note: preview always means “Open the file after creation” – see

Preview .

Printing

5

Commands by Theme

93

Example

You can use SR_Print to create a PDF directly.

On MacOS (uses native PDF support):

$error := SR_Print ( $areaXML ;0; SRP_Print_DestinationPDF ;\

"Macintosh Disk:ProjectFolder:Report:MyReport.pdf";0;"")

On Windows (uses built-in PDF generator):

$error := SR_Print ( $areaXML ;0; SRP_Print_DestinationPDF ;\

"C:\\ProjectFolder\\Printing\\MyReport.pdf";0;"")

â– 

SR_PrintBLOB

(src:O; options:L; dstFlags:L; dstPath:T; session:L; printer:T; count:L) → error:L

Parameter

ªâ–  src

ªâ–  options

ªâ–  dstFlags

ªâ–  dstPath

ªâ–  session

ªâ–  printer

1 count

Type

text longint longint text longint text longint

Description

Source blob to print.

Not used.

Destination flags – see

Print Flags for the options.

Document path when the destination is a file.

If not null, it will be used for printing and

dstFlags

/

dstPath

/

printer

will be ignored (and

PageSetup / JobSetup in

src

will be ignored).

Printer name.

If not null, the report is not printed; instead, the number of pages is returned into this parameter.

Same as

SR_Print but from a blob instead of a text file or XML as text. The

options

parameter is not relevant.

Printing

5

Commands by Theme

94

â– 

SR_PrintBLOBIntoPICT

(src:O; options:L; dstFlags:L; dstArray:AP; dstFormat:L; printer:T) → error:L

Parameter

ªâ–  src

ªâ–  options

ªâ–  dstFlags

Type

blob longint longint

Description

The blob to print.

Not used.

See

Print Flags

– but the destination is ignored – only the PageSetup bits are usable.

ªâ–  dstArray

ªâ–  dstFormat

ªâ–  printer picture array longint text

The array should be initialised as

ARRAY PICTURE

; If the array is not empty, the pictures will be added.

0 – default

- vector graphics ( SRP_PrintPict_PDFVector

- PDF on Mac, SRP_PrintPict_EMFVector – EMF on Windows)

1 – SRP_PrintPict_PNG

2 – SRP_PrintPict_TIFF

3 – SRP_PrintPict_JPEG

4 – SRP_PrintPict_BMP

5 – SRP_PrintPict_GIF

6 – SRP_PrintPict_PDFBitmap (on MacOS)

Bitmaps are generated at 72 DPI.

The printer driver to use.

Print the specified blob into a picture.

Printing

5

Commands by Theme

95

â– 

SR_PrintIntoPICT

(src:T; options:L; dstFlags:L; dstArray:AP; dstFormat:L; printer:T) → error:L

Parameter

ªâ–  src

ªâ–  options

ªâ–  dstFlags

ªâ–  dstArray

ªâ–  dstFormat

ªâ–  printer

Type

text longint longint picture array longint text

Description

A valid SuperReport Pro Object. This is not the actual SuperReport Pro area but rather the report object as it would be stored in a

4D

blob field or variable.

0 =

src

is XML

1 =

src

is a file name; ask for the file name is src is empty

Ignored if

src

="<?XML@":

src

is XML.

See

Print Flags

– but the destination is ignored – only the PageSetup bits are usable.

The array should be initialised as

ARRAY PICTURE

. The picture array items will be appended whether the array is empty or not.

0 – default

- vector graphics ( SRP_PrintPict_PDFVector

- PDF on Mac, SRP_PrintPict_EMFVector – EMF on Windows)

1 – SRP_PrintPict_PNG

2 – SRP_PrintPict_TIFF

3 – SRP_PrintPict_JPEG

4 – SRP_PrintPict_BMP

5 – SRP_PrintPict_GIF

6 – SRP_PrintPict_PDFBitmap (on Mac)

Bitmaps are generated at 72 DPI.

The printer driver to use.

Print the report into a picture.

Printing

â– 

SR_PrintSettings

(areaReportRef:L; options) → error:L

Parameter

ªâ–  areaReportRef

Type

longint

Description

Area / Report reference.

ªâ–  options A combination of:

SRP_Print_ValidatePageSetup

SRP_Print_DefaultPageSetup

SRP_Print_4DPageSetup

SRP_Print_SimplePageSetup *

SRP_Print_DefaultJobSetup

SRP_Print_4DJobSetup

SRP_Print_AskPageSetup

SRP_Print_AskJobSetup

* Use only the report size, orientation and scaling stored in the report, not platform-native page setup / job setup.

Set various printing options.

Example

$error := SR_PrintSettings ( $areaRepRef ; SRP_Print_ValidatePageSetup )

5

Commands by Theme

96

Printing

5

Commands by Theme

97

Miscellaneous

â– 

SR_Area_Redo

(areaReportRef:L) → error:L

Parameter

ªâ–  areaReportRef

Type

longint

Description

Area / Report reference.

Execute the next redo action from the Undo stack.

Example

$error := SR_Area_Redo( $areaRepRef )

â– 

SR_Area_SaveUndo

(areaReportRef:L; operation:L) → error:L

Parameter

ªâ–  areaReportRef

ªâ–  operation

Type

longint longint

Description

Area / Report reference.

-1 = pause

-2 = resume

0 = stop anything else: start.

SuperReport Pro contains unlimited undo support. The plugin records all user actions and inserts them into the undo stack.

Changes executed to the report through code must be inserted into the undo stack explicitly with the

SR_Area_SaveUndo command.

The

operation

parameter is used for naming Undo / Redo menu items. Internally, menu command IDs are used, e.g. 219 = Group

objects (see the example for

SR_ChangeObjectParent ).

Example

// Start recording actions

$error := SR_Area_SaveUndo ( $areaRepRef ;1)

// Execute any commands

// ...

// Stop recording and save actions to undo stack

$error := SR_Area_SaveUndo( $areaRepRef ;0)

Miscellaneous

5

Commands by Theme

98

â– 

SR_Area_Undo

(areaReportRef:L) → error:L

Parameter

ªâ–  areaReportRef

Type

longint

Description

Area / Report reference.

Execute the next undo action from the Undo stack.

Example

$error := SR_Area_Undo( $areaRepRef )

â– 

SR_ColorPicker

(color:L; actionValue:L) → OK:L

Parameter

1 color

1 actionValue

Type

longint longint

Description

On input: the default color to preselect

On output: the selected color

On input:

0 – show platform native color picker

1 – show 4D RGB color picker (supports alpha channel)

2 – don't show a picker

On output:

Color

mixed with white background.

Invoke the color picker, optionally setting a default

color

. The returned value is 1 if OK, 0 otherwise (user cancelled).

â– 

Example 1 – Use the native color picker

$color :=-65536

$SRok := SR_ColorPicker( $color ;0)

â– 

Example 2 – Use the 4D form color picker

$color :=0xFFFF0000 // full red

$SRok := SR_ColorPicker( $color ;1)

â– 

Example 3 – Use the 4D form color picker, return the mixed value

$color :=0x80FF0000 // 50% transparent red

$mixed :=1

$SRok := SR_ColorPicker( $color ; $mixed )

Miscellaneous

5

Commands by Theme

99

Assuming the user didn't change anything and clicked OK, $SRok =1 and $mixed =0xFF7F0000.

or:

$color :=0x80FF0000 // 50% transparent red

$mixed :=2

$SRok := SR_ColorPicker( $color ; $mixed ) // return the mixed value

$SRok =1 and $mixed =0xFF7F0000.

This is used in SuperReport Pro 4D forms to display semi-transparent colors (4D does not support alpha channel).

â– 

SR_DetokenizeScript

(blob:O) → text:T

Parameter

ªâ–  blob

©â–  text

Type

blob text

Description

Tokenized script in a blob.

The detokenized script.

Detokenize a script that was previously tokenized with

SR_TokenizeScript .

â– 

SR_ExecuteScript

(areaReportRef:L) → error:L

Parameter

ªâ–  areaReportRef

Type

longint

Description

Area / Report reference.

Set a flag to execute the object script at the next idle event.

Example

$error := SR_ExecuteScript ( $areaRepRef )

Miscellaneous

5

Commands by Theme

100

â– 

SR_RunScript

(text:T)

Parameter

ªâ–  text

Type

text

Description

Script to execute.

Execute the script contained in

text

. The script can contain control structures. If you're familiar with the Footrunner plugin from

Footprints, this command functions in very much the same way.

Example

Load a saved script from a record and execute it:

$script := [Scripts]ScriptData

SR_RunScript ( $script )

â– 

SR_RunTokenizedScript

(blob:O)

Parameter

ªâ–  blob

Type

blob

Description

Tokenized script to execute.

Run a script that was tokenized with SR_TokenizeScript.

â– 

SR_TokenizeScript

(text:T; blob:O) → length:L

Parameter

ªâ–  text

©â–  blob

©â–  length

Type

text blob longint

Description

Script to tokenize.

The tokenized script.

Length of the blob.

Tokenize the script in

text

and save it into a

blob

.

If you need to create a long or complex script, you can create it in 4D, tokenize it using SR_TokenizeScript and store it into

Resources:

Get 4D folder

( Current Resources folder ).

You can then use

DOCUMENT TO BLOB

and run it with SR_RunTokenizedScript.

Miscellaneous

6

Properties by Theme

101

6

Properties by Theme

In this section you’ll find complete details about each property that can be used with the SuperReport Pro commands.

Property themes

They are organised into themes according to which Object Kinds they relate to:

â–  â– 

Common properties: Objects and Styles

Object Common Properties

Style Properties

â–  â– 

Plugin / Area / Event

Plugin Properties

Area Properties

Event Properties

â–  â– 

Report

â–  â– 

Section / Guide

Section General Properties

Section Header / Footer Properties

Section Break Properties

Section Watermark Properties

Guide Properties

â–  â– 

Group / Line / Oval / Rectangle

Group Properties

Line Properties

Oval Properties

Rectangle Properties

â–  â– 

Picture / Text

Picture Properties

Text Properties

â–  â– 

Variable / Field / Data source

Variable Properties

Field Properties

Property themes

6

Properties by Theme

102

Data Source Properties

â–  â– 

Table / Header / Column / Footer

Table Properties

Table Header Properties

Table Column Properties

Table Footer Properties

â–  â– 

Get Objects

Property Table Columns

The following details are included for each property:

Constant:

the name of the property that you type into the command.

Get:

whether the constant can be used in Getter commands

Set:

whether it can be used in Setter commands

Per:

Persistent. If a property is persistent, it means that the property is saved with the area definition and will be applied when the area is displayed again.

Type:

the type of the value:

Bool

: boolean value (True=1 or False=0)

Int

: a long integer

Real

: a real number

Text

: an alphanumeric

Color

: the “Color” type will accept seven methods, whether as string values or longint values.See

Working with colors

.

Default:

the default value that will be used for this property unless you specify otherwise

Min:

the minimum acceptable value, where appropriate

Max:

the maximum acceptable value, where appropriate

Comments:

a description of the constant and, where appropriate, a list of allowable options

Note: property values and XML Names are listed in Appendix 4

.

Property Table Columns

6

Properties by Theme

103

Common properties: Objects and Styles

These two groups include properties that may apply to various object kinds. In addition, the relevant properties for both are mentioned in the property list of each object kind to which they apply.

Object Common Properties

The following properties may or may not apply depending upon the objects (area, report, section, line, variable,

table , etc.).

The characteristics below are common to all object types, except:

â–  â– 

The Object kind

name.

â–  â– 

Some features that are different when applying to specific objects, indicated by a light purple background in the table below, see

Comments for details.

Constant

SRP_Object_Kind

SRP_Object_XML

SRP_Object_ID

SRP_Object_Name

SRP_Object_Order

SRP_Object_Rect

SRP_Object_Visible

SRP_Object_Locked

SRP_Object_Selected

SRP_Object_Export

SuperReport Pro Object Common Properties

Get Set Per Type

✔

✔

✔

✔

✔

✔

✔

✔

✔

✔ text

✔

✔

✔

✔ text text text int

Default Min Max Comments

Depends upon the object kind

See

SRP Object Kinds constants

XML of the object

Report object: read only

Use

SR_LoadReport to set a new report

Table header / footer objects: only when visible (not covered by another cell)

Object ID

used in XML / HTML export

Style object: uses longint ID

Guide object: not persistent, no XML name

Object name used in XML / HTML export

Style object: name used in styles popup

Report object: name used in XML / HTML export / print job name

Print order

✔

✔

✔

✔

✔

✔

✔

✔

✔

✔

✔

✔

✔

✔ rect bool int bool bool yes

0 no yes

0 2

Object rectangle as "left;top;right;bottom"- relative to the parent

Object is visible (is not hidden)

Table header / footer objects: read only

(not applicable to Table column)

Guide object: not persistent, no XML name

0 = unlocked

1 = locked

2 = locked & not selectable

Report object: not persistent, no XML name

Guide object: not persistent, no XML name

Object is selected in the report design editor

Style object: not persistent, no XML name

Report object: not persistent, no XML name

Data Source object: not persistent, no XML name

Guide object: not persistent, no XML name

Should be exported?

Note: line, oval and rectangle objects are never exported

Common properties: Objects and Styles

6

Properties by Theme

104

Constant

SRP_Object_PosLeft

SRP_Object_PosTop

SRP_Object_PosRight

SRP_Object_PosBottom

SRP_Object_PosWidth

SRP_Object_PosHeight

SRP_Object_FixH

SRP_Object_FixV

SRP_Object_VariableSizeH

SRP_Object_VariableSizeV

SRP_Object_BindToParentH

SRP_Object_BindToParentV

SRP_Object_Align

SRP_Object_Draw

SRP_Object_RelPosLeft

Get Set Per Type

✔ ✔ ✔ real

✔

✔

✔

✔

✔

✔

✔

✔

✔

✔

✔

✔

✔

✔

✔

✔

SuperReport Pro Object Common Properties

real real real real real bool

Default

no

Min Max Comments

Left coordinate of the object position - relative to the parent

Table header / column / footer objects: read only

Top coordinate of the object position - relative to the parent

Table header / column / footer objects: read only

Right coordinate of the object position - relative to the parent

Bottom coordinate of the object position - relative to the parent

Width of the object position - relative to the parent

Table header / column / footer objects: not persistent, no XML name

Height of the object position - relative to the parent

Table header / column / footer objects: not persistent, no XML name

Fixed horizontal position

✔ ✔ ✔ bool no Fixed vertical position

✔

✔

✔

✔

✔

✔

✔

✔

✔

✔

✔

✔

✔

✔

✔

✔

✔

✔

✔ bool bool int int int int real no no

0

0

0

1

0

0

0

0

2

2

3

3

Can grow / shrink horizontally

Can grow / shrink vertically

Bind to right side of parent:

0 = none SRP_Object_Bind_None

1 = move SRP_Object_Bind_Move

2 = grow SRP_Object_Bind_Grow

Bind to bottom side of parent:

0 = none SRP_Object_Bind_None

1 = move SRP_Object_Bind_Move

2 = grow SRP_Object_Bind_Grow

Position in parent

0 = current

1 = left

2 = center

3 = right

Every relevant object in a section can be positioned on the left, in the middle or on the right

This is usable when the report is set to physical paper ( SRP_Report_PhysicalPaper ) - it takes care of margins

Otherwise (when the report is set to printable area) align right will be at the right margin

Draw object:

0 = no

1 = yes

2 = on overflow

3 = always

Section object: uses two-state (boolean) values

Move left side by X points

Table header / column / footer objects: read only

Common properties: Objects and Styles

6

Properties by Theme

105

Constant

SRP_Object_RelPosTop

SRP_Object_RelPosRight

SRP_Object_RelPosBottom

SRP_Object_RelMoveH

SRP_Object_RelMoveV

SRP_Object_DashStyle

SRP_Object_Fill

SRP_Object_Script

SRP_Object_HTMLPrefix

SRP_Object_HTMLSuffix

SRP_Object_Frame

SRP_Object_FrameOffset

SRP_Object_

FrameThickness

✔

SuperReport Pro Object Common Properties

Get Set Per Type

✔ real real

Default Min Max Comments

Move top side by X points

Table header / column / footer objects: read only

Move right side by X points

✔

✔ real real

✔ real

✔ ✔ ✔ int

✔

✔

✔

✔

✔

✔

✔

✔

✔

✔

✔

✔

✔

✔

✔

✔

✔

✔

✔

✔

✔ bool text text text int real real

0 no

0

2

1

0

0

0

0

4

1

32

10

Move bottom side by X points

Move horizontally by X points

Move vertically by X points

Dash pattern for stroking lines

0 = solid

1 = dash

2 = dot

3 = dash dot

4 = dash dot dot

See http://msdn.microsoft.com/en-us/library/windows/ desktop/ms534104(v=vs.85).aspx

Note: supported by Line, Oval, Rect, Picture, Text,

Variable, Field

Use the fill/background color

Script

to execute when the object is printed

Used with

HTML export

Used with

HTML export

The object has a visible frame

Oval and Table objects: default is 1

Table object: maximum is 2 (single / double frame)

Note: Rectangle objects use

SRP_Rect_Flags

Offset on inside of the frame in points

For example, if a text object has its height set to 12,

SRP_Object_Frame is on, and the SRP_Object_

FrameOffset is 2, there will be only 8 points for the object text

To use a frame offset with no frame, set SRP_

Object_Frame to Yes (1) and SRP_Object_

FrameThickness to 0

Width of the frame in points

Common properties: Objects and Styles

6

Properties by Theme

106

Style Properties

The following properties are used by text type objects.

Their purpose is to define styles that can later be used by relevant object kinds. They will also appear in the design editor under the Styles popup menu.

â– 

Examples

Here are examples of how to use styles:

Style Creation (using commands)

C_LONGINT

( $objNum ) // style object number

$objNum :=0 // will be modified by SR_NewObject below

$error := SR_NewObject ( $areaRepRef ; $objNum ; SRP_Style ;0) // create a new style, object number is $objNum

SR_SetLongProperty ( $areaRepRef ; $objNum ; SRP_Object_ID ;123) // set the style object ID to 123 (longint)

SR_SetTextProperty ( $areaRepRef ; $objNum ; SRP_Object_Name ;"My Style #123") // style name

SR_SetTextProperty ( $areaRepRef ; $objNum ; SRP_Style_FontName ;"Times")

SR_SetLongProperty ( $areaRepRef ; $objNum ; SRP_Style_Size ;12)

SR_SetTextProperty ( $areaRepRef ; $objNum ; SRP_Style_TextColor ;"red")

// style "My Style #123" is now Times 12 Red

Style Creation (using XML)

C_LONGINT

( $objNum ) // style object number

$objNum :=0 // will be modified by SR_NewObjectFromXML below

$error := SR_NewObjectFromXML ( $areaRepRef ; $objNum ;"<Style name=\"My Style #123\" id=\"123\"\

font=\"Times\" size=\"12\" textColor=\"red\" />") // create and initialize a new style

Warning: Style ID Uniqueness

SuperReport Pro does not check for uniqueness in object IDs. Make sure that the style ID that you set does not already exist, otherwise the first created style under that ID will be used when applying the style.

This check can easily be performed with the SR_FindObjectByID command, which will return zero in the (style) object number and an error -5 = SRP_Err_InvalidObjectRef if this ID doesn't yet exist, meaning that the value can be added - it will be unique. Note that the ID is converted to text for the command:

C_LONGINT

( $objNum ) // style object number

$objNum :=0

$error := SR_FindObjectByID ( $areaRepRef ;"123"; $objNum ) // does any object exist with ID 123?

If

( $objNum =0) // $error = -5 = SRP_Err_InvalidObjectRef

// The ID is unique, we can create the style

End if

Common properties: Objects and Styles

6

Properties by Theme

107

Applying the Style to an Object

$styleID :=123 // we want to apply style # 123 created above

SR_SetLongProperty ( $areaRepRef ; $objNum ; SRP_Object_StyleID ; $styleID )

// object # $objNum is now Times 12 Red

See also Creating Reports Procedurally

.

Additional Notes

â– 

When the specified style is not available, the Default style (ID = 0) is used.

â– 

In the design editor, when pasting a style which already exists, the old one is replaced.

â– 

When you programmatically set a style ID to be duplicate, you can later change it with SRP_Object_ID

â– 

Common Object Properties used in Styles

Constant

SRP_Object_Kind

SRP_Object_XML

SRP_Object_ID

Specifics

Object kind = SRP_ObjectKind_Style

Type: int

Style ID

SRP_Object_Name

SRP_Object_Selected Not persistent

â– 

Properties

Constant

SRP_Object_StyleID

SRP_Style_Features

SRP_Style_FontName

Get Set Per Type

✔ ✔ ✔ int

✔ ✔ ✔ int

✔ ✔ ✔ text

SuperReport Pro Style Properties

Default

0

1

Min

0

1

Max Comments

Style ID (set by

SRP_Object_Kind = "Style"

Base Style to use for the object

Longint ID for Styles as opposed to text for all other object kinds

Note: when set, all overriden (specific) properties are ignored until SRP_Style_Features is used to restore any of them

See

Note about SRP_Object_StyleID and Style

Features

Specifically defined (overriden) properties from the predefined style

Useful to find out which features were modified since the style was set, through programming or with the design editor, thus differ from the style settings

The value is a combination of feature bits - see

Style Features constants

Style font name

SRP_Object_ID with

Arial on

Windows

Helvetica on

MacOS

Common properties: Objects and Styles

6

Properties by Theme

108

Constant

SRP_Style_Size

SRP_Style_Full

SRP_Style_Bold

SRP_Style_Italic

SRP_Style_Underline

SRP_Style_StrikeThrough

SRP_Style_Wrap

SRP_Style_HorAlign

SRP_Style_VertAlign

SRP_Style_TextColor

SRP_Style_BackColor

SRP_Style_FrameColor

SRP_Style_Rotation

SRP_Style_BaseLineShift

SRP_Style_HorizontalScale

SRP_Style_LineSpacing

Get Set Per Type

✔ ✔ ✔ real

✔

✔

✔

✔ int bool

SuperReport Pro Style Properties

Default

8 on

Windows

9 on MacOS

0 no

Min Max Comments

4

0

128

15

Style font size

Type is real because you can use decimal values such as 10.5

Style font style, combining the values of the following boolean properties (each assigned to a bit):

SRP_Style_Bold (bit 0)

SRP_Style_Italic (bit 1)

SRP_Style_Underline (bit 2)

SRP_Style_StrikeThrough (bit 3)

Style font style - bold

✔ ✔ bool no Style font style - italic

✔

✔ ✔

✔ ✔ ✔ bool

✔ ✔ ✔ int

✔

✔

✔

✔

✔

✔

✔

✔

✔

✔

✔

✔

✔

✔

✔

✔

✔

✔

✔

✔

✔

✔

✔

✔

✔ bool bool int color color color real real real real

1

1

0

0 no no no

0

0

#FF000000

#00FFFFFF

#FF000000

Style font style - underline

Style font style - strike-through

Style wrap long lines

0

0

5

3

Style horizontal alignment:

0 = default

1 = left

2 = center

3 = right

4 = justify

5 = full justify

Style: vertical alignment:

0 = default

1 = top

2 = center

3 = bottom

Style: font color

Default is Black

Style: background color

Default is Transparent (no color)

Style: frame color

Default is Black

-360 360 Style rotation of text

-100 256 Style baseline shift

0.1

100 Style horizontal scale

0.5

10 Style line spacing

Default value can be changed using

SR_SetRealProperty

(0;0; SRP_Style_LineSpacing ; $value )

Note: changing the value to any of the five Style font style properties (full, bold, italic, underline, strike-through) will modify only one SRP_Style_Features bit: SRP_Style_HasFontStyle (bit 3).

Common properties: Objects and Styles

6

Properties by Theme

109

Note about

SRP_Object_StyleID

and

SRP_Style_Features

When you apply a base style to a text object with SRP_Object_StyleID the “overridden” or “specific” properties a.k.a. “features”

(specifically set to the object through any of the other Style properties) are no longer applied to the object.

The SRP_Style_Features property is set to 1 ( SRP_Style_HasBaseStyle ). When you access any style property thereafter, the base style is used (until any property is overriden).

You can set any bit of SRP_Style_Features explicitly: the appropriate last known feature (“specific” value) will be used.

However, this feature restore ability is only valid during the current editing session. Features that are no longer used (were reset to base style values) are not saved with the report. In other words, only visible features (effectively in use) are saved with the report.

Example: start with a virgin object using default style ( styleID = 0) features = 1 ( SRP_Style_HasBaseStyle ) fontName = (e.g.) "Helvetica" textColor = "#FF000000" set fontName to "Arial" features = 3 ( SRP_Style_HasBaseStyle | SRP_Style_HasFontName ) fontName = "Arial" textColor = "#FF000000" set textColor to "red" features = 19 ( SRP_Style_HasBaseStyle | SRP_Style_HasFontName | SRP_Style_HasTextColor ) fontName = "Arial" textColor = "#FFFF0000" set styleID to 0 features = 1 ( SRP_Style_HasBaseStyle ) fontName = (e.g.) "Helvetica" textColor = "#FF000000" set feature to 17 features = 17 ( SRP_Style_HasBaseStyle | SRP_Style_HasTextColor ) fontName = (e.g.) "Helvetica" textColor = "#FFFF0000"

When saved, the report XML will only include textColor = "#FFFF0000" as a specific feature. The fontName = "Arial" feature that was reset will be forgotten.

Common properties: Objects and Styles

6

Properties by Theme

110

Plugin / Area / Event

Plugin Properties

Note: these properties expect the value zero as the first two parameters to the

getter / setter command

.

â– 

Style Property used

â–  â– 

SRP_Style_LineSpacing

â– 

Properties

Constant

SRP_Area_Version

SRP_Area_Path

SRP_Area_TraceOnError

SRP_Area_LastError

SRP_Area_Copyright

SRP_Area_Rounding

SRP_Area_Proximity

SRP_Area_ScrollWheel

SRP_Area_NewReport

SRP_Area_VarDate

SRP_Area_VarTime

SRP_Area_VarPage

SRP_Area_VarRecord

SRP_Area_VarArea

Get Set Per Type Default

✔ text

SuperReport Pro Plugin Properties

Min Max Comments

Version of the SuperReport Pro plugin

✔

✔

✔

✔

✔

✔

✔

✔

✔

✔

✔

✔

✔

✔

✔

✔

✔

✔

✔

✔

✔

✔

✔ text int real real text text text text text text int text real

1

1

2.5

10

SRDate

SRTime

SRPage

SRRecord

SRArea

0 3

Path to the SuperReport Pro plugin

Invoke the 4D debugger in interpreted and / or an alert in compiled if a command causes an error, and it is a command that does not return an error code bit 0: trace in interpreted (values 1 & 3) bit 1: alert in compiled (values 2 & 3)

Last error in any SuperReport Pro report or area

Copyright of the SuperReport Pro plugin

0.1

10000 If set to N, all position values are rounded to 1/N of point

For example, setting it to 100 will cause all positions be rounded to 1/100 (0.01) point

Used in the SuperReport Pro design editor

0.05 10 Distance from which will be dragged points snapped to guides or grid points

Used in the SuperReport Pro design editor

1 1000 Multiplier on mouse wheel move

If you use the mouse wheel:

- the option key will make the scroll 10 times faster

- the control / command key will make the scroll

SRP_Area_ScrollWheel times faster

Used in the SuperReport Pro design editor

Default empty report

Stored in Resources / EmptyReport.XML

Standard variable name

Standard variable name

Standard variable name

Standard variable name

Standard variable name

Plugin / Area / Event

6

Properties by Theme

111

Constant

SRP_Area_VarObject

SRP_Area_VarBegHTML

SRP_Area_VarEndHTML

SRP_Area_VarPages

SRP_Area_VarName

SRP_Area_VarDateTime

SRP_Area_VarPrintSection

SRP_Area_VarCurrentRun

SRP_Area_VarRepeat

SRP_Area_ToolTips

SRP_Area_ExtensionSRP

SRP_Area_ExtensionTXT

SRP_Area_ExtensionHTML

SRP_Area_ExtensionXML

SRP_Area_

NotificationCallback

SRP_Area_PreviewFlags

✔ ✔ text

SuperReport Pro Plugin Properties

Get Set Per Type Default

✔ ✔ text SRObjectPrintRef

SRBegHTML

Min Max Comments

Standard variable name

SRObjectID is maintained for compatibility, but only the name SRObjectPrintRef can be modified with this property

Standard variable name

✔

✔

✔

✔

✔

✔

✔

✔

✔

✔

✔

✔

✔

✔

✔

✔

✔

✔

✔

✔

✔

✔

✔

✔

✔

✔

✔

✔ text text text text text text text int text text text text text int

SREndHTML

SRPages

SRName

SRDateTime

SRPrintSection

SRCurrentRun

SRRepeatNum

XML txt html

XML

0

0 2

Standard variable name

Standard variable name

Standard variable name

Report only variable (not a 4D variable)

Standard variable name

Report only variable (not a 4D variable)

Standard variable name

Standard variable name

Standard variable name

Only valid in scripts of repeating objects

Enable tool tips

0 = no

1 = yes

2 = toggle

Standard file extension for report

Old ".srp" is always accepted for compatibility in addition to this setting

Setting an empty string resets the extension to the default

Standard file extension for text export

Setting an empty string resets the extension to the default

Standard file extension for HTML export

Setting an empty string resets the extension to the default

Standard file extension for XML export

Setting an empty string resets the extension to the default

Notification callback

(e.g. for properties palette implementation)

Parameters:

(AreaReportRef:L; CallbackType:L; Rebuild:B)

- CallbackType is the same as in event or editor callbacks, see

SRP_Area_CallbackMethEdit

- Rebuild is True if the report was modified since the last call

Additional flags (bits) to use when preview in the editor is used or old v2

SR Preview

is called

See

Preview flags

Plugin / Area / Event

Constant

SRP_Area_

WinPreviewName

SRP_Area_Moving

6

Properties by Theme

112

✔ ✔ real

SuperReport Pro Plugin Properties

Get Set Per Type Default

✔ ✔ text ""

1

Min Max Comments

0.1

5

Name of a file to use when Preview is used on

Windows

Preview means SRP_Print_DestinationPreview is specified (preview in editor, SR Preview,

SR_Print

)

See also

Print Flags

Step for moving / resizing objects with arrow keys

Values are in points (decimals allowed)

Also settable in Report Properties dialog

Area Properties

â– 

Common Object Property used

Constant

SRP_Object_Kind

Specifics

Object kind = SRP_ObjectKind_Area

â– 

Properties

Constant

SRP_Area_Name

SRP_Area_IsArea

SRP_Area_Visible

SRP_Area_Selected

SRP_Area_ScrollLeft

SRP_Area_ScrollTop

SRP_Area_Self

Get Set Per Type

✔ text

SuperReport Pro Area Properties

Default Min Max Comments

Name of the area object (variable name on 4D form)

✔

✔

✔

✔

✔

✔

✔

✔

✔ bool bool bool real real pointer

Is this a SuperReport Pro area?

Area is visible

Set to false before showing another dialog over the

SuperReport Pro area to hide scrollbars

Is selected (has focus in 4D)

Horizontal scroll position in points (decimals allowed)

Vertical scroll position in points (decimals allowed)

Pointer to the area variable

C_POINTER

( $ptr )

$error :=

SR_GetPtrProperty (

$areaRepRef ;1; SRP_

Area_Self ;-> $ptr )

Plugin / Area / Event

6

Properties by Theme

113

Constant

SRP_Area_Tool

SRP_Area_DrawingPage

SRP_Area_DrawingMode

SRP_Area_Report

SRP_Area_Redraw

Get Set Per Type

✔ ✔ int

✔

✔

✔

✔

✔ int int int

SuperReport Pro Area Properties

Default

0

0

0

Min

0

0

0

Max Comments

8

3

7

Current tool:

0 = selection / SRP_Tool_Select

1 = text / SRP_Tool_Text

2 = field / SRP_Tool_Field

3 = variable / SRP_Tool_Variable

4 = line / SRP_Tool_Line

5 = rectangle / SRP_Tool_Rectangle

6 = oval / SRP_Tool_Oval

7 = picture / SRP_Tool_Picture

8 = table / SRP_Tool_Table

See

SRP Area Tools

constants

Draw sections as of page X

0 = all

1 = first page

2 = second page

3 = last page

Drawing mode of the objects:

0 = normal

1 = alias

2 = format

3 = name

4 = ID

5 = order

6 = size

7 = value

Report reference to the associated report

✔ n/a Force the area redraw

Plugin / Area / Event

Event Properties

Constant

SRP_Area_Event

SRP_Area_EventPosH

SRP_Area_EventPosV

SRP_Area_EventModifiers

SRP_Area_EventKey

SRP_Area_EventChar

SRP_Area_DoubleClick

Get Set Per Type

✔ int

✔ int

SuperReport Pro Event Properties

Default Min Max Comments

Kind of event:

1 = mouse down

3 = key down

5 = auto key

18 = mouse moved

21 = select

22 = deselect

25 = scroll

30 = Undo

31 = Cut

32 = Copy

33 = Paste

34 = Clear

35 = Select all

36 = Redo

39 = mouse wheel

Horizontal mouse position in points

✔

✔ int int

✔

✔

✔ text text bool

Vertical mouse position in points

Event modifiers:

256 = command

512 = shift

1024 = caps lock

2048 = option

4096 = control

Key code

Char (string) from keyboard

Last click is double click

6

Properties by Theme

114

Plugin / Area / Event

Constant

SRP_Area_

CallbackMethEdit

6

Properties by Theme

115

Get Set Per Type

✔ ✔ ✔ text

SuperReport Pro Event Properties

Default Min Max Comments

Editor event callback function

Parameters:

(AreaReportRef:L; CallbackType:L; ObjectNum:L;

ObjectType:L) -> Result:L

CallbackType values:

1 = object created

2 = object modified

3 = section modified

4 = object script modified

5 = report script modified

6 = control-click

7 = click

8 = selection changed

9 = object deleted

ObjectType values:

0 = group

1 = line

2 = rectangle

3 = oval

4 = picture

5 = text

6 = variable

7 = field

8 = table

9 = table header

10 = table column

11 = table footer

12 = report document

13 = report area

14 = data source

15 = style

16 = section

17 = guide

Note that the values above are not compatible with pre-v3 versions

Result values:

0 = handled

1 = not handled, SuperReport Pro should proceed with handling

Plugin / Area / Event

6

Properties by Theme

116

Constant

SRP_Area_HitPart

SRP_Area_HitObject

SRP_Area_CreatedObject

SRP_Area_DraggedObject

SRP_Area_DraggedPosH

SRP_Area_DraggedPosV

Get Set Per Type

✔ int

✔ int

SuperReport Pro Event Properties

Default Min Max Comments

Part of object under mouse:

0 = none

1 = object

2 = top / left

3 = top / center

4 = top / right

5 = right / center

6 = bottom / right

7 = bottom / center

8 = bottom / left

9 = left / center

10 = horizontal resize

11 = vertical resize

Object under mouse

✔ ✔ int

✔

✔

✔ int int int

Last object created by user

Setter clears this property

Object under the mouse during drag

Horizontal position of the mouse pointer during drag

Vertical position of the mouse pointer during drag

Plugin / Area / Event

6

Properties by Theme

117

Report

â– 

Common Object Properties used

Constant

SRP_Object_Kind

SRP_Object_XML

SRP_Object_ID

SRP_Object_Name

SRP_Object_Locked

SRP_Object_Selected

Specifics

Object kind = SRP_ObjectKind_Report

Read only: use

SR_LoadReport

to set a new report

Name used in XML / HTML export / print job name

Not persistent, no XML name

Make it locked, hide toolbar & menubar to get readonly view

Not persistent, no XML name

â– 

Report Properties

Constant

SRP_Report_Version

SRP_Report_PageWidth

SRP_Report_PageHeight

SRP_Report_Scale

SRP_Report_PhysicalPaper

SRP_Report_Margins

SRP_Report_MarginLeft

SRP_Report_MarginTop

SRP_Report_MarginRight

SRP_Report_MarginBottom

SRP_Report_CountPages

SuperReport Pro Report Properties

Get Set Per Type

✔ ✔ text

Default Min Max Comments

Version of the report format

✔ ✔ ✔ real

✔ ✔ ✔ real

✔ ✔ ✔ real

✔

✔

✔

✔

✔

✔

✔

✔

✔

✔

✔

✔

✔

✔

✔

✔

✔

✔

✔

✔

✔

✔

✔

✔

✔

✔ bool text real real real real bool int real

1 no no

1

5

1

0

0

0

0

0

100 32767 The page width in points

100 32767 The page height in points

0.1

10

256

256

Printing scale

The scaling is provided by SuperReport Pro, not by the printer driver

Use physical paper

Printable area otherwise (default)

Page margins: left, top, right, bottom as a string e.g.: "1.5;1.5;1.5;1.5"

Left-hand margin in points

Top margin in points

256

256

32

256

Right-hand margin in points

Bottom margin in points

Calculate number of pages before printing

If not set, SRPages will contain -1

Number of columns in the Body section

Space between the columns in points

SRP_Report_ColumnCount

SRP_Report_

ColumnSpacing

SRP_Report_ColumnOrder

SRP_Report_PageFormat

SRP_Report_PrintSettings

SRP_Report_DevMode

SRP_Report_DeviceNames

✔

✔

✔

✔

✔

✔

✔

✔

✔

✔

✔

✔

✔

✔

✔ bool

BLOB

BLOB

BLOB

BLOB no Column print order is horizontal

MacOS: flattened page format (XML)

MacOS: flattened print settings (XML)

Windows: device mode (binary)

Windows: device names (binary)

Report

6

Properties by Theme

118

Constant

SRP_Report_

ObjectHierarchy

SRP_Report_UserBLOB

SRP_Report_Document

SRP_Report_DataSource

SRP_Report_MacPrinter

SRP_Report_WinPrinter

SRP_Report_PrintEmptyText

✔ ✔

SuperReport Pro Report Properties

Get Set Per Type

✔

BLOB

BLOB

Default Min Max Comments

All sections with all objects in the report as List in blob

Use

BLOB TO LIST

to get the list object

BLOB for free use by developer

✔ ✔ text

✔

✔

✔

✔ ✔ int

✔ text

✔

✔ text bool no

Full path to the document

Object number of the data source

MacOS: device name (from the page setup XML stored in the SRP_Report_PageFormat property)

Windows: device name

(from the binary DEVNAMES structure stored in the

SRP_Report_DeviceNames property)

Set to 1 (True) to override old v2.x behavior and print empty text

Note: when this property is set to 1 (True), SRP_

Text_PrintEmptyText , SRP_Variable_PrintEmptyText and SRP_Field_PrintEmptyText are ignored (handled as if set to True)

â– 

Report Editor Properties

Constant

SRP_Report_

CallbackMethEvent

SuperReport Pro Report Editor Properties

Get Set Per Type

✔ ✔ ✔ text

Default Min Max Comments

Event callback method

Parameters:

(AreaReportRef:L; Event:L; Info:L) -> Result:L

Event values:

11 = area zoomed (parameter 3 contains the area reference in the external window)

12 = zoomed window collapsed (un-zoomed)

13 = zoomed window brought to front

14 = original (4D form) window brought to front

15 = editor window has been closed (either report area on form or external window)

16 = area has lost focus

17 = area is hidden (changing form page)

40 = menu item selected before (parameter 3 contains the menu item ID)

41 = menu item selected after (parameter 3 contains the menu item ID)

If SRP_Report_CallbackVersion is set to 1, a return value is expected for “before menu” event (40): return 1 to execute menu action

Report

6

Properties by Theme

119

Constant

SRP_Report_

CallbackVersion

SRP_Report_ShowMenubar

SRP_Report_ShowToolbar

SRP_Report_ShowMargins

SRP_Report_ShowRuler

SRP_Report_RulerUnits

SRP_Report_GridSize

SRP_Report_ShowGrid

SRP_Report_SnapToGrid

SRP_Report_ShowGuides

SRP_Report_LockGuides

SRP_Report_SnapToGuides

SRP_Report_ShowSections

SRP_Report_LockSections

SRP_Report_

ShowObjBorders

SRP_Report_Zoom

SRP_Report_ShowZoom

SRP_Report_ShowSRMenu

SRP_Report_BasicSRMenu

SRP_Report_EnableScripts

✔ ✔

SuperReport Pro Report Editor Properties

Get Set Per Type

✔ ✔ int bool

Default

0 yes

Min

0

Max Comments

1 Callback version of the Menu handler to use

Different parameters are used when calling the method to be executed for a menu item

0 = old behavior: called without parameters

1 = new behavior: called with parameters (area; menuID)

If set to 1, modify behavior of menu event callback and all custom methods associated with menu items

If set to 1, menu event callback

(set with SRP_Report_CallbackMethEvent or old

'SR On Event') has to add:

C_LONGINT

( $0 )

$0 :=1 // set to 0 to not execute the menu item method / standard action

And any method called as menu item override (set with SR Menu Item ( $areaRepRef ;

SR MenuItem Set 4D Method ; $menuID ; "";0;0;

"myMenuItemCallback")) has to add:

C_LONGINT

( $1 ) // the SRP area

C_LONGINT

( $2 ) // menu ID

(required to function in compiled mode)

This is how you can have one method for all menu item action overrides

Display the SuperReport Pro menu bar

✔ ✔ bool

✔ ✔ ✔ bool

✔

✔

✔

✔

✔

✔ bool int yes yes no

1 1

✔

✔

✔

✔

✔

✔

✔

✔

✔

✔

✔

✔

✔

✔

✔

✔

✔

✔

✔

✔

✔

✔

✔

✔

✔

✔

✔ int bool bool bool bool bool bool bool bool no no yes no no

12 no no yes

4

Display the SuperReport Pro toolbar

Display the margins

Display the SuperReport Pro ruler

3 1 = point

2 = mm

3 = inch

256 Grid size, in SRP_Report_RulerUnits

Display the grid

Snap objects to the grid

Snap objects to the guides

Lock the guides

Snap objects to the guides

Show section labels

Lock the sections of the report

Show objects' borders

✔ ✔ ✔ real

✔

✔

✔

✔

✔

✔

✔

✔ bool bool bool bool

1 yes yes no yes

0.1

10 View scale

Enable Zoom (open report in external window)

Show the Database menu

Show the basic dialog on Database menu > Main

Table

Enable editing of scripts

Report

6

Properties by Theme

120

Constant

SRP_Report_ExportFlags

SRP_Report_

ExportDelimiter

SRP_Report_

ExportRecDelimiter

SRP_Report_DoMenu

SRP_Report_

DoMenuNoProc

SRP_Report_HideHTML

SRP_Report_Modified

SRP_Report_ZoomTitle

SRP_Report_

EditNumberPages

✔

✔

✔

✔

✔

✔

✔

✔

SuperReport Pro Report Editor Properties

Get Set Per Type

✔ ✔ int int int int int bool

Default

0

TAB (9)

CR+LF

(655373)

Min Max Comments

Flags used with

File > Export (last set by user):

256 = SRP_Export_Text

16 = SRP_Export_CSVFormat

512 = SRP_Export_XML

1024 = SRP_Export_HTML

4096 = SRP_Export_Body

8192 = SRP_Export_Breaks

16384 = SRP_Export_Total

32768 = SRP_Export_Headers

65536 = SRP_Export_Watermark

32 = SRP_Export_StaticText

64 = SRP_Export_Sorted

128 = SRP_Export_PlainText

The field delimiter for text export used with

File > Export

Record delimiter to be used for text export

This value is a long integer which can contain 2 characters where the first character is put in the low-order word

The default is "\r\n" which is equivalent to

Carriage Return | ( Line Feed << 16)

The record delimiter is always CR+LF in XML and

HTML mode

Execute specified menu item (or associated method if specified for that menu item)

Execute specified menu item (ignoring associated method if specified for that menu item)

Hide HTML in User Interface

✔

✔

✔

✔

✔

✔ ✔ bool text int

SuperReport

Pro

1 1 16

True (1) if modified

Name to use when “zooming” the area to an external window

Number of pages to draw in the editor

Usable for designing multipage reports

Report

6

Properties by Theme

121

Section / Guide

Section Properties

â– 

Common Object Properties used

Constant

SRP_Object_Kind

SRP_Object_XML

SRP_Object_ID

SRP_Object_Name

SRP_Object_Order

SRP_Object_Rect

SRP_Object_Visible

SRP_Object_Locked

SRP_Object_Selected

SRP_Object_Export

SRP_Object_RelPosBottom

SRP_Object_Draw

SRP_Object_Script

SRP_Object_HTMLPrefix

SRP_Object_HTMLSuffix

Specifics

Object kind = SRP_ObjectKind_Section

Uses two-state (boolean) values

â– 

Section General Properties

Constant

SRP_Section_Type

SRP_Section_Height

SRP_Section_FixedHeight

SRP_Section_KeepTogether

SRP_Section_MinSpace

Get Set Per Type

✔

✔ ✔

✔ text

✔

SuperReport Pro Section General Properties

real

Default

0

Min

0

Max Comments

SRP_SectionType_Header

SRP_SectionType_BreakHeader

SRP_SectionType_Body

SRP_SectionType_BreakFooter

SRP_SectionType_Footer

SRP_SectionType_Watermark

See

SRP Section Types

“Total” is SRP_SectionType_BreakFooter with break level = 0

4096 Height of the section in points

✔ ✔ ✔ bool

✔

✔

✔

✔

✔

✔ bool real no no

0 0 512

The section will not grow / shrink if set to true; Footer always has fixed height

Start a new page if there is not enough space for the entire section

Minimum available space on page; if less is available, start a new page

Section / Guide

6

Properties by Theme

122

Constant

SRP_Section_PageThrow

SuperReport Pro Section General Properties

Get Set Per Type

✔ ✔ ✔ int

Default

0

Min

0

Max

2

Comments

Throw a new page:

0 = none

1 = before the section is printed

2 = after the section is printed

â– 

Section Header / Footer Properties

You can have 3 separate headers / footers, each specifying only one of the three options - then you have separate first page header, last page header, header printed on other pages.

Constant

SRP_Section_FirstPage

SRP_Section_SecondPage

SRP_Section_LastPage

Get Set Per Type

✔ ✔ ✔ bool

✔ ✔

SuperReport Pro Section Header / Footer Properties

✔ bool

Default

yes yes

Min Max Comments

Print on first page

Print on subsequent pages except the last page

✔ ✔ ✔ bool yes Print on last page

â– 

Section Break Properties

Constant

SRP_Section_

FooterFromBottom

SRP_Section_Break_

OnField

SRP_Section_Break_

OnVariable

SRP_Section_Break_

OnArray

SRP_Section_Break_Level

SRP_Section_Break_Always

SRP_Section_Break_On

Get Set Per Type

✔ ✔ ✔ bool

✔

✔

✔

✔

✔

✔

✔

✔

✔

✔

✔

✔

✔

✔

✔

✔

✔

SuperReport Pro Section Break Properties

text text text int bool text

Default

no

0 no

Min

0

Max Comments

Print the section from bottom of page, not below the body

This is a property of break footer and footer, where it defaults to true for footer (footer at the bottom of page) and false for break footer (break after the body / higher-level breaks, not above the footer)

These are “2 in 1” - when set,

SRP_Section_Break_Type is set and

SRP_Section_Break_OnXXX is set to the provided source

(variable name or [Table]Field)

When a getter is used, only the “correct” one

(according to SRP_Section_Break_Type ) returns

SRP_Section_Break_OnXXX

(the variable / field to check for value change)

Section break level

0 = total

Always draw on new page

Break header only

The variable / field to check for value change

Section / Guide

6

Properties by Theme

123

Constant

SRP_Section_Break_Type

SuperReport Pro Section Break Properties

Get Set Per Type

✔ ✔ int

Default

0

Min

1

Max Comments

3 The type of break:

0 = none

1 = field

2 = variable

3 = array {currentIteration}

â– 

Section Watermark Properties

Constant

SRP_Section_FirstPage

SRP_Section_SecondPage

SRP_Section_LastPage

SRP_Section_Watermark_

OnTop

Get Set Per Type

✔ ✔ ✔ bool

✔

✔

✔

✔

✔

✔

SuperReport Pro Section Watermark Properties

bool bool

Default

yes yes yes

Min Max Comments

Print the watermark on the first page

Print the watermark on subsequent pages except the last page

Print the watermark on the last page

✔ ✔ ✔ bool no Print on top of all other drawings

Note: when this property is 0, the objects in the watermark section are not selectable with the mouse

Guide Properties

â– 

Common Object Properties used

Constant

SRP_Object_Kind

SRP_Object_XML

SRP_Object_ID

SRP_Object_Order

SRP_Object_Rect

SRP_Object_Visible

SRP_Object_Locked

SRP_Object_Selected

SRP_Object_RelPosLeft

SRP_Object_RelPosTop

SRP_Object_RelMoveH

SRP_Object_RelMoveV

Specifics

Object kind = SRP_ObjectKind_Guide

Not persistent, no XML name

Not persistent, no XML name

Not persistent, no XML name

Not persistent, no XML name

Only vertical guide

Only horizontal guide

Only vertical guide

Only horizontal guide

Section / Guide

6

Properties by Theme

124

â– 

Properties

Constant

SRP_Guide_Type

SRP_Guide_Position

Get Set Per Type

✔ ✔ bool

✔ ✔ ✔ real

SuperReport Pro Guide Properties

Default

0

Min Max Comments

0 = horizontal

1 = vertical

-4096 4096 Location of the guide

Group / Line / Oval / Rectangle

Group Properties

â– 

Common Object Properties used

Constant

SRP_Object_Kind

SRP_Object_XML

SRP_Object_ID

SRP_Object_Name

SRP_Object_Order

SRP_Object_Rect

SRP_Object_Visible

SRP_Object_Locked

SRP_Object_Selected

SRP_Object_Export

SRP_Object_PosLeft

SRP_Object_PosTop

SRP_Object_PosRight

SRP_Object_PosBottom

SRP_Object_PosWidth

SRP_Object_PosHeight

SRP_Object_FixH

SRP_Object_FixV

SRP_Object_VariableSizeH

SRP_Object_VariableSizeV

SRP_Object_BindToParentH

SRP_Object_BindToParentV

SRP_Object_Align

SRP_Object_Draw

SRP_Object_RelPosLeft

SRP_Object_RelPosTop

Specifics

Object kind = SRP_ObjectKind_Group

Group / Line / Oval / Rectangle

6

Properties by Theme

125

Constant

SRP_Object_RelPosRight

SRP_Object_RelPosBottom

SRP_Object_RelMoveH

SRP_Object_RelMoveV

Specifics

â– 

Property

Constant

SRP_Group_Objects

Get Set Per Type

✔ int

SuperReport Pro Group Properties

Default Min Max Comments

Number of objects owned by this group

Line Properties

â– 

Common Object Properties used

Constant

SRP_Object_Kind

SRP_Object_XML

SRP_Object_ID

SRP_Object_Name

SRP_Object_Order

SRP_Object_Rect

SRP_Object_Visible

SRP_Object_Locked

SRP_Object_Selected

SRP_Object_PosLeft

SRP_Object_PosTop

SRP_Object_PosRight

SRP_Object_PosBottom

SRP_Object_PosWidth

SRP_Object_PosHeight

SRP_Object_FixH

SRP_Object_FixV

SRP_Object_VariableSizeH

SRP_Object_VariableSizeV

SRP_Object_BindToParentH

SRP_Object_BindToParentV

SRP_Object_Align

SRP_Object_Draw

Specifics

Object kind = SRP_ObjectKind_Line

Group / Line / Oval / Rectangle

6

Properties by Theme

126

Constant

SRP_Object_RelPosLeft

SRP_Object_RelPosTop

SRP_Object_RelPosRight

SRP_Object_RelPosBottom

SRP_Object_RelMoveH

SRP_Object_RelMoveV

SRP_Object_DashStyle

Specifics

â– 

Properties

Constant

SRP_Line_Thickness

SRP_Line_Color

SRP_Line_Flags

Get Set Per Type

✔ ✔ ✔ real

SuperReport Pro Line Properties

Default

1

Min

0

Max Comments

10 Line thickness in points

✔ ✔ ✔ color

✔ ✔ ✔ int black undefined 0 4

Line color

See

Working with colors

Line kind:

0 = horizontal

1 = vertical

2 = top/left to bottom/right

3 = bottom/left to top/right

4 = full X

Oval Properties

â– 

Common Object Properties used

Constant

SRP_Object_Kind

SRP_Object_XML

SRP_Object_ID

SRP_Object_Name

SRP_Object_Order

SRP_Object_Rect

SRP_Object_Visible

SRP_Object_Locked

SRP_Object_Selected

SRP_Object_PosLeft

SRP_Object_PosTop

SRP_Object_PosRight

SRP_Object_PosBottom

Specifics

Object kind = SRP_ObjectKind_Oval

Group / Line / Oval / Rectangle

6

Properties by Theme

127

Constant

SRP_Object_PosWidth

SRP_Object_PosHeight

SRP_Object_FixH

SRP_Object_FixV

SRP_Object_VariableSizeH

SRP_Object_VariableSizeV

SRP_Object_BindToParentH

SRP_Object_BindToParentV

SRP_Object_Align

SRP_Object_Draw

SRP_Object_RelPosLeft

SRP_Object_RelPosTop

SRP_Object_RelPosRight

SRP_Object_RelPosBottom

SRP_Object_RelMoveH

SRP_Object_RelMoveV

SRP_Object_DashStyle

SRP_Object_Fill

SRP_Object_Frame

Specifics

Default is 1

â– 

Properties

Constant

SRP_Oval_Thickness

SRP_Oval_Color

SRP_Oval_FillColor

Get Set Per Type

✔ ✔ ✔ real

✔

✔

✔

✔

✔

✔

SuperReport Pro Oval Properties

color color

Default

1 black black

Min

0

Max Comments

10 Thickness of the oval's frame, in points

Color of the frame

See

Working with colors

Color to fill the oval with

See

Working with colors

Group / Line / Oval / Rectangle

Rectangle Properties

â– 

Common Object Properties used

Constant

SRP_Object_Kind

SRP_Object_XML

SRP_Object_ID

SRP_Object_Name

SRP_Object_Order

SRP_Object_Rect

SRP_Object_Visible

SRP_Object_Locked

SRP_Object_Selected

SRP_Object_PosLeft

SRP_Object_PosTop

SRP_Object_PosRight

SRP_Object_PosBottom

SRP_Object_PosWidth

SRP_Object_PosHeight

SRP_Object_FixH

SRP_Object_FixV

SRP_Object_VariableSizeH

SRP_Object_VariableSizeV

SRP_Object_BindToParentH

SRP_Object_BindToParentV

SRP_Object_Align

SRP_Object_Draw

SRP_Object_RelPosLeft

SRP_Object_RelPosTop

SRP_Object_RelPosRight

SRP_Object_RelPosBottom

SRP_Object_RelMoveH

SRP_Object_RelMoveV

SRP_Object_DashStyle

SRP_Object_Fill

Specifics

Object kind = SRP_ObjectKind_Rectangle

6

Properties by Theme

128

Group / Line / Oval / Rectangle

6

Properties by Theme

129

â– 

Properties

Constant

SRP_Rect_Thickness

SRP_Rect_Color

SRP_Rect_FillColor

SRP_Rect_Rows

SRP_Rect_Columns

SRP_Rect_Flags

SuperReport Pro Rectangle Properties

Get Set Per Type

✔ ✔ ✔ real

Default

1

Min

0

Max Comments

10 Width of the border in points

✔ ✔ ✔ color black

✔

✔

✔

✔

✔

✔

✔

✔

✔

✔

✔

✔ color int int int black

1

1

15

1

1

0

Color of the border

See

Working with colors

Color to fill the rectangle with

See

Working with colors

512 Number of rows in the grid

512 Number of columns in the grid

31 Which border lines to draw: bit 0: left bit 1: top bit 2: right bit 3: bottom bit 4: rounded rect

When a rounded rectangle is used, all four lines are drawn

Group / Line / Oval / Rectangle

Picture / Text

Picture Properties

â– 

Common Object Properties used

Constant

SRP_Object_Kind

SRP_Object_XML

SRP_Object_ID

SRP_Object_Name

SRP_Object_Order

SRP_Object_Rect

SRP_Object_Visible

SRP_Object_Locked

SRP_Object_Selected

SRP_Object_Export

SRP_Object_PosLeft

SRP_Object_PosTop

SRP_Object_PosRight

SRP_Object_PosBottom

SRP_Object_PosWidth

SRP_Object_PosHeight

SRP_Object_FixH

SRP_Object_FixV

SRP_Object_VariableSizeH

SRP_Object_VariableSizeV

SRP_Object_BindToParentH

SRP_Object_BindToParentV

SRP_Object_Align

SRP_Object_Draw

SRP_Object_RelPosLeft

SRP_Object_RelPosTop

SRP_Object_RelPosRight

SRP_Object_RelPosBottom

SRP_Object_RelMoveH

SRP_Object_RelMoveV

SRP_Object_DashStyle

SRP_Object_Fill

SRP_Object_Frame

SRP_Object_FrameOffset

SRP_Object_FrameThickness

Specifics

Object kind = SRP_ObjectKind_Picture

6

Properties by Theme

130

Picture / Text

6

Properties by Theme

131

â– 

Properties

Constant

SRP_Picture_FillColor

SRP_Picture_FrameColor

SRP_Picture_HTMLReplace

SRP_Picture_Data

SRP_Picture_Format

SRP_Picture_Size

SRP_Picture_Width

SRP_Picture_Height

SuperReport Pro Picture Properties

Get Set Per Type

✔ ✔ ✔ color

✔

✔

✔

✔

✔

✔ color text

✔ ✔ ✔

BLOB /

PICT

✔ ✔ ✔ int

Default

black black

0

Min

0

Max Comments

4

Color with which to fill in the white spaces of the picture

See

Working with colors

Color of the frame

See

Working with colors

When exporting as HTML, put this text into the generated HTML in place of the actual picture

Pictures can't be embedded into HTML; a link is needed

The picture

✔ int

0 = truncated

1 = centered

2 = scaled to fit

3 = scaled proportionally

4 = scaled proportionally centered

Image size

✔

✔ real real

Width of the picture in points

The picture must be displayed on screen, otherwise it will be 0

Height of the picture in points

The picture must be displayed on screen, otherwise it will be 0

Text Properties

â– 

Common Object Properties used

Constant

SRP_Object_Kind

SRP_Object_XML

SRP_Object_ID

SRP_Object_Name

SRP_Object_Order

SRP_Object_Rect

SRP_Object_Visible

SRP_Object_Locked

SRP_Object_Selected

SRP_Object_Export

SRP_Object_PosLeft

SRP_Object_PosTop

SRP_Object_PosRight

Specifics

Object kind = SRP_ObjectKind_Text

Picture / Text

Constant

SRP_Object_PosBottom

SRP_Object_PosWidth

SRP_Object_PosHeight

SRP_Object_FixH

SRP_Object_FixV

SRP_Object_VariableSizeH

SRP_Object_VariableSizeV

SRP_Object_BindToParentH

SRP_Object_BindToParentV

SRP_Object_Align

SRP_Object_Draw

SRP_Object_RelPosLeft

SRP_Object_RelPosTop

SRP_Object_RelPosRight

SRP_Object_RelPosBottom

SRP_Object_RelMoveH

SRP_Object_RelMoveV

SRP_Object_DashStyle

SRP_Object_Fill

SRP_Object_HTMLPrefix

SRP_Object_HTMLSuffix

SRP_Object_Frame

SRP_Object_FrameOffset

SRP_Object_FrameThickness

Specifics

6

Properties by Theme

132

Picture / Text

6

Properties by Theme

133

â– 

Style Properties used

â–  â– 

SRP_Style_Features

â–  â– 

SRP_Style_FontName

â–  â– 

SRP_Style_Size

â–  â– 

SRP_Style_Full

â–  â– 

SRP_Style_Bold

â–  â– 

SRP_Style_Italic

â–  â– 

SRP_Style_Underline

â–  â– 

SRP_Style_StrikeThrough

â–  â– 

SRP_Style_Wrap

â–  â– 

SRP_Style_HorAlign

â–  â– 

SRP_Style_VertAlign

â–  â– 

SRP_Style_TextColor

â–  â– 

SRP_Style_BackColor

â–  â– 

SRP_Style_FrameColor

â–  â– 

SRP_Style_Rotation

â–  â– 

SRP_Style_BaseLineShift

â–  â– 

SRP_Style_HorizontalScale

â–  â– 

SRP_Style_LineSpacing

â– 

Properties

Constant

SRP_Text_Dynamic

SRP_Text_Attributed

SRP_Text_KeepTogether

SRP_Text_DrawEmpty

SRP_Text_Data

SRP_Text_ParsedData

SRP_Text_PrintEmptyText

Get Set Per Type

✔ ✔ ✔ bool

✔ ✔ ✔ bool

✔ ✔ ✔ bool

✔

✔

✔

✔

✔

✔

✔ int text text

✔ ✔ ✔ bool

SuperReport Pro Text Properties

Default

no no

Min Max Comments

Parse for variable substitution <%variable%> no

0 no

0 2

Multistyled text

For more information, see the

Text Style Tags

section

If possible, keep all the text in the box on the same page

If it does not fit into the available space, a new page is requested, then it is printed even if it does not fit on a page

0 = draw

1 = remove

2 = remove enclosing group

The text

Parsed text with substituted variables

When a View Values was used, the text / variable / field is processed as at the time of printing - this is the result of processing the SRP_Text_Data

(identical if SRP_Text_Dynamic is false)

Set to 1 (True) to override old v2.x behavior and print empty text

Picture / Text

6

Properties by Theme

134

Variable / Field / Data source

Variable Properties

â– 

Common Object Properties used

Constant

SRP_Object_Kind

SRP_Object_XML

SRP_Object_ID

SRP_Object_Name

SRP_Object_Order

SRP_Object_Rect

SRP_Object_Visible

SRP_Object_Locked

SRP_Object_Selected

SRP_Object_Export

SRP_Object_PosLeft

SRP_Object_PosTop

SRP_Object_PosRight

SRP_Object_PosBottom

SRP_Object_PosWidth

SRP_Object_PosHeight

SRP_Object_FixH

SRP_Object_FixV

SRP_Object_VariableSizeH

SRP_Object_VariableSizeV

SRP_Object_BindToParentH

SRP_Object_BindToParentV

SRP_Object_Align

SRP_Object_Draw

SRP_Object_RelPosLeft

SRP_Object_RelPosTop

SRP_Object_RelPosRight

SRP_Object_RelPosBottom

SRP_Object_RelMoveH

SRP_Object_RelMoveV

SRP_Object_DashStyle

SRP_Object_Fill

SRP_Object_Script

SRP_Object_HTMLPrefix

SRP_Object_HTMLSuffix

SRP_Object_Frame

SRP_Object_FrameOffset

SRP_Object_FrameThickness

Specifics

Object kind = SRP_ObjectKind_Variable

Variable / Field / Data source

â– 

Style Properties used

â–  â– 

SRP_Style_Features

â–  â– 

SRP_Style_FontName

â–  â– 

SRP_Style_Size

â–  â– 

SRP_Style_Full

â–  â– 

SRP_Style_Bold

â–  â– 

SRP_Style_Italic

â–  â– 

SRP_Style_Underline

â–  â– 

SRP_Style_StrikeThrough

â–  â– 

SRP_Style_Wrap

â–  â– 

SRP_Style_HorAlign

â–  â– 

SRP_Style_VertAlign

â–  â– 

SRP_Style_TextColor

â–  â– 

SRP_Style_BackColor

â–  â– 

SRP_Style_FrameColor

â–  â– 

SRP_Style_Rotation

â–  â– 

SRP_Style_BaseLineShift

â–  â– 

SRP_Style_HorizontalScale

â–  â– 

SRP_Style_LineSpacing

6

Properties by Theme

135

Variable / Field / Data source

6

Properties by Theme

136

â– 

Properties

Constant

SRP_Variable_Attributed

SRP_Variable_KeepTogether

SRP_Variable_DrawEmpty

SRP_Variable_Source

SRP_Variable_Index

SRP_Variable_Alias

SRP_Variable_Format

SRP_Variable_ParsedData

SRP_Variable_Calculate

SRP_Variable_Record

SRP_Variable_Repeat

SRP_Variable_RepeatOffset

SRP_Variable_UseOld

SRP_Variable_

PrintEmptyText

Get Set Per Type

✔ ✔ ✔ bool

✔

✔

✔

✔

✔

✔

✔

✔

✔ bool int

SuperReport Pro Variable Properties

text

Default

no no

0

Min

0

Max Comments

2

Multistyled text

For more information, see the

Text Style Tags

section

Keep the entire contents of the frame on the same page

0 = draw

1 = remove

2 = remove enclosing group

Variable to display

✔ ✔ ✔ int

✔

✔

✔

✔

✔

✔

✔

✔

✔

✔

✔

✔

✔ text text text int text

✔ ✔ ✔ int

-2

0

0

-2

0

0

7

-2 = variable

-1 = array {currentIteration}

>=0 is array {index}

Alias of the variable, as defined by the developer using the

SR Variables

SuperReport Pro API

command in the old

Only used in the editor

Formats as defined in 4D

Pictures use formats as defined for picture objects, e.g. "3" for scaled proportionally

For date / time variables, use 4D specific formats as text, e.g. "107" - can use

String

( Blank if null date +

Internal date short )

See

SRP_Text_ParsedData , here it is the variable

value (no <%variable%> substitution)

What to calculate:

0 = none

1 = total

2 = min

3 = avg

4 = max

5 = count

6 = stdvar

7 = stddev

Name of a variable to store the calculated value

✔

✔

✔

✔

✔

✔

✔

✔

✔ real bool bool

0 yes no

0

2 Repeat this object:

0 = none

1 = horizontal

2 = vertical

Note: consider using a Table

object

512 Offset (distance between) repeating objects in points

In break footer / total, use the old value (before the break)

Set to 1 (True) to override old v2.x behavior and print empty text

Variable / Field / Data source

Field Properties

â– 

Common Object Properties used

Constant

SRP_Object_Kind

SRP_Object_XML

SRP_Object_ID

SRP_Object_Name

SRP_Object_Order

SRP_Object_Rect

SRP_Object_Visible

SRP_Object_Locked

SRP_Object_Selected

SRP_Object_Export

SRP_Object_PosLeft

SRP_Object_PosTop

SRP_Object_PosRight

SRP_Object_PosBottom

SRP_Object_PosWidth

SRP_Object_PosHeight

SRP_Object_FixH

SRP_Object_FixV

SRP_Object_VariableSizeH

SRP_Object_VariableSizeV

SRP_Object_BindToParentH

SRP_Object_BindToParentV

SRP_Object_Align

SRP_Object_Draw

SRP_Object_RelPosLeft

SRP_Object_RelPosTop

SRP_Object_RelPosRight

SRP_Object_RelPosBottom

SRP_Object_RelMoveH

SRP_Object_RelMoveV

SRP_Object_DashStyle

SRP_Object_Fill

SRP_Object_Script

SRP_Object_HTMLPrefix

SRP_Object_HTMLSuffix

SRP_Object_Frame

SRP_Object_FrameOffset

SRP_Object_FrameThickness

Specifics

Object kind = SRP_ObjectKind_Field

6

Properties by Theme

137

Variable / Field / Data source

6

Properties by Theme

138

â– 

Style Properties used

â–  â– 

SRP_Style_Features

â–  â– 

SRP_Style_FontName

â–  â– 

SRP_Style_Size

â–  â– 

SRP_Style_Full

â–  â– 

SRP_Style_Bold

â–  â– 

SRP_Style_Italic

â–  â– 

SRP_Style_Underline

â–  â– 

SRP_Style_StrikeThrough

â–  â– 

SRP_Style_Wrap

â–  â– 

SRP_Style_HorAlign

â–  â– 

SRP_Style_VertAlign

â–  â– 

SRP_Style_TextColor

â–  â– 

SRP_Style_BackColor

â–  â– 

SRP_Style_FrameColor

â–  â– 

SRP_Style_Rotation

â–  â– 

SRP_Style_BaseLineShift

â–  â– 

SRP_Style_HorizontalScale

â–  â– 

SRP_Style_LineSpacing

â– 

Properties

Constant

SRP_Field_Attributed

SRP_Field_KeepTogether

SRP_Field_DrawEmpty

SRP_Field_Source

SRP_Field_Alias

SRP_Field_Format

SRP_Field_ParsedData

Get Set Per Type

✔ ✔ ✔ bool

✔ ✔ ✔ bool

✔ ✔ ✔ int

✔ ✔ ✔ text

SuperReport Pro Field Properties

Default

no no

0

Min

0

Max Comments

2

Multistyled text

For more information, see the

Text Style Tags

section

Keep the entire contents of the frame on the same page

0 = draw

1 = remove

2 = remove enclosing group

The table and field to display

✔ ✔ ✔ text

✔

✔

✔ ✔ text text

-2 = variable

-1 = array {currentIteration}

>=0 is array {index}

Formats as defined in 4D

Pictures use formats as defined for picture objects, e.g. "3" for scaled proportionally

For date / time variables, use 4D specific formats as text, e.g. "107" - can use

String

( Blank if null date +

Internal date short )

See

SRP_Text_ParsedData , here it is the field value

Variable / Field / Data source

6

Properties by Theme

139

Constant

SRP_Field_Calculate

SRP_Field_Record

SRP_Field_Repeat

SRP_Field_RepeatOffset

SRP_Field_UseOld

SRP_Field_PrintEmptyText

Get Set Per Type

✔ ✔ ✔ int

✔ ✔ ✔ text

SuperReport Pro Field Properties

Default

0

Min

0

Max Comments

7 What to calculate:

0 = none

1 = total

2 = min

3 = avg

4 = max

5 = count

6 = stdvar

7 = stddev

Name of a variable to store the calculated value

✔ ✔ ✔ int 0 0

✔

✔

✔

✔

✔

✔

✔

✔

✔ real bool bool

0 yes no

0

2 Repeat this object:

0 = none

1 = horizontal

2 = vertical

512 Offset (distance between) repeating objects in points

In break footer / total, use the old value (before the break)

Set to 1 (True) to override old v2.x behavior and print empty text

Data source Properties

â– 

Common Object Properties used

Constant

SRP_Object_Kind

SRP_Object_XML

SRP_Object_Selected

Specifics

Object kind = SRP_ObjectKind_DataSource

Not persistent, no XML name

Variable / Field / Data source

6

Properties by Theme

140

â– 

Properties

Constant

SRP_DataSource_Type

SRP_DataSource_Source

SRP_DataSource_VarName

SRP_DataSource_Alias

SRP_DataSource_Iterations

SRP_DataSource_TableID

SRP_DataSource_

RelateOne

SRP_DataSource_

RelateMany

SRP_DataSource_Callback

SRP_DataSource_

StartScript

SRP_DataSource_

BodyScript

SRP_DataSource_EndScript

SRP_DataSource_

StartScriptToks

SRP_DataSource_

BodyScriptToks

SRP_DataSource_

EndScriptToks

SuperReport Pro Data source Properties

Get Set Per Type

✔ ✔ text

Default

4D

Min Max Comments

For future enhancements, currently only "4D"

✔ ✔ ✔ text 0 1 4

✔

✔

✔

✔

✔

✔

✔

✔

✔

✔

✔

✔

✔

✔

✔

✔

✔

✔

✔

✔

✔

✔

✔

✔

✔

✔

✔

✔

✔

✔

✔

✔

✔

✔

✔

✔

✔

✔

✔ text text int int int int text text text text

BLOB

BLOB

BLOB

1

0

2

2

1

0

0

2

2

What defines the number of iterations:

1 = records in selection of table (table number is in

SRP_DataSource_TableID )

2 = fixed number specified by

SRP_DataSource_Iterations

3 = value of variable (variable name is in

SRP_DataSource_VarName )

4 = size of array (array name is in

SRP_DataSource_VarName )

Variable name

Alias of the data source, as defined by the developer using the

SR Variables command in the old

SuperReport Pro API

Only used in the editor

Number of iterations

4D table number

What to do when SRP_DataSource_Source is 1 and fetching a record:

0 = relations are ignored

1 = use automatic relations

2 = use automatic relations

& do a manual

RELATE ONE

/

RELATE MANY

on the main table ( SRP_DataSource_TableID )

Callback for scripts execution

Parameters: (AreaReportRef:L; Script:T)

Script to be executed before the report is processed

Even before the number of iterations is checked

(selection / array size / variable) - so you can create a selection for the report here

Script to be executed when a new row is fetched

(going to the next iteration)

This differs from the Body's script, which is executed just before processing the section (as all sections are handled the same)

“Processing”, because it does not mean this section will be printed now - e.g. if there is not enough space: footer will be processed, then header, break headers…

Script to be executed after the report is finished - to do some cleanup (e.g. clearing arrays created in the

Start script for the report)

Tokenized version of the script

( SRP_DataSource_StartScript )

Tokenized version of the script

( SRP_DataSource_BodyScript )

Tokenized version of the script

( SRP_DataSource_EndScript )

Variable / Field / Data source

6

Properties by Theme

141

Table / Header / Column / Footer

Use these properties with Table objects

.

Table Properties

â– 

Common Object Properties used

Constant

SRP_Object_Kind

SRP_Object_XML

SRP_Object_ID

SRP_Object_Name

SRP_Object_Order

SRP_Object_Rect

SRP_Object_Visible

SRP_Object_Locked

SRP_Object_Selected

SRP_Object_Export

SRP_Object_PosLeft

SRP_Object_PosTop

SRP_Object_PosRight

SRP_Object_PosBottom

SRP_Object_PosWidth

SRP_Object_PosHeight

SRP_Object_FixH

SRP_Object_FixV

SRP_Object_BindToParentH

SRP_Object_Align

SRP_Object_Draw

SRP_Object_RelPosLeft

SRP_Object_RelPosTop

SRP_Object_RelPosRight

SRP_Object_RelPosBottom

SRP_Object_RelMoveH

SRP_Object_RelMoveV

SRP_Object_StyleID

SRP_Object_Script

SRP_Object_HTMLPrefix

SRP_Object_HTMLSuffix

SRP_Object_Frame

Specifics

Object kind = SRP_ObjectKind_Table

Read only

Default is 1

Maximum is 2 (single / double frame)

SRP_Object_FrameOffset

SRP_Object_FrameThickness

Table / Header / Column / Footer

6

Properties by Theme

142

â– 

Properties

Constant

SRP_Table_FrameColor

SRP_Table_HGridThickness

SRP_Table_VGridThickness

SRP_Table_RowHeight

SRP_Table_

VariableRowHeight

SRP_Table_NumColumns

SRP_Table_NumHeadings

SRP_Table_NumFooters

SRP_Table_DrawHeaders

SRP_Table_DrawColumns

SRP_Table_DrawFooters

SRP_Table_FixedSize

SRP_Table_AltRowOptions

SRP_Table_AltRowColor

Get Set Per Type

✔ ✔ ✔ color

✔ ✔ ✔ real

SuperReport Pro Table Properties

Default

1

Min

0

Max Comments

10

Color of the frame

See

Working with colors

Width of gridline horizontal borders in points

✔ ✔ ✔ real 1 0 10 Width of gridline vertical borders in points

✔ ✔ ✔ real

✔

✔

✔

✔

✔

✔

✔

✔

✔

✔

✔

✔

✔

✔

✔

✔

✔

✔

✔

✔ bool int int int

✔ ✔ ✔ bool

✔ ✔ ✔ int bool bool int color yes

1

1

0 no

0

#FFEEEEEE

0

0

0

0

1

2

1

7

Height of rows

0 = calculate from the style used

Rows can have variable height

SRP_Table_RowHeight is used as minimum row height in this case

At least one column must have

SRP_Column_CalcRowHeight = 1

Number of columns in the table

Number of table header rows

Number of table footer rows

Print the table headers

0 = no

1 = yes

2 = draw nothing (no headers) if there are no data

Print the table footers

The footer is only printed when SRP_Table_

DrawColumns is True (1) and data exists; otherwise only the header is drawn

(if SRP_Table_DrawColumns # 2)

Footer cells are evaluated at the end of table printing

(variable substitution)

Use the fixed size as defined in the report

Alternate row coloring options: bit 0: 1 = enable, 0 = disable bit 1: 1 = apply SRP_Table_AltRowColor to even rows, 0 = apply to odd rows bit 2: 1 = alt color applies to empty space below the last row (if any) – usable with fixed size able only

Alternate row color (default is light gray)

Table / Header / Column / Footer

6

Properties by Theme

143

Table Header Properties

â– 

Common Object Properties used

Constant

SRP_Object_Kind

SRP_Object_XML

SRP_Object_ID

SRP_Object_Name

SRP_Object_Order

SRP_Object_Rect

SRP_Object_Visible

SRP_Object_Locked

SRP_Object_Selected

SRP_Object_PosLeft

SRP_Object_PosTop

SRP_Object_PosRight

SRP_Object_PosBottom

SRP_Object_PosWidth

SRP_Object_PosHeight

SRP_Object_RelPosRight

SRP_Object_RelPosBottom

SRP_Object_Fill

Specifics

Object kind = SRP_ObjectKind_Header

Only when visible (not covered by another cell)

Read only

Read only

Read only

Not persistent, no XML name

Not persistent, no XML name

â– 

Style Properties used

â–  â– 

SRP_Style_Features

â–  â– 

SRP_Style_FontName

â–  â– 

SRP_Style_Size

â–  â– 

SRP_Style_Full

â–  â– 

SRP_Style_Bold

â–  â– 

SRP_Style_Italic

â–  â– 

SRP_Style_Underline

â–  â– 

SRP_Style_StrikeThrough

â–  â– 

SRP_Style_Wrap

â–  â– 

SRP_Style_HorAlign

â–  â– 

SRP_Style_VertAlign

â–  â– 

SRP_Style_TextColor

â–  â– 

SRP_Style_BackColor

â–  â– 

SRP_Style_FrameColor

â–  â– 

SRP_Style_Rotation

Table / Header / Column / Footer

6

Properties by Theme

144

â–  â– 

SRP_Style_BaseLineShift

â–  â– 

SRP_Style_HorizontalScale

â–  â– 

SRP_Style_LineSpacing

â– 

Properties

Constant

SRP_Header_Dynamic

SRP_Header_Attributed

SRP_Header_Width

SRP_Header_Height

SRP_Header_ColSpan

SRP_Header_RowSpan

SRP_Header_Data

Get Set Per Type

✔ ✔ ✔ bool

✔

✔

✔

✔

✔

✔

✔

✔

✔

✔

✔

✔

SuperReport Pro Table Header Properties

bool real real int

Default

no no

1

Min

0

Max Comments

Parse for variable substitution <%variable%>

The variable substitution is performed on first data row

Multistyled text

For more information, see the

Text Style Tags

section

Width of the header cell

0 = automatic

Height of the header cell

0 = automatic

100 Number of columns to span over

✔

✔

✔

✔

✔

✔ int text

1 0 100 Number of header rows to span over

The header text

Table / Header / Column / Footer

6

Properties by Theme

145

Table Column Properties

â– 

Common Object Properties used

Constant

SRP_Object_Kind

SRP_Object_XML

SRP_Object_ID

SRP_Object_Name

SRP_Object_Order

SRP_Object_Rect

SRP_Object_Locked

SRP_Object_Selected

SRP_Object_PosLeft

SRP_Object_PosTop

SRP_Object_PosRight

SRP_Object_PosBottom

SRP_Object_PosWidth

SRP_Object_PosHeight

SRP_Object_RelPosRight

SRP_Object_RelPosBottom

SRP_Object_Fill

SRP_Object_Script

Specifics

Object kind = SRP_ObjectKind_Column

Read only

Read only

Not persistent, no XML name

Not persistent, no XML name

â– 

Style Properties used

â–  â– 

SRP_Style_Features

â–  â– 

SRP_Style_FontName

â–  â– 

SRP_Style_Size

â–  â– 

SRP_Style_Full

â–  â– 

SRP_Style_Bold

â–  â– 

SRP_Style_Italic

â–  â– 

SRP_Style_Underline

â–  â– 

SRP_Style_StrikeThrough

â–  â– 

SRP_Style_Wrap

â–  â– 

SRP_Style_HorAlign

â–  â– 

SRP_Style_VertAlign

â–  â– 

SRP_Style_TextColor

â–  â– 

SRP_Style_BackColor

â–  â– 

SRP_Style_FrameColor

â–  â– 

SRP_Style_Rotation

Table / Header / Column / Footer

6

Properties by Theme

146

â–  â– 

SRP_Style_BaseLineShift

â–  â– 

SRP_Style_HorizontalScale

â–  â– 

SRP_Style_LineSpacing

â– 

Properties

Constant

SRP_Column_Attributed

SRP_Column_Width

SRP_Column_Grid

SRP_Column_Source

SRP_Column_Alias

SRP_Column_Format

SRP_Column_RowNum

SRP_Column_Duplicates

SRP_Column_

ExecutionLevel

SRP_Column_

CalcRowHeight

Get Set Per Type

✔ ✔ ✔ bool

✔

✔

✔

✔

✔

✔

SuperReport Pro Table Column Properties

real bool

Default

no yes

Min Max Comments

Multistyled text

For more information, see the

Text Style Tags section

Width of the data column

0 = automatic

Draw vertical grid for this column

✔ ✔ ✔ text Source of the data: variable name or [Table]Field

✔ ✔ ✔ text

✔

✔

✔

✔

✔

✔ text bool no

Alias of the column, as defined by the developer using the

SR Variables

SuperReport Pro API

command in the old

Only used in the editor

Picture columns use formats as defined for picture objects, e.g. "3" for scaled proportionally

For date / time columns, use 4D specific formats as text, e.g. "107" - can use

String

( Blank if null date +

Internal date short )

Print row number - set when

SRP_Column_Source is set to

"%ROWNUM%"

✔ ✔ ✔ bool

✔ ✔ ✔ int

✔ ✔ ✔ bool yes

0 no

0

Print repeated values

Defines the order of execution of the scripts for columns

This enables you to have 1 → M → M related data

Calculate row height on this column

Table / Header / Column / Footer

6

Properties by Theme

147

Table Footer Properties

â– 

Common Object Properties used

Constant

SRP_Object_Kind

SRP_Object_XML

SRP_Object_ID

SRP_Object_Name

SRP_Object_Order

SRP_Object_Rect

SRP_Object_Visible

SRP_Object_Locked

SRP_Object_Selected

SRP_Object_PosLeft

SRP_Object_PosTop

SRP_Object_PosRight

SRP_Object_PosBottom

SRP_Object_PosWidth

SRP_Object_PosHeight

SRP_Object_RelPosRight

SRP_Object_RelPosBottom

SRP_Object_Fill

Specifics

Object kind = SRP_ObjectKind_Footer

Only when visible (not covered by another cell)

Read only

Read only

Read only

Not persistent, no XML name

Not persistent, no XML name

â– 

Style Properties used

â–  â– 

SRP_Style_Features

â–  â– 

SRP_Style_FontName

â–  â– 

SRP_Style_Size

â–  â– 

SRP_Style_Full

â–  â– 

SRP_Style_Bold

â–  â– 

SRP_Style_Italic

â–  â– 

SRP_Style_Underline

â–  â– 

SRP_Style_StrikeThrough

â–  â– 

SRP_Style_Wrap

â–  â– 

SRP_Style_HorAlign

â–  â– 

SRP_Style_VertAlign

â–  â– 

SRP_Style_TextColor

â–  â– 

SRP_Style_BackColor

â–  â– 

SRP_Style_FrameColor

â–  â– 

SRP_Style_Rotation

â–  â– 

SRP_Style_BaseLineShift

Table / Header / Column / Footer

6

Properties by Theme

148

â–  â– 

SRP_Style_HorizontalScale

â–  â– 

SRP_Style_LineSpacing

â– 

Properties

Constant

SRP_Footer_Dynamic

SRP_Footer_Attributed

SRP_Footer_Width

SRP_Footer_Height

SRP_Footer_ColSpan

SRP_Footer_RowSpan

SRP_Footer_Data

Get Set Per Type

✔ ✔ ✔ bool

✔

✔

✔

✔

✔

✔

✔

✔

✔

✔

✔

✔

✔

✔

✔

SuperReport Pro Table Footer Properties

bool real real int int

Default

no no

1

1

Min

0

0

Max Comments

Parse for variable substitution <%variable%>

Multistyled text

For more information, see the

Text Style Tags

section

Width of the footer cell

0 = automatic

Height of the footer cell

0 = automatic

100 Number of columns to span over

100 Number of footer rows to span over

✔ ✔ ✔ text The footer text

Table / Header / Column / Footer

6

Properties by Theme

149

Get Objects

The following properties are used to define the object selection filter (selector) when calling the

SR_GetObjects

command to retrieve the

Object numbers

.

â– 

Properties

Constant

SRP_ReportAllObjects

SRP_ReportSelectedObjects

SRP_ReportEditorStyles

SRP_ReportDataSource

SRP_ReportGuides

SRP_ReportStyleSet

SRP_ReportSections

SRP_SectionObjects

SRP_GroupObjects

SRP_TableHeaderRowMask

SRP_TableColumns

SRP_TableFooterRowMask

SuperReport Pro Get Objects Properties

Get Set Per Type

✔ int

Default Min Max Comments

All objects in a report

✔

✔

✔

✔

✔

✔

✔

✔

✔

✔

✔ int int int int int int int int int int int

Selected objects in a report

Styles used by the editor

The data source

All guides

All styles

All sections

All root objects in a section

All root objects in a group

All headers in a table header row

Use

String

( $row ; SRP_TableHeaderRowMask ) to access the row number $row

Numbered from 1, e.g. "H002" is the second row in headers

All columns in a table

All footers in a table footer row

Use

String

( $row ; SRP_TableFooterRowMask ) to access the row number $row

Numbered from 1, e.g. "F002" is the second row in footers

Get Objects

7

Print flags

150

7

Print flags

Here is a summary of the flags (option bits) pertaining to printing SuperReport Pro areas to a printer or file and / or previewing them using PDF (Preview) on MacOS and either PDF or XPS on Windows.

Constants

The following four commands include a

DstFlags

parameter where many option bits (a.k.a. “Print flags”) can be included for settings (except SRP_Print_WinPDFPreview

, only used for Preview

):

â–  â– 

SR_Print and

SR_PrintBLOB

print SuperReport Pro reports

â–  â– 

SR_OpenSession and

SR_OpenSessionBLOB create a printing session (which can be a PDF file creation and not actual printing)

In addition, the

SR_PrintSettings command uses some of the Print flags in the

Options

parameter, indicated by a * in the list below.

Use the

or operator | to combine them.

â–  â– 

SRP_Print_4DJobSetup

*: use 4D job settings (

PRINT SETTINGS

)

â–  â– 

SRP_Print_4DPageSetup

*: use 4D page settings (

PRINT SETTINGS

)

â–  â– 

SRP_Print_AskJobSetup

*: display the system dialog for the user to define the job setup

â–  â– 

SRP_Print_AskPageSetup

*: display the system dialog for the user to define the page setup

â–  â– 

SRP_Print_Default : same as SRP_Print_DestinationPrinter | SRP_Print_AskPageSetup | SRP_Print_AskJobSetup

â–  â– 

SRP_Print_DefaultJobSetup

*: use the default printer job settings

â–  â– 

SRP_Print_DefaultPageSetup

*: use the default printer page settings

â–  â– 

SRP_Print_DestinationFile : create a PDF file on MacOS and either PDF or XPS on Windows (or other, depending on the printer and driver used e.g. HP LaserJet printer could create a PostScript or PCL file)

â–  â– 

SRP_Print_DestinationPDF : on MacOS, equal to SRP_Print_DestinationFile

â–  â– 

SRP_Print_DestinationPreview : create a PDF file on MacOS and either PDF or XPS on Windows (or other, see above) then open

it - see Preview

â–  â– 

SRP_Print_DestinationPrinter : the default job name is the report name set with SRP_Object_Name (

Edit > Report Options > Name in user mode) - if the name is empty, “SuperReport Pro” is used

â–  â– 

SRP_Print_MacUseDestination : on MacOS, use the destination saved in the report ( SRP_Report_PrintSettings )

â–  â– 

SRP_Print_NoDefaultPrinter : use the printer stored in the report, if any

â–  â– 

SRP_Print_NoProgress: remove the progress indicator when printing (e.g. on the server) - also used when printing to a file - can also be used as a

Preview flag

â–  â– 

SRP_Print_SimplePageSetup

*: use only report size, orientation and scaling stored in the report, not platform-native page setup / job setup)

Constants

7

Print flags

151

â–  â– 

SRP_Print_ValidatePageSetup *: ask the user first, then display the system dialog to define the page setup if the report page setup differs from the currently used printer

â–  â– 

SRP_Print_WinOpenCreatedFile : on Windows, can be used in conjunction with SRP_Print_DestinationPDF or SRP_

PrintDestinationFile to open the generated file (implicit in SRP_Print_DestinationPreview mode - the file will be opened automatically after generating the preview)

â–  â– 

SRP_Print_WinPDFNoFonts : only useful when using SuperReport Pro's internal PDF library on Windows - can also be used as

a Preview flag

- see also

Printing to PDF on Windows

â–  â– 

SRP_Print_WinPDFPreview : this flag in only useful as a

Preview flag and cannot be used in the

DstFlags

parameter

â–  â– 

Print settings

to apply the user's setting (setup in the SuperReport Pro editor or using

SR_PrintSettings ), specify the following Print flags:

SRP_Print_NoDefaultPrinter or even SRP_Print_NoDefaultPrinter | SRP_Print_MacUseDestination

â–  â–  to use 4D's settings (using

PRINT SETTINGS

): SRP_Print_4DPageSetup | SRP_Print_4DJobSetup

â–  â–  to use the default printer settings: SRP_Print_DefaultPageSetup | SRP_Print_DefaultJobSetup

These options are mutually exclusive: either use what is saved in the report or 4D's settings or default printer settings.

â–  â– 

if you specify SRP_Print_NoDefaultPrinter , the printer name stored in the report will be used (the printer name is stored in the report per platform)

â–  â– 

if you don't specify SRP_Print_NoDefaultPrinter in the Print flags, the stored printer name will not be used: the default printer will be used instead.

â–  â– 

if you specify SRP_Print_MacUseDestination , even the destination saved in the report will be used on MacOS (if user clicked

Preview, it will do a preview!)

â–  â– 

if you specify SRP_Print_SimplePageSetup , only the page size, orientation and scaling saved in the report will be used with default printer's settings (recommended for cross-platform printing)

â–  â– 

if you specify SRP_Print_ValidatePageSetup , the page setup system dialog is displayed if the report page setup differs from the currently used printer - “differs” mainly covers the paper size, margins and scaling; “currently used” depends on SRP_Print_

NoDefaultPrinter , SRP_Print_4DPageSetup , SRP_Print_4DJobSetup , printer stored in the report, default printer, printer name provided in the command

Constants – Print settings

7

Print flags

152

Preview

The SRP_Print_DestinationPreview Print flag will create a preview file, then open it.

Preview can also be performed using the File menu (File > Preview) or the old SR Preview command.

Note: the old SR Preview command maps to

SR_PrintBLOB

, you can use SR_PrintBLOB directly, including the file name to use.

Preview always means “Open the file after creation”: opening the file is implicit, there is no need to explicitly set the SRP_Print_

WinOpenCreatedFile Print flag.

On Windows, it will create a XPS file “SRP_Preview.xps” in User's Documents if there is no report name (i.e. if

SRP_Area_WinPreviewName is empty) and no name was provided in

DstPath

.

If the SRP_Print_WinPDFPreview Preview flag is used (see below) or Microsoft XPS Document Writer is not available, a PDF will be created instead of the XPS.

Note: when using File > Preview, set SRP_Area_WinPreviewName if you want to change the name of the Preview file on

Windows.

Preview flags

Preview flags are a subset of Print flags, useful in preview mode. These settings will affect all future previews from the Editor

( File > Preview) or using the old SR Preview command, both cases where

DstFlags

can't be provided by any other means.

In other words, when you (as a developer) have the control, nothing is added by SuperReport Pro. When there is no other way

(e.g. using the editor user interface), SRP_Area_PreviewFlags is used to specify additional flags.

Note: this property can only be set globally: in other words, it expects the value zero as the first two parameters to the

getter

/

setter

command.

These flags are set through this SRP_Area_PreviewFlags property value as the sum of one or more of the following bit constants:

SRP_Print_WinPDFNoFonts , SRP_Print_WinPDFPreview , SRP_Print_NoProgress , e.g.:

SR_SetLongProperty (0;0;

SRP_Area_PreviewFlags ; SRP_Print_WinPDFPreview | SRP_Print_WinPDFNoFonts )

â–  â– 

SRP_Print_WinPDFNoFonts : only useful when using internal PDF library on Windows, do not embed fonts in the PDF file - see

Printing to PDF on Windows

â–  â– 

SRP_Print_WinPDFPreview : force PDF preview instead of XPS even if XPS is available (only a Preview flag, not to be used in the

DstFlags

parameter of the commands)

Note: when SRP_Print_DestinationPreview | SRP_Print_WinPDFPreview is used, it is internally mapped to SRP_Print_

DestinationPDF | SRP_Print_WinOpenCreatedFile .

â–  â– 

SRP_Print_NoProgress : remove the progress indicator when building the preview

Note: there is also a specific SRP_Export_NoProgress flag for SRP_Report_ExportFlags to suppress the progress bar while exporting.

Preview

7

Print flags

153

Examples

The examples below illustrate the SRP_Print_NoProgress Print flag, used as such for printing or as a Preview flag.

â– 

Print

The following line will print the report stored in $path on the device called “my Printer” without progress bar:

$error :=

SR_Print (

$path ; 0; SRP_Print_NoProgress ; ""; 0; "my Printer") // print without progress

â– 

Preview

The following line will set all subsequent previews triggered by the File > Preview menu or the old SR Preview command to remove progress bar display:

SR_SetLongProperty (0;0; SRP_Area_PreviewFlags ; SRP_Print_NoProgress )

â– 

Programming a preview

If you want to programmatically display a preview without progress indicator:

$error := SR_Print ( $path ; 0; SRP_Print_NoProgress | SRP_Print_DestinationPreview ; ""; 0; "")

Editor and command mapping

â–  â– 

When preview in the Editor (

File > Preview) is used, SR_Print is called with:

â–  â– 

SRP_Print_DestinationPreview | SRP_Print_NoDefaultPrinter | (value of SRP_Area_PreviewFlags )

â–  â– 

When the old SR Preview command is used, SR_Print is called with:

SRP_Print_DestinationPreview | (value of the SRP_Area_PreviewFlags )

File name

The report name (or the name provided in

DstPath

) will be used for the preview file name.

â–  â–  on Windows, if

DstPath

is empty the name will be “SRP_Preview.xps”

The suffix is changed to “.pdf” if SRP_Print_WinPDFPreview is specified.

The suffix is changed to “.xps” if SRP_Print_WinPDFPreview is not specified and the suffix is neither “.xps” nor “.oxps”.

â–  â– 

on MacOS, if

DstPath

is empty (which is always the case when using File > Preview), the printing job name is used i.e. the report name ( SRP_Object_Name of the report) or "SuperReport Pro" if the report name is empty

$error := SR_GetPtrProperty ( $areaRepRef ; 1; SRP_Object_Name ;-> $objName ) or simpler:

$reportName :=

SR_GetTextProperty (

$areaRepRef ; 1; SRP_Object_Name )

If the destination name is not a fully qualified name, the user's Documents directory is used on Windows and the invisible /var/ folders/ system directory is used on MacOS.

Preview

7

Print flags

154

â– 

Unique name on Windows

If you want to preview several reports at once, you must use a unique file name. Set the file name just before calling the print command, then reset it at the end (either to an empty string or any preferred name).

The easiest is probably to use a sequential counter and a temporary directory for the preview file to be stored. You can try to delete that directory's content on your application startup (or termination):

$path := <>myTemporaryDirectory +"MyGreatestApplication Preview " +

String

( <>lPreview )+ ".xps"

<>lPreview := <>lPreview +1 // increment the counter

Use $path directly if you are calling SR_PrintBLOB.

If you are calling the old SR Preview command, do this just before the call:

SR_SetTextProperty (0;0; SRP_Area_WinPreviewName ; $path )

Then reset it at the end of the loop:

SR_SetTextProperty (0;0; SRP_Area_WinPreviewName ;"")

Alternatively:

â–  â–  create a printing session for the preview (using

SR_OpenSession with

SRP_Print_DestinationPreview )

â–  â–  print all reports using

SR_PrintBLOB within that session

â–  â–  close the session (using SR_CloseSession )

Then you only need one file.

Windows File format

The printer used for preview is Microsoft XPS Document Writer.

If no printer named “Microsoft XPS Document Writer” can be found or SRP_Print_WinPDFPreview is specified, the SuperReport

Pro internal PDF library is used to create a PDF preview.

â– 

Using Microsoft XPS Document Writer on Windows

You can check

PRINTER LIST

to find out if it is present then install it if needed.

On Windows XP SP3, Microsoft XPS Document Writer is present, but Internet Explorer is used instead of XPS Viewer.

On Windows 8, you can try to use OXPS. Set the name of the preview file to be used including the extension:

SR_SetTextProperty (0;0; SRP_Area_WinPreviewName ;"My SuperReport Pro Preview.oxps")

Note: SuperReport Pro always uses the same file. If you open this file in XPS Viewer, SuperReport Pro can't write to it and you get Access denied = error 5.

You must first close the preview file before SuperReport Pro can write a new preview into it.

Preview

7

Print flags

155

Printing to PDF on Windows

PDF File size

You can control the size of printed reports when using the PDF destination for output on Windows when you ask SuperReport Pro not to embed fonts ( SRP_Print_WinPDFNoFonts ).

All used fonts are normally embedded into the PDF file, e.g. using two fonts (Arial and Times New Roman) in a small two-pages report:

â–  â– 

254 Kb without the fonts

â–  â– 

2.4 Mb with the fonts

Note: graphics are not downscaled (e.g. printing a 1200 dpi picture includes the picture as-is, it is not downscaled to 300 or 600 dpi) - you need PDFCreator for this.

Using PDFCreator

SuperReport Pro v3 supports PDFCreator directly: "Print to file" using PDFCreator produces a PostScript (PS) file, then SuperReport

Pro calls PDFCreator to convert it to a PDF file.

The printer has to be named "PDFCreator". You can check

PRINTER LIST

to find out if it is present then install it if needed.

Here is an example of printing to a PDF using PDFCreator:

$error := SR_Print ( $areaRepRef ;0; SRP_Print_DestinationFile ; $path ;0;"PDFCreator")

See other examples of usage with SR_SetLongProperty

.

Printing to PDF on Windows

8

Working with Colors

156

8

Working with Colors

You can use colors in your SuperReport Pro reports in various ways: to color text, backgrounds, or other objects.

Specifying Colors

Internally, all colors in SuperReport Pro version 3 use ARGB (alpha-red-green-blue, each channel using 8 bits: 0-255 / 0x00-0xFF).

You can use the alpha channel to specify transparency. The value should be between 0 - 255 (0x00 - 0xFF).Transparency of 0 means fully transparent (invisible) color; transparency of 255 (0xFF) means fully opaque color.

However, there are seven ways that you can specify colors in SuperReport Pro. Where necessary, they will be converted to the

ARGB model. The seven methods can be split into two groups: color values passed as string values, and color values passed as longint values.

Color values passed as string values

Using one of the standard color names (red, green, blue, dark red, dark blue, white, gray, light gray, cyan, magenta, yellow, brown, orange, dark orange, purple, black). In this case, you pass the color name using

SR_SetTextProperty.

For all above values, the alpha is always 100%. You can also use “transparent”, which will set the alpha channel to 0%.

2.

Using standard hexadecimal notion with one of the text commands.

e.g. “0xFFFF0000” is 100% red

Using hexadecimal ARGB (alpha-red-green-blue) notation. In this format, a leading # is used, followed by two hexa numbers per channel; if less than four channels are specified, full alpha (0xFF) is assumed. Note that this is the format used internally by

SuperReport Pro.

e.g. “#FF0000” is the same as “#FFFF0000” = 100% red

4.

3- or 4-part RGBA comma-separated real type channel values can be used with one of the text commands. Channel values have to be in range 0.0 - 1.0; if three values are specified, alpha is assumed to be 1.0. This is simply the percentage for each color (and alpha for transparency). Note that in this case alpha is at the end. This format conversion is triggered by any “.” in the value.

e.g. “1.0,0,0” is the same as “1.0,0,0,1.0” = 100% red

5.

3- or 4-part RGBA comma-separated long integer type channel values can also be used with one of the text commands. Channel values have to be in the range 0 - 65535; if three values are specified, alpha is assumed to be 65535. Note that in this case alpha is at the end.

e.g. “65535,0,0” is the same as “65535,0,0,65535” = 100% red

Specifying Colors

8

Working with Colors

157

6.

Using the “good old” 4D 256 color palette. Any 4D 256 color palette can be specified as “Pxxx” where xxx is the palette index in range

1 – 256. For example, the following variable / field script will set the object's background color to yellow:

SR_SetTextProperty ( SRArea ; SRObjectPrintRef ; SRP_Style_BackColor ;"P2")

Color passed in longint values

7.

SR_SetLongProperty . In this case, nothing is assumed about the alpha channel and the alpha value needs

to be specified. The color can be conveniently written in hexa notation like 0xAARRGGBB; for example 0xFF00FF00 is 100% green.

However, this number in decimal notation is -16711936.

Note that the color picker and 4D RGB commands use longint values for color without the alpha channel. This means that the developer must add alpha channel information to the color if he is going to pass a color to SuperReport Pro by code - for example:

$SRPColor := $Color | 0xFF000000

Converting RGB values

SuperReport Pro colors are very close to the format used by 4D.

In 4D, RGB colors are long integers interpreted as 0x00RRGGBB, so there are 3 channels each in range 0 - 255.

SuperReport Pro uses ARGB - 0xAARRGGBB - 4 channels each in range 0 - 255.

For example, let's examine the following RGB values from 4D:

â–  â– 

$red :=244

â–  â– 

$green :=248

â–  â– 

$blue :=255

Let's combine them using simple math:

$argb :=0xFF000000 | ( $red << 16) | ( $green << 8) | $blue

We get 0xFFF4F8FF.

Generally, to create ARGB color for use with SuperReport Pro, use

$argb :=( $alpha << 24) | ( $red << 16) | ( $green << 8) | $blue which is the same as

$argb :=( $alpha * 256 * 256 * 256) + ( $red * 256 * 256) + ( $green * 256) + $blue

To create RGB color for use with 4D, use

$rgb :=( $red << 16) | ( $green << 8) | $blue which is the same as

$rgb :=( $red * 256 * 256) + ( $green * 256) + $blue

Converting RGB values

8

Working with Colors

158

Patterns

Patterns are no longer supported. They are interpreted by SuperReport Pro version 3 as transparency ratios (alpha channel value):

â–  â– 

"black" or 1: 100% (0xFF)

â–  â– 

"darkgray" or 4: 75% (0xC0)

â–  â– 

"gray" or 2: 50% (0x80)

â–  â– 

"lightgray" or 3: 25% (0x40)

â–  â– 

"white" or 0 or "none" or "" or anything else: 0% = no drawing (0x00)

Patterns

9

Appendixes

159

9

Appendixes

Appendix 1: Troubleshooting

Localised Formats

When the database is set to use ',' and '.' as placeholders, you must not use localized formats (in other words always use

"###,##0.00"), otherwise you must use localized formats - e.g. "### ##0,00" on some European systems.

Debugger window

If an error is encountered whilst a SuperReport Pro command is executing, and SRP_Area_TraceOnError bit 0 (trace on error in interpreted) has been set to True (default setting), the 4D debugger window will open in interpreted mode.

To turn Trace on error on:

SR_SetLongProperty ( $areaRepRef ;0; SRP_Area_TraceOnError ;1) // no alert in compiled (default)

SR_SetLongProperty ( $areaRepRef ;0; SRP_Area_TraceOnError ;3) // alert in compiled as well

To turn it off for both modes:

SR_SetLongProperty (

$areaRepRef ;0; SRP_Area_TraceOnError ;0)

Note: this is only relevant for commands that do not return an error code.

Missing strings on 4D v11

When the form is loaded, you may be missing some language settings / resources / XLF and see “:15002”, etc.

This is a known 4D v11 bug. Languages are loaded from Resources/en.lproj/SRP.xlf (for an English version of 4D), but 4D v11 does not support XLIFF files in plugins.

When you copy Resources/en.lproj/SRP.xlf into the corresponding directory of your database, you will see the strings in the editor, but in the dialogs they will still appear as :15002,xxx.

It seems that for 4D v11 it would be needed to copy all the strings from SRP.xlf into Resources/SRP.rsrc.

We can also provide a 4D method to do this. Feel free to contact our support .

Appendix 1: Troubleshooting

9

Appendixes

160

Object visibility

SRP_Object_Visible is used only in the editor - to show / hide objects (e.g. you hide the second header to see a page layout for the first page). During printing this property does not exist.

Boolean properties can be set using all variants of SR_SetXXXProperty.

SRP_Object_Draw can also be used. Put the following script into the variable's script (here named vText ):

If

( vText ="")

SR_SetLongProperty ( SRArea ; SRObjectPrintRef ; SRP_Object_Draw ;0)

End if

or simply (and better):

SR_SetLongProperty ( SRArea ; SRObjectPrintRef ; SRP_Object_Draw ;

Num

( vText #""))

The second one is better because when you use View > Object Content > Value, the property will be modified in the edited report.

Note: empty objects are not drawn (neither the background nor frame), which is compatible with SuperReport Pro version 2.x.

Forcing empty space at the top of the page

Some specific situations require that an empty space is left at the top of a page and that printing occurs only below this blank part.

However, when a new page is started, SuperReport Pro removes all empty space between objects on previous and current page.

Thus the objects are positioned at the top of the page (below the top margin or header).

To force the empty space at the top of e.g. page 2:

â–  â– 

create an object, e.g. horizontal line, at the top of the second page (it can be even a few inches below the top of the second page)

â–  â– 

set it to stick at that position ( Fix Vertical Position - then objects above it can move using variable depth printing and this line will not be moved into the first page) and make it invisible by changing the line color (set alpha to 0 to be fully transparent)

Now when the second page starts, that line will be positioned on top of the page. All objects below will start at the expected position

(relative to this line).

Appendix 1: Troubleshooting

9

Appendixes

161

Appendix 2: Hints and Tips

Quotes and Double Quotes

When writing XML code, SuperReport Pro supports the use of single quotes instead of double quotes.

For example you can use font='Times New Roman' - you don't have to add lots of '+

Char

( Double Quote )' to your code.

Setting the font attributes

To set the fonts for variables and fields:

SR_SetTextProperty (

$areaRepRef ; $objNum ; SRP_Style_FontName ; $font )

SR_SetLongProperty (

$areaRepRef ; $objNum ; SRP_Style_Size ; $fontSize )

SR_SetLongProperty (

$areaRepRef ; $objNum ; SRP_Style_Full ; $fontStyle )

// this line modifies SRP_Style_Bold, SRP_Style_Underline, SRP_Style_Italic and SRP_Style_StrikeThrough

To set the styles:

SR_SetLongProperty ( $areaRepRef ; $objNum ; SRP_Object_StyleID ; $value )

// style to be used, all overridden properties are cleared (e.g. font name)

Modifying the font size during printing

It is possible to write a script that variably controls the font display size, based on values stored into a database record or from any other source.

For example, having a Variable / Field object on the page, make it to print variable height and create a script:

SR_SetLongProperty ( SRArea ; SRObjectPrintRef ; SRP_Style_Size ; $fontSize )

This is equivalent to the old API (see SR_SetFont in the SuperReport Pro 2.9 manual):

$error := SR Set Object Format ( SRArea ; SRObjectPrintRef ; SR Attribute Font Size ; ""; $fontSize )

Components

All 4D variables are created / accessed in the current scope.

Therefore if you are using SuperReport Pro in a component, it will access the component's variables.

Appendix 2: Hints and Tips

9

Appendixes

162

Platform native settings and printing destination

The following properties hold the platform native settings:

â–  â– 

SRP_Report_PageFormat - Page Setup on MacOS - flattened PMPageFormat (XML) contains all the paper handling options including selected printer

â–  â– 

SRP_Report_PrintSettings - Job Setup on MacOS - flattened PMPrintSettings (XML) contains selected destination (including file name), number of copies, tray handling…

â–  â– 

SRP_Report_MacPrinter - device name from the page setup XML stored in the SRP_Report_PageFormat property get the device name

â–  â– 

SRP_Report_DevMode - binary DEVMODE structure on Windows holds all the page setup and job handling options

â–  â– 

SRP_Report_DeviceNames - binary DEVNAMES structure on Windows holds the selected printer

â–  â– 

SRP_Report_WinPrinter - device name from the DEVNAMES structure stored in the SRP_Report_DeviceNames property get the device name

Other properties related to printing (no constants, use the specified strings instead):

"pgsc"

- old MacOS 7 Page Setup when an old SuperReport Pro report is converted.

This is only used to initialize platform native page setup when none already exists (which then should be used), this property is never modified by SuperReport Pro v3.

"land"

- landscape orientation

"prsc"

- page scale, cleared when SR_PrintSettings is used (this includes File > Page Setup, File > Job Setup and old commands

SR Page Setup & SR Validate)

Note: "land" and "prsc" are set when a page setup (on any platform) is used. They are not to be manipulated directly, unless SRP_

Print_SimplePageSetup is to be used (see below). When you change them, you have to modify the margins, page size, etc.

When SRP_Print_SimplePageSetup is specified, platform native settings are ignored, only landscape and scaling are used (and paper size, of course).

When SRP_Print_NoDefaultPrinter is specified (and printer is not explicitly named), the stored printer name is used.

When SRP_Print_MacUseDestination is specified, the destination used is the one that has been stored in

SRP_Report_PrintSettings .

Appendix 2: Hints and Tips

9

Appendixes

163

Embedding variables in HTML export text

When a text is parsed for variables, the leading + sign means “don't HTML encode the value of the variable” otherwise the value is

HTML encoded, but only if the text is attributed.

Note: if the text is not attributed, the contents of the variables is not HTML encoded.

Exporting static text into HTML:

â–  â– 

If “export plain text” is specified and the text is attributed, remove the tags, leave plain text, mark as not attributed.

â–  â– 

If HTML prefix or HTML suffix are not empty:

1. Write the HTML prefix (not HTML encoded) while parsing for variable substitutions (no HTML encoding is performed)

2. If attributed, write the text (not HTML encoded) otherwise write the HTML encoded text

3. Write the HTML suffix while parsing for variable substitutions (no HTML encoding is performed)

â–  â– 

If both HTML prefix and HTML suffix are empty:

1. Write "<span>" (with name and id, if not empty)

2. If attributed, write the text (not HTML encoded) otherwise write the HTML encoded text

3. Write "</span>",

In other words, when “export plain text” option is not specified, if you want to modify the following variables style, you must specify a HTML prefix or a HTML suffix (single space will do), not to enclose e.g. "<h1>" into "<span>".

â–  â–  not attributed text: "<h1>" or "<%vH1%>" with 4D variable vH1:="<h1>" will produce "<h1>" in the HTML stream

â–  â– 

attributed text: "&lt;h1&gt;" or "&lt;%+vH1%&gt;" with 4D variable vH1:="<h1>" will produce "<h1>" in the HTML stream

â–  â–  attributed text: "&lt;%vH1%&gt;" with 4D variable vH1:="<h1>" will produce "&lt;h1&gt;" in the HTML stream

Note: this <span> is a big difference from previous versions.

Appendix 2: Hints and Tips

9

Appendixes

164

Setting multiple objects

If you need to modify a report, do it before printing: first create an offscreen report with the

SR_NewReport

command, manipulate it, print or save it, then destroy it.

To globally set e.g. the multistyled

(attributed) property of all fields:

// select the document to work on

$doc :=

Select document

("";".srp";"Select a SuperReport Pro report"; Package open )

$areaRepRef :=0

$error := SR_NewReport ( $areaRepRef ) // create an offscreen area

$error := SR_LoadReport ( $areaRepRef ; Document ;1) // load the document

ARRAY LONGINT

( $objs ;0)

$error := SR_GetObjects ( $areaRepRef ;1; SRP_ReportAllObjects ; $objs ) // get all objects

For

( $i ;1;

Size of array

( $objs ))

If

( SR_GetTextProperty ( $areaRepRef ; $objs { $i }; SRP_Object_Kind )= SRP_ObjectKind_Field ) // is it a field?

SR_SetLongProperty ( $areaRepRef ; $objs { $i }; SRP_Field_Attributed ;1) // make it multistyled

End if

End for

$error :=

SR_SaveReport (

$areaRepRef ; Document ;1) // save the modified report

$error :=

SR_DeleteReport (

$areaRepRef ) // dispose the offscreen area

Appendix 2: Hints and Tips

9

Appendixes

165

Appendix 3: Frequently Asked Questions

User environment

Can I use SuperReport Pro in the User Environment?

Yes, SuperReport Pro can be used on any valid input form, either in the User Environment or a custom method which calls

MODIFY

SELECTION

.

Compatibility

Does SuperReport Pro support 64-bit Windows systems?

Yes!

Does SuperReport Pro support Macintosh PowerPC systems?

The shipping plugin doesn't. However, we can provide a compatible version if needed - please contact us through www.e-node.net

.

Does SuperReport Pro support drag and drop?

No.

Repeating Objects and Relationships

Can I use the Repeating Objects feature for multi-level relationships? For example, if I have a Customer, Invoice, and Line Item table, can I use repeating objects to show all the related Invoices, and show their related Line Items?

No, the Repeating Objects feature is designed to work with a single related many table.

In order to create this type of report, you are going to have to create it based on the Line Item’s table, and using Break Header data, you can show the related one and its associated related one information.

You can use a

Table object

which supports 1 → M → M → M → M relations.

Appendix 3: Frequently Asked Questions

Virtual structure

Does SuperReport Pro use a virtual structure, if it has been defined, to look up 4D fields?

Yes. If a virtual structure is in effect and a field is not defined in the virtual structure, the physical field name is used.

9

Appendixes

166

Headers and footers

Which header and footer will be printed if the report has only one page?

This depends on the SRP_Section_FirstPage , SRP_Section_SecondPage and SRP_Section_LastPage properties:

â–  â– 

The first header / footer having both SRP_Section_FirstPage and SRP_Section_LastPage set to 1

â–  â– 

The first header / footer having one of SRP_Section_FirstPage and SRP_Section_LastPage set to 1 and SRP_Section_SecondPage set to 0

When multiple pages are to be printed, the behavior is as follows:

â–  â– 

For the first page, the first header / footer having SRP_Section_FirstPage set to 1

â–  â– 

For the last page, the first header / footer having SRP_Section_LastPage set to 1

â–  â– 

For other pages, the first header / footer having SRP_Section_SecondPage set to 1

What is the difference between setting the headers / footers from the View Menu and the checkboxes in the properties of the

Footer Section?

Checkboxes in section properties for first / second / last page are used to make the choice.

View > Headers / Footers For > XXX makes use of them in the editor.

For example if there is a section to be shown on first page only and you choose to show sections for the last page, it will be made invisible.

This view is mostly useful when you have three different headers (one for first, one for last and one for all other pages)…

I have set up a report with a Header to be printed every page, A first page header to be printed after the Everypage header but only on the first page then a sub header to be printed every page followed by the body.

The First page only header does not print… ever.

When I use the menu View > Headers / Footers for > First page the section, which is supposed to print first page only is not showing. In fact that section does not appear at any time except when the option selected is all pages. All sections are selected for printing from the Database Menu

You can have only one header for the first page.

If there are more headers with “Print on first page”, the first one will be used.

The same holds for other page options - first one having “second page” / “last page” will be used.

Appendix 3: Frequently Asked Questions

9

Appendixes

167

And the same holds for Footers.

Thus modify the first header to contain all information for the first page, make it print on first page only.

Modify the second header to print on second and last pages and to contain all information for all pages except the first one.

Another possibility: use header for all pages, make a new sub-header ( Edit > Add Section: break header, level 1) for the other information and make it to print on change of a constant variable (e.g. SRDate ) - it will be printed only on the first page.

Plug-in Area type

It is indicated in the manual

that the Plug-in Area type should be “SuperReport Pro” and not “SuperReport”.

In the example database, the type is “SuperReport”. We have not seen any difference. Which is the correct setting?

Both behave identically. Prefer %SuperReport in case changes will be needed in the future to enhance support User mode.

In version prior to 2.0 only %SuperReport was available, but is not visible in the User environment.

Then _SuperReport Pro was added in version 2.x to be able to use it in User mode.

Menus

Is it possible to replace one of the menu items with my own code?

Yes - use

SR Menu Item

Parameters text, enable, mark and overrideMethod are input (depending on action) and output (always).

For example, to associate a method with

File > Export

:

$error := SR Menu Item ( $areaRepRef ; SR MenuItem Set 4D Method ; SR MenuItem Print To Disk ; "";0; 0; \

"methodNameToCall")

For new menu items (without a new constant), consult the SRProMenus.XML file in the bundle.

When the SRP_Area_CallbackVersion property is set to 1:

â–  â– 

The menu event callback will expect a return value when called with SR Menu Item Selected Before : add

C_LONGINT

( $0 ) and set it to 1 if SuperReport Pro should handle the menu item

â–  â– 

T he menu item callback will be provided with 2 arguments (area and menu ID): add

C_LONGINT

( $1 ; $2 )

Appendix 3: Frequently Asked Questions

9

Appendixes

168

Is it possible to intercept SuperReport Pro menu calls via a callback method and let or not SuperReport Pro execute the appropriate command depending on the programmer's choice ( $0 of the callback method)?

Yes, but only when using a menu callback method ( SRP_Report_CallbackMethEvent ) and SRP_Area_CallbackVersion = 1.

â–  â– 

The user chooses a menu item

â–  â– 

If a menu event callback is defined, it is called with SR Menu Item Selected Before and menu ID

â–  â– 

If a command is set for the menu item, it is executed, otherwise the standard action is taken

â–  â– 

If a menu event callback is defined, it is called with SR Menu Item Selected After and the menu ID

To disable standard execution, make the respective menu item disabled…

The menu item method gets no parameters (for compatibility), but to provide it with areaID and menuID is possible (can be made optional - call with arguments or not).

See also the discussion above regarding the SRP_Area_CallbackVersion property.

Watermarks

Can I add a watermark to my report?

Yes, you can add a Watermark section (see the User Guide for information about adding a Watermark Section, and the

Watermark

Properties section for information about procedurally controlling watermarks).

Multiple Undos

Is there a limit to the undo buffer?

Yes - it is 65536, which is virtually unlimited.

SRArea variable and Area / Report reference during printing

According to

the manual

the variable SRArea (printed report reference) can be used in callback scripts. This variable is set to -1.

The value -1 is OK. Just try to use it. Note that when there are more reports printing (e.g. on the server) they will use -2, -3…

Reports in SuperReport Pro areas and

offscreen reports use positive numbers, reports being printed use negative values.

Note that the SRArea variable is only valid during printing.

Appendix 3: Frequently Asked Questions

9

Appendixes

169

If I pass in this value to SR Get Object IDs I get an error -8008 Invalid area.

Only

SR_GetXXXProperty / SR_SetXXXProperty were supported during printing before version 3.3.

As of v3.3,

SR_GetObjects ,

SR_GetObjectsByPropertyValue

and old

SR Get Object IDs

are supported during printing. However:

â–  â– 

SR_GetObjects

ignores the second parameter and only SRP_ReportAllObjects as the selector is usable (returning all objects of the report),

â–  â– 

SR Get Object IDs

does not support “selected objects”, only “all objects”.

What can I pass in to SR Get Object IDs?

Only a valid SuperReport Pro Area - on a form, in an external window or an

offscreen

report.

I am trying to get the ObjectID from a specific variable name. Is there another way of doing this?

Not during printing.

Manipulate that object in its script. SRArea and SRObjectPrintRef are valid for properties manipulation..

SuperReport Pro supports only variable / field properties change during printing (font, size, color…). E.g. you can change a color of currently printed object in the object script:

SR_SetTextProperty ( SRArea ; SRObjectPrintRef ; SRP_Style_TextColor ;"red")

I tried to use SR_FindObjectByID using err := SR_FindObjectByID ( SRArea ;"myname"; myref ), which returns an error 4 and myref as 0 although an object with the given ID (which is unique) does exist.

The only API usable during printing is SR_GetXXXProperty and SR_SetXXXProperty.

Appendix 3: Frequently Asked Questions

9

Appendixes

170

Appendix 4: Property Values, Constants and XML Names

Property Constant

SRP_Area_CallbackMethEdit

SRP_Area_Copyright

SRP_Area_CreatedObject

SRP_Area_DoubleClick

SRP_Area_DraggedObject

SRP_Area_DraggedPosH

SRP_Area_DraggedPosV

SRP_Area_DrawingMode

SRP_Area_DrawingPage

SRP_Area_Event

SRP_Area_EventChar

SRP_Area_EventKey

SRP_Area_EventModifiers

SRP_Area_EventPosH

SRP_Area_EventPosV

SRP_Area_ExtensionHTML

SRP_Area_ExtensionSRP

SRP_Area_ExtensionTXT

SRP_Area_ExtensionXML

SRP_Area_HitObject

SRP_Area_HitPart

SRP_Area_IsArea

SRP_Area_LastError

SRP_Area_Moving

SRP_Area_Name

SRP_Area_NewReport

SRP_Area_NotificationCallback

SRP_Area_Path

SRP_Area_PreviewFlags

SRP_Area_Proximity

SRP_Area_Redraw

SRP_Area_Report

SRP_Area_Rounding

SRP_Area_ScrollLeft

SRP_Area_ScrollTop

SRP_Area_ScrollWheel

SRP_Area_Selected

SRP_Area_Self

SRP_Area_Tool

SRP_Area_ToolTips

SRP_Area_TraceOnError move anam defr palp scrw asel self tool

TIPS

TRAC path sPrF snap upds rept rund scrl scrt sHTM sSRP sTXT sXML hito hite isEA drmo drpa evtT evtC evtK evtM evtH evtV

Property Value (selector)

edit copy creo evtD drgo drpX drpY

Property XML Name

editorProc

Appendix 4: Property Values, Constants and XML Names

Property Constant

SRP_Area_VarArea

SRP_Area_VarBegHTML

SRP_Area_VarCurrentRun

SRP_Area_VarDate

SRP_Area_VarDateTime

SRP_Area_VarEndHTML

SRP_Area_VarName

SRP_Area_VarObject

SRP_Area_VarPage

SRP_Area_VarPages

SRP_Area_VarPrintSection

SRP_Area_VarRecord

SRP_Area_VarRepeat

SRP_Area_VarTime

SRP_Area_Version

SRP_Area_Visible

SRP_Area_WinPreviewName

SRP_Column_Alias

SRP_Column_Attributed

SRP_Column_CalcRowHeight

SRP_Column_Duplicates

SRP_Column_ExecutionLevel

SRP_Column_Format

SRP_Column_Grid

SRP_Column_RowNum

SRP_Column_Source

SRP_Column_Width

SRP_DataSource_Alias

SRP_DataSource_BodyScript

SRP_DataSource_BodyScriptToks

SRP_DataSource_Callback

SRP_DataSource_EndScript

SRP_DataSource_EndScriptToks

SRP_DataSource_Iterations

SRP_DataSource_RelateMany

SRP_DataSource_RelateOne

SRP_DataSource_Source

SRP_DataSource_StartScript

SRP_DataSource_StartScriptToks

SRP_DataSource_TableID

SRP_DataSource_Type

SRP_DataSource_VarName

SRP_Field_Alias

9

Appendixes

171

scTS tbid type name alis call scrE scTE iter relM rel1 src scrS grid rown src widt alis scrB scTB visi sPrN alis attr varh dups exel fmt svre svci svti vers svob svpa svp# svps

Property Value (selector)

svar svbh svcr svda svdt sveh svna

Property XML Name

alias attributed varHeight duplicates level format grid rownum source width alias

BodyScript

BodyScriptTokens callback

EndScript

EndScriptTokens iterations relateMany relateOne source

StartScript

StartScriptTokens tableID type name alias

Appendix 4: Property Values, Constants and XML Names

Property Constant

SRP_Field_Attributed

SRP_Field_Calculate

SRP_Field_DrawEmpty

SRP_Field_Format

SRP_Field_KeepTogether

SRP_Field_ParsedData

SRP_Field_PrintEmptyText

SRP_Field_Record

SRP_Field_Repeat

SRP_Field_RepeatOffset

SRP_Field_Source

SRP_Field_UseOld

SRP_Footer_Attributed

SRP_Footer_ColSpan

SRP_Footer_Data

SRP_Footer_Dynamic

SRP_Footer_Height

SRP_Footer_RowSpan

SRP_Footer_Width

SRP_Group_Objects

SRP_GroupObjects

SRP_Guide_Position

SRP_Guide_Type

SRP_Header_Attributed

SRP_Header_ColSpan

SRP_Header_Data

SRP_Header_Dynamic

SRP_Header_Height

SRP_Header_RowSpan

SRP_Header_Width

SRP_Line_Color

SRP_Line_Flags

SRP_Line_Thickness

SRP_Object_Align

SRP_Object_BindToParentH

SRP_Object_BindToParentV

SRP_Object_DashStyle

SRP_Object_Draw

SRP_Object_Export

SRP_Object_Fill

SRP_Object_FixH

SRP_Object_FixV

SRP_Object_Frame expo fill fixH fixV fram lclr flgs thic algn bndH bndV strs draw attr cspn data dyna high rspn widt dyna high rspn widt objs objs data type calr repe repo src oldv attr cspn data

Property Value (selector)

attr calt drem fmt keep text txtF

9

Appendixes

172

pos attributed colspan text dynamic height rowspan width lineColor flags thickness align bindH bindV stroke draw export fill fixH fixV frame

Property XML Name

attributed calc empty format keepTogether printEmptyText record repeat repeatOffset source useOld attributed colspan text dynamic height rowspan width

Appendix 4: Property Values, Constants and XML Names

Property Constant

SRP_Object_FrameOffset

SRP_Object_FrameThickness

SRP_Object_HTMLPrefix

SRP_Object_HTMLSuffix

SRP_Object_ID

SRP_Object_Kind

SRP_Object_Locked

SRP_Object_Name

SRP_Object_Order

SRP_Object_PosBottom

SRP_Object_PosHeight

SRP_Object_PosLeft

SRP_Object_PosRight

SRP_Object_PosTop

SRP_Object_PosWidth

SRP_Object_Rect

SRP_Object_RelMoveH

SRP_Object_RelMoveV

SRP_Object_RelPosBottom

SRP_Object_RelPosLeft

SRP_Object_RelPosRight

SRP_Object_RelPosTop

SRP_Object_Script

SRP_Object_ScriptTokens

SRP_Object_Selected

SRP_Object_StyleID

SRP_Object_VariableSizeH

SRP_Object_VariableSizeV

SRP_Object_Visible

SRP_Object_XML

SRP_Oval_Color

SRP_Oval_FillColor

SRP_Oval_Thickness

SRP_Picture_Data

SRP_Picture_FillColor

SRP_Picture_Format

SRP_Picture_FrameColor

SRP_Picture_Height

SRP_Picture_HTMLReplace

SRP_Picture_Size

SRP_Picture_Width

SRP_Rect_Color

SRP_Rect_Columns

9

Appendixes

173

htmR imgs widt lclr cols

Fclr fmt fclr high lclr

Fclr thic data scrT selc styl expH expV visi

XML rpol rpor rpot scrp rect movH movV rpob name objZ posb posh posl posr post posw

Property Value (selector)

foff fthi htmP htmS id kind lock

Property XML Name

frameOffset frameThickness

HTMLStartTag

HTMLEndTag id locked name bottom height left right top width

Script

ScriptTokens selected styl varSizeH varSizeV visible lineColor fillColor thickness

ImageData fillColor format frameColor

HTMLReplacementTag lineColor cols

Appendix 4: Property Values, Constants and XML Names

Property Constant

SRP_Rect_FillColor

SRP_Rect_Flags

SRP_Rect_Rows

SRP_Rect_Thickness

SRP_Report_BasicSRMenu

SRP_Report_CallbackMethEvent

SRP_Report_CallbackVersion

SRP_Report_ColumnCount

SRP_Report_ColumnOrder

SRP_Report_ColumnSpacing

SRP_Report_CountPages

SRP_Report_DataSource

SRP_Report_DeviceNames

SRP_Report_DevMode

SRP_Report_Document

SRP_Report_DoMenu

SRP_Report_DoMenuNoProc

SRP_Report_EditNumberPages

SRP_Report_EnableScripts

SRP_Report_ExportDelimiter

SRP_Report_ExportFlags

SRP_Report_ExportRecDelimiter

SRP_Report_GridSize

SRP_Report_HideHTML

SRP_Report_LockGuides

SRP_Report_LockSections

SRP_Report_MacPrinter

SRP_Report_MarginBottom

SRP_Report_MarginLeft

SRP_Report_MarginRight

SRP_Report_Margins

SRP_Report_MarginTop

SRP_Report_Modified

SRP_Report_ObjectHierarchy

SRP_Report_PageFormat

SRP_Report_PageHeight

SRP_Report_PageWidth

SRP_Report_PhysicalPaper

SRP_Report_PrintEmptyText

SRP_Report_PrintSettings

SRP_Report_RulerUnits

SRP_Report_Scale

SRP_Report_ShowGrid

9

Appendixes

174

txtF pgst rulu resc grsh marg marT modi

Olst pgfm high widt phys enah gulo selo

Mprn marB marL marR domi domI nump enas expD expO expR grsi colC colH colS cpgs

DATA wdnh wdmh docn

Property Value (selector)

Fclr flgs rows thic srmb call cbcv

Property XML Name

fillColor flags rows thickness eventProc columnCount printOrder columnSpacing countPages

DeviceNames

DevMode numPages gridSize lockGuides lockSections pageMarginBottom pageMarginLeft pageMarginRight pageMargins pageMarginTop

PageFormat pageHeight pageWidth usePhysical printEmptyText

PrintSettings rulerUnits reportScale showGrid

Appendix 4: Property Values, Constants and XML Names

Property Constant

SRP_Report_ShowGuides

SRP_Report_ShowMargins

SRP_Report_ShowMenubar

SRP_Report_ShowObjBorders

SRP_Report_ShowRuler

SRP_Report_ShowSections

SRP_Report_ShowSRMenu

SRP_Report_ShowToolbar

SRP_Report_ShowZoom

SRP_Report_SnapToGrid

SRP_Report_SnapToGuides

SRP_Report_UserBLOB

SRP_Report_Version

SRP_Report_VirtualCommands

SRP_Report_VirtualStructure

SRP_Report_VirtualVariables

SRP_Report_WinPrinter

SRP_Report_Zoom

SRP_Report_ZoomTitle

SRP_ReportAllObjects

SRP_ReportDataSource

SRP_ReportEditorStyles

SRP_ReportGuides

SRP_ReportSections

SRP_ReportSelectedObjects

SRP_ReportStyleSet

SRP_Section_Break_Alias

SRP_Section_Break_Always

SRP_Section_Break_Level

SRP_Section_Break_On

SRP_Section_Break_OnArray

SRP_Section_Break_OnField

SRP_Section_Break_OnVariable

SRP_Section_Break_Type

SRP_Section_FirstPage

SRP_Section_FixedHeight

SRP_Section_FooterFromBottom

SRP_Section_Height

SRP_Section_KeepTogether

SRP_Section_LastPage

SRP_Section_MinSpace

SRP_Section_PageThrow

SRP_Section_SecondPage

9

Appendixes

175

keep pagN mins pthr pag2 brkA brkF brkV brkT pag1 fixd bind high body selc

STL# alis alwa brkL brkO

Vlst

Wprn scal zoom objs

DATA

STYL

GUID toos zoms grsn gusn usrb vers

Clst

Slst

Property Value (selector)

gush mars mens obor rush sesh srms

Property XML Name

showGuides showMargins showMenubar showObjBorders showRulers showSections showToolbar snapToGrid snapToGuide version scale alias always level breakOnArray breakOnField breakOnVariable firstPage fixedHeight bindToBottom height keepTogether lastPage minSpace pageThrow secondPage

Appendix 4: Property Values, Constants and XML Names

Property Constant

SRP_Section_Type

SRP_Section_Watermark_OnTop

SRP_SectionObjects

SRP_Style_BackColor

SRP_Style_BaseLineShift

SRP_Style_Bold

SRP_Style_Features

SRP_Style_FontName

SRP_Style_FrameColor

SRP_Style_Full

SRP_Style_HorAlign

SRP_Style_HorizontalScale

SRP_Style_Italic

SRP_Style_LineSpacing

SRP_Style_Rotation

SRP_Style_Size

SRP_Style_StrikeThrough

SRP_Style_TextColor

SRP_Style_Underline

SRP_Style_VertAlign

SRP_Style_Wrap

SRP_Table_AltRowColor

SRP_Table_AltRowOptions

SRP_Table_DrawColumns

SRP_Table_DrawFooters

SRP_Table_DrawHeaders

SRP_Table_FixedSize

SRP_Table_FrameColor

SRP_Table_HGridThickness

SRP_Table_NumColumns

SRP_Table_NumFooters

SRP_Table_NumHeadings

SRP_Table_RowHeight

SRP_Table_VariableRowHeight

SRP_Table_VGridThickness

SRP_TableColumns

SRP_TableFooterRowMask

SRP_TableHeaderRowMask

SRP_Text_Attributed

SRP_Text_Data

SRP_Text_DrawEmpty

SRP_Text_Dynamic

SRP_Text_KeepTogether attr data drem dyna keep ftrn hdrn high varh vgrt colu

F000

H000 codr fodr hedr fixs fclr hgrt coln size styS tclr styU valg wrap altc alto fnam fclr styF halg hors styI lisp rotd

Property Value (selector)

type onto objs bclr basl styB sfea

9

Appendixes

176

Property XML Name

onTop backColor baseLineShift bold features font frameColor qdStyle halign hScale italic lineSpacing rotation size strikethrough textColor underline valign wrap altRowColor altRowColorParams draw draw draw fixedSize frameColor hGridThickness cols height varHeight vGridThickness attributed text empty dynamic keepTogether

Appendix 4: Property Values, Constants and XML Names

Property Constant

SRP_Text_ParsedData

SRP_Text_PrintEmptyText

SRP_Variable_Alias

SRP_Variable_Attributed

SRP_Variable_Calculate

SRP_Variable_DrawEmpty

SRP_Variable_Format

SRP_Variable_Index

SRP_Variable_KeepTogether

SRP_Variable_ParsedData

SRP_Variable_PrintEmptyText

SRP_Variable_Record

SRP_Variable_Repeat

SRP_Variable_RepeatOffset

SRP_Variable_Source

SRP_Variable_UseOld elem keep text txtF calr repe repo src oldv

Property Value (selector)

text txtF alis attr calt drem fmt

Property XML Name

printEmptyText alias attributed calc empty format elem keepTogether printEmptyText record repeat repeatOffset source useOld

9

Appendixes

177

Appendix 4: Property Values, Constants and XML Names

9

Appendixes

178

Appendix 5: Other Constants

The constants not directly referring to properties are listed belown by themes.

This Appendix contains two sections:

â–  â– 

New API constants (version 3 and above, prefixed by "SRP", no spaces in constant names).

â–  â– 

Legacy constants (from previous versions, prefixed by "SR Pro", no underscores in constant names).

Version 3 API constants

â– 

SRP Object Kinds

Constant

SRP_ObjectKind_Style

SRP_ObjectKind_Area

SRP_ObjectKind_Report

SRP_ObjectKind_Section

SRP_ObjectKind_Group

SRP_ObjectKind_Line

SRP_ObjectKind_Oval

SRP_ObjectKind_Rectangle

SRP_ObjectKind_Picture

SRP_ObjectKind_Text

SRP_ObjectKind_Variable

SRP_ObjectKind_Field

SRP_ObjectKind_Table

SRP_ObjectKind_Header

SRP_ObjectKind_Column

SRP_ObjectKind_Footer

SRP_ObjectKind_DataSource

SRP_ObjectKind_Guide

â– 

SRP Section Types

Constant

SRP_SectionType_Header

SRP_SectionType_BreakHeader

SRP_SectionType_Body

SRP_SectionType_BreakFooter

SRP_SectionType_Footer

SRP_SectionType_Watermark

S

S

S

S

S

S

S

S

S

S

S

S

S

S

S

S

Type

S

S

S

S

S

S

Type

S

S

Value

Header

BreakHeader

Body

BreakFooter

Footer

Watermark

Oval

Rect

Pict

Text

Var

Field

Table

Header

Value

Style

SuperReport Pro

Report

Section

Group

Line

Column

Footer

DataSource

Guide

Appendix 5: Other Constants

â– 

SRP Create Object Types

Constant

SRP_Group

SRP_Line

SRP_Oval

SRP_Rectangle

SRP_Picture

SRP_Text

SRP_Variable

SRP_Field

SRP_Table

SRP_Header

SRP_BreakHeader

SRP_Body

SRP_BreakFooter

SRP_Footer

SRP_Watermark

SRP_Scrap

SRP_HorizontalGuide

SRP_VerticalGuide

SRP_DataSource

SRP_Style

â– 

SRP Area Tools

Constant

SRP_Tool_Select

SRP_Tool_Text

SRP_Tool_Field

SRP_Tool_Variable

SRP_Tool_Line

SRP_Tool_Rectangle

SRP_Tool_Oval

SRP_Tool_Picture

SRP_Tool_Table

S

S

S

S

S

S

S

S

S

S

S

S

S

Type

S

S

S

S

S

S

S

L

L

L

L

L

L

Type

L

L

L

VARI

FLD

TABL

HDrs

HDBR body

FOBR

FOOs

Value

GRP#

LINE

OVAL

RECT

PICT

TEXT wate scrs

GUHo

GUVe

DATA

STYL

6

7

4

5

1

2

Value

0

3

8

9

Appendixes

179

Appendix 5: Other Constants

â– 

SRP Get Objects Types

Constant

SRP_GroupObjects

SRP_ReportAllObjects

SRP_ReportDataSource

SRP_ReportEditorStyles

SRP_ReportGuides

SRP_ReportSections

SRP_ReportSelectedObjects

SRP_ReportStyleSet

SRP_SectionObjects

SRP_TableColumns

SRP_TableFooterRowMask

SRP_TableHeaderRowMask

â– 

SRP Object Binding

Constant

SRP_Object_Bind_None

SRP_Object_Bind_Move

SRP_Object_Bind_Grow

â– 

SRP Style Features

Constant

SRP_Style_HasBaseStyle

SRP_Style_HasFontName

SRP_Style_HasFontSize

SRP_Style_HasFontStyle

SRP_Style_HasTextColor

SRP_Style_HasBackColor

SRP_Style_HasHorAlign

SRP_Style_HasVertAlign

SRP_Style_HasWrap

SRP_Style_HasFrameColor

SRP_Style_HasRotation

SRP_Style_HasBaseLineShift

SRP_Style_HasHorizontalScale

SRP_Style_HasLineSpacing

S

S

S

S

S

S

S

S

S

S

S

Type

S

L

L

Type

L

L

L

L

L

L

L

L

L

L

L

L

L

L

Type

L

9

Appendixes

180

selc

STL# objs colu

F000

H000

Value

objs objs

DATA

STYL

GUID body

1

2

Value

0

128

256

512

1024

2048

4096

8192

8

16

32

64

2

4

Value

1

Appendix 5: Other Constants

â– 

SRP Error Codes

Constant

SRP_Err_OK

SRP_Err_Generic

SRP_Err_CantLoadXML

SRP_Err_CantSaveXML

SRP_Err_InvalidAreaRef

SRP_Err_InvalidObjectRef

SRP_Err_InvalidRequest

SRP_Err_InvalidArrayType

SRP_Err_InvalidNilPointer

SRP_Err_InvalidPointerType

SRP_Err_InvalidArraySize

SRP_Err_InvalidSession

SRP_Err_UserCancelled

SRP_Err_HdrFtrTooBig

SRP_Err_NoFitInSectionOrGroup

SRP_Err_NoFitInFixedSizeGroup

SRP_Err_HdrTooBig

SRP_Err_SectionTooBig

SRP_Err_TooManySubPages

SRP_Err_TooManyPages

SRP_Err_SectionTooBigForNewPage

Abort (button in runtime error dialog or 4D error)

L

L

L

L

L

L

L

L

L

L

L

L

L

Type

L

L

L

L

L

L

L

L

L

â– 

SRP Export Flags

Constant

SRP_Export_NoProgress

SRP_Export_CSVFormat

SRP_Export_StaticText

SRP_Export_Sorted

SRP_Export_PlainText

SRP_Export_Text

SRP_Export_XML

SRP_Export_HTML

SRP_Export_Body

SRP_Export_Breaks

SRP_Export_Total

SRP_Export_Headers

SRP_Export_Watermark

L

L

L

L

L

L

L

L

L

L

L

Type

L

L

9

Appendixes

181

-8

-9

-6

-7

-10

-11

-128

-205

-3

-4

-5

-1

-2

Value

0

-206

-207

-210

-211

-212

-213

-214

-1000

512

1024

4096

8192

16384

32768

65536

Value

8

16

32

64

128

256

Appendix 5: Other Constants

â– 

SRP Print Picture

Constant

SRP_PrintPict_PDFVector

SRP_PrintPict_EMFVector

SRP_PrintPict_PNG

SRP_PrintPict_TIFF

SRP_PrintPict_JPEG

SRP_PrintPict_BMP

SRP_PrintPict_GIF

SRP_PrintPict_PDFBitmap

â– 

SRP Print Flags

Constant

SRP_Print_DestinationPrinter

SRP_Print_DestinationFile

SRP_Print_DestinationPreview

SRP_Print_DestinationPDF

SRP_Print_ValidatePageSetup

SRP_Print_DefaultPageSetup

SRP_Print_4DPageSetup

SRP_Print_SimplePageSetup

SRP_Print_DefaultJobSetup

SRP_Print_4DJobSetup

SRP_Print_AskPageSetup

SRP_Print_AskJobSetup

SRP_Print_NoProgress

SRP_Print_NoDefaultPrinter

SRP_Print_WinPDFNoFonts

SRP_Print_MacUseDestination

SRP_Print_Default

SRP_Print_WinOpenCreatedFile

SRP_Print_WinPDFPreview

See also Print Flags

.

L

L

L

L

L

L

L

L

L

L

L

Type

L

L

L

L

L

L

L

L

L

L

L

L

L

L

L

Type

L

16

32

64

128

512

1024

4096

8192

1

3

4

Value

0

16384

32768

65536

131072

12288

262144

524288

2

3

4

5

6

0

1

Value

0

9

Appendixes

182

Appendix 5: Other Constants

Legacy constants

â– 

SR Pro Event Codes

Constant

SR Zoom Area

SR UnZoom Area

SR Zoom Area to Back

SR Orig Area to Back

SR Area Closing

SR Editor Mode

SR Preview Mode

SR Preview First Page

SR Preview Previous Page

SR Preview Next Page

SR Preview Last Page

SR Preview Print Page

SR Close Preview

SR Menu Item Selected Before

SR Menu Item Selected After

â– 

SR Pro Menu IDs

Constant

SR MenuItem New

SR MenuItem Open

SR MenuItem Close

SR MenuItem Save

SR MenuItem Save As

SR MenuItem Print To Disk

SR MenuItem Preview

SR MenuItem Page Setup

SR MenuItem Print

SR MenuItem Zoom

SR MenuItem Undo

SR MenuItem Cut

SR MenuItem Copy

SR MenuItem Paste

SR MenuItem Clear

SR MenuItem Select All

SR MenuItem Duplicate

SR MenuItem Modify Object

SR MenuItem Change Object

SR MenuItem Position Object

L

L

L

L

L

L

L

L

L

L

L

L

L

L

L

L

L

L

Type

L

L

L

L

L

L

L

L

L

L

L

L

L

L

L

Type

L

L

9

Appendixes

183

207

208

209

210

203

204

205

206

109

110

201

202

105

106

107

108

Value

101

102

103

104

32

33

34

35

20

21

30

31

40

41

13

14

15

Value

11

12

Appendix 5: Other Constants

Constant

SR MenuItem Modify Section

SR MenuItem Position Sections

SR MenuItem Activate Section

SR MenuItem Bring To Front

SR MenuItem Bring Forward

SR MenuItem Send To Back

SR MenuItem Send Backwards

SR MenuItem Use Physical Page

SR MenuItem Use Printable Area

SR MenuItem Rulers

SR MenuItem Ruler Units

SR MenuItem Grid

SR MenuItem Guides

SR MenuItem Lock Guides

SR MenuItem Sections

SR MenuItem Lock Sections

SR MenuItem Margins

SR MenuItem Object Borders

SR MenuItem Show Object Border

SR MenuItem Show Object Alias

SR MenuItem Main Table

SR MenuItem Select Records

SR MenuItem Order Records

SR MenuItem Print Sections

SR MenuItem Scripts

SR MenuItem Header

SR MenuItem SubHeader1

SR MenuItem SubHeader2

SR MenuItem SubHeader3

SR MenuItem SubHeader4

SR MenuItem SubHeader5

SR MenuItem SubHeader6

SR MenuItem Body

SR MenuItem SubTotal6

SR MenuItem SubTotal5

SR MenuItem SubTotal4

SR MenuItem SubTotal3

SR MenuItem SubTotal2

SR MenuItem SubTotal1

SR MenuItem Total

SR MenuItem Footer

SR MenuItem Ruler Points

SR MenuItem Ruler Millimeter

L

L

L

L

L

L

L

L

L

L

L

L

L

L

L

L

L

L

L

L

L

L

L

L

L

L

L

L

L

Type

L

L

L

L

L

L

L

L

L

L

L

L

L

L

9

Appendixes

184

404

405

1001

1002

1003

1004

1005

313

401

402

403

309

310

311

312

305

306

307

308

301

302

303

304

214

215

216

217

Value

211

212

213

1014

1015

1016

1101

1102

1006

1007

1008

1009

1010

1011

1012

1013

Appendix 5: Other Constants

Constant

SR MenuItem Ruler Inches

SR MenuItem Line Hair

SR MenuItem Line 1

SR MenuItem Line 2

SR MenuItem Line 3

SR MenuItem Line 4

SR MenuItem Line 5

SR MenuItem Line 6

SR MenuItem Line 7

SR MenuItem Line 8

SR MenuItem Font Size 6

SR MenuItem Font Size 7

SR MenuItem Font Size 8

SR MenuItem Font Size 9

SR MenuItem Font Size 10

SR MenuItem Font Size 11

SR MenuItem Font Size 12

SR MenuItem Font Size 14

SR MenuItem Font Size 18

SR MenuItem Font Size 24

SR MenuItem Font Size 36

SR MenuItem Font Size Smaller

SR MenuItem Font Size Larger

SR MenuItem Font Size Other

SR MenuItem Start Script

SR MenuItem Body Script

SR MenuItem End Script

L

L

L

L

L

L

L

L

L

L

L

L

L

L

L

L

L

L

L

L

L

L

L

L

L

L

Type

L

6006

6007

6008

6009

6010

6011

6012

6013

6014

7001

7002

7003

5007

5008

5009

6001

6002

6003

6004

6005

Value

1103

5001

5002

5003

5004

5005

5006

9

Appendixes

185

Appendix 5: Other Constants

â– 

SR Pro Sections

Constant

SR Num Sections

SR All Sections

SR Print Defined Sections

SR Section Header

SR Section SubHeader1

SR Section SubHeader2

SR Section SubHeader3

SR Section SubHeader4

SR Section SubHeader5

SR Section SubHeader6

SR Section Body

SR Section SubTotal6

SR Section SubTotal5

SR Section SubTotal4

SR Section SubTotal3

SR Section SubTotal2

SR Section SubTotal1

SR Section Total

SR Section Footer

SR Section Header Mask

SR Section SubHeader1 Mask

SR Section SubHeader2 Mask

SR Section SubHeader3 Mask

SR Section SubHeader4 Mask

SR Section SubHeader5 Mask

SR Section SubHeader6 Mask

SR Section Body Mask

SR Section SubTotal6 Mask

SR Section SubTotal5 Mask

SR Section SubTotal4 Mask

SR Section SubTotal3 Mask

SR Section SubTotal2 Mask

SR Section SubTotal1 Mask

SR Section Total Mask

SR Section Footer Mask

L

L

L

L

L

L

L

L

L

L

L

L

L

L

L

L

L

L

L

L

L

L

L

L

L

L

L

L

L

L

L

L

L

L

Type

L

8

16

32

64

128

256

512

2

4

15

1

11

12

13

14

1024

2048

4096

8192

16384

32768

7

8

9

10

5

6

3

4

0

1

2

Value

16

65535

-1

9

Appendixes

186

Appendix 5: Other Constants

â– 

SR Pro Errors

Constant

SR Invalid Report Data

SR Cannot Create BLOB

SR Invalid Array Type

SR User Cancelled

SR No Selected Objects

SR Unknown Std Variable

SR Bad Menu ID

SR Bad Parameter

SR Invalid Area

SR Damaged Report

SR Editor Item ID Invalid

SR Editor Section Not Active

SR Editor Sect Position Invalid

SR Editor Cannot Disable Sects

SR Editor Invalid Sect Option

SR Editor Incompatible Obj Type

â– 

SR Pro Editor Codes

Constant

SR Editor Create Object

SR Editor Modify Object

SR Editor Modify Section

SR Editor Modify Object Script

SR Editor Modify Report Script

SR Editor Control Click Object

SR Editor Click Object

SR Editor Selection Changed

SR Editor Object Deleted

SR Object Type Text

SR Object Type Field

SR Object Type Variable

SR Object Type Line

SR Object Type Rectangle

SR Object Type Circle

SR Object Type Picture

SR Start Report Script

SR Body Report Script

SR End Report Script

SR Use Section Always

SR Use Section On Break

SR Use Section On First Page

L

L

L

L

L

L

L

L

L

L

L

L

L

L

Type

L

L

L

L

L

L

L

L

L

L

L

L

L

L

L

L

L

L

L

L

L

L

L

Type

L

9

Appendixes

187

6

8

4

5

2

3

9

1

7

8

5

6

2

3

Value

1

4

1

2

3

1

2

3

-8006

-8007

-8008

-8888

-2000

-2001

-2002

-2003

-2004

-2005

Value

-8000

-8001

-8002

-8003

-8004

-8005

Appendix 5: Other Constants

Constant

SR Use Section On Second Page

SR Section Break On Field

SR Section Break On Variable

SR Section Break On Array

SR Section Throw Page None

SR Section Throw Page Before

SR Section Throw Page After

SR Section Throw Page Min Space

SR Section Keep On One Page

SR Section Adjust At Print Time

SR Obj Flag Left Line

SR Obj Flag Top Line

SR Obj Flag Right Line

SR Obj Flag Bottom Line

SR Obj Flag All Lines

SR Obj Flag Fixed Horizontal

SR Obj Flag Fixed Vertical

SR Obj Flag Grow Horizontal

SR Obj Flag Grow Vertical

SR Obj Flag Variable Width

SR Obj Flag Variable Height

SR Obj Flag Replace If Empty

SR Obj Flag Record Calc Value

SR Obj Flag Show Calc Value

SR Obj Flag Repeating Object

SR Obj Flag Repeat Vertically

SR Obj Flag Repeat Horizontally

SR Obj Flag Replace Row If Empt

SR Variable Type Variable

SR Variable Type Array Auto

SR Variable Type Array Element

SR Calculation Type None

SR Calculation Type Total

SR Calculation Type Min

SR Calculation Type Average

SR Calculation Type Max

SR Pict Format Normal

SR Pict Format Centered

SR Pict Format Scaled To Fit

SR Pict Format Scaled Prop

SR Pict Format Scaled Prop Cent

SR Iterations Main Table

SR Iterations Fixed

L

L

L

L

L

L

L

L

L

L

L

L

L

L

L

L

L

L

L

L

L

L

L

L

L

L

L

L

L

Type

L

L

L

L

L

L

L

L

L

L

L

L

L

L

9

Appendixes

188

4096

8192

16384

32768

65536

1

2

16

32

64

128

256

512

1024

2048

2

4

8

15

2

1

4

1

2

3

3

1

1

2

Value

4

4

1

2

3

2

0

1

3

4

1

2

3

0

Appendix 5: Other Constants

Constant

SR Iterations Variable

SR Iterations Array

SR Property All

SR Property Name

SR Property Position

SR Property Type

SR Property Options

SR Property Selected

SR Property Field

SR Property Variable Type

SR Property Calculation

SR Property Rows Cols

SR Property Repeat Offsets

SR Attribute All

SR Attribute Font Name

SR Attribute Fore Color

SR Attribute Back Color

SR Attribute Font Size

SR Attribute Font Style

SR Attribute Fore Pattern

SR Attribute Back Pattern

SR Attribute Justification

SR Attribute Line Thickness

SR Attribute Format

SR Attribute 4D Fore Color

SR Attribute 4D Back Color

SR Attribute No Adjust

SR PowerMenu Tables

SR PowerMenu Fields

SR PowerMenu Variables

SR PowerMenu Commands

SR PowerMenu Break Object Type

SR PowerMenu Variable Type

SR PowerMenu Format

SR PowerMenu Color

SR PowerMenu Pattern

SR PowerMenu Line

SR Position At Front

SR Position At End

SR Position Forward

SR Position Backward

SR All Objects

SR Selected Objects

L

L

L

L

L

L

L

L

L

L

L

L

L

L

L

L

L

L

L

L

L

L

L

L

L

L

L

L

L

Type

L

L

L

L

L

L

L

L

L

L

L

L

L

L

9

Appendixes

189

0

1

2

512

1024

2048

4096

32

64

128

256

2

4

8

16

16

32

64

128

256

512

-7169

1

4

8

1

2

4

-1

Value

3

-4

0

-2

-3

1

11

12

13

-1

6

7

3

5

Appendix 5: Other Constants

Constant

SR Tool Arrow

SR Tool Text

SR Tool Field

SR Tool Variable

SR Tool Line

SR Tool Rectangle

SR Tool Circle

â– 

SR Pro Options

Constant

SR Generic Option Query

SR Generic Option Set Off

SR Generic Option Set On

SR Print Option Validate

SR Print Option Job Dialog

SR Print Option No Progress

SR Print Option 4DPrintSettings

SR Print Option 4DPageSetup

SR Print Option 4DJobSetup

SR Print Option UseDefPrinter

SR Save Option File Dialog

SR DoCommand Use Custom Proc

SR DoCommand Ignore Custom Proc

SR MenuItem Count Items

SR MenuItem Query

SR MenuItem Set Text

SR MenuItem Set Status

SR MenuItem Set Mark

SR MenuItem Set 4D Method

SR PrintToDisk File Dialog

SR PrintToDisk Output HTML

SR PrintToDisk Body Only

SR PrintToDisk Static Text

SR PrintToDisk TopLeft Order

SR PrintToBLOB Output HTML

SR PrintToBLOB Body Only

SR PrintToBLOB Static Text

SR PrintToBLOB TopLeft Order

SR PrintToPict Validate

SR PrintToPict Job Dialog

SR PrintToPict No Progress

SR PrintToPict 4DPrintSettings

L

L

L

L

L

L

L

L

L

L

L

L

L

L

L

L

L

L

L

L

L

L

L

L

L

L

L

L

L

L

L

Type

L

L

L

L

L

L

L

Type

L

9

Appendixes

190

8

1

2

4

8

2

4

8

1

2

4

1

1

4

8

1

2

-1

0

0

1

16

32

64

1

4

8

1

2

0

1

Value

-1

4

5

6

1

2

3

Value

0

Appendix 5: Other Constants

Constant

SR PrintToPict 4DPageSetup

SR PrintToPict 4DJobSetup

SR MainTable Show Dialog

SR MainTable Query

SR MainTable Choose Table

SR MainTable Fixed Iteration

SR MainTable Variable

SR MainTable Array

SR Options Hide Zoom

SR Options Basic Interface

SR Options Hide HTML

SR Options Use Std Guides

SR Options Use Custom Struct

SR Options Hide Menubar

SR Options Hide Toolbar

SR Options Hide Hor Scrollbar

SR Options Hide Vert Scrollbar

SR FileType Mac

SR FileType Win

SR FileType Get Creator

SR FileType Get Text Type

SR FileType Get Doc Type

SR FileType Set Creator

SR FileType Set Text Type

SR FileType Set Doc Type

SR AreaFormat Physical Page

SR AreaFormat Printable Area

SR SetAreaFormat Adjust Objects

SR SetAreaFormat Adjust Sects

SR SetAreaFormat Adjust Guides

SR Structure Physical

SR Structure Virtual

SR Structure Area Structure

SR Structure Get Invisible

SR Structure Get SubTables

SR Structure Get Indexed Only

SR Structure Get Empty Tables

SR Structure Sort By Name

SR Structure No MenuID

SR Structure Mark Indexed

SR Structure Mark Invisible

SR Commands By First Char

SR Commands By Theme

L

L

L

L

L

L

L

L

L

L

L

L

L

L

L

L

L

L

L

L

L

L

L

L

L

L

L

L

L

Type

L

L

L

L

L

L

L

L

L

L

L

L

L

L

9

Appendixes

191

1

2

4

1

2

2

4

-4

1

-1

-2

1

2

128

256

8

16

32

64

2

4

8

1

2

4

0

1

Value

16

32

-1

128

256

512

0

1

8

16

32

64

2

4

0

1

Appendix 5: Other Constants

Constant

SR Commands Area Commands

SR Commands Sort Second Level

SR Commands Sort First Level

SR Preview Wait For Close

SR Preview Zoom In

SR PrintDestination Printer

SR PrintDestination File

SR PrintDestination Fax

SR PrintDestination Preview

SR PrintDestination PDF

L

L

L

L

L

L

L

L

L

Type

L

3

4

5

1

2

1

2

4

8

Value

2

9

Appendixes

192

Appendix 5: Other Constants

10

Copyrights and Trademarks

193

10

Copyrights and

Trademarks

All trade names referenced in this document are the trademark or registered trademark of their respective holder.

SuperReport Pro is copyright and exclusively published worldwide by e-Node .

4D and 4D Server are trademarks of 4D SAS.

Windows is a trademark of Microsoft Corporation.

Macintosh, MacOS and MacOS X are trademarks of Apple, Inc.

Copyrights and Trademarks

11

Index

194

11

Index

Symboles

2D arrays . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43

4D arrays . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43

4D Form . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23

4D Server . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16

4D v11. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 159

4D variable . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49

<span> . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 163

%SuperReport . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64

.xps . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 153

A

Access . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64

Adjust Object Size by Style. . . . . . . . . . . . . . . . . . . . . . . . 29

ALP_Area_SRPTableTemplate . . . . . . . . . . . . . . . . . . . . . 56

Alpha channel . . . . . . . . . . . . . . . . . . . . . . . . . .156

,

157

,

158

AL_SuperReport . . . . . . . . . . . . . . . . . . . . . . . . . . .43

,

56

,

57

API . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27

Appearance . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27

AreaList Pro . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43

Area Properties. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .112

Area reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34

Area / Report Identification . . . . . . . . . . . . . . . . . . . . . . . . 33

AreaReportRef . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33

Area / Report reference . . . . . . . . . . . .24

,

33

,

34

,

62

,

70

,

168

Area Tools. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 179

ARGB . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 156

Attributed . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .49

,

163

,

164

B

Background color . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 157

Base style . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 109

Blob format . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28

Body . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43

Bool . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 102

Boolean properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27

Boolean values . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37

C

Color . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 102

Color palette . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 157

Color picker. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 98

Colors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 156

Color values . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 156

Columns . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43

Command syntax . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37

Command Themes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63

Compatibility . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10

Compatibility Mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27

Components . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 161

Constants . . . . . . . . . . . . . . . . . . . . . . . . . . . . .170

,

178

,

183

Convert . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28

Count Pages . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29

Create Object Types . . . . . . . . . . . . . . . . . . . . . . . . . . . . 179

Index

Creating Reports Procedurally . . . . . . . . . . . . . . . . . . 43

,

52

Custom Tag Variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49

D

Data source Properties . . . . . . . . . . . . . . . . . . . . . . . . . . 139

Debugger . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40

,

159

Demo mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .11

Demonstration mode. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15

Double Quotes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 161

DstFlags . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 150

Dynamic Text . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29

E

EMail notification. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21

Embedding variables . . . . . . . . . . . . . . . . . . . . . . . . . . . 163

Empty space . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 160

Error Codes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 181

Event Cycle. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46

Event Properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .113

Events (constants) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .113

Export Flags . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 181

External Window. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22

,

24

F

Features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 109

Field Properties. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 137

Fields . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43

File name . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 153

Final keys . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19

Font . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 161

Fonts. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30

,

155

Font size . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 161

Footers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30

,

43

Formats. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 159

Forums . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10

Frequently Asked Questions . . . . . . . . . . . . . . . . . . . . . . 165

Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38

11

Index

195

G

Get Objects. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 149

Get Objects Types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 180

Getters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65

,

70

Getters and Setters. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39

Group object . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29

Group Properties. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 124

Guide Properties. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 123

H

Header and footer. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 166

Header/Footer Properties . . . . . . . . . . . . . . . . . . . . . . . . 122

Headers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .30

,

43

,

166

Headers/footers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 166

Hexadecimal . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 156

Hints and Tips . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 161

HTML . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .48

,

50

,

163

HTML export . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51

HTML prefix . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 163

HTML suffix. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 163

I

Installation. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .11

Int . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 102

Internal variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41

J

Job Setup . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 162

L

Language . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 159

License server . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19

License types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12

,

13

Line Properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 125

Localised Formats. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 159

Local variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30

Index

M

Machine ID . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17

Master key . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19

Menu. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 168

Menu event callback . . . . . . . . . . . . . . . . . . . . . . . . . . . . 168

Menus. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 167

Merged . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17

Merged licenses . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12

Multi-platform . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47

Multiple objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71

,

164

Multiple Undos . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 168

Multiple values . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71

Multi-style (attributed) text. . . . . . . . . . . . . . . . . . . . . . . . . 30

Multistyled. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 164

N

Native drawing of Text. . . . . . . . . . . . . . . . . . . . . . . . . . . . 30

New API . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27

O

Object Binding . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 180

Object Common Properties. . . . . . . . . . . . . . . . . . . . . . . 103

Object ID. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .35

,

82

,

103

ObjectID . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 169

Object Identification . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35

Object Kinds . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32

,

178

Object name . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36

Object number . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35

Object numbers. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 149

Object print reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36

Object Properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 103

Objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32

,

78

Object visibility . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 160

Obsolete Commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29

OEM . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13

Offscreen . . . . . . . . . . . . . . . . . . . . . . . .22

,

26

,

34

,

164

,

168

Omitted parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38

Online instant activation . . . . . . . . . . . . . . .14

,

16

,

18

,

19

,

69

11

Index

196

Online registration. . . . . . . . . . . . . . . . . . . . . . . . . . . . 19

,

69

On Load . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39

Option bits. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 150

Output As HTML File. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51

Oval Properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 126

P

Page Setup . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 162

Parameter Descriptions . . . . . . . . . . . . . . . . . . . . . . . . . . 62

Parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62

Partner . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13

Patterns . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 157

PDF . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 155

PDFCreator. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 155

PDF File . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 155

Picture format documents . . . . . . . . . . . . . . . . . . . . . . . . . 28

Picture Properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 130

Platform native settings. . . . . . . . . . . . . . . . . . . . . . . . . . 162

PL_Register . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18

Plug-in Area . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25

Plug-in Area type . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 167

Plugin Properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .110

PowerPC. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 165

Preview. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 152

Preview flags . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 152

Print Drivers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47

Printed report reference . . . . . . . . . . . . . . . . . . . . . . . . . . 34

PRINTER LIST . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 154

Print flags . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 150

Print Flags. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 182

Printing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 88

Printing AreaList Pro Areas . . . . . . . . . . . . . . . . . . . . . . . . 56

Printing destination . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 162

Printing session . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 154

Print Picture . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 182

Print reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36

Print settings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 151

Progress indicator. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 152

Properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37

Index

Property . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 83

Property themes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 101

Q

Quotes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 161

R

Real . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71

Rectangle Properties . . . . . . . . . . . . . . . . . . . . . . . . . . . 127

Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34

Register . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15

,

67

Registering . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14

Registering Server licenses . . . . . . . . . . . . . . . . . . . . . . . 16

Registering your SuperReport Pro Licence. . . . . . . . . . . . 41

Regular licenses . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12

Remote mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16

Repeating Objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 165

Report Editor Properties . . . . . . . . . . . . . . . . . . . . . . . . . .118

Report Properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .117

Report reference. . . . . . . . . . . . . . . . . . . . . . . . . . . . .33

,

113

RGB . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 157

RGB values. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 157

Row coloring options. . . . . . . . . . . . . . . . . . . . . . . . . . . . 157

S

Scripts. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30

,

44

Section . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46

Section Break . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 122

Section Break Properties . . . . . . . . . . . . . . . . . . . . . . . . 122

Section Header / Footer. . . . . . . . . . . . . . . . . . . . . . . . . . 122

Section Properties. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 121

Section Types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 178

Section Watermark . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 123

Setters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 74

Setting multiple objects . . . . . . . . . . . . . . . . . . . . . . . . . . 161

Single-user license . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13

SR_AbortPrinting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44

SRArea . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41

,

168

11

Index

197

SR_Area_AddUndo. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 98

SR_Area_Redo. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 97

,

98

SR_Area_SaveUndo. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 97

SR_Area_Undo. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 98

SRBegHTML. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41

SR_ChangeObjectParent . . . . . . . . . . . . . . . . . . . . . . . . . 79

SR_CloseSession . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 88

SR_ColorPicker . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 98

SR_ConvertReportToXML. . . . . . . . . . . . . . . . . . . . . . . . . 64

SR_ConvertToXML . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28

SRCurrentRun . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41

SRDate . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41

SRDateTime . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41

SR_DeleteObject . . . . . . . . . . . . . . . . . . . . . . . . . . . . 79

,

81

SR_DeleteReport . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 70

SR_DetokenizeScript . . . . . . . . . . . . . . . . . . . . . . . . . . . . 99

SREndHTML. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41

SR_Export . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29

,

89

SR_ExportBLOB . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 90

SR_ExportBLOBIntoBLOB . . . . . . . . . . . . . . . . . . . . . 51

,

90

SR_ExportIntoBLOB . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51

SR File Types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29

SR_FindObjectByID . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 82

SR_GetLongProperty . . . . . . . . . . . . . . . . . . . . . . .52

,

70

,

72

SR Get Object Properties . . . . . . . . . . . . . . . . . . . . . . . . . 28

SR_GetObjects. . . . . . . . . . . . . . . . . . . . . . . . . . .54

,

82

,

149

SR_GetObjectsByPropertyValue. . . . . . . . . . . . . . . . . . . . 83

SR_GetObjectXML . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71

SR_GetParent. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 84

SR_GetProperties. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71

SR_GetPtrProperty . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72

SR_GetRealProperty . . . . . . . . . . . . . . . . . . . . . . . . . 27

,

72

SR Get Scripts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28

SR Get Sections . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28

SR_GetTextProperty . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 73

SR_ModifyTable . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43

SRName . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41

SR_NewObject . . . . . . . . . . . . . . . . . . . . . . . . .52

,

79

,

82

,

86

SR_NewObjectFromXML . . . . . . . . . . . . . . . . . . . . . . . . . 87

SR_NewReport . . . . . . . . . . . . . . . . . . . . . . . . .24

,

52

,

65

,

66

Index

SR_NewReportBLOB . . . . . . . . . . . . . . . . . . . . . . . . . . . . 66

SRObjectID. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42

SRObjectPrintRef . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41

SR_OpenSession . . . . . . . . . . . . . . . . . . . . . . . . . . . . 88

,

90

SR_OpenSessionBLOB . . . . . . . . . . . . . . . . . . . . . . . . . . 92

SR Package . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29

SRPage . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41

SRPages. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41

SR_ParseReport. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65

SRP_DataSource_Callback . . . . . . . . . . . . . . . . . . . . . . . 27

SRP_DataSource_RelateMany. . . . . . . . . . . . . . . . . . . . . 27

SRP_DataSource_RelateOne. . . . . . . . . . . . . . . . . . . . . . 27

SRP_Export_HTML. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51

SRP_Preview.xps . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 153

SRP_Report_CountPages . . . . . . . . . . . . . . . . . . . . . . . . 29

SR_Print . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 90

,

92

SR_PrintBLOB . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 93

SR_PrintBLOBIntoPICT . . . . . . . . . . . . . . . . . . . . . . . . . . 95

SR Print Disk . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29

SR Print HTML . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29

SRPrintSection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41

SR_PrintSettings. . . . . . . . . . . . . . . . . . . . . . . . . . .29

,

88

,

95

SRP_Text_Dynamic . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29

SRRecord . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41

SR_Register . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29

,

67

SR RELATIONS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27

,

29

SR_RunScript . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 100

SR_RunTokenizedScript . . . . . . . . . . . . . . . . . . . . . . . . . 100

SR_SaveReport . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69

SR_SetLongProperty . . . . . . . . . . . . . . . . . . . . . . . . . 52

,

77

SR SetPrinter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29

SR_SetProperties . . . . . . . . . . . . . . . . . . . . . . . . . .72

,

74

,

75

SR_SetPtrProperty . . . . . . . . . . . . . . . . . . . . . . . . . . . 74

,

76

SR_SetRealProperty. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 77

SR Set Script Callback . . . . . . . . . . . . . . . . . . . . . . . . 27

,

29

SR_SetTextProperty . . . . . . . . . . . . . . . . . . . . . . .52

,

78

,

156

SRTime . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41

SR_TokenizeScript . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 100

Styled text. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30

Style Features. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 180

11

Index

198

Style ID Uniqueness . . . . . . . . . . . . . . . . . . . . . . . . . . . . 106

Style Properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 106

Style Tags . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59

T

Table Column Properties. . . . . . . . . . . . . . . . . . . . . . . . . 144

Table Footer Properties. . . . . . . . . . . . . . . . . . . . . . . . . . 146

Table Header Properties . . . . . . . . . . . . . . . . . . . . . . . . . 143

Table object. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30

Table objects. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43

Table Properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 141

Technical Support . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10

Templates . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57

Text Properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 131

Tokenize . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 100

Tools . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 179

Transparency . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .156

,

158

Transparent. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 156

Troubleshooting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 159

TrueType fonts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30

U

Undo . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 168

Undo buffer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 168

Unicode. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30

Updates . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12

User Environment . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 165

V

Variable name. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 169

Variable Properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 134

Variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41

Version 3 API . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 178

Virtual structure. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 166

W

Watermark . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30

Watermark Properties . . . . . . . . . . . . . . . . . . . . . . . . . . . 123

Index

Watermarks. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 168

Windows File format . . . . . . . . . . . . . . . . . . . . . . . . . . . . 154

X

XLF . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 159

XML . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .10

,

71

,

87

,

106

XML Names . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 170

XPS Document Writer. . . . . . . . . . . . . . . . . . . . . . . . . . . 154

11

Index

199

Index

advertisement

Key Features

  • Create custom reports
  • Export to various formats
  • Integrate with 4D applications
  • Utilize scripting capabilities
  • Generate dynamic reports
  • Customizable templates

Frequently Answers and Questions

What is SuperReport Pro?
SuperReport Pro is a powerful reporting tool that allows you to create dynamic reports and integrate them seamlessly into your 4D applications.
What are the key features of SuperReport Pro?
SuperReport Pro offers a wide range of features, including the ability to create custom reports, export to various formats, integrate with 4D applications, utilize scripting capabilities, and generate dynamic reports.
How can I register my SuperReport Pro license?
You can register your SuperReport Pro license online or using a text file. The manual provides detailed instructions on the registration process.

Related manuals

Download PDF

advertisement

Table of contents