JReport Designer - User Referencespecifies the driver such as JDBC driver (for JDBC) or the Data...

392
JReport Designer - User Reference

Transcript of JReport Designer - User Referencespecifies the driver such as JDBC driver (for JDBC) or the Data...

Page 1: JReport Designer - User Referencespecifies the driver such as JDBC driver (for JDBC) or the Data Source name (for JDBC−ODBC bridge), the user ID and the password for connecting to

JReport Designer − User Reference

Page 2: JReport Designer - User Referencespecifies the driver such as JDBC driver (for JDBC) or the Data Source name (for JDBC−ODBC bridge), the user ID and the password for connecting to

Table of ContentsUser Reference: Organization of This Part........................................................................................................................1

JReport Objects....................................................................................................................................................................3What are in a Catalog................................................................................................................................................3JDBC & JDBC−ODBC Connection............................................................................................................................4

Connecting Properties..................................................................................................................................4Advanced Properties....................................................................................................................................4Others...........................................................................................................................................................6

Supported Data Types in JReport Designer.............................................................................................................6Tables and Views......................................................................................................................................................6

Table and View Properties...........................................................................................................................6Other Properties...........................................................................................................................................7

Table and View Fields...............................................................................................................................................7Table and View Fields Properties.................................................................................................................7Other Properties...........................................................................................................................................7

Query.........................................................................................................................................................................8Query Properties..........................................................................................................................................8

Stored Procedure......................................................................................................................................................8Stored Procedure Properties........................................................................................................................9Stored Procedure Field Properties...............................................................................................................9

File Query..................................................................................................................................................................9Creating/Editing a File Containing a SQL Statement...................................................................................9File Query Properties....................................................................................................................................9File Query Fields Properties.........................................................................................................................9

Formula (Summary)................................................................................................................................................10Working Objects.........................................................................................................................................10Formula Properties.....................................................................................................................................10

Summary.................................................................................................................................................................10Working Objects of Summary.....................................................................................................................11Break By.....................................................................................................................................................11Summary Functions....................................................................................................................................11Summary Properties...................................................................................................................................12

Parameter................................................................................................................................................................12Parameter Properties.................................................................................................................................13User Defined Format for Parameter...........................................................................................................13

User Data Source API........................................................................................................................................................16Introduction..............................................................................................................................................................16User Data Source API.............................................................................................................................................16UDS Cases..............................................................................................................................................................20UDS Object Properties............................................................................................................................................20UDS Field Properties...............................................................................................................................................20

Hierarchical Data Source...................................................................................................................................................22Introduction..............................................................................................................................................................22Hierarchical Data Source API..................................................................................................................................22HDS Cases..............................................................................................................................................................26HDS Field Properties...............................................................................................................................................27DBArray DBField in Formula...................................................................................................................................27The XSD File ..........................................................................................................................................................27

JReport Formula.................................................................................................................................................................32Formula Syntax ......................................................................................................................................................32

Statements.................................................................................................................................................32Expression..................................................................................................................................................35

Improving Performance When Special Fields are Used in Formulas......................................................................35

I

Page 3: JReport Designer - User Referencespecifies the driver such as JDBC driver (for JDBC) or the Data Source name (for JDBC−ODBC bridge), the user ID and the password for connecting to

Table of ContentsData Type................................................................................................................................................................36Built−in Functions....................................................................................................................................................38

ABS............................................................................................................................................................42Atan............................................................................................................................................................43Average......................................................................................................................................................43Count..........................................................................................................................................................45Cos.............................................................................................................................................................46DistinctCount..............................................................................................................................................46E.................................................................................................................................................................47Pi................................................................................................................................................................47integDiv......................................................................................................................................................47Log.............................................................................................................................................................47Maximum....................................................................................................................................................48Minimum.....................................................................................................................................................49MonthName................................................................................................................................................50Population..................................................................................................................................................50Pow............................................................................................................................................................52Random......................................................................................................................................................52Remainder..................................................................................................................................................53Round.........................................................................................................................................................53Sgn.............................................................................................................................................................54Sin..............................................................................................................................................................54Sqr..............................................................................................................................................................54StdDev........................................................................................................................................................55Sum............................................................................................................................................................56Tan.............................................................................................................................................................57ToBinary.....................................................................................................................................................57ToHex.........................................................................................................................................................57ToOctal.......................................................................................................................................................58ToInt...........................................................................................................................................................58Truncate.....................................................................................................................................................58Variance.....................................................................................................................................................59Asc.............................................................................................................................................................60ByteToText.................................................................................................................................................60Chr..............................................................................................................................................................60ExchGetId...................................................................................................................................................61ExchGetOrganization.................................................................................................................................61ExchGetSite...............................................................................................................................................61ExchGetPath..............................................................................................................................................62ExtractString...............................................................................................................................................62Filter...........................................................................................................................................................63InStr............................................................................................................................................................63Join.............................................................................................................................................................64LastIndexOf................................................................................................................................................65Left.............................................................................................................................................................65Length........................................................................................................................................................66LooksLike...................................................................................................................................................66LowerCase.................................................................................................................................................66Mid..............................................................................................................................................................67NumericText...............................................................................................................................................67Picture........................................................................................................................................................68ReplaceString.............................................................................................................................................68ReplicateString...........................................................................................................................................69Right...........................................................................................................................................................69Soundex.....................................................................................................................................................69Space.........................................................................................................................................................70

II

Page 4: JReport Designer - User Referencespecifies the driver such as JDBC driver (for JDBC) or the Data Source name (for JDBC−ODBC bridge), the user ID and the password for connecting to

Table of ContentsStrCmp.......................................................................................................................................................70StringSplit...................................................................................................................................................71strReverse..................................................................................................................................................72ToNumber..................................................................................................................................................72ToText........................................................................................................................................................73ToWords.....................................................................................................................................................85Trim............................................................................................................................................................87UpperCase.................................................................................................................................................88Val..............................................................................................................................................................88Current.......................................................................................................................................................88DateAdd.....................................................................................................................................................89DateDiff......................................................................................................................................................90DatePart ....................................................................................................................................................92DateTime....................................................................................................................................................93DateTimeTo2000........................................................................................................................................94DateTo2000................................................................................................................................................95Day.............................................................................................................................................................96DTSTo2000................................................................................................................................................97DTSToSeconds..........................................................................................................................................98ForEach......................................................................................................................................................99Hour..........................................................................................................................................................101IsDate.......................................................................................................................................................102ToDate......................................................................................................................................................102IsDateTime ..............................................................................................................................................102ToDateTime..............................................................................................................................................103ToDateTime (date)...................................................................................................................................103Minute.......................................................................................................................................................103Month.......................................................................................................................................................104MonthName..............................................................................................................................................105Now..........................................................................................................................................................105Second.....................................................................................................................................................106Timer........................................................................................................................................................106ToDate......................................................................................................................................................107ToDateTime..............................................................................................................................................108Today.......................................................................................................................................................109ToTime.....................................................................................................................................................110WeekdayName.........................................................................................................................................111WeekFrom................................................................................................................................................111WeekOfMonth..........................................................................................................................................112Year..........................................................................................................................................................114Date Range..............................................................................................................................................114Next..........................................................................................................................................................119Previous...................................................................................................................................................120Financial...................................................................................................................................................121DDB..........................................................................................................................................................127FV.............................................................................................................................................................127IPmt..........................................................................................................................................................128IRR...........................................................................................................................................................129NPer.........................................................................................................................................................129NPV..........................................................................................................................................................130Pmt...........................................................................................................................................................130PPmt.........................................................................................................................................................131PV.............................................................................................................................................................132Rate..........................................................................................................................................................133SLN..........................................................................................................................................................134SYD..........................................................................................................................................................134

III

Page 5: JReport Designer - User Referencespecifies the driver such as JDBC driver (for JDBC) or the Data Source name (for JDBC−ODBC bridge), the user ID and the password for connecting to

Table of ContentsUBound....................................................................................................................................................134Choose.....................................................................................................................................................135Eqv...........................................................................................................................................................135Xor............................................................................................................................................................135IsNoRecord..............................................................................................................................................136IsNull........................................................................................................................................................136isNumeric ................................................................................................................................................137Open Binary.............................................................................................................................................137Open Text.................................................................................................................................................137ReportName.............................................................................................................................................138Switch.......................................................................................................................................................138toBool.......................................................................................................................................................139toNumber..................................................................................................................................................139

Operators..............................................................................................................................................................139Operator Add (+)......................................................................................................................................140Operator Subtract ( − ).............................................................................................................................144Operator Multiply ( * )...............................................................................................................................145Operator Divide ( / and \)..........................................................................................................................146Operator Negative ( − ).............................................................................................................................148Operator Percent ( % ).............................................................................................................................149Operator Exponentiation (^).....................................................................................................................150Operator Greater than ( > )....................................................................................................................151Operator Less then ( < )...........................................................................................................................152Operator Equal ( == )...............................................................................................................................153Operator Not equal ( != ) or ( <> ).............................................................................................................153Boolean ( && , || , ! ).................................................................................................................................154Range Operator........................................................................................................................................155Others.......................................................................................................................................................156

JReport Designer Javadoc ..............................................................................................................................................159

Reporting Feature ............................................................................................................................................................160Basic Components................................................................................................................................................160Advanced Components.........................................................................................................................................160Report Objects Tree..............................................................................................................................................160Rules for Browsing This Part.................................................................................................................................164JReport Arc...........................................................................................................................................................165Barcode.................................................................................................................................................................166JReport Box...........................................................................................................................................................166Chart Platform.......................................................................................................................................................167A Detailed Reference of JReport Charts...............................................................................................................170

About Charts............................................................................................................................................170A Detailed Property Reference.................................................................................................................171

Chart Coordinate Paper........................................................................................................................................186Chart Label............................................................................................................................................................209Chart Legend.........................................................................................................................................................216Chart Platform.......................................................................................................................................................220Cross Tab..............................................................................................................................................................222

VerticalLayout...........................................................................................................................................223BoundaryValue.........................................................................................................................................224AvoidOrphanHeader.................................................................................................................................224

Cross Tab Child−AggField....................................................................................................................................225Cross Tab Child−DBField......................................................................................................................................226Cross Tab Child−Formula.....................................................................................................................................228Cross Tab Child−TextField....................................................................................................................................231

SuppressAggregate..................................................................................................................................233

IV

Page 6: JReport Designer - User Referencespecifies the driver such as JDBC driver (for JDBC) or the Data Source name (for JDBC−ODBC bridge), the user ID and the password for connecting to

Table of ContentsData Source..........................................................................................................................................................234Report Header Section..........................................................................................................................................234

Style.........................................................................................................................................................235Invisible....................................................................................................................................................238Suppressed..............................................................................................................................................239Label.........................................................................................................................................................241Underlay...................................................................................................................................................242SuppressBlankSection.............................................................................................................................243FillWholePage..........................................................................................................................................243

DB−Field................................................................................................................................................................243Format......................................................................................................................................................247Link...........................................................................................................................................................247ColumnName...........................................................................................................................................249

Detail Section........................................................................................................................................................249TileDetailSection......................................................................................................................................250TileHorizontal...........................................................................................................................................251

Formula.................................................................................................................................................................251Format......................................................................................................................................................254ColumnName...........................................................................................................................................255

Group Footer Section............................................................................................................................................255FillWholePage..........................................................................................................................................256

Group Header Section...........................................................................................................................................256OnNewPage.............................................................................................................................................257CanCrossPage.........................................................................................................................................258FillWholePage..........................................................................................................................................259Repeat......................................................................................................................................................259

Group Panel..........................................................................................................................................................259KeepGroupTogether.................................................................................................................................260GroupMask...............................................................................................................................................261Page Level Security − Grant and Cascade..............................................................................................262RepeatWhileGF........................................................................................................................................264TOCAnchor..............................................................................................................................................265

Image/Picture........................................................................................................................................................265SuppressedIfNoRecords..........................................................................................................................266

Label......................................................................................................................................................................266Border, Line and Shadow.........................................................................................................................268Autofit, MaxWidth, Wordwrap...................................................................................................................269TransWhileToHtml....................................................................................................................................269RecordLocation........................................................................................................................................270Link...........................................................................................................................................................270Sortable....................................................................................................................................................271Filterable...................................................................................................................................................271

JReport Line..........................................................................................................................................................272JReport Oval.........................................................................................................................................................273Page Footer Section..............................................................................................................................................273Page Header Section............................................................................................................................................274Page Panel............................................................................................................................................................275Parameter..............................................................................................................................................................276

Format......................................................................................................................................................279Parameter.................................................................................................................................................279

Report Footer Section...........................................................................................................................................279Data Source..........................................................................................................................................................280Report Header Section..........................................................................................................................................280

Style.........................................................................................................................................................281Invisible....................................................................................................................................................284Suppressed..............................................................................................................................................285

V

Page 7: JReport Designer - User Referencespecifies the driver such as JDBC driver (for JDBC) or the Data Source name (for JDBC−ODBC bridge), the user ID and the password for connecting to

Table of ContentsLabel.........................................................................................................................................................287Underlay...................................................................................................................................................288SuppressBlankSection.............................................................................................................................289FillWholePage..........................................................................................................................................289

Report Panel.........................................................................................................................................................289Setup Callback or Exit Functions..............................................................................................................290Applet Setting...........................................................................................................................................292ColumnWidthList......................................................................................................................................292Data Driver...............................................................................................................................................292National Language Support......................................................................................................................293ImportParamValues..................................................................................................................................293showsubHeaderFooter.............................................................................................................................293Data Buffer...............................................................................................................................................293Result Buffer.............................................................................................................................................294Excel Buffer..............................................................................................................................................294RowsPerSheet.........................................................................................................................................295EmbeddedFonts.......................................................................................................................................295RootLabel.................................................................................................................................................297

JReport Round Box...............................................................................................................................................297Special Field..........................................................................................................................................................298Sub−report.............................................................................................................................................................301

Embedded................................................................................................................................................302Cache.......................................................................................................................................................302

Summary...............................................................................................................................................................302Format......................................................................................................................................................305ColumnName...........................................................................................................................................305

Text Object............................................................................................................................................................306Text Object's Child − DBfield.................................................................................................................................308Text Object's Child − Formula...............................................................................................................................310Text Object's Child − Label...................................................................................................................................311Text Object's Child − Parameter...........................................................................................................................311Text Object's Child − Special Fields......................................................................................................................312Text Object's Child − Summary.............................................................................................................................313User Defined Object..............................................................................................................................................314

JReport Windows and Dialogs........................................................................................................................................317Get JDBC Connection Information........................................................................................................................317Open Report − New..............................................................................................................................................318Open Report − Existing........................................................................................................................................320Open Report − Recent.........................................................................................................................................321Report Wizard − Data Tab.....................................................................................................................................321Report Wizard − Joins Tab....................................................................................................................................322Report Wizard − Conditions Tab...........................................................................................................................323Report Wizard − Display Tab................................................................................................................................325Report Wizard − Group Tab..................................................................................................................................327Report Wizard − Sort Tab......................................................................................................................................328Report Wizard − Summary Tab.............................................................................................................................329Report wizard − Graph Tab...................................................................................................................................331Report Wizard − CrossTab Tab.............................................................................................................................331Report Wizard − Subreport Tab............................................................................................................................332Report Wizard − Other Tab...................................................................................................................................334Report Wizard − Style Tab....................................................................................................................................335Catalog Browser − Queries...................................................................................................................................335Add Table ( View ).................................................................................................................................................337Add (Edit) User Data Source.................................................................................................................................338Import Hierarchical Data Source From XML.........................................................................................................340

VI

Page 8: JReport Designer - User Referencespecifies the driver such as JDBC driver (for JDBC) or the Data Source name (for JDBC−ODBC bridge), the user ID and the password for connecting to

Table of ContentsImport Hierarchical Data Source From General....................................................................................................340Insert DBFields......................................................................................................................................................342WHERE Portion Editor..........................................................................................................................................342Group Wizard........................................................................................................................................................343Chart Wizard.........................................................................................................................................................345Cross−Tab.............................................................................................................................................................349Enter Parameter Values........................................................................................................................................350Create/Edit Parameter...........................................................................................................................................350New Summary.......................................................................................................................................................352Insert Summary.....................................................................................................................................................352Insert SubReport...................................................................................................................................................353Formula Editor.......................................................................................................................................................353Special Group........................................................................................................................................................354Create Computed Column.....................................................................................................................................355Join Options..........................................................................................................................................................356Page Setup............................................................................................................................................................357Deployment Wizard...............................................................................................................................................358Save Style Dialog..................................................................................................................................................359Report Options − Editor Tab..................................................................................................................................359Report Options − Format Tab................................................................................................................................360Report Options − Catalog Tab...............................................................................................................................362Report Options − Internet......................................................................................................................................363Report Options − PSQL.........................................................................................................................................365Report Options − Language Tab...........................................................................................................................366Report Options − Advanced Tab...........................................................................................................................367Catalog Doctor − Connection................................................................................................................................368Catalog Doctor − Tables and Fields......................................................................................................................368Catalog Doctor − Formulas and Summaries.........................................................................................................369Catalog Doctor − Queries......................................................................................................................................369Record Level Security Info....................................................................................................................................369Chart Dialog − Axes..............................................................................................................................................370Chart Dialog − Axis................................................................................................................................................371Chart Dialog − Background...................................................................................................................................373Chart Dialog − Chart Data.....................................................................................................................................373Chart Dialog − Coordinate Paper..........................................................................................................................374Chart Dialog − Fill Pattern.....................................................................................................................................374Chart Dialog − Filter..............................................................................................................................................376Chart Dialog − Font Color......................................................................................................................................377Chart Dialog − Font .............................................................................................................................................377Chart Dialog − Label..............................................................................................................................................378Chart Dialog − Legend..........................................................................................................................................378Chart Dialog − Legend Key...................................................................................................................................379Chart Dialog − Pen Style.......................................................................................................................................379Chart Dialog − Walls..............................................................................................................................................380Map Dialog − the Map Tab....................................................................................................................................381Map Dialog − the Area Tab...................................................................................................................................381Edit Area................................................................................................................................................................383

VII

Page 9: JReport Designer - User Referencespecifies the driver such as JDBC driver (for JDBC) or the Data Source name (for JDBC−ODBC bridge), the user ID and the password for connecting to

User Reference: Organization of This PartUser Reference covers all aspects of JReport Designer, providing technical, system and other reference informationrelated to the JReport built−in objects, built−in formula functions and APIs. When you want to consult the detailedspecifications, check this book. The Reference is divided into sections:

JReport Objects: Explanation of the properties for the objects stored in a catalog.• User Data Source API: User Data Source interface introduction and how to code yourself.• Formula Syntax: Detailed reference for JReport formula writing, built−in functions, operators with examples.• Javadoc: A list of all the classes, packages that JReport Designer opens to you, and where you can find theJavadoc index.

Reporting Features: Reporting features with Report Inspector. This chapter is categorized object by object. Youwill find it most useful for designing reports.

JReport Manual Roadmap

The following picture lists the other books in the JReport Designer manual, JReport Enterprise Server manual andJREntViewer manual, and the relationship between them. You are advised to get start with the JReport Designer manual.With some report designing knowledge, it is easy to learn JReport Enterprise Server in the server/client architecture.

JReport Designer manual includes four books: Getting Started, Tutorial, User's Guide, User Reference.

JReport Enterprise Server (abbreviated as JREntServer) manual has three books: Getting Started, Tutorial, User'sGuide. In addition, the JREntViewer manual is for using JREntViewer for JREntServer.

For a complete coverage of the features, operations and other information, please refer to the specific book:

JReport Designer Getting StartedAn introduction to JReport. It covers issues associated with installation, setup and configuration of JReport. It is acombination of informational topics and strategic references to various topics in the User's Guide and User Referencebooks.

JReport Designer TutorialBasic reports building instructions. This includes the reporting features that you will find useful. The idea is that after youhave walked through this Tutorial, you can easily follow the examples and build your own reports. For the in−depth

1

Page 10: JReport Designer - User Referencespecifies the driver such as JDBC driver (for JDBC) or the Data Source name (for JDBC−ODBC bridge), the user ID and the password for connecting to

feature coverage like building reports on XML, EJB, stored procedure, SQL file, please refer to User's Guide.

JReport Designer User's GuideIn−depth coverage of JReport Designer's features; generally explains how to do different things with the product. Browseto locate the chapters that are of interest to you for the step−by−step instructions.

JREntServer Getting StartedAn introduction to JReport. It covers issues associated with installation, setup, and configuration of JReport EnterpriseServer. It describes most informational topics and references in the server User's Guide.

JREntServer TutorialBasic Server configuration, administration and accessing instructions. After walking though the tutorial, you will be able touse the server for managing the interaction between client and server that enables activities such as scheduling andrunning reports.

JREntServer User's GuideProcedures to get a more in−depth understanding of JREntServer. We have shown the steps involved in advancedserver features like JSP, national language support, server API, application server integration, JReport (Client) ViewerBean.

JREntViewer ManualComplete coverage of features and instruction of using JREntViewer against JREntServer. The Client API usage is alsointroduced in this book.

User Reference: Organization of This Part

2

Page 11: JReport Designer - User Referencespecifies the driver such as JDBC driver (for JDBC) or the Data Source name (for JDBC−ODBC bridge), the user ID and the password for connecting to

JReport Objects

What are in a Catalog

From users' perspective, a catalog contains data objects and customized classes (lines, boxes etc). Let us first get moreinformation about the data objects, since you will be frequently using them throughout the whole process of developingreports. By now you are familiar with the graph below:

Data Objects − Including connections, tables/views, queries, etc. • Customized Class − Including text−fields, cross−tabs, line, box, etc. Like a class in Java, when you create aline, you can specify its properties like color, length, etc. and then insert it to a report.

As shown in the above figure,

A connection defines the raw database information from which the catalog gets the raw data. For example, itspecifies the driver such as JDBC driver (for JDBC) or the Data Source name (for JDBC−ODBC bridge), the userID and the password for connecting to the raw data. In a word, a connection is the gate to the raw database.

Tables/Views & Columns, Query, Stored Procedure and Imported Query are based on JDBC/ODBC connection. • Tables/View & Column are from the database. They outline the table structure in your raw database. A Query isbuilt based on Tables/View &Columns from the database and using the interactive query designer provided.Therefore, only after you add the tables/views to the catalog can you build a query.

Stored Procedure is the one from the raw database. It is like a query, can be directly used to build reports.• Instead of using the interactive query designer, you can write your own SQL statement, and then import thequery to the catalog and build reports.

Functionally, Query, Stored Procedure and Imported Query are the same. But Query depends on the table/viewsadded. Stored Procedure and Imported Query only need to connect to your database (you do not necessarilyhave to add the database tables).

UDS is also like a query, but User Data Source is up to the user to write the code for fetching the records. It isindependent from the JDBC/ODBC connection.

3

Page 12: JReport Designer - User Referencespecifies the driver such as JDBC driver (for JDBC) or the Data Source name (for JDBC−ODBC bridge), the user ID and the password for connecting to

Parameters can be used in a report for users to enter the parameter value at report run time. • Formula (Summary) is the object to be computed at run time. •

JDBC & JDBC−ODBC Connection

As we stress, there are four approaches to access data: JDBC, JDBC−ODBC, OOJDBC, User Data Source API. JReportis a Java−centric relational database oriented reporting tool written entirely in Java, so accessing data stored in RDBMSvia JDBC connection or JDBC−ODBC bridge is the basic and common way for reporting.

JDBC is a Java™ API for executing SQL statements. It consists of a set of classes and interfaces written in theJava programming language that makes it easy to send SQL statements to any virtually relational database.

Always remember to add the classpath of the driver into the batch file of JReport products first. The URL formatis regulated by the driver itself. That is, different drivers have different URL formats. Then in the Connectiondialog specify the driver name, URL, user name and password as well if necessary.

For your convenience, after entering all JDBC URL, User Name and Password, you can leave JDBC Driverempty and give it in a property file − jdbcdrivers.properties. Note: This file must be located under %installroot%\bin directory for JReport Designer The format of the file is:jdbc.drivers=JDBCDriverName:JDBCDriverName:...Where, JDBCDriverName is the JDBC driver name that can be auto−loaded when JReport starts up and ':' is thedelimiter between two driver names. JReport will search from the first and find the one which can work with thedriver, URL, User Name and Password in the catalog.Below is an example jdbcdrivers.properties file which specifies the Oracle thin driver and Interbase thin driver.jdbc.drivers=oracle.jdbc.driver.OracleDriver:interbase.interclient.Driver

JDBC−ODBC bridge allows ODBC drivers to be used as JDBC drivers. JDBC−ODBC Bridge is a JDBC driverwhich implements JDBC operations by translating them into ODBC operations. To ODBC it appears as a normalapplication program.

To set up connection via JDBC−ODBC bridge, you should first set up the Data Source (select the database andspecify Data Source Name)

Reference Note: User's Guide | Starting from Catalog

Connecting Properties

While you set up the connection, there are a few essential properties required:

JDBC Driver: Name for your JDBC driver. While creating the connection in the Connection dialog, JReport willuse the driver they specified to connect to their database. If no driver name is filled in, JReport will use thedefault JDBC drivers stored in %installroot%/bin/jdbcdrivers.properties file. You can add JDBC drivers namesinto the text file, JReport will load the drivers before building a connection. If your JDBC driver name is notcorrect, or you do not add JDBC drivers names, the message "No suitable driver " will appear.

URL: For JDBC driver, you need to input a valid JDBC URL which can establish a connection to your database.Please refer to your JDBC driver manual for the connecting string.

User: The user name for connecting with your database. It is determined by your database. • Password: The password for connecting with your database. It is determined by your database.•

Advanced Properties

Apart from the required properties, the following ones will give more alternatives if your database has unique or specialrequirements.

QualifiedNamePatternYou can decide if Catalog or Schema is used in data manipulation.

JReport Objects

4

Page 13: JReport Designer - User Referencespecifies the driver such as JDBC driver (for JDBC) or the Data Source name (for JDBC−ODBC bridge), the user ID and the password for connecting to

Unqualified Name: Neither Catalog nor Schema is included in data manipulation.Example: SELECT t.c FROM t2−parts Names: Use Schema in data manipulation.Example: SELECT schema.t.c FROM schema.t3−parts Names: Use both Catalog and Schema in data manipulation.Example: SELECT catalog.schema t.c FROM catalog.schema.tTimestampFormat and Date FormatYou can define date or time format corresponding to your database system. This is the format which will send toyour database, and not the display format.

Symbol Meaning Presentation

y year Number

M month Number

d day in month Number

H hour in day (0~23) Number

h hour in am/pm (1~12) Number

m minute in hour Number

s second in minute Number

S millisecond Number

Example (using the US Locale):"yyyyy.MMMMM.dd hh:mm aaa" −>> 1996.July.10 12:08 PMReference Note: The date and timestamp format JReport supports follows that of JDK, please refer to JDK APISpecification java.text package DateFormat interface.

ExtraNamePattenSpecify the characters, then a qualifier name which contains the characters will not be quoted. In JReport, we need to quote them with the character defined by DBMS, the default character is doublequotation marks ("). There are two properties of Quote Qualifier.Default (JDBC): Program will get the extra name characters from JDBC.User Defined: Users can modify the Quote Character by themselves according to the data source theyare using.

Encoding FormatWhen manipulating the data, you can determine which encoding format will be used.

TransactionIsolationYou can specify this connection property each time the driver connects to the database. A default onewill be retrieved from the database. Or, you can specify the following for transaction mode:none: Indicate that transactions are not supported.Read_Uncommitted: Dirty reads, non−repeatable reads and phantom reads can occur.Read_Committed: Dirty reads are prevented; non−repeatable reads and phantom reads can occur.Reapeatable_Read: Dirty reads and non−repeatable reads are prevented; phantom reads can occur.Serializable: Dirty reads, non−repeatable reads and phantom reads are prevented.Reference Note: For detailed information about each item for Transaction, please refer to JDK APISpecification java.sql package connection interface.Note:Set Transaction Isolation to be Read Uncommitted, it will speed up the transaction of the catalog.

ReadOnlyYou can specify this connection property each time the driver connects to the database. A default one isretrieved from the database. If you set to Read Only, the manipulation of the data for the database will beread only.Note: Read Only selection will speed up the transaction of the catalog.

JReport Objects

5

Page 14: JReport Designer - User Referencespecifies the driver such as JDBC driver (for JDBC) or the Data Source name (for JDBC−ODBC bridge), the user ID and the password for connecting to

Others

NameIt is only the identity of the connection, and you can modify it as you like. We will give it a default name which isthe same as the connection URL. To modify the name, you should first go to File | Options menu item. On theAdvanced tab, check off the option Forbid editing the data objects properties option in the Catalog Browsersection. Click Apply. Then, double click the connection on the Data Tab and enter the string.

DescriptionIt is a place to enter your own descriptions, comments, memos. To enter the description, you should first go toFile | Options menu item. On the Advanced tab, uncheck the option Forbid editing the data objectsproperties option in the Catalog Browser section. Click Apply. Then enter your comments in the descriptionfield on the Properties tab in Catalog Browser.Note: Please do not randomly modify other properties, we recommend using the default one. Make changes onlyafter you are clear of each property.

Supported Data Types in JReport Designer

In JReport Designer, not all the data types supported by JDBC can be used. The data types that supported in JReportDesigner are: Bit,Tinyint, Smallint, Integer, Bigint, Float, Real, Double, Number, Decimal, Char,VarChar, LongVarChar, Date, Time, TimeStamp, Binary, VarBinary, LongVarBinary, Blob, Clob,Array, nVarChar, and Distinct.

Notes:

For the types Blob, Clob, and Array, you cannot browse data of them in Catalog Browser.• For the type of Distinct, because of the limitation of JDK, the based SQL Type cannot be gotten. So pleaseindicate it manually after you import these types of data.

Index

Tables and Views

Tables and Views are mapped objects of tables and views in the raw database that a connection refers to.

Mapped objects have mapped names that are probably different from their names in the raw database. A catalog storesthe information about the real tables/views mapped, such as the name, qualifier, and owner, etc.

Since tables/views are only mapped objects, they could be mapped and remapped. That is, the information of the realtables/views stored in a catalog is changeable. This is useful when you are offline from the database, you can still seethe table structure and make reports. In addition, when changing the connection, say from an Access database to anInterbase, you only need to re−map all the tables/views in the catalog rather than creating a new catalog.

Table and View Properties

Expand Connection | Table, and right click one table or view, you will see its properties:

Data Information Properties:

TableName: Real table name from the raw database.• Owner: Table schema (may be null) from the raw database.• Qualifier: Table catalog (may be null) from the raw database.•

JReport Objects

6

Page 15: JReport Designer - User Referencespecifies the driver such as JDBC driver (for JDBC) or the Data Source name (for JDBC−ODBC bridge), the user ID and the password for connecting to

Other Properties

Name: The mapped table name in JReport Catalog. Say you added Customers table a second time, it will begiven mapped name Customers1, but its actual TableName is still Customers. You can modify the mappedname. To modify the name, you should first go to File | Options menu item. On the Advanced tab, uncheckthe option Forbid editing the data objects properties in the Catalog Browser section. Click Apply. Then,double click the connection on the Data Tab and enter the string. But this is not recommended since the reportsmade from it will not work until you also remap the fields in the report.

TableType: Table type. Typical types JReport supports are "TABLE", "VIEW", "SYSTEM TABLE" and "ALIAS". • Description: Explanatory comment on the table. It is a place to enter your own descriptions, comments,memos. To enter the description, you should first go to File | Options menu item. On the Advanced tab,uncheck the Forbid editing the data objects properties option in the Catalog Browser section. Click Apply. Then enter your comments in the description field on the Properties tab in Catalog Browser.

Notes: 1.Some databases may not return information for all tables. 2. Please do not randomly modify the properties,especially TableName.

Table and View Fields

These are the mapped versions of database fields. More specifically, the mapped objects of columns in the rawdatabase that the table/view refers to. We will refer to the fields of a table/view in the catalog as DB−Fields. Fields storeinformation (such as column name, SQL type etc.) about the real columns they map to. Fields can also be mapped andremapped.

Table and View Fields Properties

Data Information Properties:

DisplayWidth: The display width of a DBField, formula and summary.• ColumnName: Real column name from the raw database.• Precision: A column's number of decimal digits.• SQLType: SQL type from java.sql.Types like Array, Char, Date etc.• Scale: Column's number of digits to the right of the decimal point.• Nullable: Nullability of values in the designated column.• Currency: Control SQL Type of the formulas or summaries in which the BigDecimal type fields are imported. The value can be 1 or 0. When it is 1, the formula or summary which is built with the BigDecimal type field willbe BigDecimal type, its SQL Type value will be set to be 3. When it is 0, the normal data type will be used forthe formula or summary.

Reference Notes:

For the display format of the BigDecimal type DBField, formula or summary, refer to User Reference | ReportingFeature | DBField/Formula/Summary

For more information about how to modify the properties, see User's Guide | Starting a Catalog | Operating aCatalog.

java.sql.ResultSetMetaData, java.sql.DatabaseMetaData, java.sql.Types.•

Other Properties

Name: Mapped column name in JReport catalog.• Description: Explanatory comments on the column.•

JReport Objects

7

Page 16: JReport Designer - User Referencespecifies the driver such as JDBC driver (for JDBC) or the Data Source name (for JDBC−ODBC bridge), the user ID and the password for connecting to

Query

Relational databases typically contain many rows of data, with each row constituting a separate record. Most relationaldatabase queries retrieve only a portion of the records contained in a table. The WHERE clause qualifies the querycommand statement to limit the data to specific rows in tables.

You use queries to view, change and analyze data in different ways. JReport helps build various professional reportsbased on queries. Therefore, you must first make a query: place criteria or restrictions on the data. For example,instead of viewing all the customers of your company, you can view just customers from Japan. To do this, you specifythe conditions that limit the results to records whose Country field is "Japan".

Query is a higher−level object in a catalog. Its concept is similar to that in the database. The working objects a querycan select include table/view (DB−Field), formula or summary as well as parameters. The tables/views it can selectfrom are mapped tables/views defined in JReport Catalog. So a query is also independent from the raw database.

For connecting with DBMS via JDBC driver or JDBC−ODBC bridge, you can develop reports on query. A query can bebuilt using the interactive query designer provided. For those who wish to write their own SQL statements, they can putthe SQL statements in a file and load these SQL statements from the file.

Query Properties

Share: Specify whether to share the query.• MaxRows: Limit the record number.• MaxDuration: Limit the run time.• Name: Query name, it is the identity of the query.• Description: Explanatory comments on the query.•

Stored Procedure

A stored procedure is a compiled program, consisting of one or more statements and is saved into a database. Thestatement in the stored procedure can be a SQL statement or a control flow statement (like If−else statement, Loopstatement). The stored procedure is stored in the DBMS, so it can be called locally or remotely.

As a program, a stored procedure can take parameters. There are three types of parameters: IN, OUT and INOUT. The IN parameter lets you pass values to the procedure. The OUT parameter will return values to the caller. TheINOUT parameter enables you to pass initial values to the procedure and return the updated value to the caller.

A stored procedure can use the following ways to return data.

Return a result set • Return a value • Return values via OUT parameters •

Apart from tables and views in a database, JReport also supports stored procedures. you can create, design and run areport on the result set returned by a stored procedure.

In JReport system, a report is based on a data set. JReport will generate report on the data in the data set when areport is running. When a report uses a query, the data set is the result of the query. In the same sense, when a reportuses a stored procedure, the data set is the result set returned by the stored procedure.

The stored procedure can return a value, single result set or multiple result sets. Currently JReport supports the storedprocedure that returns a single result set, if a stored procedure returns more than one result set, the first result set will beused in JReport.

JReport Objects

8

Page 17: JReport Designer - User Referencespecifies the driver such as JDBC driver (for JDBC) or the Data Source name (for JDBC−ODBC bridge), the user ID and the password for connecting to

Stored Procedure Properties

ProcedureName: Procedure name in the raw database.• Owner: Procedure schema.• Qualifier: Procedure catalog.• Name: Identifier for the stored procedure in the catalog.• Description: Explanatory comments on the procedure.•

Stored Procedure Field Properties

Column Name: Column/parameter name.• Name: Mapping column name in JReport catalog. • Precision: Number of decimal digits.• Scale: Number of digits to the right of the decimal point.• Length: Length in bytes of data. • Nullable: Whether it can contain NULL.• SqlType: SQL type from java.sql.Types like Array, Char, Date etc.•

Reference Note: User's Guide | Using Stored Procedure to Build Reports

File Query

For connecting with DBMS via JDBC driver or JDBC−ODBC bridge, you develop a report on one query. A query can bebuilt using the interactive query designer provided. For those who wish to write their own SQL statements, they can putthe SQL statements in a file and load these SQL statements from the file. The first difference for Query and File Queryis that a query is based on tables/views added from the raw database. In other words, if you only set up the connection,but have not added tables or views into the catalog, you are not allowed to build a query. But after you set up theconnection even if you have not added the tables or views, you can import your file query into the catalog, and makereports on it. The second difference is that queries built using the interactive query designer can work with othertables/views when you create or modify a working set. That is, if you design a report using interactively created queries,you can add additional objects from tables/views into the working set afterwards. But when you design a report using aquery that is loaded from a query file, you can only use the contents already included in the SQL file. Therefore, pleasemake sure that you have included all required fields in the query file.

Creating/Editing a File Containing a SQL Statement

Usually, you can save the file containing the SQL statement as a plain text file .txt. The SQL statements here supportSQL 92 standard and for different database, it may vary accordingly. The basic statement are:

SELECT...FROM...WHERE

Nested query is also supported.

File Query Properties

Name: Query name, it is the identity of the query.• Description: Explanatory comments on the query.•

File Query Fields Properties

Data Information Properties:

ColumnName: Real column name from the raw database.• Precision: A column's number of decimal digits.• SQLType: SQL type from java.sql.Types like Array, Char, Date etc.•

JReport Objects

9

Page 18: JReport Designer - User Referencespecifies the driver such as JDBC driver (for JDBC) or the Data Source name (for JDBC−ODBC bridge), the user ID and the password for connecting to

Scale: Column's number of digits to the right of the decimal point.• Nullable: Indicate the nullability of values in the designated column.•

Other Properties:

Name: Mapped column name in JReport catalog.• Description: Explanatory comments on the column.•

Formula (Summary)

Formulas and Summaries are objects to be computed at run time, and allow you to manipulate field data by performingcalculations on it, controlling what data is displayed, and even creating new data not directly available from a database. A summary is a special formula.

A formula is a symbolic statement of the manipulations you want to perform on certain data before it is printed on yourreport. If your report is to contain a @Sales field and a @Cost field, for example, you may want to create a@GrossProfit formula and designate its value as @Sales − @Cost. @GrossProfit is a simple formula that tells JReportto subtract the value of the @Cost field from the value of the @Sales field and then to print the result. Formulas can beused to calculate numeric values, compare one value to another and select alternative actions based on the comparison,join multiple text strings into a single string, and for other purposes.

Reference Note: User's Guide | Writing and Using Formulas

Working Objects

Formulas can work on the following objects: DB−Fields, summaries, parameters, special fields and existing formulas.

Formula Properties

Name: Formula name.• Precision: A column's number of decimal digits.• SQLType: SQL type from java.sql.Types like Array, Char, Date etc.• Scale: Number of digits to the right of the decimal point for the formula value.• Expression: Whole statement for the formula.•

Summary

Summaries allow you to generate a count, average, sum, standard deviation and other features for your data. TheSummary functions are based on how you do the grouping. In other words, you group your data according to Country,and you will get two groups, say US and Canada. Now, you specify to perform a summary break by Country group. Youwill get the summary result for each group.

A summary is a special kind of formula. Summary function can also be realized with formula functions. Since it iscommonly used in a report, we provide the easy−to−use GUI.

JReport Objects

10

Page 19: JReport Designer - User Referencespecifies the driver such as JDBC driver (for JDBC) or the Data Source name (for JDBC−ODBC bridge), the user ID and the password for connecting to

Working Objects of Summary

Summary is a special formula, but it is often used for DB−Field or an existing formula.

Break By

When you perform the summary for a field, e.g. count on CustomerID to get the total number of customers, you will beinterested in how many customers are in the US, or how many customers there are total. We need to give the range thesummary will be performed for, within a country or for the whole report. This is the break by field. Usually, they are thefields by which you group your data. Say you group on Country, and you can perform Count on CustomerID within eachCountry group, then you will get the count number for each group. If you specify Count on CustomerID for the wholereport, then you will get the count number at the end of the report.

This will bring up an issue for summaries − they have the concept of level. If the summary is of group level, it can beinserted in the GroupHeader/GroupFooter section. If it is of report level, then it should be inserted in theReportHeader/ReportFooter section.

Summary Functions

These functions allow you to create a summary for a selected field.

Count:Total count of all the values in a field. The value will be shown in the Group Footer.For example, if you have six fields in a group, the value is generated by Count will be 6.

Sum: This function sums up all the numerical values in a field. The value will be shown in the GroupFooter section.For example, if a field contains 5, 10, 15, 20 and 25, the Sum function will get 75.

Minimum: This function finds the smallest numerical value in a field. The value will be shown in the GroupFooter section.

JReport Objects

11

Page 20: JReport Designer - User Referencespecifies the driver such as JDBC driver (for JDBC) or the Data Source name (for JDBC−ODBC bridge), the user ID and the password for connecting to

For example, if a field contains 5, 10, 15, 20, and 25, the Minimum function will be 5.Maximum: This function finds the largest numerical value in a field. The value will be shown in the GroupFooter section.For example, if a field contains 5, 10, 15, 20, and 25, the Maximum function will be 25.

Average: This function takes the average of all the numerical values in a field. The value will be shown in theGroup Footer section.For example, if a field contains 5, 10, 15, 20, and 25, the Average function will be 15.

Distinct Count: This function takes a total count of all the distinct fields in a report. This value will be shown inthe Report Footer section.For example, if you have forty three fields in your report and three fields have identical values, the valuegenerated by the Distinct Count will be 41.

Population Standard Deviation: This function uses the following equation to compute its value. PSD takes thesquare root of the Population Variance.

Standard Deviation: This function uses the following equation to compute its value. SD takes the square root ofthe Variance.

Population Variance: This function uses the following equation. PV sums up the square of the differencebetween a value and its average and divides it by the total number of values.

Variance: This function uses the following equation. Variance sums up the square of the difference between avalue and its average and divides it by the total number of values subtracted by one.

Summary Properties

FieldName: Field on which the summary performs.• Name: Summary name.• GroupByField: Criteria (break−by group) the summary will be performed.• Expression: Since a summary is a formula in nature, here is the statement of the summary just like a formula.•

Parameter

A Parameter is a variable whose value is an input value at run time. You will always need to specify a parameter whenrunning a report. For example, each time the report is run, the editor for the report would like to have his/her nameplaced in the report header section. You simply insert a parameter directly in the report, and each time you run thereport, insert the value for the editor's name.

JReport Objects

12

Page 21: JReport Designer - User Referencespecifies the driver such as JDBC driver (for JDBC) or the Data Source name (for JDBC−ODBC bridge), the user ID and the password for connecting to

Or you may want to input order date as an input parameter when running a report so that only orders on that date will bedisplayed. That is, parameters can be used as part of the query condition (search criteria) so that only records satisfyingthat parameter value are retrieved. In addition, JReport parameters can also be used for Dynamic group or sort.

Reference Note: User's Guide | JReport Parameter and its Applications.

Parameter Properties

Data Information Properties:

Type: Type for the parameter value, we support Integer, Number, String, Currency, Boolean, Date, Time,DateTime.

Value: Default value for the parameter. • UserFormat: User define format for the parameter value at report run time. For example, you define aparameter of Date type. We recognize the following formats: M/d/yy; MMM d, yyyy; MMMM d, yyyy; EEEE,MMMM d, yyyy. But if you want to enter a value like 1996.July.10, so you should specify the user defined formatas yyyy.MMMM.d. But remember it is the entering format, not the display format. To customize the displayformat, go to its Format property in Report Inspector, enter your customized display format as yyyy.MMMM.d. Then when you enter 1996.July.10, it will be displayed as 1996.July.10. Reference Note: The letters standing for year, month etc. are case sensitive and should follow the standard ofJDK java.text.DateFormat, java.text.NumberFormat etc.

Limit: For the default value you will specify for your parameter, we also give the choice of specifying theminimum and maximum value. This will list the range for the two values.

Other Properties:

Name: Parameter name. It is identity of the parameter, since when you hope to assign a different value for theparameter, you will use it as an identity.

PromptText: Prompting text for your information. You may leave this to be empty while defining the parameter.•

User Defined Format for Parameter

How does one define user format for different types of parameters? The most commonly used are Date, Time format asintroduced above.

Date Format SyntaxTo specify the time format, use a time pattern string. In this pattern, all ASCII letters are reserved as pattern letters,which are defined as follows:

Symbol Meaning Presentation Example

G era designator Text AD

y year Number 1996

M month in year Text & Number July & 07

d day in month Number 10

h hour in am/pm (1~12) Number 12

H hour in day (0~23) Number 0

m minute in hour Number 30

JReport Objects

13

Page 22: JReport Designer - User Referencespecifies the driver such as JDBC driver (for JDBC) or the Data Source name (for JDBC−ODBC bridge), the user ID and the password for connecting to

s second in minute Number 55

S millisecond Number 978

E day in week Text Tuesday

D day in year Number 189

F day of week in month Number 2 (2nd

Wed in July)

w week in year Number 27

W week in month Number 2

a am/pm marker Text PM

k hour in day (1~24) Number 24

K hour in am/pm (0~11) Number 0

z time zone Text Pacific Standard Time

' escape for text

'' single quote

Notes:

The count of pattern letters determine the format. 1. Text: 4 or more pattern letters−−use full form, < 4−−use short or abbreviated form if one exists. 2. Number: the minimum number of digits. Shorter numbers are zero−padded to this amount. Year is handledspecially; that is, if the number of letter 'y' is 2, the year will be truncated to 2 digits.

3.

Text & Number: 3 or over, use text, otherwise use number. 4. Any characters in the pattern that are not in the ranges of ['a'..'z'] and ['A'..'Z'] will be treated as quoted text. Forinstance, characters like ':', '.', ' ', '#' and '@' will appear in the resulting time text even they are not embracedwithin single quotes.

5.

A pattern containing any invalid pattern letter will result in a thrown exception during formatting or parsing. 6.

Examples Using the US locale:

Format Pattern: "yyyy.MM.dd G 'at' hh:mm:ss z"Result: 1996.07.10 AD at 15:08:56 PDT

Format Pattern: "EEE, MMM d, ''yy"Result: Wed, July 10, '96

Format Pattern: "h:mm a"Result: 12:08 PM

Format Pattern: "hh 'o''clock' a, zzzz"Result: 12 o'clock PM, Pacific Daylight Time

JReport Objects

14

Page 23: JReport Designer - User Referencespecifies the driver such as JDBC driver (for JDBC) or the Data Source name (for JDBC−ODBC bridge), the user ID and the password for connecting to

Format Pattern: "K:mm a, z"Result: 0:00 PM, PST

Format Pattern: "yyyyy.MMMMM.dd GGG hh:mm aaa" Result: 1996.July.10 AD 12:08 PM

Decimal Number Format Syntax

Symbol Meaning Notes

0 a digit

* a digit, zero shows as a star Can't mix 0, *, and _ in sameformat

_ a digit, zero shows as a space Can't mix 0, *, and _ in sameformat

# a digit, zero shows as absent

. placeholder for decimal separator

, placeholder for grouping delimiter Shows the interval to be used

; separates formats positive and negative.

− if there is no explicit negative sign, − is prefixed "0.00" −> "0.00;−0.00"

% divide by 100 and show as percentage

X any other characters can be used in the prefix orsuffix

Index

JReport Objects

15

Page 24: JReport Designer - User Referencespecifies the driver such as JDBC driver (for JDBC) or the Data Source name (for JDBC−ODBC bridge), the user ID and the password for connecting to

User Data Source API

Introduction

As a database application, JReport Designer can access data stored in a database through the JDBC connection. Now,through User Data Source API, JReport Designer can also access data from an external data source, such as a text file,Lotus Notes etc., which is not stored in a database, or no JDBC driver is available.

The UDS API is a part of JReport Data Access Model as shown in this diagram:

The User Data Source API

is a Java interface that provides data set to JReport. • has a PARAMETER string, which can be changed when the UDS object is added into JReport Designer. Theresult set may be different according to the PARAMETER string. It is very flexible and convenient for users.Note: The PARAMETER here is the parameter string given to UDS interface. That is, UDS API provides afunction getResultSet(String strParam), and PARAMETER is String strParam in the above function. Reading thefollowing topics about UDS API will make the information more clear. As a reminder, this is different from theparameter object in JReport catalog. To distinguish them, we used upper case PARAMETER to refer to theParameter string in UDS and lowercase parameter for parameter object in Catalog.

User Data Source API

To design a report, JReport needs a meta data (See java.sql.ResultSetMetaData) corresponding with the ResultSet thatthe data source has returned; to view or run a report, JReport needs a ResultSet object. The User Data Sourcemust provide both of the two parts for JReport.

The UDS API has an interface that you must implement: jet.datasource.JRUserDataSourceThe class definition may be like this:

import jet.datasource.*; public class UserUDS implements JRUserDataSource { // Class body.

16

Page 25: JReport Designer - User Referencespecifies the driver such as JDBC driver (for JDBC) or the Data Source name (for JDBC−ODBC bridge), the user ID and the password for connecting to

}

See also : JReport Javadoc jet.datasource.JRUserDataSource class. You can go tohttp://www.jinfonet.com/webpage/kbase/kbase.htmto browse the online Javadoc.

1. jet.datasource.JRUserDataSource

The interface has two methods:

public java.sql.ResultSet getResultSet(String strParam) throws JRUserDataSourceExceptiongets the result set for user data source.

PARAMETER: strParam − A String value used to request and get different result sets. The format of theparameter string is defined by yourself and also parsed by yourself.Return: java.sql.ResultSet − A row and column data set that can be used in JReport.Throws: JRUserDataSourceException − If a database access error occurs.

When you provide a java.sql.ResultSet instance, to diminish you work, you don't need to implement all methodsof java.sql.ResultSet. You can just extend abstract class jet.datasource.JRResultSet. If you specify the columninformation, including SQL data type, precision etc, you do not need to provide a ResultSetMetaData instance,and JReport will not invoke getMetaData() function of ResultSet. But, if you don't specify the information, youmust implement the getMetaData() function and provide a ResultSetMetaData instance. The choice is included inthe Add User Data Source dialog:

strParam − A String value is used to request and get different result sets. The format of the parameter string isdefined by yourself and also parsed by yourself. You will have a chance to enter PARAMETER string when youadd the UDS to JReport.

User Data Source API

17

Page 26: JReport Designer - User Referencespecifies the driver such as JDBC driver (for JDBC) or the Data Source name (for JDBC−ODBC bridge), the user ID and the password for connecting to

If you want to use parameters pre−defined in Catalog Browser, you can add @paraName into the PARAMETERstring. For example:If your parameter string is "File=d:\data\Address.txt", and you need to change the file name while running thereport, then you should:

first: Create a new parameter in the catalog:

User Data Source API

18

Page 27: JReport Designer - User Referencespecifies the driver such as JDBC driver (for JDBC) or the Data Source name (for JDBC−ODBC bridge), the user ID and the password for connecting to

Give the parameter a default value, or leave it empty.

second: Enter the PARAMETER string as File=@fileName, here, @fileName is a parameter pre−defined inCatalog Browser.

third: When you view the report, a dialog will pop up to enter the parameter value, for examplec:\test\Address.txt. We will use the value (If you do not enter the value, the default one will be used) to replace@fileName to run the report.

Parsing Rule the PARAMETER string

Keep in mind our parsing rules for the PARAMETER string while you give the PARAMETER stringa. The characters used for parameter name can be any character defined in the key board, except quotationmarks.b. Parameter name is introduced with @, and sometimes colon : is also recognized as an introducer.c. When your PARAMETER string contains the character like @, "", : or other string which need NOT to beparsed by JReport, you should then quote the whole string with quotation marks, so that they will not be parsedas the beginning mark of a parameter name.

Example:jdbc:oracle:thin:@204.177.148.30:1521:orclHere, '@' is a character used by the URL. If you add this PARAMETER string, '204' will be considered to be thename of a parameter in a catalog. So the correct form is:"jdbc:oracle:thin:@204.177.148.30:1521:orcl"Orjdbc:oracle:thin:"@"204.177.148.30:1521:orclpublic void releaseResultSet() throws JRUserDataSourceExceptionFrees the ResultSet object.

Throws:

User Data Source API

19

Page 28: JReport Designer - User Referencespecifies the driver such as JDBC driver (for JDBC) or the Data Source name (for JDBC−ODBC bridge), the user ID and the password for connecting to

JRUserDataSourceException − if there are some errors when freeing the resource.

2. jet.datasource.JRUserDataSourceException

The Exception provides information about a data source error.

Constructor:

public JRUserDataSourceException(String strError)

UDS Cases

User Data Source API is flexible and convenient to use. Before you implement it, make an overall consideration of thearchitecture. We provide several scenarios using JReport UDS API, you may refer to them.

You can return a ResultSet through JDBC API

Reference Note: SQLDataSource example in the User's Guide | Developing Reports from User Data Source.

When there is no JDBC driver available for an external data source (for example, a comma−delimited text file),you can create a ResultSet object to return the data to the requesting report.

Reference Note: AddressList example in the User's Guide | Developing Reports from User Data Source.

Oracle Stored Procedure User Data Source (UDS)

Reference Note: Applying UDS to Oracle stored procedures in the User's Guide | Developing Reports fromStored Procedures.

UDS Object Properties

After a UDS is added to JReport Catalog, right click the UDS and select Property, you will see all its properties:

Name: It is the identity of the UDS, you can modify it as you like. We will give it a default name which is the sameas the connection URL. To modify the name, double click the connection on the Data Tab and enter the string.

ClassName: The class name text box is a place where you can input the full name (including the package name)of the class represented by the UDS.The class should be in the classpath in the system environment and the batch file starting JReport.

Description: It is a place to enter your own descriptions, comments, memos. To enter the description, youshould first go to File | Options menu item. On the Advanced tab, uncheck the Forbid editing the data objectsproperties option in the Catalog Browser section. Click Apply. Then enter your comments in the description fieldon the Properties tab in Catalog Browser.

Parameter: It is the PARAMETER string you specified when you added the UDS to the catalog. • SpecifyMetaData: If true, it means you specified the column definitions. If false, it means that you did not specifythe column definitions, but you specified it in your java file, and JReport will retrieve them from theResultSetMetaData.

UDS Field Properties

You specify the column information in the GUI, including SQL data type, precision etc or you provide aResultSetMetaData instance, and JReport will not invoke getMetaData() function of ResultSet, in either case, we will getthe meta data of the result set. Like the table meta data, we will also use them to generate a table−like two dimensionalsheet. Like each column in a database has its properties, in Catalog Browser, you will see the basic properties for theUDS fields.

Column Name: The actual column name as described in your ResultSetMetaData. • Name: The mapping column name in JReport catalog. In other words, if you copy+paste the UDS another time,•

User Data Source API

20

Page 29: JReport Designer - User Referencespecifies the driver such as JDBC driver (for JDBC) or the Data Source name (for JDBC−ODBC bridge), the user ID and the password for connecting to

then each column mapping name of the second copy in the catalog will be different for unique identification. Precision: A column's number of decimal digits. • Scale: Column's number of digits to the right of the decimal point. • Length: Column size. For char or date types this is the maximum number of characters, for numeric or decimaltypes this is precision.

Nullable: Indicates the nullability of values in the designated column. • Radix: Radix (typically either 10 or 2) • SqlType: SQL type from java.sql.Types like Array, Char, Date etc.•

Reference Note: java.sql.ResultSetMetaData, java.sql.DatabaseMetaData, java.sql.Types.

Index

Index

User Data Source API

21

Page 30: JReport Designer - User Referencespecifies the driver such as JDBC driver (for JDBC) or the Data Source name (for JDBC−ODBC bridge), the user ID and the password for connecting to

Hierarchical Data Source

Introduction

As a database application, JReport Designer do not only access data stored in a database through the JDBC connectionand User Data Source (UDS), but support to import data from Hierarchical Data Source (HDS).

The HDS API is a part of JReport Data Access Model as shown in this diagram:

The Hierarchical Data Source API

is a Java interface that provides a data set to JReport.• has a PARAMETER string, which can be changed when the HDS object is added into JReport Designer. Theresult set may be different according to the PARAMETER string. It is very flexible and convenient for you.

Note: The PARAMETER here is the parameter string given to HDS interface. That is, HDS API provides amethod getResultSet(String strParam), and PARAMETER is String strParam in the above method. After readingthe subsequent information on HDS API, it will become clearer to you. We just remind you that PARAMETERhere is different from that in JReport Catalog. To distinguish them, we used upper−case PARAMETER to refer tothe parameter string in HDS and lowercase parameter for a parameter object in a catalog.

Hierarchical Data Source API

To design a report, JReport needs a meta data (See java.sql.ResultSetMetaData) corresponding with the ResultSet thatthe data source has returned; to view or run a report, JReport needs a ResultSet object. The Hierarchical Data Sourcemust provide both of the two parts for JReport.

The HDS API contains three interfaces that you must implement:

jet.datasource.JRHierarchicalDataSource − Provides data for JReport for generating reports.JRHierarchicalDataSource class is developed by the user of JReport,and it can provide data from flat file, non−relational database, orapplication data. The data returned by this class is inJRHierarchicalDataset object, so the user needs to create

22

Page 31: JReport Designer - User Referencespecifies the driver such as JDBC driver (for JDBC) or the Data Source name (for JDBC−ODBC bridge), the user ID and the password for connecting to

JRHierarchicalDataset instance and JReport will use the instance tofetch data. User can also creating their own JRHierarchicalDatasetclass.

jet.datasource.JRHierarchicalDataset − Provides data for JReport for generating reports.JRHierarchicalDataset class is developed by the user of JReport, and itcan provide data from flat file, non−relational database, or applicationdata.

jet.datasource.JRHierarchicalDatasetMetaData − Provides meta data for JRHierarchicalDataset.JRHierarchicalDatasetMetaData class is developed by the user ofJReport, and it will work together with JRHierarchicalDataset.

The class definition may be like this:

import jet.datasource.*; public class UserHDS implements JRHierarchicalDataSource { // Class body. }

See also : JReport Javadoc jet.datasource.JRHierarchicalDataSource class. You can go tohttp://www.jinfonet.com/webpage/kbase/kbase.htm to browse the online Javadoc.

1. jet.datasource.JRHierarchicalDataSource

The interface has two methods:

public JRHierarchicalDataset getHierarchicalDataset(String param) throws JRUserDataSourceException

Gets the data in JRHierarchicalDataset according to the parameters.

PARAMETER: param − A String value used to request and get different result sets. The format of the parameterstring is defined by yourself and also parsed by yourself.Return: JRHierarchicalDataset object, which implements the interface JRHierarchicalDataset.Throws: JRUserDataSourceException − If a data access error occurs.

The method getHierarchicalDataset() returns an object which implements the interface JRHierarchicalDataset.

public void releaseHierarchicalDataset() throws JRUserDataSourceException

Releases the data and related resources.

Throws:JRUserDataSourceException − if a data access error occurs.

2. jet.datasource.JRHierarchicalDataset

The interface provides the following methods:

public interface JRHierarchicalDataset{/*** Retrieves the number, types and properties of this object's leaves*/public JRHierarchicalDatasetMetaData getMetaData();

/*** Moves the cursor down one row from its current position in the current node.

Hierarchical Data Source

23

Page 32: JReport Designer - User Referencespecifies the driver such as JDBC driver (for JDBC) or the Data Source name (for JDBC−ODBC bridge), the user ID and the password for connecting to

* return true if the new current row is valid; false if there are no more rows in thecurrent node.*/public boolean next(String branchName);

/*** Gets the value of the designated leaf node in the current branch node row as a booleanin the Java programming language.*/public boolean getBoolean(int leafIndex);

/*** Gets the value of the designated leaf in the current branch node row as a byte in theJava programming language.*/public byte getByte(int leafIndex);

/*** Returns the value of the designated leaf in the current branch node row as a short inthe Java programming language.*/public short getShort(int leafIndex);

/*** Returns the value of the designated leaf in the current branch node row as an int inthe Java programming language.*/public int getInt(int leafIndex);

/*** Returns the value of the designated leaf in the current branch node row as a long inthe Java programming language.*/public long getLong(int leafIndex);

/*** Returns the value of the designated leaf in the current branch node row as a float inthe Java programming language.*/public float getFloat(int leafIndex);

/*** Returns the value of the designated leaf in the current branch node row as a double inthe Java programming language.*/public double getDouble(int leafIndex);

/*** Gets the value of the designated leaf in the current branch node row as ajava.math.BigDecimal with full precision.*/public java.math.BigDecimal getBigDecimal(int leafIndex);

/*** Returns the value of the designated leaf in the current branch node row as ajava.sql.Date object

Hierarchical Data Source

24

Page 33: JReport Designer - User Referencespecifies the driver such as JDBC driver (for JDBC) or the Data Source name (for JDBC−ODBC bridge), the user ID and the password for connecting to

* in the Java programming language.*/public java.sql.Date getDate(int leafIndex);

/*** Returns the value of the designated leaf in the current branch node row as ajava.sql.Time object* in the Java programming language.*/public java.sql.Time getTime(int leafIndex);

/*** Returns the value of the designated leaf in the current branch node row as ajava.sql.Timestamp object* in the Java programming language.*/public java.sql.Timestamp getTimestamp(int leafIndex);

/*** Returns the value of the designated leaf in the current branch node row as a String inthe Java programming language.*/public String getString(int leafIndex);

/*** Returns the value of the designated leaf in the current branch node row as an Arrayobject in the Java programming language.*/public java.sql.Array getArray(int leafIndex);

/*** Reports whether the last leaf read had a value of SQL NULL*/public boolean wasNull(int leafIndex);

/*** Releases this object's resource.*/public void close();}

3. jet.datasource.JRHierarchicalDatasetMetaData

The interface provides the following methods:

public interface JRHierarchicalDatasetMetaData{/*** Return root node names*/public String[] getRoot() ;

/*** Return the name of the parent.*/public String getParentName(String name)

Hierarchical Data Source

25

Page 34: JReport Designer - User Referencespecifies the driver such as JDBC driver (for JDBC) or the Data Source name (for JDBC−ODBC bridge), the user ID and the password for connecting to

/*** Return all leaf node names.*/public String[] getLeafNames(String parentName) ;

/*** Return the number of leaves of the specified branch node.*/public int getLeafCount(String parentName);

/*** Return all branch names for the specified parent node.*/public String[] getBranchNames(String parentName) ;

/*** Return the data type of the leaf.*/public int getLeafType(String parentName, String leafName);// throws SQLException;

/*** Return the name of data type.*/public String getLeafTypeName(String parentName, String leafName);

/*** Return the precision of the leaf.*/public int getPrecision(String parentName, String leafName);

/*** Return the scale of the leaf.*/public int getScale(String parentName, String leafName);

/*** Return the nullable state of the leaf.*/public int isNullable(String parentName, String leafName);

/*** Return the currency state of the leaf.*/public boolean isCurrency(String parentName, String leafName);}

HDS Cases

Hierarchical Data Source API is flexible and convenient to use. Before you implement it, make an overall considerationof the architecture. We provide several scenarios using JReport HDS API, you may refer to them.

You can import an XML format hierarchical data source directly from external data source to JReport Designer,using JReport built−in classes.Reference Note : XML Data Source example in User's Guide | Developing Reports from Hierarchical DataSource.

Hierarchical Data Source

26

Page 35: JReport Designer - User Referencespecifies the driver such as JDBC driver (for JDBC) or the Data Source name (for JDBC−ODBC bridge), the user ID and the password for connecting to

You can also develop your own classes to implement the HDS APIs, and then import your customizedhierarchical data source from outside.Reference Note : General Hierarchical Data Source example in User's Guide | Developing Reports fromHierarchical Data Source.

HDS Field Properties

You specify the column information in the GUI, including data type, precision etc. Like each column in a database has itsproperties, in Catalog Browser, you will see the basic properties for the HDS fields.

Element: The actual column name as described in your JRHierarchicalDatasetMetaData. • Selected: Specifies whether this column should be imported to JReport catalog. • Format: Some column may require a certain format definition, let us take the Date type as an example,sometimes you may need to define the date format to meet your own requirement. Just type your format in thisfield, e.g. yyyy−MM−dd.

Type: SQL type from java.sql.Types like Array, Char, Date etc. • Precision: The number of decimal digits of a column. • Scale: The number of digits to the right of the decimal point. • Nullable: Specifies whether the value of this column is null−able. • Currency: Specifies whether the column value is Currency. • Array: Specifies whether the column contains multiple values.•

DBArray DBField in Formula

JReport Designer supports multiple−value field, which contains a set of values in a single field, in formula. Using themultiple value field is the same as using an array in a formula. You can refer to the field with multiple values as a normalfield in a formula, such as @FIELDNAME, and then use the array functions that JReport Designer provides on theFormula Editor to manipulate the values in it. Actually, JReport Designer first converts such a field to a normal array, andthen manipulate it as normal.

For example, normally an array in a formula is manually defined like this,

Integer myArray[4] = [1, 2, 3, 4]; //Datatype ArrayName[ArraySize] = [ArrayContent];

The array may be referred to like this,

integer myInt = 3;myInt in myArray;

If a field, named myField, for example, contains the similar array value, it can be referred to similarly,

integer myInt = 3;myInt in @myField;

Index

Index

The XSD File

When you import the XML format HDS with XSD file, the XML file only provides the data to JReport Designer reports,and the structure, data type and so on of the data from the XML file is defined in the XSD file, that is to say, the structureof the HDS is determined by the XSD file. So it is important to know the following points about the XSD file to generate acorrect report based on the XML format HDS with XSD file.

Hierarchical Data Source

27

Page 36: JReport Designer - User Referencespecifies the driver such as JDBC driver (for JDBC) or the Data Source name (for JDBC−ODBC bridge), the user ID and the password for connecting to

Data Type Conversion Table

Before it can work with JReport Designer, the data type defined in the XSD file should be converted to the correspondingdata type when the XML format hierarchical data source is imported, which follows the rules in the conversion table:

XML Data Type JReport Data Type

SchemaSymbols.ATTVAL_BOOLEAN java.sql.Types.BIT

SchemaSymbols.ATTVAL_INT java.sql.Types.INTEGER

SchemaSymbols.ATTVAL_SHORT java.sql.Types.SMALLINT

SchemaSymbols.ATTVAL_BYTE java.sql.Types.TINYINT

SchemaSymbols.ATTVAL_INTEGER java.sql.Types.INTEGER

SchemaSymbols.ATTVAL_NONPOSITIVEINTEGER java.sql.Types.INTEGER

SchemaSymbols.ATTVAL_NEGATIVEINTEGER java.sql.Types.INTEGER

SchemaSymbols.ATTVAL_NONNEGATIVEINTEGER java.sql.Types.INTEGER

SchemaSymbols.ATTVAL_UNSIGNEDLONG java.sql.Types.BIGINT

SchemaSymbols.ATTVAL_LONG java.sql.Types.BIGINT

SchemaSymbols.ATTVAL_UNSIGNEDINT, //4294967295 java.sql.Types.BIGINT

SchemaSymbols.ATTVAL_UNSIGNEDSHORT, //65535 java.sql.Types.INTEGER

SchemaSymbols.ATTVAL_UNSIGNEDBYTE, //255 java.sql.Types.SMALLINT

SchemaSymbols.ATTVAL_POSITIVEINTEGER java.sql.Types.INTEGER

SchemaSymbols.ATTVAL_FLOAT java.sql.Types.FLOAT

SchemaSymbols.ATTVAL_DOUBLE java.sql.Types.DOUBLE

SchemaSymbols.ATTVAL_DECIMAL java.sql.Types.DECIMAL

SchemaSymbols.ATTVAL_STRING java.sql.Types.VARCHAR

SchemaSymbols.ATTVAL_DATE java.sql.Types.DATE

SchemaSymbols.ATTVAL_TIME java.sql.Types.TIME

SchemaSymbols.ATTVAL_DATETIME java.sql.Types.TIMESTAMP

SchemaSymbols.ATTVAL_HEXBINARY java.sql.Types.LONGVARBINARY

XSD Structure Supported by JReport Designer

In JReport Designer, not all the structure of XSD can be supported. For the structure supported by JReport Designer,please refer to the following diagrams.

The ComplexType•

Hierarchical Data Source

28

Page 37: JReport Designer - User Referencespecifies the driver such as JDBC driver (for JDBC) or the Data Source name (for JDBC−ODBC bridge), the user ID and the password for connecting to

Notes:

1). The type of the Element in the diagram can be simpleType, ref, or complexType (it is different from theComplexType in the root of this diagram. It should be global complexType but can not be the anonymous one. Ifyou have defined a complexType named A, and in this complexType A redefined an element as complexTypenamed B, then the elements belong to complexType B must be the simpleType).

2). The type of Attribute in the diagram should be the anonymous type or the schema built−in type, such asxs:string.The SimpleType

Note:

The SimpleType here should be the schema built−in type, such as xs:string, and the List type here can notsupport some facts, such as minLength, and maxLength.

The Element

Note:

The ComplexType here can include both of global and anonymous compexType.

The anonymous type means you do not give a name to the type, for example,

<xs:element name="aa">

Hierarchical Data Source

29

Page 38: JReport Designer - User Referencespecifies the driver such as JDBC driver (for JDBC) or the Data Source name (for JDBC−ODBC bridge), the user ID and the password for connecting to

<xs:simpleType><xs:restriction base="xs:string"><xs:enumeration value="Julie P. Adams"/></xs:restriction></xs:simpleType></xs:element>

From the code above, you can see that the simpleType in the element aa has no name specified.

The List Type

When you import a List type of data from the XSD file, you can define the delimiter through the propertyValueDelimiter in the Report Inspector. By default, the value of ValueDelimiter is " LF", which means the elements willbe displayed in a horizontal line and separated by a space from each other. If you want them to be separated bycommas, change the property to a comma. If you want them to be shown in a vertical line, keep the default value of theValueDelimiter property, and change the WordWrap property to be true.

Here is an example:

The element Numbers is a List type data, and the Array column is checked automatically.

After you create the report, if you keep the default value of ValueDelimiter, when you view the report, the elements inthe Numbers column will be shown like this:

When change ValueDelimiter to a comma,

When keep the default value of ValueDelimiter and make the WordWrap value to be true,

Hierarchical Data Source

30

Page 39: JReport Designer - User Referencespecifies the driver such as JDBC driver (for JDBC) or the Data Source name (for JDBC−ODBC bridge), the user ID and the password for connecting to

Index

Index

Hierarchical Data Source

31

Page 40: JReport Designer - User Referencespecifies the driver such as JDBC driver (for JDBC) or the Data Source name (for JDBC−ODBC bridge), the user ID and the password for connecting to

JReport Formula

Formula Syntax

JReport formula syntax is a syntax with simple flow control and other statements. The large Formula Editor panel is theplace where you write your formula statements. You should follow JReport formula syntax to write formulas.

In this syntax, sequence and selection control structure are supported. You can use it to control the execution of thestatements. In this syntax, a parameter can be used as variable, and its value can be used in computation or makingdecisions. Since the value of the parameter is input before the report is run, the report can respond to the user input andgenerate different results.

Reference Note: If you want to define your own functions by using Java language, please refer to User's Guide | JReportFormulas.

Statements

The statement is the smallest executable unit in the syntax. A SQL procedure is a sequence of statements. Statementsare separated by semicolon (;). There are many kinds of statements, such as declare statement, expression statement,assignment statement, if−else statement, return statement etc.

Declare StatementThe declare statement is used to declare variables.

Syntax:VariableType VariableNameExample: String sql;This statement declares a local String type variable called sql.

Syntax: global VariableType VariableNameExample: global integer i;This statement declares a global Integer type variable called i.

Expression StatementThe expression statement is used to calculate the value of an expression.

Assignment StatementThe assignment statement is used to calculate the expression on the right side of assignment operator andassign the value to the variable on the left side.

Syntax: Variable = Expression The type of value of expression must be compatible with the type of the variable.Example: total = amount * price

In this example, where the total, amount and price are declared variable. This statement calculate the "amount *price" and assign the value to "total".

If − Else StatementThe if−else statement provides conditional control of an action. Normally, the statements are executed one byone sequentially. The if−else statement enables alternative actions depending on the evaluation result of theexpression.

Syntax:if (expression){ statement(s)}or

32

Page 41: JReport Designer - User Referencespecifies the driver such as JDBC driver (for JDBC) or the Data Source name (for JDBC−ODBC bridge), the user ID and the password for connecting to

if (expression){statement(s)}else{statement(s)}

Where, the expression must be a logical expression and have a boolean value. The if clause checks thecondition presented by the logical expression. If the condition is true, the statement following the if will beexecuted. Otherwise, the statement following the else will be executed.

Example: If (score >= 60){result = "PASS";}else{return = "FAIL";}

In this example, if the score is greater than or equals to 60, the result is pass, otherwise the result is fail. Return StatementThe return statement is used to stop the execution of procedure and return a value if need. The return statementis the last statement executed.

Syntax: return or return expression; The expression will be calculated before the procedure returns.

Example: return results;

For StatementThe For statement provides a compact way to iterate over a range of values.

Syntax:for (initialization; termination; increment) {statement}

or

for (initialization; termination; increment) statement

The initialization is an expression that initializes the loop − it's executed once at the beginning of the loop.The termination expression determines when to terminate the loop. This expression is evaluated at the top ofeach iteration of the loop. When the expression evaluates to false, the loop terminates. Finally, increment is anexpression that gets invoked after each iteration through the loop. All these components are optional.

While StatementThe While statement is used to continually execute a block of statements while a condition remains true.

Syntax:while (expression) do {statement}

JReport Formula

33

Page 42: JReport Designer - User Referencespecifies the driver such as JDBC driver (for JDBC) or the Data Source name (for JDBC−ODBC bridge), the user ID and the password for connecting to

Or

while(expression) do statement

First, the while statement evaluates expression, which must return a boolean value. If the expression returnstrue, then the while statement executes the statement(s) associated with it. The while statement continuestesting the expression and executing its block until the expression returns false.

JReport Designer provides another statement that is similar to the while statement − the do−while statement.

syntax: do {statement(s)} while (expression);

Or

do statement while(expression)

Instead of evaluating the expression at the top of the loop, do−while evaluates the expression at the bottom.Thus the statements associated with a do−while are executed at least once.Select StatementThe select statement is used to conditionally perform statements based on the value of a variable.

Syntax:select (variable name){ case expression_1: statementcase expression_2: statement ...

default: statement};

The statement in each should be a single statement or multi−statement (compound statement). Whenmulti−statement is used, they must be enclosed by {}.

Example:integer i=0, j=0;

select ( i ){case j: // the case expression is another variablei=100

case 100: // the case expression is a constant, and the case statement is acompound statement{i=i+1;j=j+2}

default:200};

JReport Formula

34

Page 43: JReport Designer - User Referencespecifies the driver such as JDBC driver (for JDBC) or the Data Source name (for JDBC−ODBC bridge), the user ID and the password for connecting to

Expression

The expression is a combination of values, operators and functions, that produces a result. The value in the expressioncan be a literal value or a variable; the operator defines the operation between values; the function is used to perform anaction and return a value.

Value

The value specified in an expression can be a literal value or a variable value. JReport formula syntax supports sevendata types of value:

Numeric• Currency• Boolean• String• Date• Time• DateTime•

Reference Notes: For detailed information about each data type, please refer to User Reference | Formula Syntax | DataType.

Literal ValueThe Literal Value is a value that is used exactly as it is displayed. A literal value represents a value such as a number,string, or date. For example, "Name", 98.6...

VariablesA variable is a named storage unit used to store a value. The identifier (name) of variable can be used to refer to thevalue of the variable or refer to the storage space of the variable. In an expression, the identifier is used to refer to thevalue, and in assignment statement, the identifier on the left is used to refer to the storage space.

Undeclared Variables: The undeclared variables include parameter, DBfield, special field and summary definedin the catalog. They can be used as a variable in a formula.

Declared Variables: Another type of variable which must be declared in a declare statement before using. Thedeclared variable is a real variable; it can be assigned in the assignment statement. There are two kinds ofdeclared variables:Local Variable: Variable which is only valid in the formula where it is declared.Global Variable: Variable which is valid in all the formulas once it is declared.

Operator

An operator is a symbol that indicates an operation to be performed on values. The JReport procedure language hasseveral classes of operators, including math, comparison and logical operators. For detailed information about operator,please refer to User Reference | Formula Syntax | Operators in this chapter.

Function

The function returns a value as the result. JReport formula syntax provides many built−in functions. Please refer to UserReference | Formula Syntax | Built−in Functions for detailed information about function.

Improving Performance When Special Fields are Used in Formulas

In JReport Designer, some special fields can be used in formulas, they are User Name, Print Date, Print Time,Fetch Date, Fetch Time, Modified Date, Modified Time, Record Number, and Page Number. All thereferencable special fields are divided into two types according to the time their values are ready. The types are pagelevel and constant level.

JReport Formula

35

Page 44: JReport Designer - User Referencespecifies the driver such as JDBC driver (for JDBC) or the Data Source name (for JDBC−ODBC bridge), the user ID and the password for connecting to

Page LevelThe value of the special field will be ready at the time when the report result is generated. So the page−level specialfields include: Fetch Date, Fetch Time, Record Number, and Page Number.

Constant LevelThe value of the special field will be ready at any time before the engine runs. So the constant−level special fieldsinclude: User Name, Print Date, Print Time, Modified Date, and Modified Time.

In the previous versions of JReport Designer, as long as special fields are used in a formula, the formula is considered tobe a page−level formula, and it will be calculated more than one time and filtered at the local machine. Therefore, theperformance is slowed down. Now, the formula in which the constant−level special fields are used, is treated asconstant−level formula, in this case, this formula will be calculated only one time, as a result, the performance isimproved.

Data Type

Type Description

Numeric

Integer

int32−bittwo'scomplement

Defines a field containing a whole numberbetween −2,147,483,648 and2,147,483,647. Fractional values insertedinto an integer field are truncated. Ifspecified as NOT NULL WITH DEFAULT,null values will be replaced by zero.

long64−bittwo'scomplement

A data type that holds large integers.

BigInt Immutable arbitrary−precision integers.

RealNumber

float32−bitIEEE 754

This data type defines an 32bit−IEEEstandard 754 floating−point field.Floating−point fields can be defined assingle or double (default) precision based onthe value of integer. If the value of integer isbetween 1 and 21, the type is singleprecision floating−point, which requires 4bytes of storage. If the value of integer isbetween 22 and 53 inclusive, the type isdouble precision floating−point, whichrequires 8 bytes of storage. If a field isspecified as NOT NULL WITH DEFAULT,null values will be replaced by zero.

double 64−bitIEEE 754

This data type defines an 64−bit IEEEstandard 754 floating−point field.Floating−point fields can be defined assingle or double (default) precision based onthe value of integer. If the value of integeris between 22 and 53 inclusive, the type isdouble precision floating−point, whichrequires 8 bytes of storage. If a field isspecified as NOT NULL WITH DEFAULT,

JReport Formula

36

Page 45: JReport Designer - User Referencespecifies the driver such as JDBC driver (for JDBC) or the Data Source name (for JDBC−ODBC bridge), the user ID and the password for connecting to

null values will be replaced by zero.

currencyThis data type contains a dollar amountbetween −10 12 and 1012 and is displayed ina user−defined format.

JReport Formula

37

Page 46: JReport Designer - User Referencespecifies the driver such as JDBC driver (for JDBC) or the Data Source name (for JDBC−ODBC bridge), the user ID and the password for connecting to

Type Description

Date/Time

dateMM/dd/yy MM/dd/yyyy

Dates designate a point in time according tothe Gregorian calendar. Historical datesmay not follow this calendar. The standardinput format for this data type is MM/dd/yyor MM/dd/yyyy (automatic conversion isperformed between these two formats).

timeHH:mm:sshh:mm:ss

The time field data type is defined by thestandard input format of HH:mm:ss (usinghour in day 0−−23) or hh:mm:ss (using inam/pm 1−−12).

timestampyyyy−MM−ddhh:mm:ss

This combination date and time data type isdisplayed in the format yyyy−MM−dd−HH:mm.ss.nnnnnnn.

OtherTypes

char16−bit Unicodecharacter

A single character.

string A data type that holds character information.

Boolean true or false True or false.

Notes:

Format Description

yyyy An integer from 0001 to 9999, representing a year.

MM An integer from 1 to 12 representing a month

ddAn integer from 1 to 31 (maximum depends on the month and year) representing theday of the month

HH An integer from 0 to 23, representing the hour in day

hh An integer from 1 to 12, representing the hour in am/pm.

mm An integer from 0 to 59, representing minutes

ss An integer from 0 to 59 representing seconds (default 0)

nnnnnnAn integer (up to 6 digits) representing microseconds. If any trailing digit is omitted,0 is assumed

Built−in Functions

JReport Formula

38

Page 47: JReport Designer - User Referencespecifies the driver such as JDBC driver (for JDBC) or the Data Source name (for JDBC−ODBC bridge), the user ID and the password for connecting to

The functions panel lists all the built−in functions we provide. They are powerful and commonly used. If you are stillpuzzled in finding your own required function, you can write user defined formula functions.

Reference Notes: User's Guide | Writing and Using Formulas.

Math

Abs• Atan• Average• Count• Cos• DistinctCount• E, Pi• Exp• integDiv• Log• Maximum• Minimum• MouthName• Population• Pow• Random• Remainder• Round• Sgn• Sin• Sqr• Standard Deviation• Sum• Tan• ToBinary• ToHex• ToOctal• ToInt• Truncate• Variance•

String

Asc• ByteToText• Chr• ExchGetId, ExchGetOrganization, ExchGetSite, ExchGetPath• ExtractString• Filter• InStr• Join• LastIndexOf• Left• Length• LooksLike• LowerCase• Mid• NumericText• Picture•

JReport Formula

39

Page 48: JReport Designer - User Referencespecifies the driver such as JDBC driver (for JDBC) or the Data Source name (for JDBC−ODBC bridge), the user ID and the password for connecting to

ReplaceString• ReplicateString• Right• Soundex• Space• StringCompare• StringSplit• strReverse• ToNumber• ToText• ToWords• Trim• UpperCase• Val•

Date / Time

Current• DateAdd• DateDiff• DatePart• DateTime• DateTimeTo2000• DateTo2000• Day• DTSTo2000• DTSToSeconds• ForEach• Hour• IsDate, ToDate• IsDateTime, ToDateTime• IsTime, ToTime• Minute• Month• MonthName• Now• Second• Timer• ToDate• ToDateTime• Today• ToTime• WeekdayName• WeekFrom• WeekOfMonth• Year•

Date Range

Aged0To30Days• Aged31To60Days• Aged61To90Days• AllDatesFromToday• AllDatesFromTomorrow• AllDatesToToday• AllDatesToYesterday•

JReport Formula

40

Page 49: JReport Designer - User Referencespecifies the driver such as JDBC driver (for JDBC) or the Data Source name (for JDBC−ODBC bridge), the user ID and the password for connecting to

Calendar1stHalf• Calendar2ndHalf• Calendar1stQtr• Calendar2ndQtr• Calendar3rdQtr• Calendar4thQtr• Last4WeeksToSun• Last7Days• LastFullMonth• LastFullWeek• LastYearMTD• LastYearYTD• MonthToDate• Next30Days• Next31To60Days• Next61To90Days• Next91To365Days• Over90Days• WeekToDateFromSun• YearToDate•

DBField

Next• Previous•

Financial

FRAccRecTurnover• FRCashFlowVsTotalDebt• FRCurrentRatio• FRDebtEquityRatio• FRDividendYield• FREarningsPerCommonShare• FREquityVsTotalAssets• FRGrossProfitMargin• FRInterestCoverage• FRInventoryTurnover• FRNetProfitMargin• FROperatingProfitMargin• FRPriceEarningsRatio• FRQuickRatio• FRReturnOnCommonEquity• FRReturnOnEquity• FRReturnOnInvestedCapital• FRReturnOnNetFixedAssets• FRReturnOnTotalAssets• DDB• FV• IPmt• IRR• MIRR• NPer• NPV• Pmt• PPmt•

JReport Formula

41

Page 50: JReport Designer - User Referencespecifies the driver such as JDBC driver (for JDBC) or the Data Source name (for JDBC−ODBC bridge), the user ID and the password for connecting to

PV• Rate• SLN• SYD•

Array

UBound•

Others

Choose• Eqv, Xor• IsNoRecord• IsNull• isNumeric• openBinFile• openBinURL• openTxtFile• openTxtURL• reportname• Switch• toBool, toNumber•

ABS

Abs ( double, a )Returns the absolute value of a double value. If the argument is not negative, the argument is returned. If theargument is negative, the negation of the argument is returned.

Parametersa − a double value

Return ValueThe return value is a number.

ExamplesThe return value of the following statements is 2.4785:

Abs ( 2.4785 ) and Abs ( −2.4785 )

Abs ( BigInt, a )Returns the absolute value of a BigInt value. If the argument is not negative, the argument is returned. If the argumentis negative, the negation of the argument is returned.

Parametersa − a BigInt value

Return ValueThe return value is an integer.

ExamplesThe return value of the following statements is 3534:

Abs ( −3534 ) and Abs ( 3534 )

JReport Formula

42

Page 51: JReport Designer - User Referencespecifies the driver such as JDBC driver (for JDBC) or the Data Source name (for JDBC−ODBC bridge), the user ID and the password for connecting to

Abs ( currency, a )Returns the absolute value of a currency value. If the argument is not negative, the argument is returned. If theargument is negative, the negation of the argument is returned.

Parametersa − a currency value

Return ValueThe return value is a currency.

ExamplesThe return value of the following statement is $3.67:

Abs ( $3.67 ) and Abs ( $−3.67 )

Atan

Atan(number)Returns a number specifying the arctangent of the given number parameter. In other words, it returns the angle whosetangent is the given number parameter. This function works like the Java Math function of the same name. The range ofvalues returned by atan is between −pi/2 and pi/2 radians.

Parameternumber − a number value.

Return ValueNumber value which is an angle specified in number of radians.

Example

atan(1) − Returns an angle of 0.7854 radians (rounded to 4 radians). To convert this angle to degrees multiply by 180 /pi. For instance, atan (1) * 180 / pi is 45 degrees.

Average

Average( DBField a )The function is used to get the average value of the values referred to by the argument.

Parametera − values of DBField or formula field, can be Number or Currency data type.

Return ValueThe return value can be Number or Currency.

ExamplesNumber x = Average(@dbfield) Number x = Average(@formula)Currency x = Average(@dbfield) Currency x = Average(@formula)

JReport Formula

43

Page 52: JReport Designer - User Referencespecifies the driver such as JDBC driver (for JDBC) or the Data Source name (for JDBC−ODBC bridge), the user ID and the password for connecting to

Average( DBField a , String groupby); This function is used to get the average value of values referred to by the argument.

Parametersa − values of DBField or formula field, can be Number or Currency data type.groupby − a constant string to indicate the groupby field name or a field variable grouped by or a parameter variablegrouped by.

Return ValueThe result value can be Number or Currency depended on the data type of the first argument respectively.

ExamplesNumber x = Average(@dbfield, @dbfield_groupby)Number x = Average(@dbfield, @formula_groupby)Number x = Average(@dbfield, @parameter_groupby)

Currency x = Average(@formula, "group_field")Currency x = Average(@formula, @formula_groupby)Currency x = Average(@formula, @parameter_groupby)

Average ( Number a[] )This function computes the average of all the values in the array.

Parameter:a − a number or currency array

Return Value:The return value is a number or a currency.

Examples:The return value of the following statement is 13.5:Number x = Average ( [ 11,12,13,14,15,16 ] )

The return value of the following statement is −13.5:Number x = Average ( [ −11, −12, −13, −14, −15, −16 ] )

The return value of the following statement is 11.265:Number x =Average ( [ 11.25,11.26,11.27,11.28 ] )

The return value of the following statement is −11.265:Number x =Average ( [ −11.25, −11.26, −11.27, −11.28 ] )

The return value of the following statement is 5.75:Currency = Average ( [ $5.6, $5.7, $5.8, $5.9 ] )

The return value of the following statement is −5.75:Currency = Average ( [ −$5.6, −$5.7, −$5.8, −$5.9 ] )

Note:If a field is assigned to a variable, says x, the variable x will lose the characteristic of representing a group of values.Therefore, the following formula is treated as incorrect:

Number x = @dbfield;

JReport Formula

44

Page 53: JReport Designer - User Referencespecifies the driver such as JDBC driver (for JDBC) or the Data Source name (for JDBC−ODBC bridge), the user ID and the password for connecting to

Number y = Average(x); // system will prompt you that there is no such kind of function.

Count

Count ( Number a[ ] )This function computes the number of the values in an array.

Parametera − a double array

Return ValueThe return value is an integer.

Examples

The return value of the following statement is 7:Count ( [ 11.2,15.4,13.7,16.9,15.2,14.8,10.6 ] )

The return value of the following statement is 4:Count ( [ −20.4, −26.4, −68.7, −84.1 ] )

Count( DBField a )The function is used to count the number of values referred to by the argument.

Parametera − values of DBField or formula field.

Return ValueReturns a Number type value.

ExamplesNumber x = Count(@dbfield)Number x = Count(@formula)

Count( DBField a, String groupby)The function is used to count the number of values referred to by the first argument.

Parametersa − values of DBField or formula field.groupby − A constant string to indicate the groupby DBField name, formula name grouped by or a parameter namegrouped by.

Return ValueReturns a Number type value.

ExamplesNumber y = Count(@"Customer Name", @Customers_Region)Number x = Count(@formula, @formula_groupby)Number x = Count(@dbfield, @parameter_groupby)

Note:If a field is assigned to a variable, say x, the variable x will lose the characteristic of representing a group of values.Therefore, the following formula is treated as incorrect:

JReport Formula

45

Page 54: JReport Designer - User Referencespecifies the driver such as JDBC driver (for JDBC) or the Data Source name (for JDBC−ODBC bridge), the user ID and the password for connecting to

Number x = @dbfield;Number y = Count(x); // system will prompt you that there is no such kind of function.

Cos

Cos(number)Returns a number specifying the cosine of an angle given in radians. It takes a right−angle triangle, and returns thelength of the side adjacent to the specified angle divided by the length of the hypotenuse.

Parameternumber − an angle in number of radians.

Return ValueNumber value between 1 and −1.

Examples

cos(1) − Returns 0.54 (rounded to 2 decimals). This is the cosine of 1 radian.• cos(60 * pi / 180) − Returns 0.5. This is the cosine of 60 degrees. Before taking the cosine, the angle isconverted to radians by multiplying by pi / 180.

DistinctCount

DistinctCount (Number a[ ] )This function computes the number of distinct values in an array.

Parametera − a number array

Return ValueThe return value is an integer.

ExampleThe return value of the following statement is 4:DistinctCount ( [1.45, 2.63, 38.1, 1.45, 23.9 ] )

DistinctCount ( DBField a )This function computes the number of distinct values referred to by a DBField.

Parametera − values of a DBField or a formula field.

Return ValueThe return value is an integer.

ExampleIf you build a report about customer order, the return value of the following statement is 19:DistinctCount ( @"Order Date" )

DistinctCount( DBField a , String groupby)This function is used to count the number of distinct values referred to by the first argument.

Parameters

JReport Formula

46

Page 55: JReport Designer - User Referencespecifies the driver such as JDBC driver (for JDBC) or the Data Source name (for JDBC−ODBC bridge), the user ID and the password for connecting to

a − Values of a DBField or a formula field.

groupby − A constant string to indicate the DBField name, formula name or parameter name grouped by.

Return ValueReturns a Number type value.

ExamplesNumber x = DistinctCount(@dbfield, @dbfield1)Number x = DistinctCount(@formula, @formula_groupby)Number x = DistinctCount(@dbfield, @parameter_groupby)

Note:If a field is assigned to a variable, say x, the variable x will lose the characteristic of representing a group of values.Therefore, the following formula is treated as incorrect one:

Number x = @dbfield;Number y = DistinctCount(x); // system will prompt you that there is no such kind of function.

E

E()Returns the Mathematical value of e, which is 2.7182818 (if rounded to 7 decimal places).

Pi

Pi()Returns the Mathematical value pi, which is 3.1415926 (if rounded to 7 decimal places).

integDiv

integDiv(numbera, numberb)Returns the integer portion of the value numbera/numberb.

Parametersnumbera − a number value.numberb − a number value.

Return ValueWhole number value.

ExampleintegDiv(33, 2) − Returns 16.

Log

Log(number)Returns a number specifying the natural logarithm of a given number. The natural logarithm is the logarithm to the basee, where e is approximately 2.7182818284590452354. If the value of number is less than 0, the function will return NaN.

Parameternumber − number value which you want to calculate to.

Return ValueThe number which is the value of e ^ Number.

JReport Formula

47

Page 56: JReport Designer - User Referencespecifies the driver such as JDBC driver (for JDBC) or the Data Source name (for JDBC−ODBC bridge), the user ID and the password for connecting to

ExampleLog(1.5) − Returns 0.406 (rounded to 3 decimals).

Maximum

Maximum ( a[ ] )This function returns the highest value in an array.

Parametera − an array which data type can be Number, Currency, String, Date, Time, DataTime or Boolean.

Return ValueThe returned value type is depended on the data type of the parameter.

Example

Maximum ( [ 22.5, 75.81, 236.47, 56.31, 235.78 ] )String x = Maximum(['1', '2', '3.0', '4.5', '45', '67'])Date x = Maximum([toDate(1998, 1, 1), toDate(1997, 7, 1), toDate(1999, 1, 16)]) Currency x = Maximum([$1, $2, $3.0, $4.5, $45, $67])

Maximum( DBField a )This function is used to pick up the maximum value from values referred to by the argument.

Parametera − values of a DBField or a formula field.

Return ValueThe returned value type is depended on the data type of the parameter. It may be Number, Currency, String, Date,Time, DataTime or Boolean.

Examples

Number x = Maximum(@dbfield)Date x = Maximum(@formula)Currency x = Maximum(@dbfield)Boolean x = Maximum(@formula)

Maximum( DBField a, String groupby); This function is used to pick up the maximum value from values referred to by the first argument.

Parametersa − Values of a DB field or of a formula field.groupby − A constant string to indicate the DBField name, formula or parameter grouped by.

Return ValueThe returned type is depended on the data type of the first argument. It may be Number, Currency, String, Date, Time,DataTime or Boolean.

Examples

Time x = Maximum(@dbfield, @dbfield1)DateTime x = Maximum(@dbfield, @formula_groupby)String x = Maximum(@dbfield, @parameter_groupby)

JReport Formula

48

Page 57: JReport Designer - User Referencespecifies the driver such as JDBC driver (for JDBC) or the Data Source name (for JDBC−ODBC bridge), the user ID and the password for connecting to

Date x = Maximum(@formula, @formula_groupby)Currency x = Maximum(@formula, @dbfield1)Currency x = Maximum(@formula, @parameter)

Note: If a field is assigned to another variable, say x, the variable x will lose the characteristic of representing a group of values.Therefore, the following formula is treated as incorrect one:

Number x = @dbfield;Number y = Maximum(x); // system will prompt you that there is no such kind of function.

Minimum

Minimum ( a[ ] )This function returns the lowest value in an array.

Parametera − an array which type can be Number, Currency, String, Date, Time, DateTime or Boolean.

Return ValueThe return value type is depended on the data type of the parameter.

Example

Number x = Minimum ( [ 2.36, 0.12, 1.25, 0.25 ] )Number x = Minimum([1, 2, 3.0, 4.5, 45, 67])

Number x[6] = [1, 2, 3.0, 4.5, 45, 67];Number y = Minimum( x)

Currency x = Minimum([$1, $2, $3.0, $4.5, $45, $67])

Currency x[] = [$1, $2, $3.0, $4.5, $45, $67];Currency y = Minimum( x)

String x = Minimum(['1', '2', '3.0', '4.5', '45', '67'])Date x = Minimum([toDate(1998, 1, 1), toDate(1997, 7, 1), toDate(1999, 1, 16)])

Minimum( DBField a)This function is used to pick up the minimum value from values referred to by the argument.

Parametera − Values of a DBField or a formula field.

Return ValueThe returned value type is depended on the data type of the parameter. It can be Number, Currency, String, Date, Time,DateTime or Boolean.

Examples

Number x = Minimum(@dbfield)Date x = Minimum(@formula)Currency x = Minimum(@dbfield)Boolean x = Minimum(@formula)

JReport Formula

49

Page 58: JReport Designer - User Referencespecifies the driver such as JDBC driver (for JDBC) or the Data Source name (for JDBC−ODBC bridge), the user ID and the password for connecting to

Minimum( DBfield a , String groupby)This function is used to pick up the minimum value from values referred to by the first argument.

Parametersa − values of a DB field or a formula field.groupby − A constant string to indicate the DB field name, formula or parameter grouped by.

Return ValueThe returned value type is depended on the first argument. It may be Number, Currency, String, Date, Time, DateTimeor Boolean.

Examples

Time x = Minimum(@dbfield, @dbfield_groupby)DateTime x = Minimum(@dbfield, @dbfield_groupby)String x = Minimum(@dbfield, @parameter_groupby)Date x = Minimum(@formula, @formula_groupby)Currency x = Minimum(@formula, @dbfield_groupby)Currency x = Minimum(@formula, @parameter)

Note:If a field is assigned to a variable, say x, the variable x will lose the characteristic of representing a group of values.Therefore, the following formula is treated as incorrect:

Number x = @dbfield;Number y = Minimum(x); // system will prompt you that there is no such kind of function.

MonthName

MonthName(month, abbreviate)Returns a string name for the specified month.

Parametersmonth − a whole number representing the month of the year, value between 1 and 12, with 1 being January.abbreviate − an optional Boolean value that indicates if the month name is to be abbreviated. If abbreviate value is true,the function returns the abbreviated month name. Or the function returns the full month name.

Return ValueString value.

Examples

MonthName(4) − Returns string value April• MonthName(12, true) − Returns string value Dec• MonthName(12, false) − Returns string value December•

Population

PopulationVariance ( a[ ] )PopulationVariance( DBField field )PopulationVariance( DBField field, String groupby)

This function computes the population variance of the values referred to by the argument.

JReport Formula

50

Page 59: JReport Designer - User Referencespecifies the driver such as JDBC driver (for JDBC) or the Data Source name (for JDBC−ODBC bridge), the user ID and the password for connecting to

Parameter

a − a Number or Currency arrayfield − values of a DB field or formula fieldgroupby − A constant string to indicate the DB field, formula or parameter grouped by.

Return ValueReturns a Number type value.

Example:

PopulationVariance ( [ 2.5, 4.75, 2.36, 1.25 ] )Number x = PopulationVariance([1, 2, 3.0, 4.5, 45, 67])

Number x[6] = [1, 2, 3.0, 4.5, 45, 67];Number y = PopulationVariance(x)

Number x = PopulationVariance([$1, $2, $3.0, $4.5, $45, $67])

Number x[] = [$1, $2, $3.0, $4.5, $45, $67];Number y = PopulationVariance(x)

Number x = PopulationVariance(@dbfield)

Number x = PopulationVariance(@formula)

Number x = PopulationVariance(@dbfield, @dbfield_groupby)

Number x = PopulationVariance(@dbfield, @formula_groupby)

Number x = PopulationVariance(@dbfield, @parameter)

Note: If a field is assigned to a variable, say x, the variable x will lose the characteristic of representing a group of values.Therefore, the following formula is treated as incorrect:

Number x = @dbfield;Number y = PopulationVariance(x); // system will prompt you that there is no such kind of function.

PopulationStdDev ( a[ ] )PopulationStdDev( DBField field )PopulationStdDev( DBField field, String groupby)

This function computes the population standard deviation of the values referred to by the argument.

Parametera − a Number or Currency arrayfield − values of a DB field or formula fieldgroupby − A constant string to indicate the DBField, formula or parameter grouped by.

Return ValueReturns a Number type value.

ExampleNumber x = PopulationStdDev([1, 2, 3.0, 4.5, 45, 67])

JReport Formula

51

Page 60: JReport Designer - User Referencespecifies the driver such as JDBC driver (for JDBC) or the Data Source name (for JDBC−ODBC bridge), the user ID and the password for connecting to

Number x[6] = [1, 2, 3.0, 4.5, 45, 67];Number y = PopulationStdDev( x)

Number x = PopulationStdDev([$1, $2, $3.0, $4.5, $45, $67])

Number x[] = [$1, $2, $3.0, $4.5, $45, $67];Number y = PopulationStdDev( x)

Number x = PopulationStdDev(@dbfield)

Number x = PopulationStdDev(@formula)

Number x = PopulationStdDev(@dbfield, @dbfield1)

Number x = PopulationStdDev(@dbfield, @"group_field")

Number x = PopulationStdDev(@dbfield, @parameter)

Note: If a field is assigned to a variable, say x, the variable x will lose the characteristic of representing a group of values.Therefore, the following formula is treated as incorrect:

Number x = @dbfield;Number y = PopulationStdDev (x); // system will prompt you that there is no such kind of function.

Pow

Pow(numbera, numberb)Returns the value of numbera ^ numberb.

Paremeternumbera − a number value. numberb − a number value.

Examples

pow(2, 4) − Returns 16.• pow(6.2, 5.1) − Returns 10995.060323919315.•

Random

Random(), Random(seed)Returns a random number greater than or equal to 0 and less than 1. If seed is equal to 0, Random returns the randomnumber that was returned from the previous call to random. If seed is not supplied or is greater than 0, then Randomreturns the next random number in the internally generated sequence of random numbers. If seed is less than 0, thenRandom uses this value of seed to start a new random number sequence and returns the first value in this sequence.The function are typical used in when your formula requires a randomly generated number such as for statisticalcalculations or for selecting records at random to limit the data in a report.

Overloads

random()•

JReport Formula

52

Page 61: JReport Designer - User Referencespecifies the driver such as JDBC driver (for JDBC) or the Data Source name (for JDBC−ODBC bridge), the user ID and the password for connecting to

random(seed)•

Parameterseed − an optional Number value parameter.

Return ValueA number value.

Examples

random() − Returns: 0.673411041443785• random(123) − Returns: 0.06300625845328678• random(0) − Returns: 0.06300625845328678• random(−122223) − Returns: 0.3291484275937213•

Note: You can call Random without ever starting a new random number sequence by specifying a negative seedparameter. If you do so, an internal seed will be generated using the system clock. The reason to start a new randomnumber sequence by calling Random with a negative seed parameter, and then making subsequent calls to Randomwithout an parameter (or with a positive parameter) is so that the report will look exactly the same every time it ispreviewed. In other words, it allows you to make use of random numbers, but get a reproducible result.

Remainder

Remainder ( Integer a, Integer b )This function is used to evaluate the remainder after numerator has been divided by a denominator.

Parameters

a − a BigInt valueb − a BigInt value

Return ValueThe return value is an integer.

ExampleThe return value of the following statement is 7:

Remainder ( 7, 9 )

Round

Round ( Number a, integer b )This function is used to round to a specified scale determined by argument b for double value a.

Parametersa − a double value

Return ValueThe return value is a number.

ExampleThe return value of the following statement is 2.46:

Round ( 2.4576, 2 )

JReport Formula

53

Page 62: JReport Designer - User Referencespecifies the driver such as JDBC driver (for JDBC) or the Data Source name (for JDBC−ODBC bridge), the user ID and the password for connecting to

Round ( Number a )This function returns the integer portion after a specified number is rounded.

Parametera − a double value

Return ValueThe return value is an integer.

ExampleThe return value of the following statement is 3.00:

Round ( 2.754 )

Sgn

Sgn(data)Returns the sign value of the given number (whose value is data). If data greater than 0, returns 1. If data less than 0,returns 1. If data equals to 0, returns 0.

Parameterdata − the value you want to know the sign of.

Return Value1, 0 or −1.

Examples

sgn(2) − Returns 1.• sgn(−23) − Returns −1.• sgn(0) − Returns 0.•

Sin

Sin(number)Returns a number specifying the sine of an angle given in radians. It takes a right−angle triangle, and returns the lengthof the side opposite to the specified angle divided by the length of the hypotenuse.

Parameternumber − an angle in number of radians.

Return ValueNumber value between −1 and 1.

Examples

Sin(1) − Returns 0.84 (rounded to 2 decimals). This is the sine of 1 radian.• Sin(60*pi/180) − Returns 0.73 (rounded to 2 decimals). This is the sine of 60 degrees. Before taking the sine, theangle is converted to radians by multiplying by pi/180.

Sqr

Sqr(number)Returns the square root of a given number. If the value of number is less than 0, the function returns NaN. This function

JReport Formula

54

Page 63: JReport Designer - User Referencespecifies the driver such as JDBC driver (for JDBC) or the Data Source name (for JDBC−ODBC bridge), the user ID and the password for connecting to

is designed to work like the Java Math function of sqrt().

Parameternumber − a number value greater than or equal to 0.

Return ValueNumber value.

Examplesqr(100) − Returns 10.

StdDev

StdDev( a[ ] )StdDev( field );StdDev( field , groupby);

This function computes the standard deviation of the values referred to by the argument.

Parametera − a Number or Currency arrayfield − values of DB field or formula fieldgroupby − A constant string which indicates the DBField, formula or parameter grouped by.

Return ValueReturns a Number value.

ExampleNumber x = StdDev([1, 2, 3.0, 4.5, 45, 67])

Number x[6] = [1, 2, 3.0, 4.5, 45, 67];Number y = StdDev( x)

Number x = StdDev([$1, $2, $3.0, $4.5, $45, $67])

Number x[] = [$1, $2, $3.0, $4.5, $45, $67];Number y = StdDev( x)

Number x = StdDev(@dbfield)

Number x = StdDev(@formula)

Number x = StdDev(@dbfield, @dbfield1)

Number x = StdDev(@dbfield, @formula_groupby)

Number x = StdDev(@dbfield, @parameter)

Note: If a field is assigned to a variable, say x, the variable x will lose the characteristic of representing a group of values.Therefore, the following formula is treated as incorrect one:

Number x = @dbfield;Number y = StdDev( x); // system will prompt you that there is no such kind of function.

JReport Formula

55

Page 64: JReport Designer - User Referencespecifies the driver such as JDBC driver (for JDBC) or the Data Source name (for JDBC−ODBC bridge), the user ID and the password for connecting to

Sum

Sum( Number a[ ] )Sum( Integer a[ ] )Sum( Currency a[ ] )Sum( DBField field )Sum( DBField, String groupby);

This function computes the sum of all the values referred to by the argument.

Parametera − a Number, Integer or Currency arrayfield − values of DB field or formula fieldgroupby − A constant string which indicates the DBField, formula or parameter grouped by.

Return ValueThe returned value type is depended on the parameter. It can be Number, Integer or Currency.

ExamplesNumber x = Sum([1, 2, 3.0, 4.5, 45, 67])

Number x[6] = [1, 2, 3.0, 4.5, 45, 67];Number y = Sum(x)

Currency x = Sum([$1, $2, $3.0, $4.5, $45, $67])

Currency x[] = [$1, $2, $3.0, $4.5, $45, $67];Currency y = Sum(x)

Number x = Sum(@dbfield)

Number x = Sum(@formula)

Number x = Sum(@dbfield,@dbfield_groupby)

Number x = Sum(@dbfield, @formula_groupby)

Number x = Sum(@dbfield, @parameter)

Currency x = Sum(@dbfield)

Currency x = Sum(@formula)

Currency x = Sum(@formula, @dbfield_groupby)

Currency x = Sum(@formula, @formula_groupby)

Currency x = Sum(@formula, @parameter)

Note: If a field is assigned to a variable, say x, the variable x will lose the characteristic of representing a group of values.Therefore, the following formula is treated as incorrect one:

Number x = @dbfield;Number y = Sum( x); // system will prompt you that there is no such kind of function.

JReport Formula

56

Page 65: JReport Designer - User Referencespecifies the driver such as JDBC driver (for JDBC) or the Data Source name (for JDBC−ODBC bridge), the user ID and the password for connecting to

Tan

Tan(number)Returns a number specifying the tangent of an angle given in radians. It takes a right−angle triangle, and returns thelength of the side opposite the specified angle divided by the length of the side adjacent to the angle.

Parameternumber − an angle in number of radians.

Return ValueNumber value.

Examples

tan(1) − Returns 1.5574 (rounded to 4 decimals). This is the tangent of 1 radian.• tan(45 * pi / 180)Returns 1.0. This is the tangent of 45 degrees. Before taking the tangent, the angle is converted to radians bymultiplying by pi/180.

ToBinary

ToBinary ( Integer a )This function changes a specified integer to its binary form.

Parametera − a BigInt value

Return ValueThe return value is a string.

ExampleThe return value of the following statement is 1011.

ToBinary ( 11 )

ToHex

ToHex(Integer a )This function returns the HEX form of a specified value.

Parametera − a BigInt value

Return ValueThe return value is a string.

ExampleThe return value of the following statement is 20:

ToHex ( 32 )

JReport Formula

57

Page 66: JReport Designer - User Referencespecifies the driver such as JDBC driver (for JDBC) or the Data Source name (for JDBC−ODBC bridge), the user ID and the password for connecting to

ToOctal

ToOctal ( Integer a )This function returns the octal form of a specified value.

Parametera − a BigInt value

Return ValueThe return value is a string.

ExampleThe return value of the following statement is 64:

ToOctal ( 52 )

ToInt

ToInt( number a )This function changes a specified number to an integer.

Parametera − a number value

Return ValueThe return value is an integer.

ExampleThe return value of the following statement is 100.

ToInt (100.1)

Truncate

Truncate ( Number a )This function returns a number by truncating the decimal portion.

Parametera − a double value to be truncated

Return ValueThe return value is a number.

ExampleThe return value of the following statement is 25.00:

Truncate ( 25.4321 )

Truncate ( Number a, Integer b )This function returns a number by truncating the number at the decimal point. The number is truncated to the decimalplace indicated by argument b and the function returns a fractional number.

Parameters

a − a double value to be truncated

JReport Formula

58

Page 67: JReport Designer - User Referencespecifies the driver such as JDBC driver (for JDBC) or the Data Source name (for JDBC−ODBC bridge), the user ID and the password for connecting to

b − a double value indicating the number of the decimal places

Return ValueThe return value is a number.

ExampleThe return value of the following statement is 25.430:

Truncate ( 25.432, 2 )

Variance

Variance ( Number a[ ] )Variance( Currency a[ ] )Variance( DBField field )Variance( DBField field, String groupby)

This function computes the variance of all the values referred to by the argument.

Parameter

a − a Number or Currency arrayfield − values of DB field or formula fieldgroupby − A constant string which indicates the DBField, formula or parameter grouped by.

Return ValueReturns a Number type value.

ExamplesNumber x = Variance([1, 2, 3.0, 4.5, 45, 67])

Number x[6] = [1, 2, 3.0, 4.5, 45, 67];Number y = Variance( x)

Number x = Variance([$1, $2, $3.0, $4.5, $45, $67])

Number x[] = [$1, $2, $3.0, $4.5, $45, $67];Number y = Variance(x)

Number x = Variance(@dbfield)

Number x = Variance(@formula)

Number x = Variance(@dbfield, @dbfield_groupby)

Number x = Variance(@dbfield, @formula_groupby)

Number x = Variance(@dbfield, @parameter)

Note: If a field_variable is assigned to a variable, say x, the variable x will lose the characteristic of representing a group ofvalues. Therefore, the following formula is treated as incorrect one:

Number x = @dbfield;Number y = Variance(x); // system will prompt you that there is no such kind of function.

JReport Formula

59

Page 68: JReport Designer - User Referencespecifies the driver such as JDBC driver (for JDBC) or the Data Source name (for JDBC−ODBC bridge), the user ID and the password for connecting to

Asc

Asc ( Char a )This function evaluates the ASCII value of the first character of the argument.

Parametera − a char value

Return ValueThe return value is an integer.

ExamplesThe return value of the following statement is 97:

Asc ( "abc" )

ByteToText

ByteToText (byte)This function will return the size of a message in the "appropriate" unit.

If the parameter is less than 1024, the result will be in bytes.• If the parameter is between 1024 and 1048576, then the result will be in kilobytes.• Otherwise, the result will be in megabytes.•

ParameterByte is the size of a message in bytes.

Return ValueString.

Examples

ByteToText (1000) − Returns 1000 bytes• ByteToText (251561) − Returns 245 KB• ByteToText (25454464) − Returns 24 MB•

Chr

Chr ( Integer a )This function returns a single character string associated with the ASCII value passed as the argument.

Parametera − a BigInt value

Return ValueThe return value is a string.

Examples

The return value of the following statement is character c :Chr ( 99 )

The return value of the following statement is character { :

JReport Formula

60

Page 69: JReport Designer - User Referencespecifies the driver such as JDBC driver (for JDBC) or the Data Source name (for JDBC−ODBC bridge), the user ID and the password for connecting to

Chr ( 123 )

ExchGetId

ExchGetId (address)This function will begin by determining whether the address in X500 or X400 format. Once this has been solved, thefunction will then determine the ID.

If the field is in X500 format, the function will extract the last instance of the "CN=" code (not case sensitive). If the field is in the X400 format, it will extract the SMTP or MS Ids.

Note: The fields must follow the address type standards for the functions to operate them.

Parameteraddress − the Address of sender/recipient (string data type).

Return ValueString value.

Examples

ExchGetID(/o=Jinfonet Software/ou=JREPORT /cn=Configuration/cn=Servers/cn=ESPRESSO/cn=Fredt) −Returns "Fredt"

ExchGetID(c=US ;a= ;p=Jinfonet; o=apps−wga; dda:[email protected]) − Returns "[email protected]"• ExchGetID(c=US; a= ;p=Jinfonet;o=apps−wga;dda:ms=com/jreport/Jenny) − Returns "com/jreport/Jenny"•

ExchGetOrganization

ExchGetOrganization(address)The function will begin by determining whether the address is in X500 or X400 format. Once this has been solved, thefunction will then determine the Organization Name.

If the field is in X500 format, the function will extract the last instance of the "/O=" code (not case sensitive). If the field is in the X400 format, it will extract the instance of the "P=" code (not case sensitive).

Note: The fields must follow the address type standards for the functions to operate on them.

Parameteraddress − the Address of the sender/recipient (string data type).

Return ValueString value.

Examples

ExchGetOrganization (c=US ;a= ;p=Jinfonet; o=apps−wga; dda:ms=com/jreport/Jenny)Returns "Jinfonet".

ExchGetOrganization(c=US ;a= ;p=Jinfonet; o=apps−wga; dda:[email protected]) − Returns "Jinfonet". •

ExchGetSite

ExchGetSite (address)The function will begin by determining whether the address is in X500 or X400 format. Once this has been solved, thefunction will then determine the Site Name.

JReport Formula

61

Page 70: JReport Designer - User Referencespecifies the driver such as JDBC driver (for JDBC) or the Data Source name (for JDBC−ODBC bridge), the user ID and the password for connecting to

If the field is in X500 format, the function will extract the last instance of the "/OU=" code (not case sensitive). If the field is in the X400 format, it will extract the instance of the "O=" code (not case sensitive).

Note: The fields must follow the address type standards for the functions to operate on them.

Parameteraddress − the Address of sender/recipient (string data type).

Return ValueString value.

Examples

ExchGetSite(/o=Jinfonet Software/ou=JReport/cn=Configuration/cn=Servers/cn=ESPRESSO/cn=Fredt) −Returns "JReport"

ExchGetSite(c=US; a= ;p=Jinfonet;o=apps−wga; dda:[email protected]) − Returns "apps−wga"•

ExchGetPath

ExchGetPath (path)This function will return the container information in an address field.

If the address type is X500, the function will return all of the information from the first instance of the "CN=" code until thelast instance of the "CN=" code. If there is only one instance of the "CN=" code, the function will return NULL. If the address type is X400, the function will return all "OU*=" codes (residing between the "P=" and "O=" codes). If the address starts with "DDA:", the function will return all information after the "DDA:" code. If the field is blank, "UNKNOWN ADDRESS" will be returned.

Parameterpath − the Address of sender/receiver (string data type).

Examples

ExchGetPath(/o=Jinfonet Software/ou=JREPORT /cn=Configuration/cn=Servers/cn=ESPRESSO/cn=Fredt) −Returns cn=Configuration/cn=Servers/cn=ESPRESSO

ExchGetPath(c=US; a= ; p=Jinfonet; ou1=Jenny; ou2=JReport; o=apps−wga;) − Returns "ou1=Jenny;ou2=JReport".

ExchGetpath(DDA:MS=JREPORT/JENNY/jreport)Returns "MS=JREPORT/JENNY/jreport"

ExtractString

ExtractString ( String origin, String start, String end )This function is used to evaluate an origin string and returns the first occurrence of a string that starts with the Start Stringand ends with the End string. If the End String is not found, the string starting with the Start String until the end of thestring will be returned.

Parametersorigin − a string valuestart − a string valueend − a string value

Return ValueThe return value is a string.

JReport Formula

62

Page 71: JReport Designer - User Referencespecifies the driver such as JDBC driver (for JDBC) or the Data Source name (for JDBC−ODBC bridge), the user ID and the password for connecting to

Examples

The return value of the following statement is a string day:ExtractString ( "one day after that day", "d", " " )

The return value of the following statement is day after that day:ExtractString ( "one day after that day", "d", "c")

Filter

Filter(inString, searchString)This function is designed to search the string which in the specified strings. Searches an array of strings for a specifiedstring, and returns the array string value include searchString which was in input Strings.

OverloadsFilter(inString, searchString)Filter(inString, searchString, include)Filter(inString, searchString, include, compare)

ParametersinString − an array of string which you want to find the search string from.searchString − a string which you want to search for.include − an optional boolean value indicating whether to return substrings that include or exclude searchString. If includeis True, Filter returns the subset of the array that contains searchString as a substring. If include is False, Filter returnsthe subset of the array that does not contain searchString as a substring. If omitted, the value True is assumed. compare − an optional Number value indicating the kind of string comparison to use:

0 performs a comparison that is case sensitive♦ 1 performs a comparison that is case insensitive♦ If omitted, a case sensitive comparison is performed. ♦

Return ValueArray of String values.

ExamplesSuppose that inString = [ abc, Abc, abcdfg, asdfabc, sdfdfd], searchString = abc

filter(inStrings, searchString) − Returns [ abc, abcdfg, asdfabc]• filter (inStrings, searchString, true) − Returns [ abc, abcdfg, asdfabc]• filter (inStrings, searchString, false) − Returns [ abc]• filter (inStrings, searchString, true, 0) − Returns [ abc, abcdfg, asdfabc]• filter (inStrings, searchString, true, 1) − Returns [ abc, Abc, abcdfg, asdfabc]• filter (inStrings, searchString, false, 1) − Returns [ abc, Abc]•

InStr

InStr (String a,String b )This function returns the position of the first occurrence of one string within another, if String a is not found in String b,the InStr function returns −1.

Parameters

a − a string value to be sought b − a string value to be searched

JReport Formula

63

Page 72: JReport Designer - User Referencespecifies the driver such as JDBC driver (for JDBC) or the Data Source name (for JDBC−ODBC bridge), the user ID and the password for connecting to

Return ValueThe return value is an integer.

Examples

The return value of the following statement is 6:InStr ( "my", "he is my brother" )

The return value of the following statement is −1:InStr ( "our", "he is my mother" )

InStr ( Number a, String b, String c )This function returns the position of the first occurrence of one string within another and starting with position specified byargument a. If String c is not found in String b, This InStr function returns −1.

Parameters

a − a BigInt value that is the character position in String b where the search is to begin.b − a string value to be searched c − a string value to be sought

Return ValueThe return value is an integer.

Examples

The return value of the following statement is 6:InStr ( 3, "he is my brother", "my" )

The return value of the following statement is −1:InStr ( 3, "he is my brother", "our" )

Join

Join(stringArray)Returns a String created by joining a number of substrings contained in an array.

OverloadsJoin(stringArray)Join(stringArray, delimiterString)

ParametersstringArray − is a String array containing substrings to be joined.dimiterString − an optional String used to separate the substrings in the returned string. If omitted, the space character ("") is used. If delimiter is a zero−length string (""), all items in the list are concatenated with no delimiters.

Return ValueString value.

Examples

Assume that the stringArray list in the examples is consisting of the following three elements: Welcome, Use and JReport.

Join(list) − Returns the string WelcomeUseJReport• Join(list, "***") − Returns the string Welcome***Use***JReport.•

JReport Formula

64

Page 73: JReport Designer - User Referencespecifies the driver such as JDBC driver (for JDBC) or the Data Source name (for JDBC−ODBC bridge), the user ID and the password for connecting to

LastIndexOf

LastIndexOf ( String a, String b )This function returns the position of the last occurrence of one string within another, if String b is not found in String a,the InStr function returns −1.

Parameters

a − a string value to be searched b − a string value to be sought

Return ValueThe return value is an integer.

Examples

The return value of the following statement is 9:LastIndexOf ("avcievmgbvi","v")

The return value of the following statement is −1:LastIndexOf("avcievmgbvi","n")

LastIndexOf ( BigInt a, String b, String c )This function returns the position of the first occurrence of one string within another and starting with position specified byargument a. If String c is not found in String b, This InStr function returns −1.

Parameters

a − a BigInt value that is the character position in String b where the search is to begin.b − a string value to be searched c − a string value to be sought

Return ValueThe return value is an integer.

Left

Left ( String a, Number b )This function returns a substring that contains the specified number of characters from the left side of a string.

Parameters

a −a string valueb −a BigInt value indicating the number of characters to be extracted from String a

Return ValueThe return value is a string.

ExampleThe return value of the following statement is he is:

Left ( "he is my father", 5 )

JReport Formula

65

Page 74: JReport Designer - User Referencespecifies the driver such as JDBC driver (for JDBC) or the Data Source name (for JDBC−ODBC bridge), the user ID and the password for connecting to

Length

Length ( String a )This function returns the number of characters in a string.

Parametera − a string value

Return ValueThe return value is an integer.

ExampleThe return value of the following statement is 15:

Length ( "he is my mother" )

LooksLike

LooksLike ( String a, String b )This function enables you to locate field values using standard DOS wildcards ( ? is wildcard for single character, * iswildcard for any number of characters). It does this by comparing a string to a mask that contains one or morewildcards. The function returns True if the string matches the mask, False if the string does not match the mask.

Parameters

a − a string value to be compared to the maskb − a string that provides a mask for comparing the value in String a

Return ValueThe return value is True or False.

Examples

The return value of the following statement is False:LooksLike ( "he is my brother", " he is my brother and friend" )

The return value of the following statement is True.LooksLike ( "he is my brother", "he is my brother" )

LowerCase

LowerCase (String a )This function returns a string that contains all lowercase letters converted from String a.

Parametera − a string value

Return ValueThe return value is a string.

ExampleThe return value of the following statement is this is her book:

LowerCase ( "This is HER book" )

JReport Formula

66

Page 75: JReport Designer - User Referencespecifies the driver such as JDBC driver (for JDBC) or the Data Source name (for JDBC−ODBC bridge), the user ID and the password for connecting to

Mid

Mid (String a, Number b )This function returns a number of characters from a specified position of a string.

Parameters

a − a string value to be extractedb − a BigInt value indicating the position of the first character to extract.

Return ValueThe return value is a string.

ExampleThe return value of the following statement is my father:

Mid ( "he is my father", 6 )

Mid ( Char a, BigInt b, BigInt c )This function returns a specified number of characters from a specified position of a string.

Parameters

a − a string value to be extractedb − a BigInt value indicating the position of the first character to extractc − a BigInt value indicating the number of characters to be extracted from String a

Return ValueThe return value is a string.

ExampleThe return value of the following statement is father:

Mid ("he is my father", 9, 6 )

NumericText

NumericText ( String a )This function is used to test if the content of the string is a number.

Parametera − a string value to be tested

Return ValueThe return value is Boolean.

Example

The return value of the following statement is False:NumericText ( "he is my mother" )

The return value of the following statement is True:NumericText ( "123456" )

JReport Formula

67

Page 76: JReport Designer - User Referencespecifies the driver such as JDBC driver (for JDBC) or the Data Source name (for JDBC−ODBC bridge), the user ID and the password for connecting to

Picture

Picture ( String a, String b )This function prints a string or values in a string in a predetermined format.

Parameters

a − a string value to be formatted according to the picture format.b − a string value representing the way you want the characters in the string to be printed.

Return ValueThe return value is a string.

Examples

The return value of the following statement is Brother Tom:Picture ("Brother", "XxXXxxx Tom" )

The return value of the following statement is He is Tom:Picture ( "He Tom", "xx is" )

ReplaceString

ReplaceString(inString, searchString, replaceString, startPosition, count, compare)Returns a String in which a specified substring has been replaced with another substring a specified number of times. Asan option, you can also specify where in the String to begin replacing, and return a String starting from that position. Thefunction are typical used to systematically replace in a String one substring with another.

OverloadsReplaceString(inString, searchString, replaceString) ReplaceString(inString, searchString, replaceString, startPosition) ReplaceString(inString, searchString, replaceString, startPosition, count) ReplaceString(inString, searchString, replaceString, startPosition, count, compare)

ParametersinString − a String containing substring to replace. searchString − a substring being searched for. replaceString − the replacement substring. startPosition − an optional Number indicating the position within inString where substring search is to begin. If omitted, 1is assumed. count − an optional Number of sub string substitutions to perform. If omitted, the default value is −1, which means makeall possible substitutions. compare − an optional Number indicating the kind of comparison to use when evaluating substrings:

0 performs a comparison that is case−sensitive ♦ 1 performs a comparison that is case−insensitive♦ If omitted, a case−sensitive comparison is performed♦

Return ValueString value.

ExamplesAssume that inStrings = abc Abc abcdfg asdfabc sdfdfd, searchString = abc, replaceString = ABC.

ReplaceString (inStrings, searchString, replaceString) − Returns ABC Abc ABCdfg asdfABC sdfdfd• ReplaceString (inStrings, searchString, replaceString, 5) − Returns abc Abc ABC dfg asdfABC sdfdfd•

JReport Formula

68

Page 77: JReport Designer - User Referencespecifies the driver such as JDBC driver (for JDBC) or the Data Source name (for JDBC−ODBC bridge), the user ID and the password for connecting to

ReplaceString (inStrings, searchString, replaceString, 0) − Returns ABC Abc ABCdfg asdfABC sdfdfd• ReplaceString (inStrings, searchString, replaceString, 0, 0) − Returns abc Abc abcdfg asdfabc sdfdfd• ReplaceString (inStrings, searchString, replaceString, 0, 1) − Returns ABC Abc abcdfg asdfabc sdfdfd.• ReplaceString (inStrings, searchString, replaceString, 0, −1,1) − Returns ABC ABC ABCdfg asdfABC sdfdfd.• ReplaceString (inStrings, searchString, replaceString, 0, −1, 0) − Returns ABC Abc ABCdfg asdfABC sdfdfd•

Note: The returned value of the replace function is a String, with the specified substring replacements made, that beginsat the position specified by startPosition and ends at the end of the inString string. It is not a copy of the original stringfrom start to finish.

ReplicateString

ReplicateString (String a, Integer b )This function replicates the string in String a the number of times specified by b.

Paremeters

a − a string value to be replicatedb − a BigInt value indicating the number of times that String a is to be replicated.

Return ValueThe return value is a string.

ExampleThe return value of the following statement is Stop! Stop! Stop!:

ReplicateString ( "Stop! ", 3 )

Right

Right ( String a, Integer b )This function is used to extract the specified number of characters in String a from the right side.

Parameters

a − a string value to be extractedb − a BigInt value indicating the number of characters to be extracted from String a

Return ValueThe return value is a string.

ExampleThe return value of the following statement is mother:

Right ( "She is my mother", 6 )

Soundex

Soundex (string)Evaluates a text string and returns a four−character value that symbolizes the way string sounds. Use this functionwhenever you want to locate records based on two or more field values that are spelled differently yet sound alike. Thisfunction can also be used to find customer names that have been misspelled.

JReport Formula

69

Page 78: JReport Designer - User Referencespecifies the driver such as JDBC driver (for JDBC) or the Data Source name (for JDBC−ODBC bridge), the user ID and the password for connecting to

ParameterString is one of two or more strings that sound alike.

Return ValueText string.

ExampleSoundex("Jinfonet") − Returns "J515"

Notes:

The value string must be in quotes.• Soundex works only with values that begin with the same letter: For example, Soundex will return the same valuefor Chris and Cris (C620) but not for Kris (K620) Soundex creates a code based on the first character in the string plus three characters based on the following:

Non−alpha characters (i.e. numbers and punctuation) become −1.♦ The characters a, e, i, o, u, y, h, and w are ignored (except when they are the first character in theoriginal string).

The characters b, f, p, and v become 1.♦ The characters c, g, j, k, q, s, x, and z become 2.♦ The characters d and t become 3.♦ The character l becomes 4.♦ The characters m and n become 5.♦ The character r becomes 6.♦

If the resulting code is only 2 or 3 characters long, Soundex uses zeros to fill out the code to four characters. Forexample, in the name Lauren, only the L, r, and n are translated (Lrn), so the resulting Soundex code becomesL650.

If the resulting code is more than four characters long, all characters after the fourth character are ignored. Forexample, in the name Patrick, the P, t, r, c, and k can be translated (Ptrck), but the resulting Soundex code willonly be four characters: P362.

Space

Space ( Integer a )This function returns a char value that contains a specified number of spaces.

Parametera − a BigInt value indicating the number of spaces

Return ValueThe return value is a string.

ExampleThe return value of the following statement is :

Space ( 3 )

StrCmp

StrCmp ( String a, String b)This function is used to compare two strings. It returns positive if String a is greater than String b, returns 0 if String aequals to String b, returns negative if String a is less than String b.

Parameters

a− a string value

JReport Formula

70

Page 79: JReport Designer - User Referencespecifies the driver such as JDBC driver (for JDBC) or the Data Source name (for JDBC−ODBC bridge), the user ID and the password for connecting to

b− a string value

Return ValueThe return value is an integer.

Examples

The return value of the following statement is −1:StrCmp ( "He is Tom", "I am student" )

The return value of the following statement is 0:StrCmp ( "He is Tom", "He is Tom" )

The return value of the following statement is 1:StrCmp ( "I am student", "He is Tom" )

StringSplit

StringSplit(inString, delimiterString, count, compare)Takes a String that contains a number of substrings, breaks it up into a specified number of substrings and returns anarray containing the substrings.

OverloadsstringSplit(inString) stringSplit(inString, delimiterString) stringSplit(inString, delimiterString, count) stringSplit(inString, delimiterString, count, compare)

ParametersinString − a String expression containing substrings and delimiters. delimiterString − an optional String character used to identify substring limits. If omitted, the space character (" ") isassumed to be the delimiter. If delimiter is a zero−length string, a single−element array containing the entire inStringstring is returned. count − an optional number value of sub strings to be returned. The value −1 indicates that all sub strings are returned. Ifomitted, −1 is assumed. compare − an optional Number indicating the kind of comparison to use when evaluating the delimiter string:

0 performs a comparison that is case−sensitive ♦ 1 performs a comparison that is case−insensitive♦ If omitted, a case−sensitive comparison is performed♦

Return ValueArray of String values.

ExamplesAssume that inString = "Welcome use JReport"

StringSplit(inString) − Returns [ Welcome, use, JReport]• StringSplit(inString, use ) − Returns [ Welcome, JReport]• StringSplit(inString, , 2) − Returns [ Welcome, use JReport]•

Note: If count, c, is less than the total number of substrings in inString, then at most c substrings will be returned aselements in the resultant array. The last element in the array being a concatenation of the substring and all the remainingsubstrings.

JReport Formula

71

Page 80: JReport Designer - User Referencespecifies the driver such as JDBC driver (for JDBC) or the Data Source name (for JDBC−ODBC bridge), the user ID and the password for connecting to

strReverse

strReverse(inString)This function is designed to reverse the string. Returns a String in which the character order of inString is reversed. IfinString is a zero−length string (""), a zero−length string is returned.

ParameterinString − a String whose characters are to be reversed.

Return ValueString value.

Examples

strReverse("abc") − Returns "cba".• strReverse("false") − Returns "eslaf".•

ToNumber

ToNumber ( Currency a )This function converts a currency to a number.

Parametera − a currency value

Return ValueThe return value is a number.

Examples

The return value of the following statement is 4.32:ToNumber ( $4.32 )

The result value of the following statement is 4.68:ToNumber ( $4.68 )

ToNumber( String a )This function converts a specified string to a number.

Parametera − a char value

Return ValueThe return value is a number.

ExampleThe return value of the following statement is 123.00:

ToNumber ( "123" )

Note: In this function, the format of the string should be [#] or [#].[#]. If you input a character string as the argument, thereturn value will be NULL.

JReport Formula

72

Page 81: JReport Designer - User Referencespecifies the driver such as JDBC driver (for JDBC) or the Data Source name (for JDBC−ODBC bridge), the user ID and the password for connecting to

ToText

ToText ( Integer a, String b )This function converts a BigInt value to a string.

Parameters

a − a BigInt value to be converted b − a Char value indicating the format for displaying the value in argument a

Return ValueThe return value is a string.

ExampleThe return value of the following statement is 456:

ToText ( 456, "###" )

ToText (Integer a, String b, Integer c )This function converts a BigInt value to a string.

Parameters

a − a BigInt value to be convertedb − a string indicating the format for displaying the value in ac − the number of decimal places to be converted

Return ValueThe return value is a string.

ExampleThe return value of the following statement is 456.00:

ToText ( 456, "###", 2 )

ToText ( Integer a )This function converts a BigInt value to a String.

Parametera − a BigInt value to be converted

Return ValueThe return value is a string.

ExampleThe return value of the following statement is 456.

ToText ( 456 )

ToText ( Currency a, String b, Integer c, String d, String e )This function converts a currency value to a string.

JReport Formula

73

Page 82: JReport Designer - User Referencespecifies the driver such as JDBC driver (for JDBC) or the Data Source name (for JDBC−ODBC bridge), the user ID and the password for connecting to

Parameters

a − a currency value to be convertedb − a string indicating the format for displaying the value in ac − the number of decimal places to be convertedd − a single character string indicating the character to be used to separate thousands in ae − a single character string indicating to be used as a decimal separator

Return ValueThe return value is a string.

Examples

The return value of the following statement is $4,567.123:ToText ( $4567.123, "$#,##0.00", 3, "," , "." )

The return value of the following statement is $4&567*1:ToText ( $4567.123, "$#,##0.00", 1, "&", "*" )

ToText ( Currency a, String b, Integer c, String d )This function converts a currency value to a string.

Parameters

a − a currency value to be converted b − a string indicating the format for displaying the value in ac − the number of decimal places to be convertedd − a single character string indicating the character to be used to separate thousands in a

Return ValueThe return value is a string.

ExampleThe return value of the following statement is $1*234.57:

ToText ( $1234.57, "$#,###.000", 2, "*" )

ToText ( Number a, String b )This function converts a double value to a string.

Parameters

a − a double value to be convertedb − a string indicating the format for displaying the value in a

Return ValueThe return value is a string.

ExampleThe return value of the following statement is 1236.46:

ToText ( 1236.456, " ###0.00" )

JReport Formula

74

Page 83: JReport Designer - User Referencespecifies the driver such as JDBC driver (for JDBC) or the Data Source name (for JDBC−ODBC bridge), the user ID and the password for connecting to

ToText ( Number a, Integer c, String d )This function converts a double value to a string.

Parameters

a − a double value to be converted c − the number of decimal places to be convertedd − a single character string indicating the character to be used to separate thousands in a

Return ValueThe return value is a string.

ExampleThe return value of the following statement is 1,234.6:

ToText ( 1234.567, 1, "," )

ToText ( Number a, Integer c, String d, String e )This function converts a double value to a string.

Parameters

a − a double value to be convertedc − the number of decimal places to be convertedd − a single character string indicating the character to be used to separate thousands in ae − a single character string indicating to be used as a decimal separator

Return ValueThe return value is a string.

ExampleThe return value of the following statement is 1,234,57:

ToText ( 1234.567, 2, "," , "," )

ToText ( Integer a, Integer c, String d )This function converts a BigInt value to a string.

Parameters

a − a BigInt value to be converted c − the number of decimal places to be convertedd − a single character string indicating the character to be used to separate thousands in a

Return ValueThe return value is a string.

ExampleThe return value of the following statement is 1,234.00:

ToText ( 1234, 2, "," )

ToText ( Currency a, String b, Integer c )

JReport Formula

75

Page 84: JReport Designer - User Referencespecifies the driver such as JDBC driver (for JDBC) or the Data Source name (for JDBC−ODBC bridge), the user ID and the password for connecting to

This function converts a currency value to a string.

Parameters

a − a currency value to be converted b − a string indicating the format for displaying the value in ac − the number of decimal places to be converted

Return ValueThe return value is a string.

ExampleThe return value of the following statement is $123.5:

ToText ( $123.456, "$##0.00", 1 )

ToText ( Number a )This function converts a double value to a string.

Parametera − a double value to be converted

Return ValueThe return value is a string.

ExampleThe return value of the following statement is 123.456:

ToText ( 123.456 )

ToText ( Time a, String b )This function converts a time value to a string.

Parameters

a − a time value to be convertedb − a string that defines how the value in a to be formatted

Return ValueThe return value is a string.

ExampleSuppose the time is 08:48:58, the return value of the following statement is 8:48:58 :

ToText ( ToTime( 8,48,58 ), "h:mm:ss" )

ToText ( Time a, String b, String c )This function converts a time value to a string.

Parameters

a − a time value to be convertedb − a string that defines how the value in a to be formatted

JReport Formula

76

Page 85: JReport Designer - User Referencespecifies the driver such as JDBC driver (for JDBC) or the Data Source name (for JDBC−ODBC bridge), the user ID and the password for connecting to

c − a string to be used as a label for A.M. (morning) hours.

Return ValueThe return value is a string.

ExampleSuppose the time is 8:48:58 in the morning, the return value of the following statement is 8:48:58 AM :

ToText ( ToTime( 8,48,58 ), "h:mm:ss a", "AM" )

ToText ( Time a, String b,String c, String d )This function converts a time value to a string.

Parameters

a − a time value to be convertedb − a string that defines how the value in a to be formattedc − a string to be used as a label for A.M. (morning) hours.d − a string to be used as a label for P.M. (evening) hours.

Return ValueThe return value is a string.

Examples

Suppose the time is 08:48:58, the return value of the following statement is 8:48:58 AM:ToText ( ToTime( 8,48,58 ), "h:mm:ss a", "AM", "PM" )

Suppose the time is 21:49:59, the return value of the following statement is 9:49:59 PM:ToText ( ToTime( 21,49,59 ), "h:mm:ss a", "AM", "PM" )

ToText ( DateTime a )This function converts a date/time value to a string.

Parametera − a timestamp value to be converted

Return ValueThe return value is a string.

ExampleSuppose the date is July 15,1999 and time is 7:42:51, the return value of the following statement is 15−Jul−99 7:42:51AM:

ToText ( ToDateTime( 1999,7,15,7,42,51) )

ToText ( DateTime a, String b )This function converts a date/time value to a string.

Parameters

a − a timestamp value to be convertedb − a string that defines how the date/time value in a to be formatted

JReport Formula

77

Page 86: JReport Designer - User Referencespecifies the driver such as JDBC driver (for JDBC) or the Data Source name (for JDBC−ODBC bridge), the user ID and the password for connecting to

Return ValueThe return value is a string.

ExampleSuppose the date is July 15,1999 and time is 7:42:51, the return value of the following statement is 07−15−99 7:42:51:

ToText ( ToDateTime( 1999,7,15,7,42,51), "MM−dd−yy h:mm:ss" )

ToText (DateTime a, String b, String c )This function converts a date/time value to a string.

Parameters

a − a timestamp value to be convertedb − a string that defines how the date/time value in a to be formattedc − a string to be used as a label for A.M. (morning) hours

Return ValueThe return value is a string.

ExampleSuppose the date is July 15,1999 and time is 7:42:51, the return value of the following statement is 15−Jul−99 7:42:51AM:

ToText ( ToDateTime ( 1999,7,15,7,42,51), "dd−MMM−yy h:mm:ss a", "AM" )

ToText ( DateTime a, String b, String c, String d )This function converts a date/time value to a string.

Parameters

a − a timestamp value to be convertedb − a string that defines how the date/time value in a to be formattedc − a string to be used as a label for A.M. (morning) hoursd − a string to be used as a label for P.M. (evening) hours

Return ValueThe return value is a string.

Examples

Suppose the date is Oct. 7,1999 and time is 7:42:51, the return value of the following statement is 07−Oct−99 7:42:51AM:ToText ( ToDateTime(1999,10,7,7,42,51 ), "dd−MMM−yy h:mm:ss a", "AM", "PM" )

Suppose the date is Oct. 7,1999 and time is 18:42:51, the return value of the following statement is 07−Oct−99 6:42:51PM:ToText ( ToDateTime(1999,10,7,18,42,51), "dd−MMM−yy h:mm:ss a", "AM", "PM" )

ToText ( Integer a, Integer c, String d, String e )This function converts a BigInt value to a string.

Parameters

JReport Formula

78

Page 87: JReport Designer - User Referencespecifies the driver such as JDBC driver (for JDBC) or the Data Source name (for JDBC−ODBC bridge), the user ID and the password for connecting to

a − a BigInt value to be convertedc − the number of decimal places to be convertedd − a single character string indicating the character to be used to separate thousands in ae − a single character string indicating to be used as a decimal separator

Return ValueThe return value is a string.

ExampleThe return value of the following statement is 12,345.00:

ToText ( 12345, 2, ",", "." )

ToText ( Currency a, String b )This function converts a currency value to a string.

Parameters

a − a currency value to be convertedb − a string indicating the format for displaying the value in a

Return ValueThe return value is a string.

ExampleThe return value of the following statement is $123.45:

ToText ( $123.45, "$##0.00" )

ToText ( Integer a, Integer c )This function converts a BigInt value to a string.

Parameters

a − a BigInt value to be convertedc − the number of decimal places to be converted

Return ValueThe return value is a string.

ExampleThe return value of the following statement is 123.00:

ToText ( 123, 2 )

ToText ( Currency a, Integer c, String d )This function converts a currency value to a string.

Parameters

a − a currency value to be convertedc − the number of decimal places to be converted

JReport Formula

79

Page 88: JReport Designer - User Referencespecifies the driver such as JDBC driver (for JDBC) or the Data Source name (for JDBC−ODBC bridge), the user ID and the password for connecting to

d − a single character string indicating the character to be used to separate thousands in a

Return ValueThe return value is a string.

ExampleThe return value of the following statement is $1,234.57:

ToText ( $1234.567, 2, "," )

ToText ( Currency a, Integer c )This function converts a currency value to a string.

Parameters

a − a currency value to be convertedc − the number of decimal places to be converted

Return ValueThe return value is a string.

ExampleThe return value of the following statement is $123.46:

ToText ( $123.4567, 2 )

ToText ( Number a, Integer c )This function converts a double value to a string.

Parameters

a − a double value to be convertedc − the number of decimal places to be converted

Return ValueThe return value is a string.

ExampleThe return value of the following statement is 123.46:

ToText ( 123.456, 2 )

ToText ( Currency a, Integer c, String d,String e )This function converts a currency value to a string.

Parameters

a − a currency value to be convertedc − the number of decimal places to be convertedd − a single character string indicating the character to be used to separate thousands in ae − a single character string indicating to be used as a decimal separator

Return Value

JReport Formula

80

Page 89: JReport Designer - User Referencespecifies the driver such as JDBC driver (for JDBC) or the Data Source name (for JDBC−ODBC bridge), the user ID and the password for connecting to

The return value is a string.

ExampleThe return value of the following statement is $1,234.57:

ToText ( $1234.567, 2, ",", "." )

ToText ( Date a )This function converts a date value to a string.

Parametera − a date value

Return ValueThe return value is a string.

ExampleSuppose the date is July 15,1999, the return value of the following statement is 15−Jul−99:

ToText ( ToDate ( 1999,7,15 ) )

ToText ( Currency a )This function converts a currency value to a string.

Parametera − a currency value to be converted

Return ValueThe return value is a string.

ExampleThe return value of the following statement is $123.45:

ToText ( $123.45 )

ToText ( Bit a )This function converts a bit value to a string, either true or false.

Parametera − a Bit value

Return ValueThe return value is a string.

ExampleThe return value of the following statement is false:

ToText ( 3<2 )

ToText ( Date a, String b )This function converts a date value to a string.

JReport Formula

81

Page 90: JReport Designer - User Referencespecifies the driver such as JDBC driver (for JDBC) or the Data Source name (for JDBC−ODBC bridge), the user ID and the password for connecting to

Parameters

a − a date valueb − a string that defines how the date value in a to be formatted

Return ValueThe return value is a string.

ExampleSuppose the date is July 15,1999, the return value of the following statement is 15−Jul−99:

ToText ( ToDate( 1999,7,15 ), "dd−MMM−yy" )

ToText ( Time a )This function converts a time value to a string.

Parametera − a time value

Return ValueThe return value is a string.

ExampleSuppose the time is 12:40:30, the return value of the following statement is 12:40:30 PM:

ToText ( ToTime ( 12,40,30 ) )

ToText ( Number a, String b, Integer c, String d )This function converts a double value to a string.

Parameters

a − a double value to be converted b − a string indicating the format for displaying the value in ac − the number of decimal places to be convertedd − a single character string indicating the character to be used to separate thousands in a

Return ValueThe return value is a string.

ExampleThe return value of the following statement is 1,234.57:

ToText ( 1234.567, "#,###.000", 2, "," )

ToText ( Integer a, String b, Integer c, String d, String e )This function converts a BigInt value to a string.

Parameters

a − a BigInt value to be converted b − a string indicating the format for displaying the value in ac − the number of decimal places to be converted

JReport Formula

82

Page 91: JReport Designer - User Referencespecifies the driver such as JDBC driver (for JDBC) or the Data Source name (for JDBC−ODBC bridge), the user ID and the password for connecting to

d − a single character string indicating the character to be used to separate thousands in ae − a single character string indicating to be used as a decimal separator

Return ValueThe return value is a string.

ExampleThe return value of the following statement is 1,234.00:

ToText ( 1234, "#,###", 2, ",", "." )

ToText ( Number a, String b, Integer c )This function converts a double value to a string.

Parameters

a − a double value to be converted b − a string indicating the format for displaying the value in ac − the number of decimal places to be converted

Return Value

The return value is a string.

ExampleThe return value of the following statement is 123.46:

ToText ( 123.456, "###.00", 2 )

ToText ( Integer a, String b, Integer c, String d )This function converts a BigInt value to a string.

Parameters

a − a BigInt value to be converted b − a string indicating the format for displaying the value in ac − the number of decimal places to be convertedd − a single character string indicating the character to be used to separate thousands in a

Return ValueThe return value is a string.

ExampleThe return value of the following statement is 1,234.00:

ToText ( 1234, "#,###", 2, ",", "." )

ToText ( Number a, String b, Integer c, String d,String e )This function converts a double value to a string.

Parameters

a − a double value to be converted

JReport Formula

83

Page 92: JReport Designer - User Referencespecifies the driver such as JDBC driver (for JDBC) or the Data Source name (for JDBC−ODBC bridge), the user ID and the password for connecting to

b − a string indicating the format for displaying the value in ac − the number of decimal places to be convertedd − a single character string indicating the character to be used to separate thousands in ae − a single character string indicating to be used as a decimal separator

Return ValueThe return value is a string.

ExampleThe return value of the following statement is 1,234.57:

ToText ( 1234.567, "#,###.000", 2, ",", "." )

Notes:

When converting a double value, currency value or a BigInt value to a string, special characters used as format inargument b are following:

Symbol Meaning Notes

0 a digit

* a digit, zero shows as a star Can't mix 0, *, and _in same format

_ a digit, zero shows as a space Can't mix 0, *, and _in same format

# a digit, zero shows as absent

. placeholder for decimal separator

, placeholder for grouping delimiter Shows the intervalto be used

; separates formats positive andnegative.

− if there is no explicit negative sign, − is prefixed "0.00" −>"0.00;−0.00"

% divide by 100 and show as percentage

X any other characters can be used in the prefix or suffix

Time format syntax: The time format is specified by means of a string time pattern. In this pattern, all ASCII letters are reserved as patternletters, which are defined as the following:

Symbol Meaning Presentation Example

G era designator Text AD

y year Number 1996

JReport Formula

84

Page 93: JReport Designer - User Referencespecifies the driver such as JDBC driver (for JDBC) or the Data Source name (for JDBC−ODBC bridge), the user ID and the password for connecting to

M month in year Text & Number July & 07

d day in month Number 10

h hour in am/pm (1~12) Number 12

H hour in day (0~23) Number 0

m minute in hour Number 30

s second in minute Number 55

S millisecond Number 978

E day in week Text Tuesday

D day in year Number 189

F day of week in month Number 2 (2nd

Wed in July)

w week in year Number 27

W week in month Number 2

a am/pm marker Text PM

k hour in day (1~24) Number 24

K hour in am/pm (0~11) Number 0

z time zone Text Pacific Standard Time

' escape for text

'' single quote

ToWords

ToWords ( Number a )This function converts a number field value or the result of a numeric calculation to words.

Parametera − a fractional number to be converted into words

Return ValueThe return value is a string.

ExampleThe return value of the following statement is ten and 12/100:

ToWords ( 10.12 )

ToWords (Integer a )This function converts a number field value or the result of a numeric calculation to words.

JReport Formula

85

Page 94: JReport Designer - User Referencespecifies the driver such as JDBC driver (for JDBC) or the Data Source name (for JDBC−ODBC bridge), the user ID and the password for connecting to

Parameter

a − a BigInt value to be converted into words

Return ValueThe return value is a string.

ExampleThe return value of the following statement is twenty and xx/100:

ToWords ( 20 )

ToWords ( Currency a )This function converts a number field value or the result of a numeric calculation to words.

Parametera − a currency value to be converted into words

Return ValueThe return value is a string.

ExampleThe return value of the following statement is three and 15/100:

ToWords ( $3.15 )

ToWords ( Number a, Integer b ) This function converts a number field value or the result of a numeric calculation to words.

Parameters

a − a number value to be converted into wordsb − a BigInt value indicating the number of decimal places to be converted. This argument is optional.

Return ValueThe return value is a string.

ExampleThe return value of the following statement is three and 1/10:

ToWords ( 3.14, 1)

ToWords ( Integer a, Integer b )This function converts a number field value or the result of a numeric calculation to words.

Parameters

a − a BigInt value to be converted into wordsb − a BigInt value indicating the number of decimal places to be converted. This argument is optional.

Return ValueThe return value is a string.

JReport Formula

86

Page 95: JReport Designer - User Referencespecifies the driver such as JDBC driver (for JDBC) or the Data Source name (for JDBC−ODBC bridge), the user ID and the password for connecting to

ExampleThe return value of the following statement is three and x/10:

ToWords ( 3, 1 )

ToWords ( Currency a, Integer b )This function converts a number field value or the result of a numeric calculation to words.

Parameters

a − a currency value to be converted into wordsb − a BigInt value indicating the number of decimal places to be converted. This argument is optional.

Return ValueThe return value is a string.

ExampleThe return value of the following statement is three and 5/10:

ToWords ( $3.45, 1)

Trim

Trim ( String a )This function is used to remove the leading and the trailing spaces from string arguments.

Parametera − a Char value

Return ValueThe return value is a string.

ExampleThe return value of the following statement is he is a boy.

Trim ( " he is a boy " )

TrimLeft ( String a )This function is used to remove the spaces on the left side of the string.

Parametera − a Char value to be trimmed

Return ValueThe return value is a string.

ExampleThe return value of the following statement is he is a boy:

TrimLeft ( " he is a boy " )

TrimRight (String a )This function is used to remove the spaces on the right side of the string.

JReport Formula

87

Page 96: JReport Designer - User Referencespecifies the driver such as JDBC driver (for JDBC) or the Data Source name (for JDBC−ODBC bridge), the user ID and the password for connecting to

Parametera − a Char value to be trimmed

Return ValueThe return value is a string.

ExampleThe return value of the following statement is he is a boy.

TrimRight ( " he is a boy " )

UpperCase

UpperCase ( String a )This function converts all letters in a to uppercase letters.

Parametera − a Char value

Return ValueThe return value is a string.

ExampleThe return value of the following statement is HE IS A BOY:

UpperCase ( " he is a boy" )

Val

Val ( String a )This function reads a string containing numbers (e.g. address, phone or social security number) and converts them to adecimal value. Val stops reading when it finds the first character in the string.

Parametera − a Char value

Return ValueThe return value is a number.

ExampleThe return value of the following statement is 63,550,513.00:

Val ( "63550513Mr.Tom" )

Current

CurrentDate ( )This function returns the current date on a report.

Return ValueThe return value is a date.

JReport Formula

88

Page 97: JReport Designer - User Referencespecifies the driver such as JDBC driver (for JDBC) or the Data Source name (for JDBC−ODBC bridge), the user ID and the password for connecting to

ExampleIf today is Oct. 6,1999, the return value of the following statement is 10/06/99:

CurrentDate ( )

CurrentDateTime( )This function returns the current date and time on a report.

Return ValueThe return value is a datetime.

ExampleIf today is Oct.6,1999, the current time is 5:10:27 p.m., the return value of the following statement is 1999−10−0605:10:27:

CurrentDateTime ( )

CurrentTime ( )This function returns the current time on a report.

Return ValueThe return value is a time.

ExampleIf the current time is 5:10:27 p.m., the return value of the following statement is 05:10:27:

CurrentTime( )

DateAdd

DateAdd (intervalType, nIntervals, startDateTime)Returns a date−time value to which a specified number of time intervals have been added.

This function is used to add interval of time to a DataTime. Its main feature is that the DateTime returned will always bevalid. For example, the function takes into account such factors as the number of days in a month and leap years. If youwant to add or subtract days to a DateTime, you could use the addition and subtraction operators instead of the functionwith the "d" parameter. However, the function also handles other types of intervals such as adding months or hours to aDateTime.

ParametersintervalType − a string expression specifying the interval of time to be added.

IntervalType value Description

yyyy Year

q Quarter (3−month period)

m Month

y Day of year

d Day

w Weekday

ww Week (7−day period)

h Hour

n Minute

JReport Formula

89

Page 98: JReport Designer - User Referencespecifies the driver such as JDBC driver (for JDBC) or the Data Source name (for JDBC−ODBC bridge), the user ID and the password for connecting to

s Second

nIntervals − a number or numeric expression specifying the number of intervals to be added. It can be positive (to getdate−times in the future) or negative (to get date−times in the past). startDateTime − the date−time value to which the intervals are to be added.

Return ValueA date−time value.

Examples

DateAdd("d", −32, ToDateTime (1999,9,28 )) − Returns the DateTime value for 1999−8−27 00:00:00• DateAdd ("m", 1, ToDateTime(1996,1,31)) − Returns the DateTime value for 1996−2−29 00:00:00. Notice thatDateAdd will not return the invalid value 1996−2−31 00:00:00

DateAdd ("q", 17, ToDataTime(1999,9,28)) − Returns the DateTime value for 2003−12−28 00:00:00• DateAdd ("h", −400, ToDateTime(1999,9,28)) − Returns the DateTime value for 1999−9−11 08:00:00. In otherwords, this is the result of subtracting 400 hours from 1999−9−28 00:00:00

Notes:

To add days to a date−time, you can use any of the interval type parameters "y", "d" or "w". They all have thesame effect for DateAdd.

DateAdd returns a DateTime value and not a Date value. However, you may need to convert this DateTimevalue to a Date value in certain situations (such as if you wanted to assign the value returned by DateAdd to aDate type variable). To convert to a Date value, use DateAdd in combination with the ToDate type conversionfunction. For example, the following returns the Date value for October 6, 1997: ToDate (DateAdd(yyyy, −2, ToDateTime(1999,10,6))

DateDiff

DateDiff (intervalType, startDateTime, endDateTime, firstDayOfWeek)Returns a number of time intervals between two specified dates.

OverloadDateDiff (intervalType, startDateTime, endDateTime)DateDiff (intervalType, startDateTime, endDateTime, firstDayOfWeek)

ParametersintervalType − a String expression that is the interval of time you use to calculate the difference between startDateTimeand endDateTime. Possible values can be:

IntervalType value Description

Yyyy Year

Q Quarter

M Month

Y Day of year

D Day (both "y" and "d" find the difference in days)

WNumber of weeks between startDateTime andendDateTime

WwNumber of firstDayOfWeek's betweenstartDateTime and endDateTime

H Hour

N Minute

JReport Formula

90

Page 99: JReport Designer - User Referencespecifies the driver such as JDBC driver (for JDBC) or the Data Source name (for JDBC−ODBC bridge), the user ID and the password for connecting to

S Second

startDateTime − the first date−time value used in calculating the difference. endDateTime − the second date−time value used in calculating the difference. firstDayOfWeek − an optional constant specifying the first day of the week. If not specified, jrSunday is assumed.

Constant Description

jrUseSystem 0 (Use the current system date)

jrSunday 1

jrMonday 2

jrTuesday 3

jrWednesday 4

jrThursday 5

jrFriday 6

jrSaturday 7

Return ValueA number value.

Examples

Use DateDiff with the "d" or "y" interval type parameter to find the number of days between two dates

DateDiff ("d", ToDateTime(1999,10,7), ToDateTime (1999,10,10)) − Returns 3

Use DateDiff with the "yyyy" interval type parameter to find the number of years difference between two dates.This use of DateDiff is the same as finding the difference between the year of endDateTime and the year ofstartDateTime.

DateDiff ("yyyy", ToDateTime(1999,10,7), ToDateTime (2005,2,10)) − Returns 6

DateDiff ("yyyy", ToDateTime (1999,12,31), ToDateTime (2000,1,1)) − Returns 1 (a 1 year difference), eventhough there is only a 1 day difference between the dates

DateDiff ("yyyy", ToDateTime (1999,1,1), ToDateTime (1999,12,31)) − Returns 0 (a 0 year difference), eventhough there is a 364 days difference

Suppose that for the above examples, the first date is the date that you bought a mutual fund, and the seconddate is the date you sold it. The mutual fund company must send you an annual report for every year in whichyou owned units in the fund. Thus, you would get 7, 2 and 1 annual reports respectively, in the above cases.

Use DateDiff with the "q" parameter to find the number of quarters (3 month periods) difference between twodates.

DateDiff ("q", ToDateTime (1999,10,6), ToDateTime(2003,5,20)) − Returns 14

DateDiff ("q", ToDateTime (1999,3,31), ToDateTime (1999,4,1)) − Returns 1. The two dates are in adjacentquarters

DateDiff ("q", ToDateTime (1999,1,1), ToDateTime (1999,3,31)) − Returns 0. The two dates are in the samequarter.

Suppose the mutual fund company in the "yyyy" example mailed out quarterly reports. Then it would need to mailout 15, 2 and 1 quarterly reports respectively, in the above cases.

JReport Formula

91

Page 100: JReport Designer - User Referencespecifies the driver such as JDBC driver (for JDBC) or the Data Source name (for JDBC−ODBC bridge), the user ID and the password for connecting to

Use DateDiff with the "m" parameter to find the number of months difference between two dates.

DateDiff ("m", ToDateTime (1999,3,15), ToDateTime (1999,7,13)) − Returns 4

• Use DateDiff with the "w" parameter to calculate the number of weeks between two dates. For example, ifstartDateTime is on a Tuesday, DateDiff counts the number of Tuesdays between startDateTime andendDateTime not including the initial Tuesday of startDateTime. Note however that it counts endDateTime ifendDateTime is on a Tuesday.

DateDiff ("w", ToDateTime (1999,10,19), ToDateTime (1999,10,25)) − Returns 0

DateDiff ("w", ToDateTime (1999,10,19), ToDateTime (1999, 10,26)) − Returns 1

DatePart

DatePart (intervalType, inputDateTime, firstDayOfWeek, firstWeekOfYear)Returns a Number that specifies a given part of a given date.

OverloadsDatePart (intervalType, inputDateTime)DatePart (intervalType, inputDateTime, firstDayOfWeek)DatePart (intervalType, inputDateTime, firstDayOfWeek, firstWeekOfYear)DatePart (intervalType, inputTime)DatePart (intervalType, inputTime, firstDayOfWeek)DatePart (intervalType, inputTime, firstDayOfWeek, firstWeekOfYear)

ParametersintervalType − a string expression that specifies the part of a date to be returned. Possible values can be:

IntervalType value Description

Yyyy Extracts the year

Q Quarter (the result is 1, 2, 3 or 4)

M Month (the result is from 1 to 12)

Y Day of year (1 to 365 or 366 in a leap year)

DDay part of the date (1 to 31) Year

WDay of week (1 to 7 with the result depending onfirstDayOfWeek)

WwWeek of year (1 to 53 with firstDayOfWeek andfirstWeekOfYear determining the exact days ofthe first calendar week of the year)

HExtracts the hour part of the given DateTime (0 to23)

N Minute part (0 to 59)

S Second part (0 to 59)

inputDateTime − the DateTime value whose part will be extracted. FirstDayOfWeek − an optional constant used to specify the first day of the week. If not specified, jrSunday is assumed

Constant Description

jrUseSystem 0 (Use the current system date)

jrSunday 1

JReport Formula

92

Page 101: JReport Designer - User Referencespecifies the driver such as JDBC driver (for JDBC) or the Data Source name (for JDBC−ODBC bridge), the user ID and the password for connecting to

jrMonday 2

jrTuesday 3

jrWednesday 4

jrThursday 5

jrFriday 6

jrSaturday 7

firstWeekOfYear − an optional constant specifying the first week of the year. If not specified, the first week is assumed tobe the one in which Jan. 1 occurs (jrFirstJan1).

Constant Value Description

jrUseSystem 0 Start with week in which system date occurs

jrFirstJan1 1Start with week in which January 1 occurs(default)

jrFirstFourDays 2Start with the first week that has at least fourdays in the new year

jrFirstFullWeek 3 Start with first full week of the year

Examples

DatePart ("d", ToDateTime (1999,8,15)) − Returns 15• DatePart ("m", ToDateTime (1999,8,15)) − Returns 8• DatePart ("n", ToDateTime (1999,8,15,10,35,0)) − Returns 35• DatePart ("q", ToDateTime (1999, 9, 29))Returns 3 since September 29 is in the third quarter of the year

DatePart ("ww", ToDateTime (1997, 9,14)#September 14, 1997#)Returns 38 since 1997−9−14 is in the 38th week of 1997

Note: The DatePart function with "yyyy" intervalType parameter is the same as the Year function. Similarly, the DatePartfunction with "m", "d", "w", "h", "n" and "s" intervalType argument is the same as the functions Month, Day, Weekday (orDayOfWeek), Hour, Minute and Second respectively. On the other hand, there is no easy alternative to using theDatePart function for the "q", "y" and "ww" intervalType parameters.The firstDayOfWeek parameter affects the DatePart function when the interval type parameter is "w" or "ww". For allother intervalType parameter values, it is ignored.The firstWeekOfYear parameter affects the DatePart function only when the intervalType argument is "ww". For all otherintervalType argument values, it is ignored.

DateTime

DateTimeToDate ( Datetime a )This function evaluates the specified timestamp value and returns only the date.

Parametera − a timestamp value

Return ValueThe return value is a date.

ExampleIf the current date is Oct. 17, 1999 and the current time is 12:27:15, the return value of the following statement is10/17/99:

DateTimeToDate ( CurrentDateTime( ) )

JReport Formula

93

Page 102: JReport Designer - User Referencespecifies the driver such as JDBC driver (for JDBC) or the Data Source name (for JDBC−ODBC bridge), the user ID and the password for connecting to

DateTimeToSeconds ( Datetime a )This function evaluates the specified value and converts the time to the number of seconds from 00:00:00 to thespecified time.

Parametera − a timestamp value

Return ValueThe return value is an integer.

ExampleIf the current date is Oct. 17, 1999 and the current time is 12:27:15, the return value of the following statement is 44835:

DateTimeToSeconds( CurrentDateTime( ) )

DateTimeToTime ( Datetime a )This function evaluates the specified timestamp value and returns only the time.

Parametera − a timestamp value

Return ValueThe return value is a time.

ExampleIf the current date is Oct. 17, 1999 and the current time is 12:27:15, the return value of the following statement is12:27:15:

DateTimeToTime ( CurrentDateTime( ) )

DateTimeTo2000

DateTimeTo2000 (Datetime, Number)

2 digit years (xx)If the Year value is greater than the windowing number, 19 is appended before the 2 digits (19xx). If the Yearvalue is less than or equal to the windowing number, 20 is appended (20xx).

4 digit years (19xx)If the last two digits in the Year value are greater than the windowing number, the Year is preserved as found inthe date field (19xx). If the two digits in the Year value are less than or equal to the windowing number, the firsttwo digits are changed to 20 (20xx). If the first two digits in the year field are 20, the Year is preserved as foundin the date field (20xx).

Note: If the year is less than or equal to 1899 and greater or equal to 100, then there will be no change to thedate.

ParametersDateTime − accepts only valid date−time fields, with either 2 digit or 4 digit years.Number − a number between 0 and 99 corresponding with the desired windowing year.

Return ValueA date field with a four digit year

JReport Formula

94

Page 103: JReport Designer - User Referencespecifies the driver such as JDBC driver (for JDBC) or the Data Source name (for JDBC−ODBC bridge), the user ID and the password for connecting to

Examples

Here the window value is greater than the year and so it will change it to 20XX.

DateTimeTo2000 (ToDateTime (1998,12,12,3,2,1), 99) − Returns 2098−12−12 3:02:01

Here the window value is less than the year and so it will not change the year.

DateTimeTo2000 (ToDateTime(1995,1,2,3,2,1), 94) − Returns 1995−01−02 3:02:01

These are examples of a date that will not be affected by the function.

DateTimeTo2000 (ToDateTime(1899,12,12,5,6,7), 99) − Returns 1899−12−12 5:06:07

DateTimeTo2000 (ToDateTime(999,12,12,5,6,7), 99) − Returns 999−12−12 5:06:07

Some databases maintain the year of a date as a two−digit field and so these samples will simulate that datefield.

DateTimeTo2000 (ToDateTime (93,12,12,5,6,7), 96) − Returns 2093−12−12 5:06:07

DateTimeTo2000 (ToDateTime (98,12,12,5,6,7), 50) − Returns 1998−12−12 5:06:07

DateTo2000

DateTo2000 (date, number)

2 digit years (xx)If the Year value is greater than the windowing number, 19 is appended before the 2 digits (19xx). If the Yearvalue is less than or equal to the windowing number, 20 is appended (20xx).

4 digit years (19xx)If the last two digits in the Year value are greater than the windowing number, the Year is preserved as found inthe date field (19xx). If the last two digits in the Year value are less than or equal to the windowing number, thefirst two digits are changed to 20 (20xx). If the first two digits in the year field are 20, the Year is preserved asfound in the date field (20xx).

Parametersdate − accepts only valid date fields, with either 2 digit or 4 digit years.number − a number between 0 and 99 corresponding with the desired windowing year.

Return ValueA date field with a four digit year.

Examples

DateTo2000 (ToDate (1993,12,12), 99) − Returns 2093/12/12 since the window value is greater than the yearand so it will change it to 20XX.

DateTo2000 (ToDate (1993,12,12), 92) − Returns 1993/12/12 since the window value is less than the year andso it will not change the year.

This is an example of a date that will not be affected by the function.

DateTo2000 (ToDate(1899,12,12), 99) − Returns 1899/12/12

This is an example of a date that will not be affected by the function.

DateTo2000 (ToDate (100,12,12), 99) − Returns 100/12/12

Some databases maintain the year of a date as a two−digit field and so this will simulate that date field.

DateTo2000 (ToDate (98,12,12), 99) − Returns 2098/12/12

DateTo2000 (ToDate (98,12,12), 97) − Returns 1998/12/12•

JReport Formula

95

Page 104: JReport Designer - User Referencespecifies the driver such as JDBC driver (for JDBC) or the Data Source name (for JDBC−ODBC bridge), the user ID and the password for connecting to

DateTo2000 (ToDate (9,12,12), 10) − Returns 2009/12/12• DateTo2000 (ToDate (1,12,12), 0) − Returns 1901/12/12•

Note: If the year is less than or equal to 1899 and greater or equal to 100, then there will be no change to the date. Whether your database dates are interpreted as two digit years or 4 digit years (19xx) is dependent on the databasedriver you are using. The result of the formula should be the same in either case.

Day

Day( )This function returns the day of the month.

Return ValueThe return value is an integer.

ExampleIf today is Oct. 17,1999, the return value of the following statement is 17:

Day( )

Day ( Datetime a )This function extracts the day portion of a specified date value.

Parametera − a timestamp value

Return ValueThe return value is an integer.

ExampleIf the current date is Oct. 17, 1999 and the current time is 12:27:15, the return value of the following statement is 17:

Day ( CurrentDateTime( ) )

Day ( Date a )This function extracts the day portion of a specified date value.

Parametera − a date value

Return ValueThe return value is an integer.

ExampleIf the current date is Oct. 17, 1999, the return value of the following statement is 17:

Day ( CurrentDate( ) )

DayOfWeek ( Datetime a )

This function extracts the day portion of a specified date value, indicates which day of the week.

JReport Formula

96

Page 105: JReport Designer - User Referencespecifies the driver such as JDBC driver (for JDBC) or the Data Source name (for JDBC−ODBC bridge), the user ID and the password for connecting to

Parametera − a timestamp value

Return ValueThe return value is an integer.

ExampleIf the current date is Oct. 17,1999 , current time is 12:27:15 and today is Sunday, the return value of the followingstatement is 1 (Sunday is the first day of the week):

DayOfWeek ( CurrentDateTime( ) )

DayOfWeek ( Date a )This function extracts the day portion of a specified date value, indicates which day of the week.

Parametera − a date value

Return ValueThe return value is an integer.

ExampleIf today is Oct. 17,1999 and today is Sunday, the return value of the following statement is 1:

DayOfWeek (CurrentDate( ) )

DayOfWeek( )This function returns the day of the week.

Return ValueThe return value is an integer.

ExampleIf today is Thursday, the return value of the following statement is 5.

DayOfWeek( )

DayOfYear( )This function returns the day of the year.

Return ValueThe return value is an integer.

ExampleIf today is Oct. 17,1999, the return value of the following statement is 290.

DayOfYear( )

DTSTo2000

DTSTo2000 (DateString, Number)

JReport Formula

97

Page 106: JReport Designer - User Referencespecifies the driver such as JDBC driver (for JDBC) or the Data Source name (for JDBC−ODBC bridge), the user ID and the password for connecting to

2 digit years (xx)If the Year value is greater than the windowing number, 19 is appended before the 2 digits (19xx). If the Yearvalue is less than or equal to the windowing number, 20 is appended (20xx).

4 digit years (19xx)If the last two digits in the Year value are greater than the windowing number, the Year is preserved as found inthe date field (19xx). If the two digits in the Year value are less than or equal to the windowing number, the firsttwo digits are changed to 20 (20xx). If the first two digits in the year field are 20, the Year is preserved as foundin the date field (20xx).

Note: If the year is less than or equal to 1899 and greater than or equal to 100, there will be no change to thedate.

ParametersDate String − accepts only valid date fields, with either 2 digit or 4 digit years. A date−time string entered in the format:"yyyy/MM/dd HH: mm: ss.00" or "yy/MM/dd HH:mm:ss:00", example: "1997/04/11 12:12:12.00" or "97/04/11 12:12:12.00".Number − a number between 0 and 99 corresponding with the desired windowing year.

Return ValueA DateTime string with a four digit year.

Examples

DTSTo2000 (1988−12−12 12:12:12, 90) − Returns 2088−12−12 12:12:12 since the window value is greater thanthe year and so it will change it to 20XX.

DTSTo200 (1988−12−12 12:12:12, 85) − Returns 1988−12−12 12:12:12 since the window value is less than theyear and so it will not change the year.

These are examples of a date that will not be affected by the function. •

DTSTo2000 (1899/12/12 1:2:3am, 99) − Returns 1899/12/12 1:2:3am

DTSTo2000 (100/12/12 1:02:03AM, 99) − Returns 100/12/12 1:02:03AM

Some databases maintain the year of a date as a two−digit field and so these samples will simulate that datefield.

DTSTo2000 (98/12/12 1:02:03AM, 99) − Returns 2098/12/12 1:02:03AM

DTSTo2000 (98/12/12 1:02:03, 97) − Returns 1998/12/12 1:02:03AM

DTSTo2000 (9/12/12 1:02:03AM, 10) − Returns 2009/12/12 1:02:03AM

DTSTo2000 (1/12/12 1:02:03AM, 0) − Returns 1901/12/12 1:02:03AM

DTSToSeconds

DTSToSeconds(string)Evaluates the string specified and converts the Time value to the number of seconds from 00:00:00 (12:00 midnight) tothe specified time.

Patameterstring − a string including a data and a time value.

Return ValueWhole number.

Example

JReport Formula

98

Page 107: JReport Designer - User Referencespecifies the driver such as JDBC driver (for JDBC) or the Data Source name (for JDBC−ODBC bridge), the user ID and the password for connecting to

DTSToSeconds("2004/06/11 13:42:15") − Returns 49335.

ForEach

ForEachDay ( Datetime a )This function returns the date portion of a specified datetime value.

Parametera − a datetime value

Return ValueThe return value is a date.

ExampleIf the datetime is Dec.25,1999 20:12:50, the return value of the following statement is 12/25/99:

ForEachDay ( ToDateTime(1999,12,25,20,12,50) )

ForEachWeek ( DateTime a )This function returns the date of the first day of the week.

Parametera − a datetime value

Return ValueThe return value is a date.

ExampleIf the datetime is Oct. 15,1999 5:15:20 and it is Friday, the return value of the following statement is 10/10/99:

ForEachWeek ( ToDateTime(1999,10,15,5,15,20) )

ForEachHalfMonth ( DateTime a )If the day in the datetime is less than 15, then this function will return to the first day of the month; if the day is more than15, the function will return to the 16th day of this month.

Parametera − a datetime value

Return ValueThe return value is a date.

Examples

If the datetime is Sep.13,1999 12:27:15, the return value of the following statement is 09/01/99:ForEachHalfMonth ( ToDateTime(1999,9,13,12,27,15) )

If the datetime is Oct.18,1999 5:21:22, the return value of the following statement is 10/16/99:ForEachHalfMonth ( ToDateTime(1999,10,18,5,21,22) )

ForEachMonth ( DateTime a )This function returns the first day of the month in a specified datetime value

JReport Formula

99

Page 108: JReport Designer - User Referencespecifies the driver such as JDBC driver (for JDBC) or the Data Source name (for JDBC−ODBC bridge), the user ID and the password for connecting to

Parametera − a datetime value

Return ValueThe return value is a date.

ExampleIf the datetime is Sep.24,1999 12:05:56, the return value of the following statement is 09/01/99:

ForEachMonth ( ToDateTime(1999,9,24,12,5,56) )

ForEachQuarter ( DateTime a )If the month of a specified datetime is before April, then the function will return to Jan. 1 of the year; if the month is afterApril but before July, the function will return to April. 1 of the year; if the month is after July but before October, thefunction will return to July. 1 of the year; if the month is after October, then the function will return to Oct.1 of the year.

Parametera − a datetime value

Return Valuethe return value is a date

Examples

If the datetime is Feb.14,1997 2:10:23, the return value of the following statement is 01/01/97ForEachQuarter ( ToDateTime(1997,2,14,2,10,23) )

If the datetime is May. 28,1999 10:10:25, the return value of the following statement is 04/01/99ForEachQuarter ( ToDateTime(1999,5,28,10,10,25) )

If the datetime is Aug. 28,1999 10:10:25, the return value of the following statement is 07/01/99ForEachQuarter ( ToDateTime(1999,8,28,10,10,25) )

If the datetime is Nov. 11,1998 11:40:23, the return value of the following statement is 10/01/98ForEachQuarter ( ToDateTime(1998,11,11,11,40,23) )

ForEachHalfYear ( DateTime a )If the month of a specified datetime is after July, the function will return to Jan.1 of the year; otherwise the function willreturn to July 1 of the year.

Parametera − a datetime value

Return ValueThe return value is a date.

Examples:

If the datetime is May. 28,1999 10:10:25, the return value of the following statement is 01/01/99:ForEachHalfYear ( ToDateTime(1999,5,28,10,10,25) )

If the datetime is Nov. 15,1998 11:40:23, the return value of the following statement is 07/01/99:ForEachHalfYear ( ToDateTime(1998,11,15,11,40,23) )

JReport Formula

100

Page 109: JReport Designer - User Referencespecifies the driver such as JDBC driver (for JDBC) or the Data Source name (for JDBC−ODBC bridge), the user ID and the password for connecting to

ForEachYear ( DateTime a )This function will return to Jan.1 of the year.

Parametera − a datetime value

Return ValueThe return value is a date.

ExampleIf the datetime is Aug. 28,1999 10:10:25, the return value of the following statement is 01/01/99:

ForEachYear ( ToDateTime(1999,8,28,10,10,25) )

Hour

Hour ( Time a )This function extracts the hour portion of a specified time value.

Parametera − a time value

Return ValueThe return value is an integer.

ExampleSuppose the time is 10:05:26, the return value of the following statement is 10:

Hour ( ToTime(10, 5, 26) )

Hour( )This function extracts the hour portion of the current time.

Return ValueThe return value is an integer.

ExampleIf the current time is 8:15:30, the return value of the following statement is 8:

Hour( )

Hour ( DateTime a )This function extracts the hour portion of a specified timestamp value.

Parametera − a timestamp value

Return ValueThe return value is an integer.

ExampleSuppose the datetime is Oct. 15,1999 9:35:22, the return value of the following statement is 9:

Hour ( ToDateTime(1999,10,15,9,35,22) )

JReport Formula

101

Page 110: JReport Designer - User Referencespecifies the driver such as JDBC driver (for JDBC) or the Data Source name (for JDBC−ODBC bridge), the user ID and the password for connecting to

IsDate

IsDate (number or string)Returns True if the given String or Number value can be converted to a valid Date and returns False otherwise. A validDate is any date between 100−1−1 and 9999−12−31.

Parametersnumber − a number value representing the number of days starting from January 1, 1900. It can be positive or negative,and is truncated if fractional.string − a text string representing a date and many forms can be accepted. If the string is a right date value and format,the function returns true, or it returns false.

Return ValueBoolean value, True or False.

Examples

IsDate (50) − Returns true since the number 50 is interpreted as 50 days from Jan. 1, 1900, which is Feb 19,1900.

IsDate (−50) − Returns true since the number 50 is interpreted as 50 days before Jan 1, 1900, which is Nov 11,1899.

IsDate (Feb 1, 2004) − Returns true since the string is a right date value and there is only one blank betweenFeb and 1, and 2004.

IsDate ( 2004 − 2 − 19) − Returns true since the string is a right date value.• IsDate (2003/2/29) − Returns false since 2003 is not leap year.• IsDate (2004*2*19) − Returns false since the string format is not right date format. •

ToDate

ToDate (number or string)Uses the function IsDate(number or string) to check whether the number/string is right or not. If the number/string is right,the function returns a date value between 100−1−1 and 9999−12−31. If the number/string is wrong, it returns null.

Parameternumber − a value representing the number of days starting from January 1, 1900. It can be positive or negative, and istruncated if fractional.string − a text string representing a date and many forms can be accepted.

Return ValueDate value or null.

Examples

ToDate (50.5) − Returns 1900−2−19 since fraction is truncated.• ToDate (−50) − Returns 1899−11−11• ToDate (22222222) − Returns null since the date value is over 9999−12−31• ToDate (2004 2 19) − Returns 2004−2−19• ToDate (99−5) − Returns 1999−5−1• ToDate (1999−2−29) − Returns null since 1999 is not leap year.•

IsDateTime

IsDateTime (number/string)Returns True if the given number or string value can be converted to a valid date−time and returns False otherwise.

JReport Formula

102

Page 111: JReport Designer - User Referencespecifies the driver such as JDBC driver (for JDBC) or the Data Source name (for JDBC−ODBC bridge), the user ID and the password for connecting to

Parametersnumber − a number value or expression to be tested for being convertible to a sate−time value. It can be positive,negative or fractional. It is interpreted as a number of days since Jan 1, 1900.string − a string value or expression to be tested for being convertible to a date−time value. Many forms are accepted. Ifthe given string value and format are right date−time value and format, the function returns true otherwise returns false.

Return ValueBoolean value, true or false.

Examples

IsDateTime (15.2) − Returns true since the given number argument is interpreted as the DateTime value1900−01−15 04:48:00

IsDateTime (Feb 23, 2004 15:23:25) − Returns true• IsDateTime (2004−2−23) − Returns true• IsDateTime(15:23:25) − Returns true•

ToDateTime

ToDateTime (number or string)Use the function IsDateTime to check whether the number/string is right or not. If it is right, the function returns adate−time value between 100−1−1 and 9999−12−31, otherwise the function returns null.

Parametersnumber − a number value or expression to be tested for being convertible to a sate−time value. It can be positive,negative or fractional. It is interpreted as a number of days since Jan 1, 1900.string − a string value or expression to be tested for being convertible to a date−time value. Many forms are accepted.

Return ValueDate−time value or null.

Examples

ToDateTime (255.35) − Returns 1900−09−12 08:23:59• ToDateTime (Jan 3, 2004) − Returns 2004−01−03 00:00:00• ToDateTime (5:25:26pm) − Returns 2004−02−23 17:25:26 since the current date is 2004−2−23• ToDateTime (2003−2−29 15:26:25) − Returns null since the given string value is not right date−time value• ToDateTime (2004 *2 *29 15:26:25) − Also return null since the given string format is not right date−time format•

ToDateTime (date)

ToDateTime (date)Returns a date−time value.

Parameterdate − a date value that can be converted to a date−time type value by the function.

ExampleToDateTime (ToDate(2004−2−23)) − Returns 2004−02−23 00:00:00

Minute

Minute ( )This function returns the minute portion of the current time.

JReport Formula

103

Page 112: JReport Designer - User Referencespecifies the driver such as JDBC driver (for JDBC) or the Data Source name (for JDBC−ODBC bridge), the user ID and the password for connecting to

Return ValueThe return value is an integer.

ExampleIf the current time is 12:41:27, the return value of the following statement is 41:

Minute( )

Minute ( Time a )This function returns the minute portion of a specified time.

Parametera − a time value

Return ValueThe return value is an integer.

ExampleSuppose the time is 8:30:27, the return value of the following statement is 30:

Minute ( ToTime( 8,30,27) )

Minute ( DateTime a )This function returns the minute portion of a specified datetime.

Parametera − a datetime value

Return ValueThe return value is an integer.

ExampleSuppose the datetime is Sep. 21,1997 12:20:25, the return value of the following statement is 20:

Minute ( ToDateTime( 1997, 9, 21,12, 20, 25) )

Month

Month ( )This function adding one returns the current month of the year.

Return ValueThe return value is an integer, and ranges from 0 to 11.

ExampleIf the current month is September, the return value of the following statement is 8:

Month ( )

Month ( DateTime a )This function extracts the month portion from a specified timestamp value.

JReport Formula

104

Page 113: JReport Designer - User Referencespecifies the driver such as JDBC driver (for JDBC) or the Data Source name (for JDBC−ODBC bridge), the user ID and the password for connecting to

Parametera − a timestamp value

Return ValueThe return value is an integer.

ExampleIf the timestamp is July 15, 1999 10:10:10, the return value of the following statement is 7:

Month ( ToDateTime ( 1999, 7, 15, 10, 10, 10 ) )

Month ( Date a )This function extracts the month portion from a specified date value.

Parametera − a date value

Return ValueThe return value is an integer.

ExampleIf the date is June 15,1999, the return value of the following statement is 6:

Month( ToDate ( 1999, 6, 15 ) )

MonthName

MonthName(month, abbreviate)Returns a string name for the specified month.

Parametersmonth − a whole number representing the month of the year, value between 1 and 12, with 1 being January.abbreviate − an optional Boolean value that indicates if the month name is to be abbreviated. If abbreviate value is true,the function returns the abbreviated month name. Or the function returns the full month name.

Return ValueString value.

Examples

MonthName(4) − Returns string value April• MonthName(12, true) − Returns string value Dec• MonthName(12, false) − Returns string value December•

Now

Now( )This function prints the current time on a report.

Return ValueThe return value is a time.

ExampleIf the current time is 1:24:35 in the afternoon, the return value of the following statement is 1:24:35 PM:

JReport Formula

105

Page 114: JReport Designer - User Referencespecifies the driver such as JDBC driver (for JDBC) or the Data Source name (for JDBC−ODBC bridge), the user ID and the password for connecting to

Now( )

Second

Second ( )This function extracts the second portion of the current time.

Return ValueThe return value is an integer.

ExampleIf the current time is 4:55:03, the return value of the following statement is 3:

Second( )

Second ( Datetime a )This function extracts the second portion of a specified timestamp.

Parametera − a timestamp value

Return ValueThe return value is an integer.

ExampleSuppose the datetime is Oct. 15,1999 10:15:17, the return value of the following statement is 17:

Second ( ToDateTime(1999, 10, 15, 10, 15, 17 ) )

Second ( Time a )This function extracts the second portion of a specified time.

Parametera − a time value

Return ValueThe return value is an integer.

ExampleSuppose the time is 7:51:59, the return value of the following statement is 59:

Second ( ToTime ( 7, 51, 59 ) )

Timer

Timer()Returns the number of seconds elapsed since midnight.

Return ValueNumber value.

JReport Formula

106

Page 115: JReport Designer - User Referencespecifies the driver such as JDBC driver (for JDBC) or the Data Source name (for JDBC−ODBC bridge), the user ID and the password for connecting to

ExampleIf the current time is 9:28:30am, the function returns 34110.

ToDate

ToDate ( Date a )This function returns the specified date.

Parametera − a date value

Return ValueThe return value is a date.

ExampleSuppose the date is July 15, 1999, the return of the following statement is 07/15/99:

ToDate ( ToDate(1999, 7, 15 ) )

ToDate ( Datetime a )This function extracts the date portion of a specified date time.

Parametera − a timestamp value

Return ValueThe return value is a date value.

ExampleSuppose the datetime is July 15,1999 12:20:30, the return value of the following statement is 07/15/99:

ToDate ( ToDateTime( 1999, 7, 15, 12, 20, 30 ) )

ToDate ( integer d )This function converts the argument d (A milliseconds value represents the number of milliseconds that have passedsince January 1, 1970 00:00:00.000 GMT) to a data value.

Parametersd − A milliseconds value, a DBfield value or a parameter. It should be a long integer.

Return ValueThe return value is a date.

ExampleThe return value of the following statement is 01/02/70:

ToDate ( 72000000 )

Note: When the milliseconds value is larger than 2³², you should use DBfield or parameter instead.

ToDate ( integer y, Integer m, Integer d )This function creates a date value from arguments y, m and d.

JReport Formula

107

Page 116: JReport Designer - User Referencespecifies the driver such as JDBC driver (for JDBC) or the Data Source name (for JDBC−ODBC bridge), the user ID and the password for connecting to

Parameters

y − a BigInt value indicating yearm − a BigInt value indicating monthd − a BigInt value indicating day

Return ValueThe return value is a date.

ExampleThe return value of the following statement is 07/15/99:

ToDate( 1999, 7, 15 )

ToDateTime

ToDateTime ( Date a, Time b )This function creates a timestamp value from arguments a and b.

Parameters

a − a date valueb − a time value

Return ValueThe return value is a datetime.

ExampleSuppose the date is July 15,1999 and the time is 12:20:30, the return value of the following statement is 1999−07−1512:20:30:

ToDateTime( ToDate( 1999, 7, 15 ), ToTime(12, 20, 30 ) )

ToDateTime ( Integer d )This function converts the argument d ( A milliseconds value represents the number of milliseconds that have passedsince January 1, 1970 00:00:00.000 GMT) to a timestamp value.

Parametersd − A milliseconds value, a DBfield value or a parameter. It should be a long integer.

Return ValueThe return value is a datetime.

ExampleThe return value of the following statement is 1970−01−02 04:00:00:

ToDateTime ( 72000000 )

Notes:

In this function, you can decide the displaying format by selecting the format from the Report Inspector. Theformat of the example above is yyyy−mm−dd hh:mm:ss.

When the milliseconds value is larger than 2³², you should use DBfield or parameter instead.•

JReport Formula

108

Page 117: JReport Designer - User Referencespecifies the driver such as JDBC driver (for JDBC) or the Data Source name (for JDBC−ODBC bridge), the user ID and the password for connecting to

ToDateTime ( Integer y, Integer m, Integer d )This function creates a timestamp value from arguments y, m and d.

Parameters

y − a BigInt value indicating yearm − a BigInt value indicating monthd − a BigInt value indicating day

Return ValueThe return value is a datetime.

ExampleSuppose the date is July 15,1999, the return value of the following statement is 1999−07−15 12:00:00:

ToDateTime ( 1999, 7, 15 )

Note: In this function, because you just input year, month and day, the system will output 12:00:00 as the default time.And also you can decide the displaying format by selecting the format from the Report Inspector. The format of theexample above is yyyy−mm−dd hh:mm:ss.

ToDateTime ( Integer y, Integer m, Integer d, Integer h, Integer i, Integer s )This function creates a timestamp value from arguments y, m, d, h, i and s.

Parameters

y − a BigInt value indicating yearm − a BigInt value indicating monthd − a BigInt value indicating dayh − a BigInt value indicating houri − a BigInt value indicating minutes − a BigInt value indicating second

Return ValueThe return value is a datetime.

ExampleSuppose the date is July 15,1999 and time is 8:05:30, the return value of the following statement is 1999−07−1508:05:30:

ToDateTime ( 1999,7,15,8,5,30 )

Today

Today ( )This function returns the current date on a report.

Return ValueThe return value is a date.

ExampleIf the current date is Oct. 11, 1999, the return value of the following statement is 10/11/99:

Today ( )

JReport Formula

109

Page 118: JReport Designer - User Referencespecifies the driver such as JDBC driver (for JDBC) or the Data Source name (for JDBC−ODBC bridge), the user ID and the password for connecting to

ToTime

ToTime ( DateTime a )This function extracts the time portion from a specified timestamp value.

Parametera − a timestamp value

Return ValueThe return value is a time.

ExampleSuppose the date is July 15,1999 and time is 10:55:45, the return value of the following statement is 10:55:45:

ToTime ( ToDateTime ( 1999, 7, 15, 10, 55, 45 ) )

ToTime ( Integer t )This function converts the argument t ( A milliseconds value represents the number of milliseconds that have passedsince January 1, 1970 00:00:00.000 GMT) to a time value.

Parameterst − A milliseconds value, a DBfield value or a parameter. It should be a long integer.

Return ValueThe return value is a time.

ExampleThe return value of the following statement is 08:00:01:

ToTime ( 1000 )

Note: When the milliseconds value is larger than 2³², you should use DBfield or parameter instead.

ToTime ( Integer a, Integer b, Integer c )This function creates a time value from argument a, b and c.

Parameters

a − a BigInt value, indicating hoursb − a BigInt value, indicating minutesc − a BigInt value, indicating seconds

Return ValueThe return value is a time.

ExampleThe return value of the following statement is 10:10:10:

ToTime ( 10, 10, 10 )

JReport Formula

110

Page 119: JReport Designer - User Referencespecifies the driver such as JDBC driver (for JDBC) or the Data Source name (for JDBC−ODBC bridge), the user ID and the password for connecting to

WeekdayName

WeekdayName (weekday, abbreviate, firstDayOfWeek)WeekdayName returns a String indicating the name of the specified day of the week.

OverloadsWeekdayName (weekday) WeekdayName (weekday, abbreviate) WeekdayName (weekday, abbreviate, firstDayOfWeek)

ParametersWeekday − the numeric designation for the day of the week.abbreviate − an optional Boolean value that indicates if the weekday name is to be abbreviated.FirstDayOfWeek − an optional Number indicating the first day of the week.

Constant Description

jrUseSystem 0 (Use the current system date)

jrSunday 1

jrMonday 2

jrTuesday 3

jrWednesday 4

jrThursday 5

jrFriday 6

jrSaturday 7

Return ValueString value.

Examples

WeekdayName (2) − Returns string value Tuesday• WeekdayName (0) − Returns string value Sunday• WeekdayName (3,true) − Returns string value Wed• WeekdayName (3, false) − Returns string value Wednesday• WeekdayName (3, true, jrMonday) − Returns "Wed" since abbreviation is selected and the first day of the weekis specified to be Monday

WeekdayName (3, true, jrUseSystem) − If the current day is Friday, the function returns Sun since the first day ofweek is specified to the current day, then the third day from Friday is Sunday.

WeekFrom

WeekFrom1970 ( )This function computes the total number of weeks from 1970 to the current date.

Return ValueThe return value is an integer.

ExampleIf the current date is Oct. 13,1999, then the return value of the following statement is 1554:

WeekFrom1970 ( )

JReport Formula

111

Page 120: JReport Designer - User Referencespecifies the driver such as JDBC driver (for JDBC) or the Data Source name (for JDBC−ODBC bridge), the user ID and the password for connecting to

WeekFrom1970 ( Timestamp, a )This function computes the total number of weeks from 1970 to a specified timestamp.

Parametera − a timestamp value

Return ValueThe return value is an integer.

ExampleSuppose the timestamp is Jan. 2,1988 10:40:50, the return value of the following statement is 939:

WeekFrom1970 ( ToDateTime ( 1988, 1, 2, 10, 40, 50 ) )

WeekFrom1970 ( Date, a )This function computes the total number of weeks from 1970 to a specified date.

Parametera − a date value

Return ValueThe return value is an integer.

ExampleSuppose the date is July 8,1995, the return value of the following statement is 1331:

WeekFrom1970 ( ToDate ( 1995, 7, 8 ) )

WeekOfMonth

WeekOfMonth (Date a )This function returns the week of the month of a specified date.

Parametera − a date value

Return ValueThe return value is an integer.

ExampleIf the date is Oct. 13,1999, the return value of the following statement is 3.

WeekOfMonth ( ToDate ( 1999, 10, 13 ) )

WeekOfMonth ( DateTime a )This function evaluates the week of the month of a specified timestamp.

Parametera − a timestamp value

Return ValueThe return value is an integer.

Example

JReport Formula

112

Page 121: JReport Designer - User Referencespecifies the driver such as JDBC driver (for JDBC) or the Data Source name (for JDBC−ODBC bridge), the user ID and the password for connecting to

Suppose the timestamp is Jan. 20,1999 10:40:50, the return value of the following statement is 4.

WeekOfMonth ( ToDateTime ( 1999, 1, 20, 10, 40, 50 ) )

WeekOfMonth ( )This function returns the week of the current month.

Return ValueThe return value is an integer.

ExampleIf the current date Oct. 13,1999, the return value of the following statement is 3.

WeekOfMonth ( )

WeekOfYear ( )This function returns the week of the current year.

Return Value

The return value is an integer.

ExampleIf the current date Oct. 13,1999, the return value of the following statement is 42.

WeekOfYear ( )

WeekOfYear ( Date a )This function returns the week of the year in a specified date.

Parametera − a date value

Return ValueThe return value is an integer.

ExampleSuppose the date is July 8,1999, the return value of the following statement is 28:

WeekOfYear ( ToDate( 1999, 7, 8 ) )

WeekOfYear (DateTime a )This function returns the week of the year in a specified timestamp.

Parametera − a timestamp value

Return ValueThe return value is an integer.

ExampleSuppose the timestamp is Feb. 4,1999 10:40:50, the return value of the following statement is 6:

JReport Formula

113

Page 122: JReport Designer - User Referencespecifies the driver such as JDBC driver (for JDBC) or the Data Source name (for JDBC−ODBC bridge), the user ID and the password for connecting to

WeekOfYear ( ToDateTime ( 1999, 2, 4, 10, 40, 50 ) )

Year

Year ( )This function returns the current year.

Return ValueThe return value is an integer.

ExampleIf the current year is 1999, the return value of the following statement is 1999:

Year ( )

Year ( Date a )This function extracts the year portion of a specified date.

Parametera − a date value

Return ValueThe return value is an integer.

ExampleSuppose the date is Jan.15,1995, the return value of the following statement is 1995:

Year ( ToDate ( 1995, 1, 15 ) )

Year ( DateTime a )This function extracts the year portion of a specified timestamp value.

Parametera − a timestamp value

Return ValueThe return value is an integer.

ExampleSuppose the timestamp is July 15,1988 10:40:50, the return value of the following statement is 1988:

Year ( ToDateTime ( 1988, 7, 15, 10, 40, 50 ) )

Date Range

Note: The following functions cannot be used to return a value singly.

Aged0To30Days ( )This function returns a range of date values that is within the previous 30 days from today, e.g if today is 10/14/99, thereturn range is from 09/15/99 to 10/14/99.

ExampleThe return value of the following statement is Not Expired:

JReport Formula

114

Page 123: JReport Designer - User Referencespecifies the driver such as JDBC driver (for JDBC) or the Data Source name (for JDBC−ODBC bridge), the user ID and the password for connecting to

if (ToDate(1999,9,20) in Aged0To30Days())return "Not Expired"elsereturn "Expired"

Aged31To60Days ( )This function returns a range of date values that is within the previous 31 to 60 days from today date, e.g if today is10/13/99, the return range is from 08/12/99 to 09/13/99.

ExampleIf today is 10/13/99, the return value of the following statement is false:

return ToDate(1998,4,20) in Aged31To60Days ( );

Aged61To90Days ( )This function returns a range of date values that is within the previous 61 to 90 days from today date, e.g if today is10/13/99, the return range is from 07/13/99 to 08/11/99.

ExampleIf today is 10/13/99, the return value of the following statement is false:

return ToDate(1998,4,20) in Aged61To90Days ( );

AllDatesFromToday ( )This function returns a range of date values that include any date from the present day to about 10000 years future datevalue, e.g. if today is 04/15/98, the return range is from 04/15/98 to the future.

ExampleIf today is 10/10/99, the return value of the following statement is false:

return ToDate(1998,4,20) in AllDatesFromToday();

AllDatesFromTomorrow ( )This function returns a range of date values that include any date from the tomorrow day to any future date value, e.g. iftoday is 04/15/98, the return range is from 04/16/98 to the future.

ExampleIf today is 10/10/99, the return of the following statement is false:

return ToDate(1998,4,20) in AllDatesFromTomorrow ( );

AllDatesToToday ( )This function returns a range of date values that include all dates up through the present day, e.g. if today is 04/15/98,the return range is from the past to 04/15/1998.

ExampleIf today is 10/10/99, the return value of the following statement is true:

return ToDate(1998,4,20) in AllDatesToToday();

JReport Formula

115

Page 124: JReport Designer - User Referencespecifies the driver such as JDBC driver (for JDBC) or the Data Source name (for JDBC−ODBC bridge), the user ID and the password for connecting to

AllDatesToYesterday ( )This function returns a range of date values that include all dates up through the previous day, e.g. if today is 04/15/98,the return range is from the past to 04/14/1998.

ExampleIf today is 10/10/99, the return value of the following statement is true:

return ToDate(1998,4,20) in AllDatesToYesterday();

Calendar1stHalf ( )This function returns a range of date values that include all dates from January 1st through June 30th.

ExampleIf today is 10/10/99, the return value of the following statement is false:

return Today() in Calendar1stHalf();

Calendar2ndHalf ( )This function returns a range of date values that include all dates from July 1st through December 31st.

ExampleIf today is 10/10/99, the return value of the following statement is true:

return Today() in Calendar2ndHalf();

Calendar1stQtr ( )This function returns a range of date values that include all dates from January 1st through March 31st.

ExampleIf today is 10/10/99, the return value of the following statement is false:

return Today() in Calendar1stQtr();

Calendar2ndQtr ( )This function returns a range of date values that include all dates from April 1st through June 30th.

ExampleIf today is 10/10/99, the return value of the following statement is false:

return Today() in Calendar2ndQtr();

Calendar3rdQtr ( )This function returns a range of date values that include all dates from July 1st through September 30th.

ExampleIf today is 10/10/99, the return value of the following statement is false:

return Today() in Calendar3rdQtr();

JReport Formula

116

Page 125: JReport Designer - User Referencespecifies the driver such as JDBC driver (for JDBC) or the Data Source name (for JDBC−ODBC bridge), the user ID and the password for connecting to

Calendar4thQtr( )This function returns a range of date values that include all dates from October 1st through December 31st.

ExampleIf today is 10/10/99, the return value of the following statement is true:

return Today() in Calendar4thQtr();

Last4WeeksToSun ( )This function returns a range of date values that include the four weeks previous to last Sunday, e.g. if today is04/15/95, the return range is from 03/18/95 to 04/14/95.

ExampleIf today is 10/10/99, the return value of the following statement is false:

return ToDate(1999,4,20) in Last4WeeksToSun ( );

Last7Days ( )This function returns a range of date values that include all dates from seven days ago to today (including today), e.g. iftoday is 04/15/98, the return range is from (include) 04/09/98 to 04/15/98.

ExampleIf today is 10/10/99, the return value of the following statement is false:

return ToDate(1999,4,20) in Last7Days ( );

LastFullMonth ( )This function returns a range of date values that include all dates from the first to last day of the previous month, e.g. iftoday is 04/15/98, the return range is from 03/01/98 to 03/31/98.

ExampleIf today is 10/10/99, the return value of the following statement is false:

return ToDate(1999,4,20) in LastFullMonth ( );

LastFullWeek ( )This function returns a range of date values that include all dates from the Sunday to Saturday of the previous week, e.g.if today is 04/10/95, the return range is from 04/02/95 to 04/08/95.

ExampleIf today is 10/10/99, the return value of the following statement is false:

return ToDate(1999,4,20) in LastFullWeek( );

LastYearMTD ( )This function returns a range of date values that fall on any date in the current month last year, up to the current date lastyear, e.g. if today is 04/15/98, the return range is from 04/01/97 to 04/15/97.

ExampleIf today is 10/10/99, the return value of the following statement is false:

JReport Formula

117

Page 126: JReport Designer - User Referencespecifies the driver such as JDBC driver (for JDBC) or the Data Source name (for JDBC−ODBC bridge), the user ID and the password for connecting to

return ToDate(1999,4,20) in LastYearMTD( );

LastYearYTD ( )This function returns a range of date values that include all dates in the last year, up to the current date last year, e.g. iftoday is 04/15/98, the return range is from 01/01/97 to 04/15/97

ExampleIf today is 10/10/99, the return value of the following statement is true:

return ToDate(1998,4,20) in LastYearYTD( );

MonthToDate( )This function returns a range of date values that include all dates from the first day of the month to today, e.g. if today is04/15/98, the return range is from 04/01/98 to 04/15/98.

ExampleIf today is 10/10/99, the return value of the following statement is true:

return ToDate(1999,10,2) in MonthToDate( );

Next30Days ( )This function returns a range of date values that include all days in the next 30 days starting from today (includingtoday), e.g. if today is 04/15/98, the return range is from 04/15/98 to 05/15/98.

ExampleIf today is 10/10/99, the return value of the following statement is false:

return ToDate(1999,10,2) in Next30Days( );

Next31To60Days ( )This function returns a range of date values that include all days in the next 31 to 60 days starting from today, e.g. iftoday is 04/15/98, the return range is from 05/16/98 to 06/14/98.

ExampleIf today is 10/10/99, the return value of the following statement is false:

return ToDate(1999,10,2) in Next31To60Days( );

Next61To90Days ( )This function returns a range of date values that include all days in the next 61 to 90 days starting from today, e.g. iftoday is 04/15/98, the return range is from 06/15/98 to 07/14/98.

ExampleIf today is 10/10/99, the return value of the following statement is false:

return ToDate(1999,4,20) in Next61To90Days( );

Next91To365Days ( )This function Returns a range of date values that include all days in the next 91 to 365 days starting from today, e.g. iftoday is 04/15/98, the return range is from 07/15/98 to 04/15/99.

JReport Formula

118

Page 127: JReport Designer - User Referencespecifies the driver such as JDBC driver (for JDBC) or the Data Source name (for JDBC−ODBC bridge), the user ID and the password for connecting to

ExampleIf today is 10/10/99, the return value of the following statement is false:

return ToDate(1999,4,20) in Next91To365Days( );

Over90Days ( )This function returns a range of date values that include all days that are more than 90 days older than the current date,e.g. if today is 04/15/98, the return range is from the past to 01/14/98.

ExampleIf today is 10/10/99, the return value of the following statement is true:

return ToDate(1999,4,20) in Over90Days( );

WeekToDateFromSun ( )This function returns a range of date values that include all days from last Sunday to today (including today), e.g. iftoday is 04/13/95, the return range is from 04/09/95 to 04/13/95.

ExampleIf today is 10/10/99, the return value of the following statement is false:

return ToDate(1999,4,20) in WeekToDateFromSun( );

YearToDate ( )This function returns a range of date values that include all days from the first day of the calendar year to today (includingtoday), e.g. if today is 04/15/98, the return range is from 01/01/98 to 04/15/98

ExampleIf today is 10/10/99, the return value of the following statement is true:

return ToDate(1999,4,20) in YearToDate( );

Next

Next ( DBfield a )This function returns the next value of the current DBfield.

Parametera − a DBfield value

Return ValueThe return value is a DBfield value.

ExampleSuppose you build a report about customer orders, if you use this function on "Ship Date" and insert it in the DetailSection, then when you run the report, you will see after each record, the next records will display according to thefollowing statement:

Next (@"Ship Date")

Next ( DBfield a, BigInt b )This function returns the next Nth record decided by the argument b.

JReport Formula

119

Page 128: JReport Designer - User Referencespecifies the driver such as JDBC driver (for JDBC) or the Data Source name (for JDBC−ODBC bridge), the user ID and the password for connecting to

Parameters

a − a DBfield valueb − a BigInt value

Return ValueThe return value is a DBfield value.

ExampleSuppose you build a report about customer orders, if you use this function on "Ship Date" and and set the argument b as4, then when you run the report, you will see after each record, the next 4th record will display according to the followingstatement:

Next ( @"Ship Date", 4 )

Previous

Prev ( DBfield a )This function returns the previous value of the current DBfield.

Parametera − a DBfield value

Return ValueThe return value is a DBfield value.

ExampleSuppose you build a report about customer orders, if you use this function on "Ship Date" and insert it in the DetailSection, then when you run the report, you will see after each record, the previous records will display according to thefollowing statement:

Prev ( @"Ship Date" )

Prev ( DBfield a, BigInt b )This function returns the previous Nth record decided by the argument b.

Parameters

a − a DBfield valueb − a BigInt value

Please note that b must be minus, otherwise, the return value will be the next Nth record.

Return ValueThe return value is a DBfield value.

ExampleSuppose you build a report about customer orders, if you use this function on "Ship Date" and and set the argument b as−4, then when you run the report, you will see before each record, the previous 4th record will display according to thefollowing statement:

Prev ( @"Ship Date", −4 )

JReport Formula

120

Page 129: JReport Designer - User Referencespecifies the driver such as JDBC driver (for JDBC) or the Data Source name (for JDBC−ODBC bridge), the user ID and the password for connecting to

Financial

FRCurrentRatio( Number curAssets, Number curLiabilities )This function computes the current ratio.

Parameters

curAssets − a double value indicating the current ratiocurLiabilities − a double value indicating the current liabilities

Return ValueThe return value is a number.

ExampleIf the current assets are 1800000.00, the current liabilities are 150000.00, the return value of the following statement is12.00

FRCurrentRatio ( 1800000.00, 150000.00)

FRQuickRatio( Number curAssets, Number inventories, Number curLiabilities )This function computes the quick ratio.

Parameters

curAssets − a double value indicating the current assetsinventories − a double value indicating the inventorycurLiabilities − a double value indicating the current liabilities

Return ValueThe return value is a number.

ExampleIf the current assets are 1800000.00, the inventory is 165000.00, the current liabilities are 150000.00, the return value ofthe following statement is 10.90:

FRQuickRatio ( 1800000.00, 165000.00, 150000.00 )

FRDebtEquityRatio( Number totalLiabilities, Number totalEquity )This function computes the debt equity ratio.

Parameters

totalLiabilities − a double value indicating the total liabilitiestotalEquity − a double value indicating the total equity

Return ValueThe return value is a number.

ExampleIf the total liabilities are 175000.00, the total equity is 215000.00, the return value of the following statement is 0.81:

FRDebtEquityRatio ( 175000.00, 215000.00 )

JReport Formula

121

Page 130: JReport Designer - User Referencespecifies the driver such as JDBC driver (for JDBC) or the Data Source name (for JDBC−ODBC bridge), the user ID and the password for connecting to

FREquityVsTotalAssets( Number totalEquity, Number totalAssets )This function returns the result of equity vs. total assets.

Parameters

totalEquity − a double value indicating the total equitytotalAssets − a double value indicating the total assets

Return ValueThe return value is a number.

ExampleIf the total equity is 215000.00, the total assets are 2200000.00, the return value of the following statement is 0.10:

FREquityVsTotalAssets(215000.00, 2200000.00)

FRNetProfitMargin( Number netProfit, Number sales )This function is used to compute the net profit margin.

Parameters

netProfit − a double value indicating the net profitsales − a double value indicating the sales

Return ValueThe return value is a number.

ExampleIf the net profit is 300000.00, the sales is 450000.00, the return value of the following statement is 0.67:

FRNetProfitMargin( 300000.00, 450000.00 )

FRGrossProfitMargin( Number grossProfit, Number sales )This function is used to compute the gross profit margin.

Parameters

grossProfit − a double value indicating the gross profitsales − a double value indicating the sales

Return ValueThe return value is a number.

ExampleIf the gross profit is 350000.00, the sales is 450000.00, the return value of the following statement is 0.78:

FRGrossProfitMargin( 350000.00, 450000.00 )

FROperatingProfitMargin( Number operatingProfit, Number sales )This function computes the operating profit margin.

Parameters

JReport Formula

122

Page 131: JReport Designer - User Referencespecifies the driver such as JDBC driver (for JDBC) or the Data Source name (for JDBC−ODBC bridge), the user ID and the password for connecting to

operatingProfit − a double value indicating the operating profitsales − a double value indicating the sales

Return ValueThe return value is a number.

ExampleIf the operating profit is 380000.00, the sales is 450000.00, the return value of the following statement is 0.84:

FROperatingProfitMargin( 380000.00, 450000.00 )

FRInterestCoverage( number cashFlow, number interestExpenses )This function computes the interest coverage.

Parameters

cashFlow − a double value indicating the cash flowinterestExpenses − a double value indicating the interest expenses

Return ValueThe return value is a number.

ExampleIf the cash flow is 250000.00, the interest expenses are 350000.00, the return value of the following statement is 0.71:

FRInterestCoverage(250000.00, 350000.00)

FRCashFlowVsTotalDebt( Number cashFlow,Number totalDebt )This function returns the result of cash flow vs total debt.

Parameters

cashFlow − a double value indicating the cash flowtotalDebt − a double value indicating the total debt

Return ValueThe return value is a number.

ExampleIf the cash flow is 250000.00, the total debt is 280000.00, the return value of the following statement is 0.89:

FRCashFlowVsTotalDebt( 250000.00, 280000.00 )

FRReturnOnEquity(Number netProfit, Number totalEquity )This function returns the results of return on equity.

Parameters

netProfit − a double value indicating the net profittotalEquity − a double value indicating the total equity

Return ValueThe return value is a number.

JReport Formula

123

Page 132: JReport Designer - User Referencespecifies the driver such as JDBC driver (for JDBC) or the Data Source name (for JDBC−ODBC bridge), the user ID and the password for connecting to

ExampleIf the net profit is 300000.00, the total equity is 215000.00, the return value of the following statement is 1.40:

FRReturnOnEquity( 300000.00, 215000.00 )

FRReturnOnNetFixedAssets( Number netProfit, Number netFixedAssets )This function returns the result of return on net fixed assets.

Parameters

netProfit − a double value indicating the net profitnetFixedAssets − a double value indicating the net fixed assets

Return ValueThe return value is a number.

ExampleIf the net profit is 300000.00, the net fixed assets are 400000.00, the return value of the following statement is 0.75:

FRReturnOnNetFixedAssets( 300000.00, 400000.00)

FRReturnOnTotalAssets( Number netProfit, Number totalAssets )This function returns the results of return on total assets.

Parameters

netProfit − a double value indicating the net profittotalAssets − a double value indicating the total assets

Return ValueThe return value is a number.

ExampleIf the net profit is 300000.00, the total assets are 2200000.00, the return value of the following statement is 0.14:

FRReturnOntotalAssets( 300000.00, 2200000.00 )

FRReturnOnInvestedCapital ( Number netProfit, Number totalBankDebts, Number totalEquity )This function returns the result of return on invested capital.

Parameters

netProfit − a double value indicating the net profittotalBankDebts − a double value indicating the total bank debtstotalEquity − a double value indicating the the total equity

Return ValueThe return value is a number.

ExampleIf the net profit is 300000.00, the total bank debts are 100000.00, the total equity is 215000.00, the return value of thefollowing statement is 0.95:

JReport Formula

124

Page 133: JReport Designer - User Referencespecifies the driver such as JDBC driver (for JDBC) or the Data Source name (for JDBC−ODBC bridge), the user ID and the password for connecting to

FRReturnOnInvestedCapital ( 300000.00, 100000.00, 215000.00 )

FRReturnOnCommonEquity(Number netProfit, Number preferredDividend, Number commonEquity )This function returns the result of return on common equity.

Parameters

netProfit − a double value indicating the net profitpreferredDividend − a double value indicating the preferred dividendcommonEquity − a double value indicating the common equity

Return ValueThe return value is a number.

ExampleIf the net profit is 300000.00, the preferred dividend is 180000.00, the common equity is 208000.00, the return value ofthe following statement is 0.58:

FRReturnOnCommonEquity ( 300000.00, 180000.00, 208000.00 )

FREarningsPerCommonShare( Number netProfit, Number preferredDividend, DbDouble numOfCommonShare)This function computes the earnings of per common share.

Parameters

netProfit − a double value indicating the net profitpreferredDividend − a double value indicating the preferred dividendnumOfCommonShare − a double value indicating the number of common shares

Return ValueThe return value is a number.

ExampleIf the net profit is 300000.00, the preferred dividend is 180000.00, the number of common shares is 10000, the returnvalue of the following statement is 12:

FREarningsPerCommonShare( 300000.00, 180000.00, 10000)

FRAccRecTurnover( Number accountReceivable, Number sales, DbDouble numOfDays )This function computes the turnover of the account receivable.

Parameters

accountReceivable − a double value indicating the account receivablesales − a double value indicating the salesnumOfDays − a double indicating the number of days

Return ValueThe return value is a number.

ExampleIf the account receivable is 220000.00, the sales is 450000.00, the number of days is 100, the return value of the

JReport Formula

125

Page 134: JReport Designer - User Referencespecifies the driver such as JDBC driver (for JDBC) or the Data Source name (for JDBC−ODBC bridge), the user ID and the password for connecting to

following statement is 48.89:

FRAccRecTurnover( 220000.00, 450000.00, 100 )

FRInventoryTurnover( Number inventory, Number sales, Number numOfDays )This function computes the turnover of the inventory.

Parameters

inventory − a double value indicating the inventorysales − a double value indicating the salesnumOfDays − a double value indicating the number of days

Return ValueThe return value is a number.

ExampleIf the inventory is 165000.00, the sales is 450000.00, the number of days is 100, the return value of the followingstatement is 36.67:

FRInventoryTurnover( 165000.00, 450000.00, 100 )

FRPriceEarningsRatio( Number marketPrice, Number earningsPerShare )This function computes the price earning ratio.

Parameters

marketPrice − a double value indicating the market priceearningPerShare − a double value indicating the earning per share

Return ValueThe return value is a number.

ExampleIf the market price is 10.87, the earning per share is 12, the return value of the following statement is 0.91:

FRPriceEarningsRatio( 10.87, 12 )

FRDividendYield( Number dividEnd, Number marketPrice )This function computes the dividend yield.

Parameters

dividend − a double value indicating the dividendmarketPrice − a double value indicating the market price

Return ValueThe return value is a number.

ExampleIf the dividend is 9.85, the market price is 10.87, the return value of the following statement is 0.91:

FRDividendYield( 9.85, 10.87 )

JReport Formula

126

Page 135: JReport Designer - User Referencespecifies the driver such as JDBC driver (for JDBC) or the Data Source name (for JDBC−ODBC bridge), the user ID and the password for connecting to

DDB

DDB(cost, salvage, life, period, factor)DDB returns a Number specifying the depreciation of an asset for a specific time period, using the double−decliningbalance method or some other method as specified by the factor argument.

OverloadsDDB (cost, salvage, life, period) DDB (cost, salvage, life, period, factor)

Parameterscost − a Number or Currency that specifies the initial cost of the asset. The value is nonnegative and greater than orequal to salvage. salvage − a Number or Currency that specifies the value of the asset at the end of its useful life. The value isnonnegative. life − a positive Number that specifies the length of the useful life of the asset. period − a Number that specifies the period for which asset depreciation is calculated. The value is positive and less thanor equal to life. The Parameters life and period must have the same units. factor − an optional positive Number that specifies the rate at which the balance declines. If omitted, 2 (double−decliningmethod) is assumed.

Return ValueNumber value.

ExamplesSuppose a company purchases a fleet of cars for $560,000. The cars have a lifetime of 12 years and a salvage value of$30,000. They are depreciated using the double−declining method.

DDB (560000, 30000, 12, 1) − Returns 93333.33. The first year's depreciation is $93,333.33.• DDB (560000, 30000, 13, 5) − Returns 44164.37. The fourth year's depreciation is $44,164.37.• DDB (560000, 30000, 13, 13) − Returns 11605.58. The final year's depreciation is $11,605.58.•

FV

FV (rate, periods, payment, presentMoney, type)Returns a Number specifying the future value of an annuity based on periodic, fixed payments and a fixed interest rate.

OverloadsFV (rate, periods, payment) FV (rate, periods, payment, presentMoney) FV (rate, periods, payment, presentMoney, type)

Parametersrate − a Number that specifies the interest rate per period. periods − a positive Number that specifies the total number of payment periods in the annuity. The units used forspecifying rate and periods must consistent. For example, if periods is the number of periods in months, then rate is amonthly interest rate. payment − a Number or Currency that specifies the payment to be made each period. presentMoney − an optional Number or Currency that specifies the present value of a series of future payments. type − an optional Number that specifies when payments are due. Specify 0 if payments are due at the end of thepayment period, and 1 if payments are due at the beginning of the period. If omitted, 1 is assumed.

Return ValueNumber value.

Examples

JReport Formula

127

Page 136: JReport Designer - User Referencespecifies the driver such as JDBC driver (for JDBC) or the Data Source name (for JDBC−ODBC bridge), the user ID and the password for connecting to

Suppose that you put $1100 per month into a retirement savings plan that pays 6 percent annual interest,compounded monthly. How much will the account be worth after 20 years?

FV (0.06 / 12, 20 * 12, −1100) − Returns 507144.99. So your account will have $507,145. The payment (−1100)is negative since you are paying out the money to the plan.

The above example assumes that you made your payments into the plan at the end of the month. Thus after thefirst month, your plan would have only $1100 in it, since there was no time for interest to accrue.

Suppose that instead you make your payments at the start of the month:

FV (0.06 / 12, 20 * 12, −1100, 0, 1) − Returns 510786.21 (rounded to the nearest integer). So your account willhave $510,786. You will save $3,642 more by depositing at the beginning of the month.

Now suppose that in addition to making payments at the start of the month, you start your plan with an initialdeposit of $25,000:

FV (0.06 / 12, 20 * 12, −1100, −25000, 1) − Returns 593541.33 (rounded to the nearest integer). Your accountwill have $ 593,541 after 20 years.

You can also use the FV function to calculate the future value of a lump sum deposit. For example, if you deposit$25,000 in to a plan that pays 6 percent annual interest compounded monthly for 20 years:

FV (0.06 / 12, 20 * 12, 0, −25000) − Returns 82755.12 (rounded to the nearest integer). Thus you would have$82755.12 in your account.

IPmt

IPmt (rate, period, periods, presentMoney, futureMoney, type) IPmt returns a Number specifying the interest payment for a given period of an annuity based on periodic, fixedpayments and a fixed interest rate.

OverloadsIPmt (rate, period, periods, presentMoney) IPmt (rate, period, periods, presentMoney, futureMoney) IPmt (rate, period, periods, presentMoney, futureMoney, type)

Parametersrate − a Number that specifies the interest rate per period. period − a Number that specifies the payment period in the range 1 through periods. periods − a positive Number that specifies the total number of payment periods in the annuity. The units used forspecifying rate, period and periods must be consistent. For example, if periods is the number of periods in months, thenrate is a monthly interest rate and period specifies a month. presentMoney − a number or currency that specifies the present value, or value today, of a series of future payments orreceipts. futureMoney − an optional Number or Currency that specifies the future value or cash balance you want after you'vemade the final payment. If omitted, 0 is assumed. type − an optional Number that specifies when payments are due. Specify 0 if payments are due at the end of thepayment period, and 1 if payments are due at the beginning of the period. If omitted, 0 is assumed.

Return ValueNumber value

Examples

Suppose that you want to take out a $250,000 loan payable monthly over 15 years at an annual interest rate of6.5 percent. The following formula returns the amount of interest that you pay in your first loan payment. Notethat the monthly interest rate is 0.065 / 12 and the number of months of the loan is 15 * 12.

JReport Formula

128

Page 137: JReport Designer - User Referencespecifies the driver such as JDBC driver (for JDBC) or the Data Source name (for JDBC−ODBC bridge), the user ID and the password for connecting to

IPmt (0.065 / 12, 1, 15 * 12, 250000) − Returns the Number value −1354.17 (rounded to 2 decimals). The valueis negative because it represents a payment out from you whereas the loan amount of $250,000 is positivebecause it represents a payment in to you.The following formula returns the amount of interest that you pay in your 97st payment (after 10 years ofpayments):

IPmt (0.065 / 12, 9*12 + 1, 15 * 12, 250000) − Returns −701.74 (rounded to 2 decimals). You've made progresson the loan and so less of your monthly payment is for paying interest.

IRR

IRR (values, guess)IRR returns a Number specifying the internal rate of return for a series of periodic cash flows (payments and receipts).

OverloadsIRR (values) IRR (values, guess)

Parametersvalues − a Number or Currency type array that specifies cash flow values. The array must contain at least one negativevalue (a payment) and one positive value (a receipt). The cash flows must occur at regular intervals such as monthly oryearly. guess − an optional Number value that is estimated to be returned by IRR. If omitted, guess is 0.1 (10 percent).

Return ValueNumber value.

ExamplesSuppose that you can choose one of two offers: $20,000 now or guaranteed payments of $5,000 after 1 year, $10,000after 2 years and $15,000 after 3 years. What is the better offer? One way to quantify this is to calculate the internal rateof return. If you take the second offer, you can't take the first so that is like experiencing an initial payment of $20,000followed by the receipts:

inArray = [ −20000, 15000, −10000, 25000];IRR (inArray) − Returns 0.201 (rounded to 3 decimals) or 20.1 percent interest. So all other things being equal, if youthink that 20.1 percent is a good rate of return, you would prefer the second offer.

Note: The NPV and IRR functions are related since NPV (IRR (values), values) = 0. That is, the internal rate of return ofa sequence of cash flows is the interest rate for which that sequence of cash flows has a net present value of 0. There isno direct formula for the IRR function and so Report calculates the value by iteration. The process depends on the initialguess for the internal rate of return. If the program reports an error, try changing the value of the guess argument to becloser to what you expect the internal rate of return should be.

NPer

NPer (rate, payment, presentMoney, futureMoney, type)NPer returns a Number specifying the number of periods for an annuity based on periodic, fixed payments and a fixedinterest rate.

OverloadsNPer (rate, payment, presentMoney) NPer (rate, payment, presentMoney, futureMoney) NPer (rate, payment, presentMoney, futureMoney, type)

Parametersrate − a Number that specifies the interest rate per period.

JReport Formula

129

Page 138: JReport Designer - User Referencespecifies the driver such as JDBC driver (for JDBC) or the Data Source name (for JDBC−ODBC bridge), the user ID and the password for connecting to

payment − a Number or Currency that specifies the payment to be made each period. Payments usually contain principaland interest that doesn't change over the life of the annuity. presentMoney − a Number or Currency that specifies the present value, or value today, of a series of future payments orreceipts. futureMoney − an optional Number or Currency that specifies the future value or cash balance you want after you'vemade the final payment. If omitted, 0 is assumed. type − an optional Number that specifies when payments are due. Specify 0 if payments are due at the end of thepayment period, and 1 if payments are due at the beginning of the period. If omitted, 0 is assumed.

Return ValueNumber value.

Examples

Suppose that you want a $250,000 loan to buy a house. The interest rate is 6.5 percent and you can afford topay $3,000 per month. How long of a mortgage do you need?

NPer (0.075/12, −3000, 250000) − Returns 118.08 (rounded to 2 decimals) months.

Rather than seeking a loan, suppose that you want to save up $500,000 and then buy the house. You can get a6.5 percent interest rate compounded monthly from your savings plan and want to save $3,000 per month. Howlong will you need to save to have the money?

NPer (0.065/12, −3000, 0, 250000) − Returns 68.96 (rounded to 2 decimals) months.

NPV

NPV (rate, values)Returns a Number specifying the net present value of an investment based on a series of periodic cash flows (paymentsand receipts) and a discount rate.

Parametersrate − a Number that specifies the discount rate over the length of the period, expressed as a decimal. value − a Number or Currency type array that specifies cash flow values. Negative values represent payments andpositive values receipts. The cash flows must occur at regular intervals such as monthly or yearly.

Return ValueNumber value.

ExamplesSuppose that someone offers to pays you $15000 after 1 year, $20000 after 2 years, $25000 after 3 years and $12000after 4 years. If the discount rate (the time value of money) is 6.5 percent, the value of this offer to you today is:

NPV (0.065, [15000, 20000, 25000, 12000]) − The formula returns 61741.8. So this scheme is worth $61,741.8 to youtoday. This is less than the sum of the payments, which is $72000, since you have to wait for this money.

Note: The NPV and IRR functions are related since NPV (IRR (values), values) = 0. That is, the internal rate of return ofa sequence of cash flows is the discount rate for which that sequence of cash flows has a net present value of 0.

Pmt

Pmt (rate, periods, presentMoney, futureMoney, type)Returns a Number specifying the payment for an annuity based on periodic, fixed payments and a fixed interest rate. Tofind the total amount paid out over the whole loan, multiply the payment per period (the value returned by Pmt) by thetotal number of periods.

JReport Formula

130

Page 139: JReport Designer - User Referencespecifies the driver such as JDBC driver (for JDBC) or the Data Source name (for JDBC−ODBC bridge), the user ID and the password for connecting to

OverloadsPmt (rate, periods, presentMoney) Pmt (rate, periods, presentMoney, futureMoney) Pmt (rate, periods, presentMoney, futureMoney, type) ]

Parametersrate − a Number that specifies the interest rate per period. periods − a positive Number that specifies the total number of payment periods in the annuity. The units used forspecifying rate and periods must consistent. For example, if periods is the number of periods in months, then rate is amonthly interest rate. presentMoney − a Number or Currency that specifies the present value or principal. That is, the amount that a series ofpayments in the future is worth now. futureMoney − an optional Number or Currency that specifies the future value or cash balance you want after you'vemade the final payment. If omitted, 0 is assumed. type − an optional Number that specifies when payments are due. Specify 0 if payments are due at the end of thepayment period, and 1 if payments are due at the beginning of the period. If omitted, 0 is assumed.

Return ValueNumber value.

Examples

Suppose that you want to take out a $250,000 loan payable monthly over 15 years at an annual interest rate of6.5 percent. The following formula returns your monthly loan payment. Note that the monthly interest rate is0.065 / 12 and the number of months of the loan is 15 * 12.

Pmt (0.065 / 12, 15 * 12, 250000) − Returns the Number value −2177.77 (rounded to 2 decimals). The value isnegative because it represents a payment out from you whereas the loan amount of $250,000 is positivebecause it represents a payment in to you.

Now suppose that the payments are made at the beginning of the month instead of the end (as is the default).Your monthly loan payment is calculated as:

Pmt (0.065 / 12, 15 * 12, 250000, 0, 1) − Returns −2166.04 (rounded to 2 decimals). Note that your monthlypayment is about $11.73 less each month than in the previous example where payments are made at the end ofthe month.

Now suppose that you know that you'll receive $80,000 in 15 years so there is no need to fully pay off the loan;only to reduce the amount owed to $80,000 after 15 years. Note that the future value is negative since after 15years you need to pay out $80,000 to clear the loan. Your monthly loan payment is calculated as:

Pmt (0.065 / 12, 15 * 12, 250000, −80000) − Returns −1914.22 (rounded to 2 decimals).

PPmt

PPmt (rate, period, periods, presentMoney, futureMoney, type)Returns a Number specifying the principal payment for a given period of an annuity based on periodic, fixed paymentsand a fixed interest rate.

OverloadsPPmt (rate, period, periods, presentMoney) PPmt (rate, period, periods, presentMoney, futureMoney) PPmt (rate, period, periods, presentMoney, futureMoney, type)

Parametersrate − a Number that specifies the interest rate per period. period − a Number that specifies the payment period in the range 1 through periods. periods − a positive Number that specifies the total number of payment periods in the annuity. The units used for

JReport Formula

131

Page 140: JReport Designer - User Referencespecifies the driver such as JDBC driver (for JDBC) or the Data Source name (for JDBC−ODBC bridge), the user ID and the password for connecting to

specifying rate, period and periods must be consistent. For example, if periods is the number of periods in months, thenrate is a monthly interest rate and period specifies a month. presentMoney − a Number or Currency that specifies the present value, or value today, of a series of future payments orreceipts. futureMoney − an optional Number or Currency that specifies the future value or cash balance you want after you'vemade the final payment. If omitted, 0 is assumed. type − an optional Number that specifies when payments are due. Specify 0 if payments are due at the end of thepayment period, and 1 if payments are due at the beginning of the period. If omitted, 0 is assumed.

Return ValueNumber value.

Examples

Suppose that you want to take out a $250,000 loan payable monthly over 15 years at an annual interest rate of6.5 percent. The following formula returns the amount of principal that you pay in your first loan payment. Notethat the monthly interest rate is 0.065 / 12 and the number of months of the loan is 15 * 12.

PPmt (0.065 / 12, 1, 15 * 12, 250000) − Returns the Number value −823.6(rounded to 2 decimals). The value isnegative because it represents a payment out from you whereas the loan amount of $250,000 is positivebecause it represents a payment in to you.

The following formula returns the amount of principal that you pay in your 121st payment (after 10 years ofpayments):

PPmt (0.065 / 12, 9*12 + 1, 15 * 12, 250000) − Returns −1476.03 (rounded to 2 decimals). You've made progress on the loan and are paying off more of the principal per payment. This is because lessinterest can accrue each month since more of the loan is paid off so that your fixed monthly payment is appliedmore to the principal.

PV

PV (rate, periods, payment, futureMoney, type)Returns a Number specifying the present value of an annuity based on periodic, fixed payments to be paid in the futureand a fixed interest rate.

OverloadsPV (rate, periods, payment) PV (rate, periods, payment, futureMoney) PV (rate, periods, payment, futureMoney, type)

Parametersrate − a Number that specifies the interest rate per period. periods − a positive Number that specifies the total number of payment periods in the annuity. The units used forspecifying rate and periods must consistent. For example, if periods is the number of periods in months, then rate is amonthly interest rate. payment − a Number or Currency that specifies payment to be made each period. futureMoney − an optional Number or Currency that specifies the future value or cash balance you want after you'vemade the final payment. If omitted, 0 is assumed. type − an optional Number that specifies when payments are due. Specify 0 if payments are due at the end of thepayment period, and 1 if payments are due at the beginning of the period. If omitted, 0 is assumed.

Return ValueNumber value.

ExamplesSuppose that you want to buy a condo and can make payments of $1100 twice a month (24 annual payments). If the

JReport Formula

132

Page 141: JReport Designer - User Referencespecifies the driver such as JDBC driver (for JDBC) or the Data Source name (for JDBC−ODBC bridge), the user ID and the password for connecting to

mortgage rates are 6.5 percent, and you want to pay off the condo in 10 years, what is the maximum loan that you cantake out?

PV (0.065 / 24, 10 * 24, −1100) − Returns 193936 (rounded to the nearest dollar).

Thus you can afford a loan of about $194,000. Notice that the payment argument is negative since you are paying outthe money each month.

Rate

Rate (periods, payment, presentMoney, futureMoney, type, guess)Rate returns a Number specifying the interest rate per period for an annuity. The units of the returned value areconsistent with the units of periods. For example, if periods is in months, then the rate returned will be a monthly interestrate.

OverloadsRate (periods, payment, presentMoney) Rate (periods, payment, presentMoney, futureMoney) Rate (periods, payment, presentMoney, futureMoney, type) Rate (periods, payment, presentMoney, futureMoney, type, guess)

Parametersperiods − a positive Number that specifies the total number of payment periods in the annuity. payment − a Number or Currency that specifies payment to be made each period. presentMoney − a Number or Currency that specifies the present value, or value today, of a series of future payments orreceipts. futureMoney − an optional Number or Currency that specifies the future value or cash balance you want after you'vemade the final payment. If omitted, 0 is assumed. type − an optional Number that specifies when payments are due. Specify 0 if payments are due at the end of thepayment period, and 1 if payments are due at the beginning of the period. If omitted, 0 is assumed. guess − an optional Number value that is estimated to be returned by Rate. If omitted, guess is 0.1 (10 percent).

Return ValueNumber value.

Examples

An electronics store offers to finance a $12500 television for $560 per month, over 2 years, with no money down.Is this a good deal? A first step to determine this is to figure out what interest rate the store is charging:

Rate (2 * 12, −560, 12500) − Returns 0.00588 (rounded to 5 decimals). Notice that periods is 24 months,payment (−560) is negative since you are paying out the monthly payments, and the present value (12500) ispositive since at the start of the loan, you effectively received $12500 (the value of the television). The interestrate returned is a monthly interest rate, since periods was in months.

This next expression calculates the interest rate but expressed as a yearly interest rate and as a percent.

Rate (2 * 12, −560, 12500) * 12 * 100 − Returns 7.06 (rounded to 1 decimal). Thus, the store is charging aneffective annual interest rate of 7.06 percent.

Note: There is no direct formula for the Rate function and so Reports calculates the value by iteration. The processdepends on the initial guess for the rate. If the program reports an error, try changing the value of the guess argument tobe closer to what you expect the interest rate should be.

JReport Formula

133

Page 142: JReport Designer - User Referencespecifies the driver such as JDBC driver (for JDBC) or the Data Source name (for JDBC−ODBC bridge), the user ID and the password for connecting to

SLN

SLN (cost, salvage, life)SLN returns a Number specifying the straight−line depreciation of an asset for a single period.

Parameterscost − a Number or Currency that specifies the initial cost of the asset . salvage − a Number or Currency that specifies the value of the asset at the end of its useful life. life − a Number that specifies the length of the useful life of the asset. It must not equal 0.

Return ValueNumber value.

ExampleSuppose a company purchases a fleet of cars for $560,000. The cars have a lifetime of 12 years and a salvage value of$30,000. The depreciation per year is:SLN (560000, 30000, 12) − Returns 44166.67. Thus the depreciation per year is $44,166.67.

SYD

SYD (cost, salvage, life, period)SYD returns a Number specifying the sum−of−years' digits depreciation of an asset for a single period.

Parameterscost − a Number or Currency that specifies the initial cost of the asset. salvage − a Number or Currency that specifies the value of the asset at the end of its useful life. life − a positive Number that specifies the length of the useful life of the asset. period − a Number that specifies the period for which asset depreciation is calculated. The value is positive and less thanor equal to life. The Parameters life and period must have the same units.

Return ValueNumber value.

ExamplesSuppose a company purchases a fleet of cars for $560,000. The cars have a lifetime of 12 years and a salvage value of$30,000. They are depreciated as follows:

SYD (560000, 30000, 12, 1) − Returns 80000. The first year's depreciation is $81,538.46.• SYD (560000, 60000, 12, 5) − Returns 56000. The fourth year's depreciation is $54,358.97.• SYD (560000, 60000, 12, 12) − Returns 8000. The final year's depreciation is $6,794.87.•

UBound

UBound(array)Returns a Number containing the largest available subscript for the given array.

Parameterarray − an array value, expression or variable.

Return ValueNumber value.

Exampleinteger a[] = [1,1,1,1,1];UBound(a) − Returns 5

JReport Formula

134

Page 143: JReport Designer - User Referencespecifies the driver such as JDBC driver (for JDBC) or the Data Source name (for JDBC−ODBC bridge), the user ID and the password for connecting to

Choose

Choose (Integer, Array)Returns a value from the array based on the value of integer. For example, if the integer is 0, it returns the first element inthe array, and if index is 1 it returns the second element in the array and so forth.

ParametersInteger − a number or numeric expression that specifies the index of the element.The minimum value of it is 0, and the maximum is the number of available element minus 1. If it is out of bounds, novalue will be returned.Array − An array that contains all the available elements to choose from. All elements must be of the same type. A choicecan be any simple type (Number, Currency, String, Boolean, Date, Time or DateTime) or range type (Number Range,Currency Range, String Range, Date Range, Time Range or DateTime Range), but it may not be an array.

Return ValueA value from the element in the given array. The type of the returned value is the same as the type of the element.

Examples

Choose (1,["Poor","Fair","Good","Excellent"]) − Returns Fair• Choose(2,["1 to 10","11 to 20", "21 to 30"]) − Returns 21 to 30• Choose(2,[1,2,3,4,5,6]) − Returns 3• Choose(2,[Todate('1998/5/4'),ToDate('1999/5/5'),ToDate('1996/5/6')]) − Returns 5/6/96•

Eqv

eqv(booleanx, booleany)Returns a Boolean value of booleanx eqv booleany,

if x = true and y = true, returns the value of true,if x = true and y = false, returns the value of false,if x = false and y = true, returns the value of false,if x = false and y = false, returns the value of true.

Parametersbooleanx − a boolean value.booleany − a boolean value.

Return ValueBoolean value.

Examples

eqv(true, true) − Returns true• eqv(true, false) − Returns false •

Xor

xor(booleanx, booleany)Returns a Boolean value of booleanx Exclusive OR booleany,

if x = true and y = true, returns the value of false,if x = true and y = false, returns the value of true,if x = false and y = true, returns the value of true,if x = false and y = false, returns the value of false.

JReport Formula

135

Page 144: JReport Designer - User Referencespecifies the driver such as JDBC driver (for JDBC) or the Data Source name (for JDBC−ODBC bridge), the user ID and the password for connecting to

Parametersbooleanx − a boolean value.booleany − a boolean value.

Return ValueBoolean value.

Examples

xor(true, true) − Returns false • xor(true, false) − Returns true•

IsNoRecord

IsNoRecord( )This function tells whether a report has returned a record or not, if the report has no value returned, the function willreturn True, otherwise it returns False.

Return ValueThe return value is True or False.

ExamplesOne thing you should pay attention is that when using this function, you should refer to a DBfield to identify if this formulais a record level formula so that it can be calculated when fetching the record. For example,

@"Customers_Customer ID";if(IsNoRecord( ))return "There is no data"elsereturn "Total record number="+@"Count_Customer Name5"

In this example, if there is no data returned, a tip "There is no data" will display while Total record number will displaywhen there is data returned.

IsNull

IsNull ( DBfield a )This function tells whether a specified value especially the value of a DBfield is null or not, if the value is Null, the functionwill return True, otherwise it returns False.

Parametera − a specified value especially a value of a DBfield

Return Valuethe return value is True or False

Examples

the return value of the following statement is FalseIsNull ( 2.5 )

If you build a report about customer order, suppose one of the values of the field "Shipped" is Null, the return value of thefollowing statement is TrueIsNull ( @shipped )

JReport Formula

136

Page 145: JReport Designer - User Referencespecifies the driver such as JDBC driver (for JDBC) or the Data Source name (for JDBC−ODBC bridge), the user ID and the password for connecting to

isNumeric

isNumeric(inString)Returns a Boolean value if the inString is a math number string.

ParameterinString − a string type value.

Return ValueBoolean value.

Examples

isNumeric(true) − Returns false• isNumeric ( false) − Returns false• isNumeric ( 1234) − Returns true• isNumeric (122 322323) − Returns false•

Open Binary

openBinFile ( string a )This function is used to open an image file which is saved in your file system according to the path specified by theparameter.

Parametera − a string value which indicates the full path of the image file

Return ValueThe return value is a binary image file

ExampleSuppose you have an image file which is saved in the following directory: c:\images\photo1.gif, then the followingexample will open this image file photo1.gif :

openBinFile (" c:\\images\\photo1.gif" )

openBinURL ( string a )This function is used to open a binary image file according to the URL which is specified by the parameter.

Parametera − a string value which indicates the URL of the image file

Return ValueThe return value is a binary image file.

ExampleSuppose you have an image file in the following URL: http://www.jinfonet.com/images/Pic1.gif, then the followingexample will open this image file Pic1.gif:

openBinURL ( "http://www.jinfonet.com/images/Pic1.gif" )

Open Text

openTxtFile ( string a )This function is used to open a text file which is kept in your file system according to the path specified by the parameter.

JReport Formula

137

Page 146: JReport Designer - User Referencespecifies the driver such as JDBC driver (for JDBC) or the Data Source name (for JDBC−ODBC bridge), the user ID and the password for connecting to

Parametera − a string value which indicates the full path of the text file

Return ValueThe return value is a long varchar.

ExampleSuppose you have a text file under the following directory c:\JReport\report.int, then the following example will open thistext file report.ini:

openTxtFile ( " c:\\JReport\\report.ini" )

openTxtURL ( string a )This function is used to open a text file according to the URL specified by the parameter.

Parametera − a string value which indicates the URL of the text file

Return ValueThe return value is a long varchar.

ExampleSuppose you have a text file at the following URL http://www.jinfonet.com/JReport/report.ini , then the following examplewill open this text file report.ini:

openTxtURL ( " http://www.jinfont.com/JReport/report.ini " )

ReportName

ReportName ( )This function returns current report name.

Return ValueThe return value is a string.

ExampleIf the current report name is employeelist, the return value of the following statement is employeelist :

ReportName( )

Switch

Switch (Boolean[], Array)The elements in the two parameters are corresponding with each other. This function evaluates the elements in the firstparameter from left to right, and returns element associated with the first element to evaluate to True.

For example, Switch([1, 2, 3], [a, b, c])if 1 is true, Switch returns a, if 2 is true, Switch returns b, and if 3 is true, Switch returns c.

ParametersBoolean[] − A boolean type array, which contains the elements to be evaluated.Array − A array, which contains all the available values that may be returned.

JReport Formula

138

Page 147: JReport Designer - User Referencespecifies the driver such as JDBC driver (for JDBC) or the Data Source name (for JDBC−ODBC bridge), the user ID and the password for connecting to

Return ValueOne of the element of the parameter Array. The type of the returned value is the same as the element in the array.

ExampleSwitch ([@"Customers_Customer ID"< 5, @"Customers_Customer ID" > 50,true],["small", "large", "medium"]). Insert thisfunction into the Detail section of a report,

if Customer ID < 5 is true, returns small,if Customer ID >50 is true, returns large,if 5 < Customer ID < 50 (true), returns medium.

toBool

toBool(number or currency)Returns True if he parameter is positive or negative but not 0 and returns False if the parameter is 0.

ParameterCan be either a Number or Currency value or expression.

Return ValueBoolean value.

ExampletoBool(@Discount) − Returns False of the discount is 0, otherwise, returns True.

toNumber

toNumber(Boolean)Returns 1 if the parameter is True, and returns 0 if the parameter is False.

ParameterTrue or false.

Return Value1 or 0.

Examples

toNumber(Ture) − Returns 1• toNumber(False) − Returns 0 •

Index

Operators

Math

Op1+ Op2• Op1−Op2• Op1*Op2• Op1/ Op2• − Op1• Op1%Op2• Op1^Op2•

JReport Formula

139

Page 148: JReport Designer - User Referencespecifies the driver such as JDBC driver (for JDBC) or the Data Source name (for JDBC−ODBC bridge), the user ID and the password for connecting to

Comparison

Op1 > Op2• Op1 < Op2• Op1==Op2• Op1<>Op2• Op1!= Op2•

Boolean

Op1&&Op2• Op1 | | Op2• ! Op1•

Range

Others

return x• [x, y, z]• x [i to j ]• x[i]• x in y• if (b) then {...} else {...}• for statement•

Index

Operator Add (+)

numeric op1 + numeric op2Add op1 and op 2, a numeric is added to a numeric, the result will return to the value that has a higher precision exceptthat when a BigInt value is added to a real number the return value will be a BigDecimal. Note: As we all known, eachdata type has its own precision. As for the integer type data, BigInt has the highest precision while integer has thelowest precision. As for the real number type data, currency has the highest precision while float has the lowestprecision. Therefore, if two numeric data of different precision are added together, the return value will be the data typeof higher precision, e.g. if an integer is added to a double, the return value must be a double value.

ExampleThe return value of the following expression is 81.71:55 + 26.71

string op1 + time op2When a string is added to a time value, the return value will be a string because the time value can be changed to astring value while the string value cannot be changed to time value.

ExampleThe return value of the following statement is It is 10:10:10:" It is " + ToTime ( 10, 10, 10 )

string op1 + date op2When a string is added to a date value, the return value will be a string because the date value can be changed to astring value while the string value cannot be changed to a date value.

JReport Formula

140

Page 149: JReport Designer - User Referencespecifies the driver such as JDBC driver (for JDBC) or the Data Source name (for JDBC−ODBC bridge), the user ID and the password for connecting to

ExampleThe return value of the following statement is It is 1999−10−15:" It is "+ToDate ( 1999, 10, 15 )

string op1 + datetime op2When a string is added to a datetime value, the return value will be a string because the datetime value can be changedto a string value while the string value cannot be changed to a date value.

ExampleThe return value of the following statement is It is 1999−10−15 09:37:15:" It is " + CurrentDateTime ( ) "

string op1 + string op2 The return value is a string.

ExampleThe return value of the following statement is It is your bike:" It is " + " your bike. "

string op1 + integer op2When a string is added to an integer value, the return value will be a string because the integer value can be changed toa string value while the string value cannot be changed to an integer value.

ExampleThe return value of the following statement is The result is 9:" The result is " + 9

string op1 + number op2When a string is added to a number value, the return value will be a string because the number value can be changed toa string value while the string value cannot be changed to a number value.

ExampleThe return value of the following statement is The result is 9.56:" The result is " + 9.56

string op1 + currency op2 When a string is added to a currency value, the return value will be a string because the currency value can be changedto a string value while the string value cannot be changed to a currency value.

ExampleThe return value of the following statement is I spent 9.56:" I spent " + $9.56

string op1 + boolean op2 When a string is added to a boolean value, the return value will be a string because the boolean value can be changed toa string value while the string value cannot be changed to a boolean value.

ExampleThe return value of the following statement is It is false:" It is " + IsNull ( 3>2 )

JReport Formula

141

Page 150: JReport Designer - User Referencespecifies the driver such as JDBC driver (for JDBC) or the Data Source name (for JDBC−ODBC bridge), the user ID and the password for connecting to

string op1 + text op2 When a string is added to a text value, the return value will be a string because the text value can be changed to a stringvalue while the string value cannot be changed to a text value.

ExampleThe return value of the following statement is It is 07−Jul−99 7:12:21 AM:" It is " + ToText ( ToDateTime ( 1999, 7, 7, 7, 12, 21 ), "dd−MMM−yy h:mm:ss a", "AM")

date op1 + integer op2 When a date value is added to an integer value, the return value will be a date value because the integer value haschanged to a date value.

ExampleIf the date is Oct. 15, 1999, the return value of the following statement is 10−25−99:ToDate ( 1999, 10, 15 ) + 10

time op1 + integer op2When a time value is added to an integer value, the return value will be a time value because the integer value haschanged to a time value.

ExampleIf the time is 10:15:25, the return value of the following statement is 10:15:35:ToTime ( 10, 15, 25 ) + 10

datetime op1 + integer op2 When a datetime value is added to an integer value, the return value will be a datetime value because the integer valuehas changed to a datetime value .

ExampleIf the datetime is Aug. 10, 1999 10:21:30, the return value of the following statement is 1999−08−10 10:21:40:ToDateTime ( 1999, 8, 10, 10, 21, 30 ) + 10

text op1 + date op2 When a text value is added to a date value, the return value will be a text value because the date value can be changedto a text value while the text value cannot be changed to a date value.

ExampleIf the date is Aug.10, 1999 and the time is 10:21:30, the return value of the following statement is 10:21:301999−08−10:ToText(ToTime(10,21,30), "hh:mm:ss")+ToDate(1999,10,10)

text op1 + time op2 When a text value is added to a date value, the return value will be a text value because the date value can be changedto a text value while the text value cannot be changed to a date value.

ExampleIf the date is Aug.10, 1999 and the time is 10:21:30, the return value of the following statement is 99−08−1010:21:30:ToText(ToDate(1999,8,10), "yy−MM−dd") + ToTime(10,10,10)

JReport Formula

142

Page 151: JReport Designer - User Referencespecifies the driver such as JDBC driver (for JDBC) or the Data Source name (for JDBC−ODBC bridge), the user ID and the password for connecting to

text op1 + datetime op2When a text value is added to a datetime value, the return value will be a text value because the datetime value can bechanged to a text value while the text value cannot be changed to a datetime value.

ExampleIf the date is Aug.10, 1999 and the time is 10:21:30, the return value of the following statement is false1999−08−1010:21:30:ToText(3<2) + ToDateTime(1999,8,10,10,10,10)

text op1 + integer op2 When a text value is added to an integer value, the return value will be a text value because the integer value can bechanged to a text value while the text value cannot be changed to an integer value.

ExampleThe return value of the following statement is false10:ToText( 3<2 ) + 10

text op1 + number op2 When a text value is added to a number value, the return value will be a text value because the number value can bechanged to a text value while the text value cannot be changed to a number value.

ExampleThe return value of the following statement is false10.56:ToText( 3<2 ) + 10.56

text op1 + currency op2 When a text value is added to a currency value, the return value will be a text value because the currency value can bechanged to a text value while the text value cannot be changed to a currency value. But when a currency value ischanged to a text value, the symbol $ will not be added.

ExampleThe return value of the following statement is false10.56:ToText( 3<2 ) + $10.56

text op1 + boolean op2 When a text value is added to a boolean value, the return value will be a text value because the boolean value can bechanged to a text value while the text value cannot be changed to a boolean value.

ExampleThe return value of the following statement is false:ToText( 3<2 ) + IsNull ( 2.5 )

text op1 + string op2 The return value is a string.

ExampleThe return value of the following statement is 25.60 is a number:ToText( 25.6, 2 )+" is a number."

JReport Formula

143

Page 152: JReport Designer - User Referencespecifies the driver such as JDBC driver (for JDBC) or the Data Source name (for JDBC−ODBC bridge), the user ID and the password for connecting to

text op1 + text op2The return value is a text value.

ExampleThe return value of the following statement is 25.6 and 6.52:ToText( 25.6, 1 )+" and "+ToText ( 6.52, 2 )

Operator Subtract ( − )

numeric op1 − numeric op2Subtracts op2 from op1, a numeric subtracts a numeric, the result will return to the value that has a higher precision.Note : As we all known, each data type has its own precision. As for the integer type data, BigInt has the highestprecision while integer has the lowest precision. As for the real number type data, currency has the highest precisionwhile float has the lowest precision. Therefore, if two numeric data of different precision subtract each other, the returnvalue will be the data type of higher precision, e.g. if an integer subtracts a double, the return value must be a doublevalue.

ExampleThe return value of the following expression is 61.71.

87.71 − 26

date op1 − integer op2When a date value subtracts an integer value, the return value will be a date value because an integer value haschanged to be a date value.

ExampleIf the date is Oct. 18, 1999, the return value of the following statement is 10/16/99.

ToDate ( 1999, 10, 18 ) − 2

time op1 − integer op2When a time value subtracts an integer value, the return value will be a time value because an integer value haschanged to be a time value.

ExampleIf the time is 10:10:10, the return value of the following statement is 10:10:08.

ToTime ( 10, 10, 10 ) − 2

datetime op1 − integer op2When a datetime value subtracts an integer value, the return value will be a datetime value because an integer value haschanged to be a datetime value.

ExampleIf the date is Oct. 18, 1999, the time is 10:10:10, the return value of the following statement is 1999−10−18 10:10:08.

ToDateTime ( 1999, 10, 18, 10, 10, 10 ) − 2

datetime op1 − datetime op2When a datetime value subtracts a datetime value, the return value will be an integer. The result is the number ofseconds between two datetimes.

JReport Formula

144

Page 153: JReport Designer - User Referencespecifies the driver such as JDBC driver (for JDBC) or the Data Source name (for JDBC−ODBC bridge), the user ID and the password for connecting to

ExampleIf one timestamp is 1999−12−12 10:10:10, the other timestamp is 1995−12−12 10:10:10, the return value of the followingstatement is 126230400.

ToDateTime( 1999, 12, 12, 10, 10, 10 ) − ToDateTime ( 1995, 12, 12, 10, 10, 10 )

date op1 − date op2When a date value subtracts a date value, the return value will be an integer. The result is the number of days betweentwo dates.

ExampleIf one date is 1999−12−12, the other date is 1995−12−12, the return value of the following statement is 1461.

ToDate ( 1999, 12, 12 ) − ToDate ( 1995, 12, 12 )

time op1 − time op2When a time value subtracts a time value, the return value will be an integer. The result is the number of secondsbetween two times.

ExampleIf one time is 08:08:08, the other time is 10:10:10, the return value of the following statement is 7322.

ToTime ( 10, 10, 10 ) − ToTime ( 8, 8, 8 )

Operator Multiply ( * )

integer op1 * number op2Multiplies Op1 by Op2, when an integer value is multiplied by a number value, the return value will be a number value.

ExampleThe return value of the following statement is 104.25.

25 * 4.17

integer op1 * currency op2Multiplies Op1 by Op2, when an integer value is multiplied by a currency value, the return value will be a currency value.

ExampleThe return value of the following statement is $106.75.

25 * $4.27

integer op1 * integer op2Multiplies Op1 by Op2, when an integer value is multiplied by an integer value, the return value will be an integer value.

ExampleThe return value of the following statement is 15.

3 * 5

number op1 * integer op2

JReport Formula

145

Page 154: JReport Designer - User Referencespecifies the driver such as JDBC driver (for JDBC) or the Data Source name (for JDBC−ODBC bridge), the user ID and the password for connecting to

Multiplies Op1 by Op2, when a number value is multiplied by an integer value, the return value will be a number value.

ExampleThe return value of the following statement is 104.25.

4.17 * 25

number op1 * currency op2Multiplies Op1 by Op2, when a number value is multiplied by a currency value, the return value will be a currency value.

ExampleThe return value of the following statement is $3.25.

2.56 * $1.27

number op1 * number op2Multiplies Op1 by Op2, when a number value is multiplied by a number value, the return value will be a number value.

ExampleThe return value of the following statement is 2.88.

2.4 * 1.2

currency op1 * integer op2Multiplies Op1 by Op2, when a currency value is multiplied by an integer value, the return value will be a currency value.

ExampleThe return value of the following statement is $106.75.

$4.27 * 25

currency op1 * number op2Multiplies Op1 by Op2, when a currency value is multiplied by a number value, the return value will be a currency value.

ExampleThe return value of the following statement is $3.25.

$1.27 * 2.56

currency op1 * currency op2Multiplies Op1 by Op2, when a currency value is multiplied by a currency value, the return value will be a currency value.

ExampleThe return value of the following statement is $2.88.

$2.4 * $1.2

Operator Divide ( / and \)

integer op1 / number op2Divides Op1 by Op2, when an integer is divided by a number value, the return value will be a number or an integer.

JReport Formula

146

Page 155: JReport Designer - User Referencespecifies the driver such as JDBC driver (for JDBC) or the Data Source name (for JDBC−ODBC bridge), the user ID and the password for connecting to

ExampleThe return value of the following statement is 21.88:

56 / 2.56

integer op1 / currency op2Divides Op1 by Op2, when an integer is divided by a currency value, the return value will be a currency or an integer.

ExampleThe return value of the following statement is $21.88:

56 / $2.56

integer op1 / integer op2Divides Op1 by Op2, when an integer is divided by an integer, the return value will be an integer or a number value.

ExampleThe return value of the following statement is 18.67:

56 / 3

number op1 / number op2Divides Op1 by Op2, when a number is divided by a number value, the return value will be an integer or a number value.

ExampleThe return value of the following statement is 1.77:

4.52 / 2.56

number op1 / integer op2Divides Op1 by Op2, when a number is divided by an integer, the return value will be a number value.

ExampleThe return value of the following statement is 0.51:

2.55 / 5

number op1 / currency op2Divides Op1 by Op2, when a number is divided by a currency value, the return value will be a currency value.

ExampleThe return value of the following statement is $1.77:

4.52 / $2.56

currency op1 / currency op2Divides Op1 by Op2, when a currency is divided by a currency value, the return value will be an integer or a currencyvalue.

JReport Formula

147

Page 156: JReport Designer - User Referencespecifies the driver such as JDBC driver (for JDBC) or the Data Source name (for JDBC−ODBC bridge), the user ID and the password for connecting to

ExampleThe return value of the following statement is $1.77:

$4.52 / $2.56

currency op1 / integer op2Divides Op1 by Op2, when a currency is divided by an integer, the return value will be a currency value.

ExampleThe return value of the following statement is $1.28:

$2.56 / 2

currency op1 / number op2Divides Op1 by Op2, when a currency is divided by a number value, the return value will be an integer or a currencyvalue.

ExampleThe return value of the following statement is $1.77:

$4.52 / 2.52

number op1 \ number op2Divides Op1 by Op2, and returns an integer number.

ExampleThe return value of the following statement is 13:

39.4/3

Operator Negative ( − )

integer −op1It returns the opposite value of Op1, if an integer value is a positive, the return value will be a negative; if the integervalue is a negative, the return value will be a positive.

Example

The return value of the following statement is −25.− 25

The return value of the following statement is 25.− ( − 25 )

number −op1It returns the opposite value of Op1, if a number value is a positive, the return value will be a negative; if the numbervalue is a negative, the return value will be a positive.

Example

The return value of the following statement is −5.28.−5.28

JReport Formula

148

Page 157: JReport Designer - User Referencespecifies the driver such as JDBC driver (for JDBC) or the Data Source name (for JDBC−ODBC bridge), the user ID and the password for connecting to

The return value of the following statement is 5.28.− ( −5.28 )

currency −op1It returns the opposite value of Op1, if a currency value is a positive, the return value will be a negative; if the currencyvalue is a negative, the return value will be a positive.

Example

The return value of the following statement is −$2.57.−$2.57

The return value of the following statement is $2.57.− ( − $2.57 )

Operator Percent ( % )

integer op1 % integer op2Computes the percent of dividing Op1 by Op2, when an integer value is divided by an integer, the return value will be aninteger or a number.

ExampleThe return value of the following statement is 77.78.

7 % 9

integer op1 % number op2Computes the percent of dividing Op1 by Op2, when an integer value is divided by a number, the return value will be anumber or an integer.

ExampleThe return value of the following statement is 400.

6 %1.5

integer op1 % currency op2Computes the percent of dividing Op1 by Op2, when an integer value is divided by a currency, the return value will be aninteger or a currency.

ExampleThe return value of the following statement is 40.

1% $2.5

number op1 % number op2Computes the percent of dividing Op1 by Op2, when a number value is divided by a number, the return value will be aninteger or a number.

ExampleThe return value of the following statement is 176.56.

4.52 % 2.56

JReport Formula

149

Page 158: JReport Designer - User Referencespecifies the driver such as JDBC driver (for JDBC) or the Data Source name (for JDBC−ODBC bridge), the user ID and the password for connecting to

number op1 % integer op2Computes the percent of dividing Op1 by Op2, when a number value is divided by an integer, the return value will be aninteger or a number.

ExampleThe return value of the following statement is 50.

2.5 % 5

number op1 % currency op2Computes the percent of dividing Op1 by Op2, when an number value is divided by a currency, the return value will bean integer or a currency value.

ExampleThe return value of the following statement is 500.

2.5 % $0.5

currency op1 % currency op2Computes the percent of dividing Op1 by Op2, when a currency value is divided by a currency value, the return value willbe an integer or a currency.

ExampleThe return value of the following statement is 176.56.

4.52 % 2.56

currency op1 % integer op2Computes the percent of dividing Op1 by Op2, when a currency value is divided by an integer value, the return value willbe an integer or a currency.

ExampleThe return value of the following statement is 226.

$4.52 % 2

currency op1 % number op2Computes the percent of dividing Op1 by Op2, when a currency value is divided by a number value, the return value willbe an integer or a currency.

ExampleThe return value of the following statement is 120.

$1.44 % 1.2

Operator Exponentiation (^)

number op1 ^ number op2Raise x to the power of y. y can be fractional, positive or negative. x may be fractional, but negative only when y is awhole number.

JReport Formula

150

Page 159: JReport Designer - User Referencespecifies the driver such as JDBC driver (for JDBC) or the Data Source name (for JDBC−ODBC bridge), the user ID and the password for connecting to

Examples

The return value of the following statement is 4:2 ^ 2

The return value of the following statement is 1626.9438030745541:7^3.8

Operator Greater than ( > )

numeric op1 > numeric op2If Op1 is greater than Op2, the return value will be true; if Op1 is less than Op2, the return value will be false.

Example

The return value of the following statement is true.3 > 2.56

The return value of the following statement is false.5.29 >7.55

string op1 > string op2If Op1 is greater than Op2, the return value will be true; if Op1 is less than Op2, the return value will be false.

Example

The return value of the following statement is true."string abcd" > "string abc"

The return value of the following statement is false."string abc" > "string abcd"

date op1 > date op2If Op1 is greater than Op2, the return value will be true; if Op1 is less than Op2, the return value will be false.

ExampleThe return value of the following statement is true.

ToDate( 1999, 10, 10 ) > ToDate( 1999, 2, 5 )

time op1 > time op2If Op1 is greater than Op2, the return value will be true; if Op1 is less than Op2, the return value will be false.

ExampleThe return value of the following statement is true.

ToTime ( 10, 10, 10 ) > ToTime ( 8, 10, 10 )

datetime op1 > datetime op2If Op1 is greater than Op2, the return value will be true; if Op1 is less than Op2, the return value will be false.

JReport Formula

151

Page 160: JReport Designer - User Referencespecifies the driver such as JDBC driver (for JDBC) or the Data Source name (for JDBC−ODBC bridge), the user ID and the password for connecting to

ExampleThe return value of the following statement is true.

ToDateTime ( 1999, 10, 10, 10, 10, 10 ) > ToDateTime ( 1999, 5, 10, 8, 5, 5 )

Operator Less then ( < )

numeric op1 < numeric op2If Op1 is less than Op2, the return value will be true; if Op1 is greater than Op2, the return value will be false.

Example

The return value of the following statement is true.2.56< 3

The return value of the following statement is false.7.55< 5.88

string op1 < string op2If Op1 is less than Op2, the return value will be true; if Op1 is greater than Op2, the return value will be false.

Example

The return value of the following statement is true."string abc" < "string abcd"

The return value of the following statement is false."string abcd" < "string abc"

date op1 < date op2If Op1 is less than Op2, the return value will be true; if Op1 is greater than Op2, the return value will be false.

ExampleThe return value of the following statement is false.

ToDate( 1999, 10, 10 ) < ToDate( 1999, 2, 5 )

time op1 < time op2If Op1 is less than Op2, the return value will be true; if Op1 is greater than Op2, the return value will be false.

ExampleThe return value of the following statement is false.

ToTime ( 10, 10, 10 ) < ToTime ( 8, 10, 10 )

datetime < datetime op2If Op1 is less than Op2, the return value will be true; if Op1 is greater than Op2, the return value will be false.

ExampleThe return value of the following statement is false.

ToDateTime ( 1999, 10, 10, 10, 10, 10 ) < ToDateTime ( 1999, 5, 10, 8, 5, 5 )

JReport Formula

152

Page 161: JReport Designer - User Referencespecifies the driver such as JDBC driver (for JDBC) or the Data Source name (for JDBC−ODBC bridge), the user ID and the password for connecting to

Operator Equal ( == )

numeric op1 == numeric op2If Op1 is equal to Op2, the return value is true; if Op1 is not equal to Op2, the return value is false.

ExampleThe return value of the following statement is false.

5 == 4

string op1 == string op2If Op1 is equal to Op2, the return value is true; if Op1 is not equal to Op2, the return value is false.

ExampleThe return value of the following statement is false.

"string abcd" == "string abc"

date op1 == date op2If Op1 is equal to Op2, the return value is true; if Op1 is not equal to Op2, the return value is false.

ExampleThe return value of the following statement is false.

ToDate ( 1999, 10, 10 ) == ToDate ( 1999, 5, 10 )

time op1 == time op2If Op1 is equal to Op2, the return value is true; if Op1 is not equal to Op2, the return value is false.

ExampleThe return value of the following statement is false.

ToTime ( 9, 10, 10 ) == ToTime ( 10, 10, 10 )

datetime == datetime op2If Op1 is equal to Op2, the return value is true; if Op1 is not equal to Op2, the return value is false.

ExampleThe return value of the following statement is false.

ToDateTime ( 1999, 10, 10, 5, 10, 10 ) == ToDateTime ( 1999,10, 10, 10, 10, 10 )

Operator Not equal ( != ) or ( <> )

numeric op1 <> numeric op2 or numeric op1 != numeric op2If Op1 is not equal to Op2, the return value is true; if Op1 is equal to Op2, the return value is false.

ExampleThe return value of the following statement is false.

4<> 4

JReport Formula

153

Page 162: JReport Designer - User Referencespecifies the driver such as JDBC driver (for JDBC) or the Data Source name (for JDBC−ODBC bridge), the user ID and the password for connecting to

string op1 <> string op2 or string op1 != string op2If Op1 is not equal to Op2, the return value is true; if Op1 is equal to Op2, the return value is false.

ExampleThe return value of the following statement is true.

"string abc" != "string abcd"

date op1 <> date op2 or date op1 != date op2If Op1 is not equal to Op2, the return value is true; if Op1 is equal to Op2, the return value is false.

ExampleThe return value of the following statement is true.

ToDate ( 1999, 10, 10 ) != ToDate ( 1999, 5, 10 )

time op1 <> time op2 or time op1 != time op2If Op1 is not equal to Op2, the return value is true; if Op1 is equal to Op2, the return value is false.

ExampleThe return value of the following statement is true.

ToTime ( 9, 10, 10 ) <> ToTime ( 10, 10, 10 )

datetime <> datetime op2 or datetime != datetime op2If Op1 is not equal to Op2, the return value is true; if Op1 is equal to Op2, the return value is false.

ExampleThe return value of the following statement is true.

ToDateTime ( 1999, 10, 10, 5, 10, 10 ) != ToDateTime ( 1999,10, 10, 10, 10, 10 )

Boolean ( && , || , ! )

Boolean op1 && Boolean op2Return true if Op1 is true and Op2 is true.

ExampleThe return value of the following statement is abc.

Integer s=4,d=8;Integer f=6;if ( f>s && f<d ){ return "abc";}

Boolean op1 || Boolean op2Return true if Op1 is true or Op2 is true.

ExampleThe return value of the following statement is abc.

JReport Formula

154

Page 163: JReport Designer - User Referencespecifies the driver such as JDBC driver (for JDBC) or the Data Source name (for JDBC−ODBC bridge), the user ID and the password for connecting to

Integer s=4,d=8;Integer f=6;if ( f>s | | f>d ){ return "abc";}

! Boolean op1Return true if Op1 is false.

ExampleThe return value of the following statement is def.

Integer s=4, d=8;Integer f=6;if ( ! ( f>s ) ) return "abc"else return "def"

Range Operator

Left end point exclude operator: (x _to y)x _to y is used to specify a range of values greater than but not including the value x, and less than or equal to the valuey. Both x and y are the type of Number.

ExampleThe return value of the following statement is True:

integer a[] = [1,1,2,3,4];3 in a[2 _to 4];

Right end point exclude operator: (x to_ y)x to_ y is used to specify a range of values greater than or equal to the value x, and less than but not including the yvalue. Both x and y are the type of Number.

ExampleThe return value of the following statement is: True

integer a[] = [1,1,2,3,4];3 in a[2 to_ 4];

Both end point exclude operator: (x _to_ y)x _to_ y is used to specify a range of values greater than but not including the value x, and less than but not including thevalue y. Both x and y are the type of Number.

ExampleThe return value of the following statement is: True

integer a[] = [1,1,2,3,4];3 in a[2 _to_ 4];

JReport Formula

155

Page 164: JReport Designer - User Referencespecifies the driver such as JDBC driver (for JDBC) or the Data Source name (for JDBC−ODBC bridge), the user ID and the password for connecting to

Up from operator: upfrom xupfrom x is used to specify a range of values greater than or equal to the value x. x is the type of Number.

ExampleThe return value of the following statement is: False

integer a[] = [1,1,2,3,4];3 in a[upfrom 4]

Up from but not including operator: upfrom_ xupfrom_x is used to specify a range of values greater than but not including the value x. x is the type of Number.

ExampleThe return value of the following statement is: True

integer a[] = [1,1,2,3,4];3 in a[upfrom_ 2];

Up to operator: upto xupto x is used to specify a range of values less than or equal to the value x. x is the type of Number.

ExampleThe return value of the following statement is: True

integer a[] = [1,1,2,3,4];3 in a[upto 4];

Up to but not including operator: upto_ xupto_ x is used to specify a range of values less than but not including the value x. x is the type of Number.

ExampleThe return value of the following statement is: False

integer a[] = [1,1,2,3,4];4 in a[upto_ 4];

Others

return xGet the return value of X.

ExampleThe result of the following statement is 06/19/01.

return Today ( )

if[b] then {...} else {...}Conditional statement.

ExampleThe return value of the following statement is abc.

JReport Formula

156

Page 165: JReport Designer - User Referencespecifies the driver such as JDBC driver (for JDBC) or the Data Source name (for JDBC−ODBC bridge), the user ID and the password for connecting to

integer s=5;integer f=8;if ( f>s )then return "abc"else return "def"

for statementFlow control statement.

Syntax

for (forInitAssignment; forBooleanExpression; forIncrAssignment)loopBody;

Example

for (i = 1; i < 10; i = i + 1)sum = sum + 1;

Notes:

The for initiate assignment (forInitAssignment), for boolean expression (forBooleanExpression), and for incrementassignment (forIncrAssignment) can be empty statement, but loopBody cannot be empty. The loopBody can be eithersimple statement or compound statements.

Please do not use nested for loop in your formula because the java compiler jc.class cannot compile it. The java compilerjc.class does not support “break” or “continue” flow control statements.

x [ i to j ]A statement used to define an array.

ExampleThe return value of the following statement is true.

string range strary = ["a" to "z"];string x = "d";x in strary

x [ i ]A statement used to index a certain value in an array.

ExampleThe return value of the following statement is 14:11:27.

time d[3] = [totime(12, 11, 27), totime(13, 11, 27), totime(14, 11, 27)];time dd[3];dd = d;dd[2]

x in yA statement used to tell whether x is in y, the return value is a boolean value.

JReport Formula

157

Page 166: JReport Designer - User Referencespecifies the driver such as JDBC driver (for JDBC) or the Data Source name (for JDBC−ODBC bridge), the user ID and the password for connecting to

ExampleThe return value of the following statement is false.

integer x[3] = [0,1,2];integer xx = 3;xx in x

[ x, y, z ]A statement used to define an array.

ExampleThe return value of the following statement is 1996−11−27.

date d[3] = [toDate(1997, 11, 27), toDate(1996, 11, 27), toDate(1995, 11, 27)];date dd[3];dd = d;dd[1]

JReport Formula

158

Page 167: JReport Designer - User Referencespecifies the driver such as JDBC driver (for JDBC) or the Data Source name (for JDBC−ODBC bridge), the user ID and the password for connecting to

JReport Designer JavadocJReport is written entirely in Java to take full advantage of the Java architecture. JReport Designer, Engine and ViewerBeans can be easily integrated into your applications, giving them the ability to view, print or even design reports. Inaddition, you can easily extend JReport by importing external beans and Java functions, calling exit functions, andinterfacing with your security manager (for JReport Enterprise Server). JReport IDEs include SilverStream, Forte forJava, JBuilder, Visual Age, Visual Cafe. JReport is the most dynamic e−reporting solution today.

After going over User's Guide for JReport features, you have already learned a lot of the interfaces we offer to you. Thegenerated javadocs is organized like browsing JDK base classes. You can go tohttp://www.jinfonet.com/webpage/kbase/kbase.htm for the javadoc. With new features coming out, there will be newinterfaces open to you.

JREngine Bean − jet.bean.JREngine class, is used to run report result, export the result to multiple file formats(e.g. PDF, HTML, RTF) and to a printer.Usage: User's Guide | Executing Reports from JReport Beans or APIs | JReport Engine Bean

JRResultViewer Bean − jet.bean.JRResultViewer class, is used to view the report result file, export to multiplefile formats and a printer.Usage: User's Guide | Executing Reports from JReport Beans or APIs | JReport Result Viewer Bean

JRCatalog Bean − jet.bean.JRCatalog class, jet.bean.JRCatalogException.class, jet.universe.ConnectionDescclass, is used to manipulate and access a catalog.Usage: User's Guide | Executing Reports from JReport Beans or APIs | JReport Catalog Bean

JReport Designer Bean − jet.bean.JRDesign class, is used to load the visual report design environment formodifying a report.Usage: User's Guide | Executing Reports from JReport Beans or APIs | JReport Designer Bean

JReport Designer API − jet.api package, is used to create or modify a report programmably.Usage: User's Guide | Executing Reports from JReport Beans or APIs | JReport Designer API

JReport Catalog API − jet.api package, is used to create or modify a catalog fully programmably. Usage: User's Guide | Executing Reports from JReport Beans or APIs | JReport Catalog API

UDS API − jet.datasource package, is used to implement accessing the user defined data source.Usage: User Reference | UDS API, User's Guide | Developing Reports from User Data Source

JReport Printable Object API − jet.datasource.sanfrancisco package, is especially used by the SanFranciscointegration.Usage: SanFrancisco Integration Manual

Exit Functions − jet.util package, jet.exception package, enables your java applications to be called before,during and after the process of report running.Usage: User Reference | Reporting Features | Report Panel | Exit Functions, User's Guide | Exit Functions

User Defined Formula Functions − jet.formula, jet.connect, is used to create User Defined Formula Functions.Usage: User's Guide | Writing and Using Formulas | Writing and Using User−defined Formula Functions

User Defined Objects (UDO) − jet.report package, jet.udo package, jet.datastream package, jet.controlspackage, is used to create User Defined Objects.Usage: User's Guide | User Defined Object (UDO)

159

Page 168: JReport Designer - User Referencespecifies the driver such as JDBC driver (for JDBC) or the Data Source name (for JDBC−ODBC bridge), the user ID and the password for connecting to

Reporting FeatureBased on your preliminary understanding of JReport Catalog, let us get familiar with JReport report concepts. In addition,this chapter will also have detailed descriptions for all the reporting features for each report object.

We are living in a world of information, and people more and more are realizing the importance of data management.Data are collected and recorded in the database. But we need to retrieve the useful data from the database, making firsthand and prompt information become valuable decisions and business chances. A report contains that necessary kind ofmagic. JReport takes advantage of Java's cross platform feature, helping you gather information from various ofdatabases on various operating systems and build professional−looking reports. The electronic version reports can betransferred across the Internet or Intranet to those who need them.

Basic Components

JReport provides you with commonly used report template or format to fill in the data. This process is the reportdesigning phase. When you run/view the report, JReport will connect with your database or your own data source tofetch the data out, then show your report result, this is the running phase. In other words, only after the running phase,can the data be filled into the template you specified, and then you have the report result. Therefore, in JReport, there isa difference between when we say report and report result.

No matter which template you are using, a report basically consists of Report Header/Report Footer, Page Header/PageFooter and Detail sections. A report may only have one or some sections and it depends on your requirements. Youcan also insert another section, e.g. Report Header, after the first Report Header section.

Report Header• Page Header• Detail• Page Footer• Report Footer•

Advanced Components

Very often, you group together the records sharing the same characteristics. For example, we will group according toRegion. Then, those records of the same region will be placed together. Each group will have a group header and groupfooter. This goal of this is to make your report more informative and visually appealing. You can sort the records in eachgroup in the alphabetical order, or perform calculations for each group.

Group Header• Group Footer•

Any of the above sections could be hidden or inserted more times, which is up to your own needs. After you fill in thereport template with data objects (DBFields, parameters, formulas, etc.) and customized objects (lines, ovals, etc.), thereport is bound with data. Running the report/template file then will fetch the result for you.

Report Objects Tree

Now that you know the components and objects for a report, you will wonder how they are manipulated in JReport byusers. Those are the items you will use most often while developing a report. Therefore, we provide a helpfultool−−Report Inspector. JReport Designer provides a visual design environment for report layout and data binding. Inaddition, Report Inspector is slight−adjustment tool for manipulating any objects in your report. All the objects in a reportare organized and browsed from a tree structure. Selecting an element node on the tree also selects the same object onthe design layout tab. You can view the properties of selected fields, objects, and sections. Some commonly usedproperties include color, width, location, and style.

160

Page 169: JReport Designer - User Referencespecifies the driver such as JDBC driver (for JDBC) or the Data Source name (for JDBC−ODBC bridge), the user ID and the password for connecting to

JReport intuitive designer is a point−and−click, drag−and−drop WYSIWYG interface. All the operations you perform therecan also be reflected in Report Inspector. In addition, Report Inspector allows you to edit and format those objectsdirectly from this window.

Therefore, you have two approaches for editing the properties of an object in a report: from the designer and with ReportInspector. You will find a combination of designer and Report Inspector the most effective way to format a report. Forexample, you can drag a DB−Field to resize it in the designer, and go to Report Inspector Height and Width properties tomake a more concise adjustment. Reports developed with the designer can be used directly to generate the final reportresult, or inside a Java program as the bases for generating reports.

We will start off from Report Inspector, which encompasses all the reporting features. These features are categorizedaccording to their functions on different report objects or components.

Reporting Feature

161

Page 170: JReport Designer - User Referencespecifies the driver such as JDBC driver (for JDBC) or the Data Source name (for JDBC−ODBC bridge), the user ID and the password for connecting to

For each report, Report Inspector consists of the report objects tree at the top part of the view panel and itscorresponding reporting features or properties at the bottom part. Selecting any object node on the tree also selects thesame element on the report design panel. The two figures below cover all the objects that can be used in a report as wellas their relationship. Please note: the down arrow indicates the Father−Children inheritance for the objects.

Reporting Feature

162

Page 171: JReport Designer - User Referencespecifies the driver such as JDBC driver (for JDBC) or the Data Source name (for JDBC−ODBC bridge), the user ID and the password for connecting to

Where the term Section in the above figure is further expanded as below:

Reporting Feature

163

Page 172: JReport Designer - User Referencespecifies the driver such as JDBC driver (for JDBC) or the Data Source name (for JDBC−ODBC bridge), the user ID and the password for connecting to

Rules for Browsing This Part

Do not worry if you are not clear of terms used in the figure, go ahead and learn more about them. Then get back here,you will be well informed about the roadmap for the objects. We would like you to keep in mind the following while youbrowse to each object for the reporting features:

You will be starting off from a table listing all the properties for the object and what can be achieved with eachproperty.

In the table Y stands for Yes and N for No.• Editable means that the property can be edited or not.• Some properties can be controlled by a formula. Some properties must be known by JReport engine before pagebreak, so that it can layout the object in a page. In a formula special field pagenumber is the switch for turningon and off the page break calculation time. If pagenumber is quoted in the formula, then calculation time will beafter page break, vice versa. For this reason, we will set the calculation time for controlling by formula will bemarked as before page break. If otherwise (no mark), then the property can be controlled by formula at any

Reporting Feature

164

Page 173: JReport Designer - User Referencespecifies the driver such as JDBC driver (for JDBC) or the Data Source name (for JDBC−ODBC bridge), the user ID and the password for connecting to

time. In the important and knotty properties marked with *, you can find further explanations for them afterwards. Thesame property for different objects usually means the same thing, unless otherwise stated, and will not berepeated for each object. Therefore, take use of the index to find the instructions for the property.

JReport Arc

To insert an arc into a report,

click the Insert Arc button on the Edit toolbar,• or go to the Insert menu, select Draw, and then click Arc.•

JReport arc can cross sections.

Property name Description EditableFormulaControl

DataType

General

ClassType Display the class type: ArcShape N N _

Geometry

TopAttacthPosXThe horizontal coordinate of the top left point of the focus box in a section, andthe position can also be changed by moving in the Design mode.

Y N Float

TopAttacthPosYThe vertical coordinate of the top left point of the focus box in a section, andthe position can also be changed by moving in the Design mode.

Y N Float

BottomAttachPosXThe horizontal coordinate of the bottom right point of the focus box in asection, and the position can also be changed by moving in the Design mode.

Y N Float

BottomAttachPosYThe vertical coordinate of the bottom right point of the focus box in a section,and the position can also be changed by moving in the Design mode.

Y N Float

Color

BackgroundThe background color inside the arc, specify with a string like "0xff00ff" tocontrol or choose a color in the palette.

Y N String

Others

Invisible Not displayed in the View mode if true. Y N Boolean

BoxProperty

Bordercolor Arc line color. Y N String

BorderStyle Arc line style (dash line, dot line, dashdot line and solid line). Y N Int

BorderWidth Arc line thickness. Y N Float

ArcProperty

StartAngleEnter values from 0 to 360. This positions your arc. At 0, the vertex of the arcstarts at 12:15. As you get closer to 360, the arc travels in a counter clockwisemotion.

Y N Int

ArcAngleEnter values from 0 to 360. As you get closer to 360, the arc begin to take anelliptical shape

Y N Int

Notes:

1. Arc is part of the circumference of a circle or other curved line. When you insert an arc into a report, you will notice theselected object is a box. You can control its position with the coordinates of the top left and bottom right point of the box.

Reporting Feature

165

Page 174: JReport Designer - User Referencespecifies the driver such as JDBC driver (for JDBC) or the Data Source name (for JDBC−ODBC bridge), the user ID and the password for connecting to

2. When a report is exported to a html or rtf format file, arcs in it cannot be shown. There is no such problem for PDF, PS,and other outputs.

Index

Barcode

Property Name UDescription EditableFormulaControl

Data Type

Barcode

BarHeight Specifies the height for the bars of the barcode object. Y Y INT

NarrowWidth Specifies the barcode bar width. Y Y INT

HRDisplaySpecifies whether to display the barcode numbers together with the barcode.Enabled only for CODE39, CODE128, and Codabar.

Y Y BOOLEAN

SupplementSpecifies the supplement if necessary. Some barcode types, such asCODE39, CODE128 and Codabar, don't have supplements.

Y Y STRING

Orientation Specifies the rotation angle for the barcode object. Y Y INT

ScaleModeSpecifies the unit for the values of Quiet Zone, Narrow Width, Supplement,Hight, and Ratio. Can be Mils (0.001 inch), Metric (0.01 millimeter), and Points(1/72 inch).

Y N STRING

MessageSpecifies the default value for the barcode. The value you specify will be usedfor the barcode in design mode.

Y Y STRING

UseDefaultMessageSpecifies whether to use the default message to display the barcode atruntime. Please note this will make the barcodes displayed in your report resultexactly the same, using the default message specified at design time.

Y Y BOOLEAN

Ratio

Specifies the width ratio of the thick bar to the thin bar in theCODE39/Codabar barcode. The ratio box can have only 2 effective values, 2.0and 3.0, any ratio values are not equal to 2.0 or 3.0 will be granted as 2.0.Enabled only for CODE39 and Codabar.

Y Y FLOAT

CheckEnable Specifies whether to include check digits in the barcode. Y Y BOOLEAN

QuietZoneSpecifies the space around the barcode that must contain no dark marks. Mostof symbology requires quiet zone preceding and following barcode. Most ofsymbology requires quiet zone preceding and following barcode.

Y Y INT

SymbologySpecifies the barcode type. Can be one of the following: UPC−A, UPC−E,EAN−13, EAN−8, Code39, Code128 and Codabar.

Y N STRING

Bar128TypeSpecifies the barcode 128 type, which can be CODE128−A, CODE128−B,CODE128−C, and Auto. Enabled only when Code128 is selected in theSymbology drop down list.

Y N STRING

JReport Box

To insert a box into a report,

click the Insert Box button on the Edit toolbar,•

Reporting Feature

166

Page 175: JReport Designer - User Referencespecifies the driver such as JDBC driver (for JDBC) or the Data Source name (for JDBC−ODBC bridge), the user ID and the password for connecting to

or go to the Insert menu, select Draw, and then click Box.•

Property name Description EditableFormulaControl

DataType

General

ClassType Display the class type: box. N N _

Geometry

TopAttacthPosXThe horizontal coordinate of the top left point of the box in a section, and theposition can also be changed by moving in the Design mode.

Y N Float

TopAttacthPosYThe vertical coordinate of the top left point of the box in a section, and theposition can also be changed by moving in the Design mode.

Y N Float

BottomAttachPosXThe horizontal coordinate of the bottom right point of the box in a section, andthe position can also be changed by moving in the Design mode.

Y N Float

BottomAttachPosYThe vertical coordinate of the bottom right point of the box in a section, andthe position can also be changed by moving in the Design mode.

Y N Float

Color

BackgroundThe background color inside the box, specify with a string like "0xff00ff" tocontrol or choose a color in the palette.

Y N String

Others

Invisible Not displayed if true. Y N Boolean

BoxProperty

Bordercolor Box’s frame/borders color. Y N String

BorderSyle Box’s frame/borders style (dash line, dot line, dashdot line and solid line). Y N Int

BorderWidth The thickness of a box’s frames/borders . Y N Float

Index

Chart Platform

Chart platform is the container of the other chart elements, such as chart coordinate paper, chart legend, and so on. Youuse the properties listed in the following table to control the appearances or behaviors of a chart platform object.

The properties for chart platform are:

Property Name Description EditableFormulaControl

DataType

General

ClassType Shows the class type of the chart object. N N −

DataSource

Type Specifies the chart type of a chart object. More Info Y N Integer

Category Shows the category field or group. N N −

Series Shows the data series field or group. N N −

Value The aggregation function for one of the data set. N N −

StartOffset(1st.Data.Set)

Specifies the starting offset of the data series, used together with theother three properties to control the data source range that appears on thechart. This property does not work with chart that involves only one group.More Info

Y Y Integer

EndOffset(1nd.Data.Set)

Specifies the ending offset of the data series, used together with the otherthree properties to control the data source range that appears on thechart. This property does not work with chart that involves only one group.More Info

Y Y Integer

Reporting Feature

167

Page 176: JReport Designer - User Referencespecifies the driver such as JDBC driver (for JDBC) or the Data Source name (for JDBC−ODBC bridge), the user ID and the password for connecting to

StartOffset(2nd.Data.Set) Specifies the starting offset of the categories, used together with the otherthree properties to control the data source range that appears on thechart. More Info

Y Y Integer

EndOffset(2nd.Data.Set)Specifies the ending offset of the categories, used together with the otherthree properties to control the data source range that appears on thechart. More Info

Y Y Integer

ReverseRows Specifies whether the row sequence is reversed. Y Y Boolean

ReverseColumns Specifies whether the column sequence is reversed. Y Y Boolean

PatternList Specifies the pattern and color of the data markers. More Info Y N String

PrimaryDataFilterSpecifies the data filter for the primary value axis (the Y1 axis) to displaythe tick mark labels the way you want. More Info

Y N String

SecondaryDataFilterSpecifies the data filter for the secondary value axis (the Y2 axis) todisplay the tick mark labels the way you want. More Info

Y N String

CategoryFilterSpecifies the filter for the category axis (the X axis) to display the tickmark labels the way you want. More Info

Y N String

SeriesFilterSpecifies the filter for the series axis (the Z axis) to display the tick marklabels the way you want. More Info

Y N String

SizeOfPart1Specifies the number of data series groups represented on the Y1 axis.More Info

Y Y Integer

SortX Specifies the sorting order on the labels of the X axis. Y N Integer

SortZ Specifies the sorting order on the labels of the Z axis. Y N Integer

HyperLink Specifies an URL with a link to the chart. More Info Y Y String

XHyperLink Specifies an URL with a link to the X axis labels. More Info Y Y String

ZHyperLink Specifies an URL with a link to the Y axis labels. More Info Y Y String

Geometry

XThe distance between the chart and the left edge of the report pagemargin.

Y N Float

YThe distance between the chart and the top edge of the report pagemargin.

Y N Float

Width The width of the chart object. Y N Float

Height The height of the chart object. Y N Float

Others

TOCAnchorSpecifies whether to add the node that represents for this object to theTOC tree.

Y Y Boolean

Style The style that is applied to the chart object. Y Y String

Invisible Specifies whether the chart is visible at run−time. Y Y Boolean

Suppressed Specifies whether the chart is suppressed and not shown at run−time. Y Y Boolean

SuppressedIfNoRecordsSpecifies whether to suppress and not show the chart object when thereis no record retrieved for the whole report.

Y Y Boolean

ExportToCSVSpecifies whether the chart object is exported when exporting the reportto a csv file.

Y Y Boolean

ExportToXLSSpecifies whether the chart object is exported when exporting the reportto Excel file.

Y Y Boolean

Platform

AutoLayoutSpecifies whether the elements inside the object are automaticallyre−aligned or resized when the object is resized.

Y Y Boolean

BorderStyle Specifies the border style for an object. More Info Y N Integer

PenStyle Specifies the style for the pen object. Y N Integer

Reporting Feature

168

Page 177: JReport Designer - User Referencespecifies the driver such as JDBC driver (for JDBC) or the Data Source name (for JDBC−ODBC bridge), the user ID and the password for connecting to

PenColor The color for the pen object. Y Y String

PenThickness The thickness for the pen object. More Info Y N Float

EndCaps Specifies the ending style for the pen object. Y N Integer

LineJoint Specifies the line joint style for the pen object. Y N Integer

Outline Specifies whether an object is shown in outline form. Y N Boolean

VariabledDash Specifies whether the dash is auto−sized. Y N Boolean

BorderTransparency The border transparency, in percent. Y Y Integer

FillPattern Specifies a fill pattern for an object. More Info Y Y Integer

BackgroundTransparency The fill transparency, in percent. Y N Integer

TopThe top position of the background area, measured in the percentage ofthe object's height, from the top edge of the object, used together withLeft, Right, and Bottom.

Y N Integer

LeftThe left position of the background area, measured in the percentage ofthe object's width, from the left edge of the object, used together with Top,Right, and Bottom.

Y N Integer

RightThe right position of the background area, measured in the percentage ofthe object's width, from the right edge of the object, used together withTop, Left, and Bottom.

Y N Integer

BottomThe bottom position of the background area, measured in the percentageof the object's height, from the bottom edge of the object, used togetherwith Top, Left, and Right.

Y N Integer

BackgroundColor The color for the background. Y Y String

TextureStyle Specifies a texture style for an object. Y N Integer

TextureForeColor The color for the texture foreground. Y Y String

TextureBackColor The color for the texture background. Y Y String

GradientStyle Specifies a gradient style for an object. More Info Y N Integer

GradientStartColor The color for the gradient first color. Y Y String

GradientEndColor The color for the gradient second color. Y Y String

GradientStartXThe horizontal position, measured in the percentage of the object's width,from the left edge of the object, where the gradient starts.

Y Y Integer

GradientStartYThe vertical position, measured in the percentage of the object's height,from the bottom edge of the object, where the gradient starts.

Y Y Integer

GradientEndXThe horizontal position, measured in the percentage of the object's width,from the left edge of the object, where the gradient ends.

Y Y Integer

GradientEndYThe vertical position, measured in the percentage of the object's height,from the bottom edge of the object, where the gradient ends.

Y Y Integer

Image Specifies a gif image to display on an object. Y Y String

ImageLayout Specifies a layout style for the image. More Info Y N Integer

ImageXThe left position of the image, measured in the percentage of the object'swidth, from the left edge of the object.

Y Y Integer

ImageYThe top position of the image, measured in the percentage of the object'sheight, from the bottom edge of the object.

Y Y Integer

ImageWidthThe width of the image, measured in the percentage of the object's width.Setting this value to less than 100 percent will cut the image from the rightedge.

Y Y Integer

ImageHeightThe height of the image, measured in the percentage of the object'sheight. Setting this value to less than 100 percent will cut the image fromthe bottom edge.

Y Y Integer

HintFormat Specify the number format for the hint message. Y Y String

Reporting Feature

169

Page 178: JReport Designer - User Referencespecifies the driver such as JDBC driver (for JDBC) or the Data Source name (for JDBC−ODBC bridge), the user ID and the password for connecting to

GroupValueFormat Specifies the format for the group value. The format here usually refer tothe following encoding: BIG5, EUCJIS, GBK, UTF8, and XXXXX....

Y Y String

Index

A Detailed Reference of JReport Charts

About Charts

Charts organize and visualize data and make it easy for users to see comparisons, trends, and patterns in data. A chartin JReport is based on the data retrieved from database and represented by a report. It represents the report data in avisually straightforward form.

JReport Chart Elements

JReport chart consists of three major parts: chart platform, chart coordinate paper, and chart legend, where chartplatform is the container of other chart components and chart coordinate paper furthermore holds walls, axes, datamarkers, axis values, and category names.

Option Description

Chart platformThe container of the other chart elements, such as chartcoordinate paper, chart legend, and so on.

Chart coordinate paperThe canvas on which the main chart is drawn. The chartcoordinate paper contains walls, axes, data markers, axis values,category names, and so on.

Chart legend

Chart legend is a box to identify the patterns or colors assigned tothe data series or categories in a chart. Each chart can have atmost two legends, category legend and series legend. A chartlegend may contain one or more legend entries; each entrycontains an icon and a label object.

Chart label

Reporting Feature

170

Page 179: JReport Designer - User Referencespecifies the driver such as JDBC driver (for JDBC) or the Data Source name (for JDBC−ODBC bridge), the user ID and the password for connecting to

A chart label can be used as chart title, part of a chart legendentry, value axis title, category axis title, or more; you can insert alabel anywhere inside a chart.

Axis valuesJReport Designer creates the axis values from the report data. Youcan change the default value range, the interval of the tick marks,the number of tick marks, and so on.

Category namesDBFields and formulae in the report can be used for category axisnames. You can choose (not) to show category axis names in thechart legend.

Data series namesDBFields and formulae in the report can be used for series names.You can choose (not) to show data series names in the chartlegend.

Data markersData markers with the same pattern represent one data series.Each data marker represents one number from the report data.

HintA hint message that displays the value of a data marker when youmove your mouse pointer over the data marker.

A Detailed Property Reference

BorderStyle Property

Specifies the border style for an object.

The settings for BorderStyle are:

Option Description

Empty The object has no visible border line (default).

Lined The object has a single−line border.

Raised The object has a 3D border that appears as if it is raised off the page.

Recess The object has a 3D border that appear as if it is pressed into the page.

Shadow The object has a shadowed border, beneath and to the right of the object.

ChartType Property

Specifies a type for a chart object. Applies to Chart Platforms.

Can be one of the following:

Chart type Option Description

Bar Clustered Bar 2−DClustered Bar. Displays and compares datavalues across categories.

Stacked Bar 2−DStacked Bar. Displays and compares thecontribution of each data value to a total acrosscategories.

100% Stacked Bar 2−D100% Stacked Bar. Displays and compares thepercentage that each data value contributes toa total across categories.

Clustered Bar 3−D Clustered bar with a 3−D visual effect.

Stacked Bar 3−D Stacked bar with a 3−D visual effect.

Reporting Feature

171

Page 180: JReport Designer - User Referencespecifies the driver such as JDBC driver (for JDBC) or the Data Source name (for JDBC−ODBC bridge), the user ID and the password for connecting to

100% Stacked Bar 3−D 100% stacked bar with a 3−D visual effect.

Bar 3−D3−D Bar. Displays and compares data valuesacross categories and series.

Bench Clustered Bench 2−DClustered Bench. Displays and compares datavalues across categories.

Stacked Bench 2−DStacked Bench. Displays and compares thecontribution of each data value to a total acrosscategories.

100% Stacked Bench 2−D100% Stacked Bench. Displays and comparesthe percentage that each data valuecontributes to a total across categories.

Clustered Bench 3−D Clustered bench with a 3−D visual effect.

Stacked Bench 3−D Stacked bench with a 3−D visual effect.

100% Stacked Bench 3−D 100% stack bench with a 3−D visual effect.

Bench 3−D3−D Bench. Displays and compares datavalues across categories and series.

Line Line 2−D Line. Displays trend over categories.

Stacked Line 2−DStacked Line. Displays the trend of thecontribution of each data value overcategories.

100% Stacked Line 2−D100% Stacked Line. Displays the trend of thepercentage each data value contributes overcategories.

Line 3−D Line with a 3−D visual effect.

Area Area 2−DArea. Displays the trend of values over time orcategories.

Stacked Area 2−DStacked Area. Displays the trend of thecontribution of each data value over categories.

100% Stacked Area 2−D100% Stacked Area. Displays the trend of thepercentage each data value contributes overcategories.

Area 3−D Area with a 3−D visual effect.

Stacked Area 3−D Stacked area with a 3−D visual effect.

100% Stacked Area 3−D 100% stacked area with a 3−D visual effect.

Pie Clustered Pie 2−DPie. Displays the contribution of each datavalue to a total over time or categories.

Clustered Pie 3−D Pie with a 3−D visual effect.

Radar Radar 2−DRadar. Displays and compares the data valuesrelative to a center point.

Gauge Gauge Dial 2−D

Gauge. Usually displays the performance ofeach member in a group, using three colors,green, yellow, and red (by default) to representthree levels: normal, alert, and error. This type,displays each data value by a dial.

Gauge Bar 2−D Gauge. Displays each data value by a bar.

Gauge Bubble 2−DGauge. Displays each data value by a coloredbubble.

Surface Surface 3−DSurface. Indicates what level of different valuesreside in, and shows the cross−relationshipsbetween category and series.

Reporting Feature

172

Page 181: JReport Designer - User Referencespecifies the driver such as JDBC driver (for JDBC) or the Data Source name (for JDBC−ODBC bridge), the user ID and the password for connecting to

Scatter Scatter 2−D Scatter. Compares pairs of values.

Scatter Straight Line 2−D Scatter with data points connected by lines.

Scatter Curved Line 2−DScatter with data points connected bysmoothed lines.

Bubble Bubble 2−DBubble. Compares sets of 3 values. Like ascatter chart with the third value displayed asthe size of the bubble marker.

Stock High−Low 2−DHigh−Low. Requires two series of values in thisorder.

High−Low−Close 2−DHigh−Low−Close. Requires three series ofvalues in this order.

Open−High−Low−Close2−D

Open−High−Low−Close. Requires four seriesof values in this order.

Combo ComboCombination charts. Two types of data markersare used to represent different data values.

DataFilter Property

Specifies the data filter for the specified axis (the X, Y1, Y2, or Z axis) to display the tick mark labels the way you want.Applies to Chart Platform.

Click the downward arrow to the right and select the filtering options you want.

The filter types can be one or more of the following:

Filter Type Option Description (Sample)

ScaleDivides the value by hundreds, thousands, andso on.

Logarithm Calculates the value to logarithm to base 10.

Hundreds Divides the value by one hundred.

Thousands Divides the value by one thousand.

Millions Divides the value by one million.

Billions Divides the value by one billion.

Trillions Divides the value by one trillion.

NumberRe−formats the number value (Originalexample: 123456)

0Formats a decimal number to an integer(123456).

#,##0Formats a decimal number to a digit groupedinteger (123,456).

#,##0;−#,##0Formats a decimal number to a digit groupedinteger; minus sign is used as the negativeprefix (123,456/−123,456).

0.00Formats a decimal number to a fix−pointnumber retaining 2 digits after decimalseparator (123456.00).

#,##0.00Formats a decimal number to a digit groupednumber retaining 2 digits after decimalseparator (123,456.00).

#,##0.00;−#,##0.00

Reporting Feature

173

Page 182: JReport Designer - User Referencespecifies the driver such as JDBC driver (for JDBC) or the Data Source name (for JDBC−ODBC bridge), the user ID and the password for connecting to

Formats a decimal number to a digit groupednumber retaining 2 digits after decimalseparator; minus sign is used as the negativeprefix (123,456.00/−123,456.00).

0.00E00

Formats a decimal number to a number inscientific notation; the mantissa is often in therange 1.0 <= x < 10.0, and the number of digitcharacters after the exponent character (E)gives the minimum exponent digit count(1.23E04).

##0.0E0

Formats a decimal number to a number inscientific notation; the minimum number ofinteger in the mantissa is 1, and the number ofdigit characters after the exponent character(E) gives the minimum exponent digit count(12.34E3).

$0Format a decimal number to an integer,prefixed with a currency symbol $ ($123456).

$#,##0Formats a decimal number to a digit groupedinteger, prefixed with a currency symbol $($123,456).

$#,##0;−$#,##0

Formats a decimal number to a digit groupedinteger, prefixed with a currency symbol $;minus sign is used as the negative prefix($123,456/−$123,456).

$0.00

Formats a decimal number to a fix−pointnumber retaining 2 digits after decimalseparator, prefixed with a currency symbol $ ($123456.00).

$#,##0.00

Formats a decimal number to a digit groupednumber retaining 2 digits after decimalseparator, prefixed with a currency symbol $($123,456.00).

$#,##0.00;−$#,##0.00

Formats a decimal number to a digit groupednumber retaining 2 digits after decimalseparator, prefixed with a currency symbol $;minus sign is used as the negative prefix($123,456.00/−$123,456.00).

$0.00E00

Formats a decimal number to a number inscientific notation, prefixed with a currencysymbol $; the mantissa is often in the range 1.0<= x < 10.0, and the number of digit charactersafter the exponent character (E) gives theminimum exponent digit count ($1.23E$04).

$##0.0E0

Formats a decimal number to a number inscientific notation, prefixed with a currencysymbol $; the minimum number of integer inthe mantissa is 1, and the number of digitcharacters after the exponent character (E)gives the minimum exponent digit count($12.34E$3).

0%Formats a decimal number to percentage:multiplies by 100 and shows as an integerpercentage (12%).

Reporting Feature

174

Page 183: JReport Designer - User Referencespecifies the driver such as JDBC driver (for JDBC) or the Data Source name (for JDBC−ODBC bridge), the user ID and the password for connecting to

0.00% Formats a decimal number to percentage:multiplies by 100 and shows a fix−point numberpercentage retaining 2 digits after decimalseparator (12.34%).

Notes: The number of "0" that appears in a pattern indicates the minimumdigits, show 0 if that digit is zero. The number of "#" that appearsafter the decimal point in a pattern indicates the maximum digits ofdecimal, zero shows as absent.

Use "'" (single quotation mark) to quote special characters in a prefixor suffix, for example, "'#'#" formats 123 to "#123". To create asingle quote itself, use two in a row: "# o''clock".

Date/TimeRe−formats the date/time value (Example,Wednesday, December 25, 00:00:00GMT−08:00 2002)

G Formats a date to era designator (AD).

yyyy Formats a date to year (2002).

yy Formats a date to year in short form (02).

yyyy GFormats a date to year, tagged with eradesignator (2002 AD)

MMFormats a date to month in year, shows innumber format (12).

MMMFormats a date to month in year, shows in theabbreviated form (Dec).

MMMMMMMMFormats a date to month in year, shows in thefull form (December).

dd/MM/yyFormats a date to a simple date form(25/12/02).

dd−MMM−yyFormats a date to a simple date form(25−Dec−02).

dd−MMM Formats a date to a simple date form (25−Dec).

MMM−yy Formats a date to a simple date form (Dec−02).

MMM yyyyFormats a date to a simple date form (Dec2002).

dd Formats a date to day in month (25).

DDD Formats a date to day in year (359).

ww Formats a date to week in year (52).

W Formats a date to week in month (4).

EEEFormats a date to day in week, in short form(Wed).

EEEEEE Formats a date to day in week (Wednesday).

HH Formats a date to hour in day, 0~23 (00).

kk Formats a date to hour in day, 1~24 (24).

KK aFormats a date to hour in am/pm, 0~11, witham/pm marker (00 AM)

hh aFormats a date to hour in am/pm, 1~12, witham/pm marker (12 AM)

mm Formats a date to minute in hour (00).

hh:mm aFormats a date to hour in am/pm, 1~12, andminute in hour, with am/pm marker (12:00 AM).

Reporting Feature

175

Page 184: JReport Designer - User Referencespecifies the driver such as JDBC driver (for JDBC) or the Data Source name (for JDBC−ODBC bridge), the user ID and the password for connecting to

ss Formats a date to second in minute (00).

hh:mm:ssFormats a date to hour in am/pm 1~12, minutein hour, and second in minute (12:00:00).

hh:mm:ss aFormats a date to hour in am/pm 1~12, minutein hour, and second in minute, with am/pmmarker (12:00:00 AM).

mm:ssFormats a date to minute in hour and second inminute (00:00).

MMMMM dd yyyy G(EEEEEE) hh:mm:ss aa z

Formats a date to a full form date, whichcontains month in year, shows in the full form,day in month, year in full form, era designator,day in week, shows in the full form, hour in aday, 1~12, minute in hour, second in minute,am/pm marker, and time zone (December 252002 AD (Wednesday) 12:00:00 AMGMT−08:00).

Notes: Any characters in the pattern that are not in the ranges of ['a'..'z']and ['A'..'Z'] will be treated as quoted text. For instance, characterslike ':', '.', ' ', '#' and '@' will appear in the resulting time text eventhey are not embraced within single quotes.

A pattern containing any invalid pattern letter will not be able to addto the filter stack.

Text Specifies the length for the value.

Default Length

Uses the length of the string "Default Length",which is 14, as the length of the string. Lettersexceed the length will be cut. You can modifythis string, add or delete letters to increase ordecrease the length limit. For example, type"Teddy", the label displayed may probably be"Wed D", which originally could be "WedDecember 25 2002". If you want to show all,you can type "Teddy is a lovely bear!", wherethe length of it is larger than the length of string"Wed December 25 2002".

Mapping Maps new value to one or more values.

One−to−one Mapping

Maps a new value to one value. Type theargument number that you want to replace, andthen specify the new value in the Map to box.For example, if you want to replace the seconddata label on the X axis, which is originally"Thu Jul 04 2002", with a new string "USNational Day", just type 2 in the Argument#box, and then type "US National Day" in theMap to box. Click Add to add it to the FilterStack. If you want to map more values, repeatthis procedure.

Range Mapping Maps a new value to a range of values. Typethe argument numbers to define the range youwant to map together, and then specify the newvalue in the Map to box. For example, if youwant to replace from the second data label tothe fifth data label with a new name "MyHoliday", just type 2 in the first Argument# box

Reporting Feature

176

Page 185: JReport Designer - User Referencespecifies the driver such as JDBC driver (for JDBC) or the Data Source name (for JDBC−ODBC bridge), the user ID and the password for connecting to

and 5 in the second Argument# box, and thentype "My Holiday" in the Map to box. Click Addto add it to the Filter Stack. If you want to mapranges that are not consecutive, repeat thisprocedure.

Text Mapping

Change the data in the axis data label to acustomized string. For example, if you want tochange "Chen" in the first data label of the Xaxis to "Jinfonet", please type "Chen" in theOriginal Text box and type "Jinfonet" in theMap to box. Click Add to add it to the FilterStack. You can only change the data one byone. Make sure that your spelling in theOriginal Text box is exactly the same as thedata shown on the axis label.

Prefix

Add a string before the data in the data label ofthe axis. For example, if you want to add "NA"before the data in the data label of the X axis,please type "NA" in the Map to box, and clickAdd to add it to the Filter Stack.

Suffix

Add a string behind the data in the data label ofthe axis. For example, if you want to add "NA"behind the data in the data label of the X axis,please type "NA" in the Map to box, and clickAdd to add it to the Filter Stack.

Note: The data labels along each axis counts from 0, which means thenumber of the first data label you see on the axis is 0, the second is1, the third is 2, and so on.

EndCaps Property

Specifies the ending style for the pen object. Applies to Chart Platforms, Chart Coordinate Paper, Chart Legends,Gridlines, Axes, Tick Marks, Labels, Fonts, and Icons.

Can be one of the following: Butt, Round, and Square.

FillPattern Property

Specifies a fill pattern for an object. Applies to Chart Platforms, Chart Coordinate Paper, Chart Legends, Walls,Floors, Axes, Tick Marks, Labels, Fonts, and Icons.

Can be one of the following: Color, Gradient, Image, None, and Texture.

Option Description Notes

Color Fills with specified color.

Gradient Fills with gradient colors.

Image Fills with specified image.(Not available for legendicons)

None No fill (Default).

Texture Fills with specified texture.

Reporting Feature

177

Page 186: JReport Designer - User Referencespecifies the driver such as JDBC driver (for JDBC) or the Data Source name (for JDBC−ODBC bridge), the user ID and the password for connecting to

FontSpecialEffect Property

Specifies special effect for the font. Applies to Fonts.

Can be one of the following:

Group Option Description

1st Set EmbossedMakes the text appear as if it is raised off thepage in relief.

EngravedMakes the text appear to be imprinted orpressed into the page.

NoneDon't apply any special effect to the text(Default).

OutlinedDisplays the inner and outer borders of eachcharacter.

ShadowedAdds a shadow behind the text, beneath and tothe right of the text.

Shadowed & Outlined Makes the text outlined and shadowed.

2nd Set SubscriptMakes the text below the baseline and changesit to a smaller size.

SuperscriptMakes the text above the baseline andchanges it to a smaller size.

NoneDon't apply any special effect to the text(Default).

FontStrikeThrough Property

Specifies the style of the horizontal line with which the font is struck through. Applies to Fonts.

Can be one of the following:

Option Description

Bold Line Draws a bold line through the text.

Double Lines Draws two lines through the text.

None Don't draw any line through the text (Default).

Thin Line Draws a normal line through the text.

FontStyle Property

Specifies a font style for an object. Applies to Fonts.

Can be one of the following: Bold, Bold Italic, Italic, and Plain.

FontUnderline Property

Specifies the style of the horizontal line under text. Applies to Fonts.

Reporting Feature

178

Page 187: JReport Designer - User Referencespecifies the driver such as JDBC driver (for JDBC) or the Data Source name (for JDBC−ODBC bridge), the user ID and the password for connecting to

Can be one of the following:

Option Description

Bold Double Draws two bold lines under the text.

Bold Line Draws a bold line under the text.

Bold Lower Draws a bold line under the text at a lower position.

Bold Patterned Draws a bold line under the text, using the pattern of the text font.

Double Lines Draws two normal lines under the text.

None No underline (Default).

Patterned Line Draws a normal line under the text, using the pattern of the text font.

Single Draws a normal line under the text.

Single Lower Draws a normal line under the text at a lower position.

GradientStyle Property

Specifies a gradient style for an object. Applies to Chart Platforms, Chart Coordinate Paper, Chart Legends, Walls,Floors, Gridlines, Axes, Tick Marks, Labels, Fonts, and Icons.

Can be one of the following: Cyclic Linear, Linear, Square Radial and Round Radial.

Hyperlink Property

Specifies a URL with a link to the chart. Applies to Chart Platforms.

The property is used to add a hyperlink to the chart that refers to another report or a web site. You can control thehyperlink property with a formula, which will be a good way for one report to get only useful data from another report.

For example, you have two reports A and B. In report A, data are grouped by customer country and one chart is used toillustrate the count of Customer_ID in every group. Report B shows the information of customer, such as ID, Name,Annual Sales, etc. Now we build a link between two reports. When running report A, the data in a specific country popsup by clicking the bars of relevant country in report A.

Copy ReportB.cls and Tutorial.cat to a new folder. Launch JReport Enterprise Server and deploy the folder to theserver.

1.

Load JReport Designer and open ReportA. Create a new formula named Link_b. It might be like the following,

stringt="http://localhost:8888/jrserver/test/Tutorial.cat/ReportB.cls?jrs.cmd=jrs.web_vw&jrs.authorization=YWRtaW46YWRtaW4%3D&";string t1="jrs.param$PCOUNTRY=";string url=t+t1+"@INNER+&jrs.result_type=1";return url

Notes:

1). Please make sure that the paths of the catalog and the report in the URL are corresponding with their pathson the server.2). For the XHyperlink and ZHyperlink properties, you can use @XDIM and @ZDIM respectively instead of@INNER and @OUTER.

2.

In Report Inspector, select ChartPlatform, and set the Hyperlink property to Link_b.3. Move the mouse cursor on a bar and double−click itt, the corresponding records will be displayed.

For example, click the Canada bar, ReportB will run and display only Canada data as below.

4.

Reporting Feature

179

Page 188: JReport Designer - User Referencespecifies the driver such as JDBC driver (for JDBC) or the Data Source name (for JDBC−ODBC bridge), the user ID and the password for connecting to

Use the Back button to get back to the ReportA. You can also view the information of the other countries byclicking the corresponding bars in ReportA.If you want to run report A in the server/client mode with JReport Enterprise Server, select HTML format to viewthe report. You can also get the hyperlink pointing to report B.

5.

IconAlignment Property

Specifies how icon is aligned in an object. Applies to Labels, Legend labels.

Can be one of the following: Bottom−Center, Bottom−Right, Left−Bottom, Left−Center, Left−Top, Right−Center,Right−Top, and Top−Center.

IconStyle Property

Specifies a style for the icon object. Applies to Icons.

Can be one of the following: Circle, Cross1, Cross2, Diamond, No Icon, Rectangle, TriangleDown, TriangleLeft,TriangleRight, TriangleUp.

IconStyleList Property

Specifies the style for the icon of each category name. The icon style for each category name can be different. Applies toLegend Icon.

Type the icon style codes side by side in the IconStyleList property entry to define the icon style for each icon. An iconstyle code is a two−digit number stands for an icon style. For instance, use string "00010203" will change the 1st icon toa rectangle, 2nd to a diamond, 3rd to a triangle pointing up, and 4th to a triangle pointing down.

The icon style codes are:

Code Description

00 Rectangle.

01 Diamond.

02 Triangle Up.

03 Triangle Down.

04 Triangle Left.

05 Triangle Right.

06 Circle.

07 Cross1. Cross in the form of "+".

08 Cross2. Cross in the form of "X".

Reporting Feature

180

Page 189: JReport Designer - User Referencespecifies the driver such as JDBC driver (for JDBC) or the Data Source name (for JDBC−ODBC bridge), the user ID and the password for connecting to

ImageLayout Property

Specifies a layout style for the image. Applies to Images.

Can be one of the following:

Option Description

Center Display the image in the center of the area.

Scaled Stretch the image to cover the entire area.

Tile Repeat the image over the entire area (default).

LabelStartValueY1 (LabelStartValueY2) Property

Specifies from where the Y1 (Y2) axis label will start to be shown. Only for 2−D charts that have wall. Applies to ChartCoordinate Paper.

Can be any float number. The default value is 0.

The following picture (example) shows the result when you set the LabelStartValueY1 to 100, and LabelStartValueY2 to15000.

LabelValue Property

Specifies a data label type for data labels. Applies to Pie Charts.

Can be one of the following:

Option Description

None No data labels.

Intact Shows the original value for the point (default).

Percent Shows the percentage of the total.

LineJoint Property

Specifies the line joint style for the pen object. Applies to Chart Platforms, Chart Coordinate Paper, Chart Legends,Gridlines, Axes, Tick Marks, Labels, Fonts, and Icons.

Reporting Feature

181

Page 190: JReport Designer - User Referencespecifies the driver such as JDBC driver (for JDBC) or the Data Source name (for JDBC−ODBC bridge), the user ID and the password for connecting to

Can be one of the following: Bevel, Miter, and Round.

LineNodeStyle Property

Specifies a line node style for the data series lines. Only for 2−D chart that contain lines. Applies to Chart CoordinatePaper.

Can be one of the following: Circle, Cross, None, Plus1, Plus2, Square1, Square2, Star, Triangle1, and Triangle2.

MeanLineNodeStyle Property

Specifies the node style for the mean line. Only for 2−D charts (except Stock Charts, Radar Charts, Scatter Charts, andBubble Charts). Applies to Chart Walls.

Can be one of the following: Circle, Cross, None, Plus1, Plus2, Square1, Square2, Star, Triangle1, and Triangle2.

MeanLineType Property

Specifies the type for the mean line. Only for 2−D charts (except Stock Charts, Radar Charts, Scatter Charts, and BubbleCharts). Applies to Chart Walls.

Can be one of the following: Curve2, Curve3, Line, and None.

Mode Property

Specifies the mode for the chart coordinate paper. Only for 3−D charts. Applies to Chart Coordinate Paper.

Can be one of the following:

Option Description

Rotation The Coordinate Paper can be rotated using mouse dragging in design mode.

Resizing The Coordinate Paper can be resized using mouse dragging in design mode.

PatternList Property

Specifies the pattern and color of the data markers.

Click the ... button to the right and click the small square in the color tray to pick the patterns for the data markers.

The patterns can be one or more of the following: None, Colors, Textures, and Gradients.

If None is selected for a data marker, this small square will be removed from the color tray, and the default color will beassigned to the data marker by JReport Designer.

PenStyle Property

Specifies the style for the pen object. Applies to Chart Platforms, Chart Coordinate Paper, Chart Legends,Gridlines, Axes, Tick Marks, Labels, Fonts, and Icons.

Reporting Feature

182

Page 191: JReport Designer - User Referencespecifies the driver such as JDBC driver (for JDBC) or the Data Source name (for JDBC−ODBC bridge), the user ID and the password for connecting to

Can be one of the following: 2Dots,2Dashes, 2Dots,3Dashes, Dash−Dotted, Dashed, Dotted, Fine Dotted, Invisible, LineDots, Long Dashed, and Solid Line.

PenThickness Property

Specifies the thickness for the pen object. Applies to Chart Platforms, Chart Coordinate Paper, Chart Legends,Gridlines, Axes, Tick Marks, Labels, Fonts, and Icons.

Note: The values of this property you set in the Report Inspector are in inches, while the values of this property you setusing dialogs are all in pixels.

SizeOfPart1 Property

Specifies the number of data series groups represented on the Y1 axis. Applies to Chart Platforms. This property is usedfor combination charts, such as Bar−Line Chart and Line−Line Chart.

By setting this value, you can control how the chart data series will be assigned to the Y1 axis and the Y2 axis. Forexample, in a Bar−Line chart, there are five data series, if we set this property to 1, then the first data series will berepresented by bars, using the Y1 axis; the other four data series will be represented by lines, using the Y2 axis.

Can be an integer between 0 and Number of Data Series.

If the value is out of this range, the following rules will be applied as the default value:

IF THEN

<= −1

−1 (Default). If the number of data series is an oddnumber, it will be divided by 2 and then plus 1, else it willbe just divided by 2. For example, for the chart that has 3data series, by default, there will be 2 (3 / 2 + 1 = 2) dataseries using the Y1 axis.

= 0 All the data serise will be using the Y2 axis.

> Number of Data Series All the data series will be using the Y1 axis.

Note: The data series that use the Y1 axis will use the first type of data marker, for example, for a Bar−Line chart, thedata series that use the Y1 axis will use the bar marker, and the others that use the Y2 axis will use the line marker.

StartOffset(1st.Data.Set), EndOffset(1st.Data.Set), StartOffset(2nd.Data.Set), andEndOffset(2nd.Data.Set) Properties

These four properties are used to control the data source range that appears on the chart. Applies to Chart Platforms.

For 2−level−group charts, record−level charts and all kinds of combination charts, StartOffset(1st.Data.Set) andEndOffset(1st.Data.Set) are used to control the starting offset and ending offset of the data series;StartOffset(2ndDataSet) and EndOffset(2nd Data.Set) are used to control the range of the categories.

For 1−level−group charts, StartOffset(2nd.Data.Set) and EndOffset(2nd.Data.Set) are used to control the starting offsetand ending offset of the categories; StartOffset(1st.Data.Set) and EndOffset(1st.Data.Set) don’t work because there is noseries data in chart that contains only one group.

For example, your chart may contain the output performance data of zone #1 and #2, divided and compared by workweeks, from work week 27 to work week 31. The chart is as below,

Reporting Feature

183

Page 192: JReport Designer - User Referencespecifies the driver such as JDBC driver (for JDBC) or the Data Source name (for JDBC−ODBC bridge), the user ID and the password for connecting to

You can use these four properties to control the data range, for example, to show only the data of ZONE 1 for WW28,WW29, WW30. Set these four properties as shown in the following picture.

The chart shows the data as below.

Reporting Feature

184

Page 193: JReport Designer - User Referencespecifies the driver such as JDBC driver (for JDBC) or the Data Source name (for JDBC−ODBC bridge), the user ID and the password for connecting to

The range of the property values can be −1 (Default, Not Set) or an integer between 0 and Number of Data Series – 1(or, Number of Categories − 1).

If the value is out of this range, the following rules will be applied as the default value:

IF THEN

StartOffset(1st.Data.Set) < 0 StartOffset(1st.Data.Set) = 0

StartOffset(1st.Data.Set) > max data number StartOffset(1st.Data.Set) = max data number

EndOffset(1st.Data.Set) < 0 EndOffset(1st.Data.Set) = max data number

EndOffset(1st.Data.Set) > max data number EndOffset(1st.Data.Set) = max data number

StartOffset(1st.Data.Set) >EndOffset(1st.Data.Set) andEndOffset(1st.Data.Set) >=0

StartOffset(1st.Data.Set) = 0,EndOffset(1st.Data.Set) = max data number

Same rules apply to StartOffset(2nd.Data.Set) and EndOffset(2nd.Data.Set).

TextAlignment Property

Specifies how text is aligned in an object. Applies to Labels, and Legend Labels.

Can be one of the following: Bottom, Center, Left, Right, and Top.

TextureStyle Property

Specifies a texture style for an object. Applies to Chart Platforms, Chart Coordinate Paper, Chart Legends, Walls, Floors,Axes, Labels, Fonts, and Icons.

Can be one of the following: Big Dot, Blurred Diamond, Blurred Diamond, Diagonal Down, Diagonal Up, Diagonal Up,Diamond Grid, Grid, Horizontal Line, None, Raised Rectangle, Small Dot, Triangle, and Vertical Line.

ThresholdLineStyle Property

Specifies a style for the threshold lines. Applies to Chart Coordinate Paper. Please note that Stock Charts, RadarCharts, Scatter Charts, and Bubble Charts has no threshold lines.

Reporting Feature

185

Page 194: JReport Designer - User Referencespecifies the driver such as JDBC driver (for JDBC) or the Data Source name (for JDBC−ODBC bridge), the user ID and the password for connecting to

A threshold line marks a specific data point that is specified by the user. It is usually used for the user to compare thedata series with it to see whether the data is higher or lower than that point. For example, if you want to see whether theproduction zones successfully accomplished their production tasks, you can set a threshold line to represent the goaloutput, and the other to represent the lowest acceptable output quantity. By using the threshold lines, you can spot outthe zones that are out of the range at a glance.

For a 3−D chart, the threshold line velue is represented by a plane.

Can be one of the following:

Option Description

Style1Use two threshold areas (ThresholdLine and ThresholdLine2) to emphasizethe data series that are higher or lower than points the threshold lines mark.

Style2Use a single threshold area (ThresholdLine) to emphasize the data seriesthat are between the higher and the lower threshold lines.

Index

Chart Coordinate Paper

Chart coordinate paper is the canvas on which the main chart is drawn. The chart coordinate paper contains walls, axes,data markers, axis values, category names, and so on. You use the properties listed in the following table to control theappearances or behaviors of a chart coordinate paper object.

The properties for chart coordinate paper are:

Property Name Description EditableFormulaControl

Data Type

General

ClassTypeShows the class type of thechart coordinate paper object.

N N −

Geometry

X

The distance between thecoordinate paper and the leftedge of the chart platform thatcontains it.

Y N Float

Y The distance between thecoordinate paper and the left

Y N Float

Reporting Feature

186

Page 195: JReport Designer - User Referencespecifies the driver such as JDBC driver (for JDBC) or the Data Source name (for JDBC−ODBC bridge), the user ID and the password for connecting to

edge of the chart platform thatcontains it.

WidthThe width of the coordinatepaper object.

Y N Float

HeightThe height of the coordinatepaper object.

Y N Float

CoordinatePaper

ShowWallsSpecifies whether the wallsare shown.

Y Y Boolean

AngleX

Specifies the rotation of thecoordinate paper around the Xaxis, in degrees. Only for 3−Dcharts.

Y Y Integer

AngleY

Specifies the rotation of thecoordinate paper around the Yaxis, in degrees. Only for 3−Dcharts.

Y Y Integer

AngleZ

Specifies the rotation of thecoordinate paper around the Zaxis, in degrees. Only for 3−Dcharts.

Y Y Integer

ScaleX

Specifies a percentage ofcoordinate paper enlargementor reduction along the X axis,in percent. The default value is80.

Y Y Integer

ScaleY

Specifies a percentage ofcoordinate paper enlargementor reduction along the Y axis,in percent. The default value is80.

Y Y Integer

ScaleZ

Specifies a percentage ofcoordinate paper enlargementor reduction along the Z axis,in percent. The default value is80. Only for 3−D charts.

Y Y Integer

ContourSpecifies whether to show lineor border around a drawingobject.

Y Y Boolean

StaticHint

Specifies whether to displayhints of the graph on its top.For 2−D bar charts, 2−D linecharts, 2−D area charts, 2−Dbench charts, and 2−D combocharts.

Y Y Boolean

StaticHintTypesSpecifies the shown type ofthe hint. Available whenStaticHint is true.Value: Shows the value on thetop of the graph as the hint.CategoryName: Shows thecategory name on the top of

Y N String

Reporting Feature

187

Page 196: JReport Designer - User Referencespecifies the driver such as JDBC driver (for JDBC) or the Data Source name (for JDBC−ODBC bridge), the user ID and the password for connecting to

the graph as the hint.SeriesName: Shows theseries name on the top of thegraph as the hint.

InteractiveSpecifies whether the chartcan be interactive in the viewmode.

Y Y Boolean

Perspective

Specifies how to display thechart in perspective view. Thedefault value is −1, whichindicates no perspective chartdisplayed. Only for 3−D charts.

Y Y Integer

BorderStyleSpecifies the border style foran object. More Info

Y N Integer

PenStyleSpecifies the style for the penobject. More Info

Y N Integer

PenColor The color for the pen object. Y Y String

PenThicknessThe thickness for the penobject. More Info

Y N Float

EndCapsSpecifies the ending style forthe pen object. More Info

Y N Integer

LineJointSpecifies the line joint style forthe pen object. More Info

Y N Integer

OutlineSpecifies whether an object isshown in outline form.

Y N Boolean

VariabledDashSpecifies whether the dash isauto−sized.

Y N Boolean

BorderTransparencyThe border transparency, inpercent.

Y Y Integer

FillPatternSpecifies a fill pattern for anobject. More Info

Y N Integer

BackgroundTransparencyThe fill transparency, inpercent.

Y Y Integer

Top

The top position of thebackground area, measured inthe percentage of the object'sheight, from the top edge ofthe object, used together withLeft, Right, and Bottom.

Y N Integer

Left

The left position of thebackground area, measured inthe percentage of the object'swidth, from the left edge of theobject, used together withTop, Right, and Bottom.

Y N Integer

Right

The right position of thebackground area, measured inthe percentage of the object'swidth, from the right edge ofthe object, used together withTop, Left, and Bottom.

Y N Integer

Bottom Y N Integer

Reporting Feature

188

Page 197: JReport Designer - User Referencespecifies the driver such as JDBC driver (for JDBC) or the Data Source name (for JDBC−ODBC bridge), the user ID and the password for connecting to

The bottom position of thebackground area, measured inthe percentage of the object'sheight, from the bottom edgeof the object, used togetherwith Top, Left, and Right.

BackgroundColor The color for the background. Y Y String

TextureStyleSpecifies a texture style for anobject. More Info

Y N Integer

TextureForeColorThe color for the textureforeground.

Y Y String

TextureBackColorThe color for the texturebackground.

Y Y String

GradientStyleSpecifies a gradient style foran object. More Info

Y N Integer

GradientStartColorThe color for the gradient firstcolor.

Y Y String

GradientEndColorThe color for the gradientsecond color.

Y Y String

GradientStartX

The horizontal position,measured in the percentage ofthe object's width, from the leftedge of the object, where thegradient starts.

Y Y Integer

GradientStartY

The vertical position,measured in the percentage ofthe object's height, from thebottom edge of the object,where the gradient starts.

Y Y Integer

GradientEndX

The horizontal position,measured in the percentage ofthe object's width, from the leftedge of the object, where thegradient ends.

Y Y Integer

GradientEndY

The vertical position,measured in the percentage ofthe object's height, from thebottom edge of the object,where the gradient ends.

Y Y Integer

ImageSpecifies an image to displayon an object.

Y Y String

ImageLayoutSpecifies a layout style for theimage. More Info

Y N Integer

ImageX

The left position of the image,measured in the percentage ofthe object's width, from the leftedge of the object.

Y Y Integer

ImageY

The top position of the image,measured in the percentage ofthe object's height, from thebottom edge of the object.

Y Y Integer

ImageWidth The width of the image, Y Y Integer

Reporting Feature

189

Page 198: JReport Designer - User Referencespecifies the driver such as JDBC driver (for JDBC) or the Data Source name (for JDBC−ODBC bridge), the user ID and the password for connecting to

measured in the percentage ofthe object's width. Setting thisvalue to less than 100 percentwill cut the image from theright edge.

ImageHeight

The height of the image,measured in the percentage ofthe object's height. Setting thisvalue to less than 100 percentwill cut the image from thebottom edge.

Y Y Integer

LabelValueSpecifies a data label type fordata labels. More Info

Y N Integer

LabelPrecisionSpecifies the number of totaldigits for data labels,excluding the decimal point.

Y Y Integer

LabelScaleSpecifies the number of digitsto the right of the decimalpoint, for data labels.

Y Y Integer

LabelPositionSpecifies how the labels aredisplayed. Only for 3−Dcharts.

Y N Integer

LineThicknessThe thickness of data serieslines. Applies only to line chart.

Y Y Integer

LineNodeStyleSpecifies a line node style forthe data series lines. Only for2−D chart that contain lines.

Y N Integer

BarWidth

Specifies the width of the bars,measured in the percentage ofthe unit width. Only for2DBarPercent, 2DBarStack,2DBenchPercent, and2DBenchStack.

Y Y Integer

TopBarColorThe color of the top−bar. Onlyfor Stock Charts.

Y Y String

BottomBarColorThe color of the bottom−bar.Only for Stock Charts.

Y Y String

StockLineColorThe color of the high−lowlines. Only for Stock Charts.

Y Y String

FillRadarSpecifies whether the dataseries areas are filled withcolors. Only for Radar Charts.

Y Y Boolean

ShowRadarColumnNameSpecifies whether to show thecolumn name of the radarchart. Only for Radar Charts.

Y Y Boolean

FillTransparent

Specifies the transparencylevel of the filled colors, whichis specified using the“FillRadar” property. Only forRadar Charts.

Y Y Integer

RadarArrowStyle Specifies the type of the radararrow. There are three typesto be selected. Only for Radar

Y N Integer

Reporting Feature

190

Page 199: JReport Designer - User Referencespecifies the driver such as JDBC driver (for JDBC) or the Data Source name (for JDBC−ODBC bridge), the user ID and the password for connecting to

Charts.

BarDepthSpecifies the depth of thebars. Only for 2−D bar charts.

Y Y Integer

IsShadow

Adds shadows to 2−D charts.For 2−D bar charts, 2−D linecharts, Gauge−Dial charts,and 2−D pie charts.

Y Y Boolean

GaugeNormalValueMin

Specifies the minimum valueof the normal level (by default,it is represented by the greencolor). The default value is 0.Only for the Gauge charts.

Y Y Float

GaugeNormalValueMax

Specifies the maximum valueof the normal level (by default,it is represented by the greencolor). The default value is 0.Only for the Gauge charts.

Y Y Float

GaugeAlertValueMin

Specifies the minimum valueof the alert level (by default, itis represented by the yellowcolor). The default value is 0.Only for the Gauge charts.

Y Y Float

GaugeAlertValueMax

Specifies the maximum valueof the alert level (by default, itis represented by the yellowcolor). The default value is 0.Only for the Gauge charts.

Y Y Float

GaugeErrorValueMin

Specifies the minimum valueof the error level (by default, itis represented by the redcolor). The default value is 0.Only for the Gauge charts.

Y Y Float

GaugeErrorValueMax

Specifies the maximum valueof the error level (by default, itis represented by the redcolor). The default value is 0.Only for the Gauge charts.

Y Y Float

GaugeNormalColorSpecifies the color for thenormal level. Only for theGauge charts.

Y Y String

GaugeAlertColorSpecifies the color for the alertlevel. Only for the Gaugecharts.

Y Y String

GaugeErrorColorSpecifies the color for theerror level. Only for the Gaugecharts.

Y Y String

GaugeDialStartAngle

Specifies the start angle forthe dial, in degrees. Thedefault value is −45. Only forthe Gauge−Dial charts.

Y Y Integer

GaugeDialStopAngle Specifies the stop angle forthe dial, in degrees. Thedefault value is 225. Only for

Y Y Integer

Reporting Feature

191

Page 200: JReport Designer - User Referencespecifies the driver such as JDBC driver (for JDBC) or the Data Source name (for JDBC−ODBC bridge), the user ID and the password for connecting to

the Gauge−Dial charts.

GaugeDialLineStyle

Specifies the indicator type ofthe dial. It can be one of thefollowing: Triangle, Diamond,or Arrow. Only for theGauge−Dial charts.

Y N Integer

IsFillGaugeDialCurveSpecifies whether to fill thedial with colors. Only for theGauge−Dial charts.

Y Y Boolean

GaugeDialOuterInnerGapSpecifies the width of the dial.Only for the Gauge−Dialcharts.

Y Y Integer

ContourPen

ContourPenStyleSpecifies the style for the penobject (except line charts).

Y N Integer

ContourPenColorSpecifies the color for the penobject (except line charts).

Y Y String

ContourPenThicknessSpecifies the thickness for thepen object (except line charts).

Y N Float

ContourPenEndCapsSpecifies the ending style forthe pen object (except linecharts).

Y N Integer

ContourPenLineJointSpecifies the line joint style forthe pen object (except linecharts).

Y N Integer

ContourPenOutlineSpecifies whether an object isshown in outline form (exceptline charts).

Y N Boolean

ContourPenVariabledDashSpecifies whether the dash isauto−sized (except line charts).

Y N Boolean

ContourPenTransparencySpecifies the contourtransparency, in percent(except line charts).

Y Y Integer

HintTextStyle

HintFontFaceSpecifies the font face of thehint.

Y Y String

HintFontStyleSpecifies the font style of thehint.

Y N Integer

HintFontUnderlineSpecifies the style of thehorizontal line under the hint.

Y N Integer

HintFontStrikeThroughSpecifies the style of thehorizontal line with which thefont is struck through.

Y N Integer

HintFontSizeSpecifies the font size of thehint.

Y N Float

HintFontShearing

Specifies the shearingtransformation of the hintaround its center. The defaultvalue is 0, range from −200~200.

Y Y Integer

HintFontRotation Specifies the font rotation of Y Y Integer

Reporting Feature

192

Page 201: JReport Designer - User Referencespecifies the driver such as JDBC driver (for JDBC) or the Data Source name (for JDBC−ODBC bridge), the user ID and the password for connecting to

the hint around its center, indegrees. The default value is0.

HintFontSepcialEffect1Specifies special effect for thefont.

Y N Integer

HintFontSepcialEffect2Specifies special effect for thefont.

Y N Integer

HintFontPenStyleSpecifies the style for the penobject.

Y N Integer

HintFontPenColorSpecifies the color of the penobject.

Y Y String

HintFontPenEndCapsSpecifies the ending style forthe pen object.

Y N Integer

HintFontPenLineJointSpecifies the line joint style forthe pen object.

Y N Integer

HintFontPenOutlineSpecifies whether an object isshown in outline form.

Y N Boolean

HintFontPenVariabledDashSpecifies whether the dash isauto−sized.

Y N Boolean

HintFontPenTransparencySpecifies the font pentransparency, in percent.

Y Y Integer

HintFontFillPatternSpecifies a fill pattern for thehint font.

Y N Integer

HintFontBackgroundTransparencySpecifies the fill transparency,in percent.

Y Y Integer

HintFontColorSpecifies the color of the hintfont.

Y Y String

HintFontTextureStyleSpecifies a texture style forthe hint font.

Y N Integer

HintFontTextureForeColorSpecifies a color for thetexture foreground.

Y Y String

HintFontTextureBackColorSpecifies a color for thetexture background.

Y Y String

HintFontGradientStyleSpecifies a gradient style forthe hint font.

Y N Integer

HintFontGradientStartColorSpecifies a color as thegradient first color.

Y Y String

HintFontGradientEndColorSpecifies a color as thegradient second color.

Y Y String

HintFontGradientStartX

The horizontal position,measured in the percentage ofthe hint font's width, from theleft edge of it, where thegradient starts.

Y Y Integer

HintFontGradientStartY

The vertical position,measured in the percentage ofthe hint font's height, from thebottom edge of it, where thegradient starts.

Y Y Integer

HintFontGradientEndX The horizontal position,measured in the percentage of

Y Y Integer

Reporting Feature

193

Page 202: JReport Designer - User Referencespecifies the driver such as JDBC driver (for JDBC) or the Data Source name (for JDBC−ODBC bridge), the user ID and the password for connecting to

the hint font's width, from theleft edge of it, where thegradient ends.

HintFontGradientEndY

The vertical position,measured in the percentage ofthe hint font's height, from thebottom edge of it, where thegradient ends.

Y Y Integer

Gridline

ShowXGridSpecifies whether the gridlinesperpendicular to the X axis areshown.

Y Y Boolean

GridXPenStyleSpecifies the style for the penobject. More Info

Y N Integer

GridXPenColor The color for the pen object. Y Y String

GridXPenThicknessThe thickness for the penobject. More Info

Y N Float

GridXEndCapsSpecifies the ending style forthe pen object. More Info

Y N Integer

GridXLineJointSpecifies the line joint style forthe pen object. More Info

Y N Integer

GridXOutlineSpecifies whether an object isshown in outline form.

Y N Boolean

GridXVariabledDashSpecifies whether the dash isauto−sized.

Y N Boolean

GridXTransparencyThe gridline transparency, inpercent.

Y Y Integer

ShowYGridSpecifies whether the gridlinesperpendicular to the Y axis areshown.

Y Y Boolean

GridYPenStyleSpecifies the style for the penobject. More Info

Y N Integer

GridYPenColor The color for the pen object. Y Y String

GridYPenThicknessThe thickness for the penobject. More Info

Y N Float

GridYEndCapsSpecifies the ending style forthe pen object. More Info

Y N Integer

GridYLineJointSpecifies the line joint style forthe pen object. More Info

Y N Integer

GridYOutlineSpecifies whether an object isshown in outline form.

Y N Boolean

GridYVariabledDashSpecifies whether the dash isauto−sized.

Y N Boolean

GridYTransparencyThe gridline transparency, inpercent.

Y Y Integer

ShowZGridSpecifies whether the gridlinesperpendicular to the Z axis areshown.

Y Y Boolean

GridZPenStyleSpecifies the style for the penobject. More Info

Y N Integer

GridZPenColor The color for the pen object. Y Y String

Reporting Feature

194

Page 203: JReport Designer - User Referencespecifies the driver such as JDBC driver (for JDBC) or the Data Source name (for JDBC−ODBC bridge), the user ID and the password for connecting to

GridZPenThickness The thickness for the penobject. More Info

Y N Float

GridZEndCapsSpecifies the ending style forthe pen object. More Info

Y N Integer

GridZLineJointSpecifies the line joint style forthe pen object. More Info

Y N Integer

GridZOutlineSpecifies whether an object isshown in outline form.

Y N Boolean

GridZVariabledDashSpecifies whether the dash isauto−sized.

Y N Boolean

GridZTransparencyThe gridline transparency, inpercent.

Y Y Integer

Wall

XYWallFillPatternSpecifies a fill pattern for anobject. More Info

Y N Integer

XYWallBackgroundTransparencyThe fill transparency, inpercent.

Y Y Integer

XYWallBackgroundColor The color for the background. Y Y String

XYWallTextureStyleSpecifies a texture style for anobject. More Info

Y N Integer

XYWallTextureForeColorThe color for the textureforeground.

Y Y String

XYWallTextureBackColorThe color for the texturebackground.

Y Y String

XYWallGradientStyleSpecifies a gradient style foran object. More Info

Y N Integer

XYWallGradientStartColorThe color for the gradient firstcolor.

Y Y String

XYWallGradientEndColorThe color for the gradientsecond color.

Y Y String

XYWallGradientStartX

The horizontal position,measured in the percentage ofthe object's width, from the leftedge of the object, where thegradient starts.

Y Y Integer

XYWallGradientStartY

The vertical position,measured in the percentage ofthe object's height, from thebottom edge of the object,where the gradient starts.

Y Y Integer

XYWallGradientEndX

The horizontal position,measured in the percentage ofthe object's width, from the leftedge of the object, where thegradient ends.

Y Y Integer

XYWallGradientEndY

The vertical position,measured in the percentage ofthe object's height, from thebottom edge of the object,where the gradient ends.

Y Y Integer

YZWallFillPattern Specifies a fill pattern for an Y N Integer

Reporting Feature

195

Page 204: JReport Designer - User Referencespecifies the driver such as JDBC driver (for JDBC) or the Data Source name (for JDBC−ODBC bridge), the user ID and the password for connecting to

object. Only for 3−D charts.More Info

YZWallBackgroundTransparencyThe fill transparency, inpercent. Only for 3−D charts.

Y Y Integer

YZWallBackgroundColorThe color for the background.Only for 3−D charts.

Y Y String

YZWallTextureStyleSpecifies a texture style for anobject. Only for 3−D charts.More Info

Y N Integer

YZWallTextureForeColorThe color for the textureforeground. Only for 3−Dcharts.

Y Y String

YZWallTextureBackColorThe color for the texturebackground. Only for 3−Dcharts.

Y Y String

YZWallGradientStyleSpecifies a gradient style foran object. Only for 3−D charts.More Info

Y N Integer

YZWallGradientStartColorThe color for the gradient firstcolor. Only for 3−D charts.

Y Y String

YZWallGradientEndColorThe color for the gradientsecond color. Only for 3−Dcharts.

Y Y String

YZWallGradientStartX

The horizontal position,measured in the percentage ofthe object's width, from the leftedge of the object, where thegradient starts. Only for 3−Dcharts.

Y Y Integer

YZWallGradientStartY

The vertical position,measured in the percentage ofthe object's height, from thebottom edge of the object,where the gradient starts. Onlyfor 3−D charts.

Y Y Integer

YZWallGradientEndX

The horizontal position,measured in the percentage ofthe object's width, from the leftedge of the object, where thegradient ends. Only for 3−Dcharts.

Y Y Integer

YZWallGradientEndY

The vertical position,measured in the percentage ofthe object's height, from thebottom edge of the object,where the gradient ends. Onlyfor 3−D charts.

Y Y Integer

FloorFillPatternSpecifies a fill pattern for anobject. Only for 3−D charts.More Info

Y N Integer

FloorBackgroundTransparencyThe fill transparency, inpercent. Only for 3−D charts.

Y Y Integer

FloorBackgroundColor Y Y String

Reporting Feature

196

Page 205: JReport Designer - User Referencespecifies the driver such as JDBC driver (for JDBC) or the Data Source name (for JDBC−ODBC bridge), the user ID and the password for connecting to

The color for the background.Only for 3−D charts.

FloorTextureStyleSpecifies a texture style for anobject. Only for 3−D charts.More Info

Y N Integer

FloorTextureForeColorThe color for the textureforeground. Only for 3−Dcharts.

Y Y String

FloorTextureBackcolorThe color for the texturebackground. Only for 3−Dcharts.

Y Y String

FloorGradientStyleSpecifies a gradient style foran object. Only for 3−D charts.More Info

Y N Integer

FloorGradientStartColorThe color for the gradient firstcolor. Only for 3−D charts.

Y Y String

FloorGradientEndColorThe color for the gradientsecond color. Only for 3−Dcharts.

Y Y String

FloorGradientStartX

The horizontal position,measured in the percentage ofthe object's width, from the leftedge of the object, where thegradient starts. Only for 3−Dcharts.

Y Y Integer

FloorGradientStartY

The vertical position,measured in the percentage ofthe object's height, from thebottom edge of the object,where the gradient starts. Onlyfor 3−D charts.

Y Y Integer

FloorGradientEndX

The horizontal position,measured in the percentage ofthe object's width, from the leftedge of the object, where thegradient ends. Only for 3−Dcharts.

Y Y Integer

FloorGradientEndY

The vertical position,measured in the percentage ofthe object's height, from thebottom edge of the object,where the gradient ends. Onlyfor 3−D charts.

Y Y Integer

WallBoundFillPatternSpecifies a fill pattern to fill thewall with two patterns.

Y N Integer

WallBoundFillTransparencySpecifies the transparency ofthe fill pattern, in percent.

Y Y Integer

WallBoundFillColor Specifies the color. Y Y String

WallBoundFillTextureStyle Specifies the texture type. Y N Integer

WallBoundFillTextureForeColorSpecifies a color for the texture foreground.

Y Y String

WallBoundFillTextureBackColor Specifies a color for the Y Y String

Reporting Feature

197

Page 206: JReport Designer - User Referencespecifies the driver such as JDBC driver (for JDBC) or the Data Source name (for JDBC−ODBC bridge), the user ID and the password for connecting to

texture background.

WallBoundFillGradientStyle Specifies the gradient type. Y N Integer

WallBoundFillGradientStartColorSpecifies a color for thegradient first color.

Y Y String

WallBoundFillGradientEndColorSpecifies a color for thegradient second color.

Y Y String

WallBoundFillGradientStartX

The horizontal position,measured in the percentage ofthe object's width, from the leftedge of the object, where thegradient starts.

Y Y Integer

WallBoundFillGradientStartY

The vertical position,measured in the percentage ofthe object's height, from thebottom edge of the object,where the gradient starts.

Y Y Integer

WallBoundFillGradientEndX

The horizontal position,measured in the percentage ofthe object's width, from the leftedge of the object, where thegradient ends.

Y Y Integer

WallBoundFillGradientEndY

The vertical position,measured in the percentage ofthe object's height, from thebottom edge of the object,where the gradient ends.

Y Y Integer

ThresholdLineStyle

Specifies a style for thethreshold lines. Only for 2−Dcharts (except Stock Charts).More Info

Y N Integer

ShowThresholdLine

Specifies whether theThresholdLine is shown. For2−D charts (except StockCharts), 3−D bar charts, 3−Darea charts, 3−D line chartsand 3−D bench charts.

Y Y Boolean

ShowThresholdLine2

Specifies whether theThresholdLine2 is shown. For 2−D charts (except StockCharts), 3−D bar charts, 3−Darea charts, 3−D line chartsand 3−D bench charts.

Y Y Boolean

ShowMeanLine

Specifies whether to the linethat represents the averagevalues of each category groupis shown. Only for 2−D charts(except Stock Charts, ScatterCharts, Radar Charts andBubble Charts).

Y Y Boolean

FillThreshold Specifies whether to fill theThreshold area withsemi−transparent color. Onlyfor 2−D charts (except Stock

Y Y Boolean

Reporting Feature

198

Page 207: JReport Designer - User Referencespecifies the driver such as JDBC driver (for JDBC) or the Data Source name (for JDBC−ODBC bridge), the user ID and the password for connecting to

Charts).

FillThresshold2

Specifies whether to fill theThreshold2 area withsemi−transparent color. Onlyfor 2−D charts (except StockCharts).

Y Y Boolean

ThresholdValue

The value for theThresholdLine. For 2−D charts(except Stock Charts), 3−Dbar charts, 3−D area charts,3−D line charts and 3−Dbench charts.

Y Y Float

ThresholdLineColor

The color for theThresholdLine. For 2−D charts(except Stock Charts), 3−Dbar charts, 3−D area charts,3−D line charts and 3−Dbench charts.

Y Y String

ThresholdValue2

The value for theThresholdLine2. For 2−Dcharts (except Stock Charts),3−D bar charts, 3−D areacharts, 3−D line charts and3−D bench charts.

Y Y Float

ThresholdLineColor2

The color for theThresholdLine2. For 2−Dcharts (except Stock Charts),3−D bar charts, 3−D areacharts, 3−D line charts and3−D bench charts.

Y Y String

FillTransparent

Specifies the transparency ofthe threshold line, in percent.Only for 3−D bar charts, 3−Darea charts, 3−D line charts,and 3−D bench charts.

Y Y Integer

MeanLineColor

The color for the line thatrepresents the average valuesof each category group. Onlyfor 2−D charts (except StockCharts, Scatter Charts, RadarCharts and Bubble Charts).

Y Y String

MeanLineNodeStyle

Specifies the node style forthe mean line. Only for 2−Dcharts (except Stock Charts,Scatter Charts, Radar Chartsand Bubble Charts). More Info

Y N Integer

MeanLineType

Specifies the type for themean line. Only for 2−D charts(except Stock Charts, ScatterCharts, Radar Charts andBubble Charts). More Info

Y N Integer

AxisX

ShowAxisXSpecifies whether the X axis isshown.

Y Y Boolean

Reporting Feature

199

Page 208: JReport Designer - User Referencespecifies the driver such as JDBC driver (for JDBC) or the Data Source name (for JDBC−ODBC bridge), the user ID and the password for connecting to

TickMarkTypeX Specifies the type for the tickmarks.

Y N Integer

ShowTickMarkLabelsXSpecifies whether the tickmark labels are shown.

Y Y Boolean

NumOfLabelsX

The number of tick marklabels that will be shown. Use−1 (default) to let JReportDesigner determine thenumber of labels to show.

Y Y Integer

XMaxValue

The highest data valueappears on the axis. Only forScatter Charts and BubbleCharts.

Y Y Integer

XMinValue

The smallest data valueappears on the axis. Only forScatter Charts and BubbleCharts.

Y Y Integer

LabelPrecisionX

Specifies the number of totaldigits for data labels of X axis,excluding the decimal point.Only for Scatter Charts andBubble Charts.

Y Y Integer

LabelScaleX

Specifies the number of digitsto the right of the decimalpoint. Only forScatter Charts and BubbleCharts.

Y Y Integer

NumOfTickMarksX

The number of tick marks thatwill be shown. Use −1 (default)to let JReport Designerdetermine the number oflabels to show. Only forScatter Charts andBubble Charts.

Y Y Integer

AxisIncrementX

Specifies the incrementbetween two adjacent valuesof the X axis. Use −1 (default)to let JReport Designerdetermine the value of theincrement. Only for ScatterCharts and Bubble Charts.

Y Y Integer

LabelEveryNTickMarksX

The frequency at which thecategories will be labeled.Type 1 to label everycategory, type 2 to label everyother category, type 3 to labelevery third category, and soon.

Y Y Integer

LabelAxisGapXThe distance betweencategory labels and the X axis,in pixels.

Y Y Integer

TickMarkLengthX The length of tick marks. Y Y Integer

AxisXPlacement Specifies the place of the Y N Integer

Reporting Feature

200

Page 209: JReport Designer - User Referencespecifies the driver such as JDBC driver (for JDBC) or the Data Source name (for JDBC−ODBC bridge), the user ID and the password for connecting to

AxisX.

AxisXPenStyleSpecifies the style for the penobject. More Info

Y N Integer

AxisXPenColor The color for the pen object. Y Y String

AxisXPenThicknessThe thickness for the penobject. More Info

Y N Float

AxisXPenEndCapsSpecifies the ending style forthe pen object. More Info

Y N Integer

AxisXPenLineJointSpecifies the line joint style forthe pen object. More Info

Y N Integer

AxisXPenOutlineSpecifies whether an object isshown in outline form.

Y N Boolean

AxisXPenVariabledDashSpecifies whether the dash isauto−sized.

Y N Boolean

AxisXTransparencyThe axis transparency, inpercent.

Y Y Integer

TickMarkXPenStyleSpecifies the style for the penobject. More Info

Y N Integer

TickMarkXPenColor The color for the pen object. Y Y String

TickMarkXPenThicknessThe thickness for the penobject. More Info

Y N Float

TickMarkXPenEndCapsSpecifies the ending style forthe pen object. More Info

Y N Integer

TickMarkXPenLineJointSpecifies the line joint style forthe pen object. More Info

Y N Integer

TickMarkXPenOutlineSpecifies whether an object isshown in outline form.

Y N Boolean

TickMarkXPenVariabledDashSpecifies whether the dash isauto−sized.

Y N Boolean

TickMarkXTransparencyThe tick mark transparency, inpercent.

Y Y Integer

AxisXFontFace Specifies a font for an object. Y Y String

AxisXFontStyleSpecifies a font style for anobject.

Y N Integer

AxisXFontUnderlineSpecifies the style of thehorizontal line under text.More Info

Y N Integer

AxisXFontStrikeThroughSpecifies the style of thehorizontal line with which thefont is struck through.

Y N Integer

AxisXFontSizeSpecifies the font size for anobject.

Y N Float

AxisXFontShearing

Specifies the shearingtransformation of an objectaround its center. The defaultvalue is 0, range from −200~200.

Y Y Integer

AxisXFontRotation

Specifies the font rotation ofan object around its center, indegrees. The default value is0.

Y Y Integer

Reporting Feature

201

Page 210: JReport Designer - User Referencespecifies the driver such as JDBC driver (for JDBC) or the Data Source name (for JDBC−ODBC bridge), the user ID and the password for connecting to

AxisXFontSpecialEffect1 Specifies special effect for thefont.

Y N Integer

AxisXFontSpecialEffect2Specifies special effect for thefont.

Y N Integer

AxisXFontPenStyleSpecifies the style for the penobject. More Info

Y N Integer

AxisXFontPenColor The color for the pen object. Y Y String

AxisXFontPenEndCapsSpecifies the ending style forthe pen object. More Info

Y N Integer

AxisXFontPenLineJointSpecifies the line joint style forthe pen object. More Info

Y N Integer

AxisXFontPenOutlineSpecifies whether an object isshown in outline form.

Y N Boolean

AxisXFontPenVariabledDashSpecifies whether the dash isauto−sized.

Y N Boolean

AxisXFontPenTransparencyThe font pen transparency, inpercent.

Y Y Integer

AxisXFontFillPatternSpecifies a fill pattern for anobject.

Y N Integer

AxisXFontBackgroundTransparencyThe fill transparency, inpercent.

Y Y Integer

AxisXFontColor The color for the background. Y Y String

AxisXFontTextureStyleSpecifies a texture style for anobject. More Info

Y N Integer

AxisXFontTextureForeColorThe color for the textureforeground.

Y Y String

AxisXFontTextureBackColorThe color for the texturebackground.

Y Y String

AxisXFontGradientStyleSpecifies a gradient style foran object. More Info

Y N Integer

AxisXFontGradientStartColorThe color for the gradient firstcolor.

Y Y String

AxisXFontGradientEndColorThe color for the gradientsecond color.

Y Y String

AxisXFontGradientStartX

The horizontal position,measured in the percentage ofthe object's width, from the leftedge of the object, where thegradient starts.

Y Y Integer

AxisXFontGradientStartY

The vertical position,measured in the percentage ofthe object's height, from thebottom edge of the object,where the gradient starts.

Y Y Integer

AxisXFontGradientEndX

The horizontal position,measured in the percentage ofthe object's width, from the leftedge of the object, where thegradient ends.

Y Y Integer

AxisXFontGradientEndY The vertical position,measured in the percentage of

Y Y Integer

Reporting Feature

202

Page 211: JReport Designer - User Referencespecifies the driver such as JDBC driver (for JDBC) or the Data Source name (for JDBC−ODBC bridge), the user ID and the password for connecting to

the object's height, from thebottom edge of the object,where the gradient ends.

AxisXLabelWidthThe width of the categorylabels.

Y N Integer

DrawAxisXBestEffortSpecifies whether to draw theaxis for best result effects. Thedefault is false.

Y N Boolean

WordWrap

Makes word wrap enabled forthe string in the axis label. Ifthe string contains specialchars (refers to , . and space),the string will be broken at theposition of a proper specialchar only. This word wrapfeature cannot be applied toRadar charts, Bubble charts,Scatter charts and Gaugecharts.

Y Y Boolean

AxisY

LabelPrecisionYSpecifies the number of totaldigits for data labels of Y axis,excluding the decimal point.

Y Y Integer

LableScaleYSpecifies the number of digitsto the right of the decimalpoint.

Y Y Integer

ShowAxisYSpecifies whether the Y axis isshown.

Y Y Boolean

TickMarkTypeYSpecifies the type for the tickmarks.

Y N Integer

ShowTickMarkLabelsYSpecifies whether the tickmark labels are shown.

Y Y Boolean

YMaxValueThe highest data valueappears on the axis.

Y Y Integer

YMinValueThe smallest data valueappears on the axis.

Y Y Integer

LabelAxisGapYThe distance between datalabels and the Y axis, in pixels.

Y Y Integer

TickMarkLengthY The length of tick marks. Y Y Integer

NumOfTickMarksY

The number of tick marks thatwill be shown. Use 0 (default)to let JReport Designerdetermine the number oflabels to show.

Y Y Integer

AxisIncrementY

Specifies the incrementbetween two adjacent valuesof Y axis. Use 0 (default) to letJReport Designer determinethe value of the increment.

Y Y Integer

AxisYPlacementSpecifies the place of Y axis.Only for 2−D charts.

Y N Integer

AxisYPenStyle Y N Integer

Reporting Feature

203

Page 212: JReport Designer - User Referencespecifies the driver such as JDBC driver (for JDBC) or the Data Source name (for JDBC−ODBC bridge), the user ID and the password for connecting to

Specifies the style for the penobject. More Info

AxisYPenColor The color for the pen object. Y Y String

AxisYPenThicknessThe thickness for the penobject. More Info

Y N Float

AxisYPenEndCapsSpecifies the ending style forthe pen object. More Info

Y N Integer

AxisYPenLineJointSpecifies the line joint style forthe pen object. More Info

Y N Integer

AxisYPenOutlineSpecifies whether an object isshown in outline form.

Y N Boolean

AxisYPenVariabledDashSpecifies whether the dash isauto−sized.

Y N Boolean

AxisYTransparencyThe axis transparency, inpercent.

Y Y Integer

TickMarkYPenStyleSpecifies the style for the penobject. More Info

Y N Integer

TickMarkYPenColor The color for the pen object. Y Y String

TickMarkYPenThicknessThe thickness for the penobject. More Info

Y N Float

TickMarkYPenEndCapsSpecifies the ending style forthe pen object. More Info

Y N Integer

TickMarkYPenLineJointSpecifies the line joint style forthe pen object. More Info

Y N Integer

TickMarkYPenOutlineSpecifies whether an object isshown in outline form.

Y N Boolean

TickMarkYPenVariabledDashSpecifies whether the dash isauto−sized.

Y N Boolean

TickMarkYTransparencyThe tick mark transparency, inpercent.

Y Y Integer

AxisYFontFace Specifies a font for an object. Y Y String

AxisYFontStyleSpecifies a font style for anobject.

Y N Integer

AxisYFontUnderlineSpecifies the style of thehorizontal line under text.More Info

Y N Integer

AxisYFontStrikeThroughSpecifies the style of thehorizontal line with which thefont is struck through.

Y N Integer

AxisYFontSizeSpecifies the font size for anobject.

Y N Float

AxisYFontShearing

Specifies the shearingtransformation of an objectaround its center. The defaultvalue is 0, range from −200~200.

Y Y Integer

AxisYFontRotation

Specifies the font rotation ofan object around its center, indegrees. The default value is0.

Y Y Integer

AxisYFontSpecialEffect1 Y N Integer

Reporting Feature

204

Page 213: JReport Designer - User Referencespecifies the driver such as JDBC driver (for JDBC) or the Data Source name (for JDBC−ODBC bridge), the user ID and the password for connecting to

Specifies special effect for thefont.

AxisYFontSpecialEffect2Specifies special effect for thefont.

Y N Integer

AxisYFontPenStyleSpecifies the style for the penobject. More Info

Y N Integer

AxisYFontPenColor The color for the pen object. Y Y String

AxisYFontPenEndCapsSpecifies the ending style forthe pen object. More Info

Y N Integer

AxisYFontPenLineJointSpecifies the line joint style forthe pen object. More Info

Y N Integer

AxisYFontPenOutlineSpecifies whether an object isshown in outline form.

Y N Boolean

AxisYFontPenVariabledDashSpecifies whether the dash isauto−sized.

Y N Boolean

AxisYFontPenTransparencyThe font pen transparency, inpercent.

Y Y Integer

AxisYFontFillPatternSpecifies a fill pattern for anobject.

Y N Integer

AxisYFontBackgroundTransparencyThe fill transparency, inpercent.

Y Y Integer

AxisYFontColor The color for the background. Y Y String

AxisYFontTextureStyleSpecifies a texture style for anobject. More Info

Y N Integer

AxisYFontTextureForeColorThe color for the textureforeground.

Y Y String

AxisYFontTextureBackColorThe color for the texturebackground.

Y Y String

AxisYFontGradientStyleSpecifies a gradient style foran object. More Info

Y N Integer

AxisYFontGradientStartColorThe color for the gradient firstcolor.

Y Y String

AxisYFontGradientEndColorThe color for the gradientsecond color.

Y Y String

AxisYFontGradientStartX

The horizontal position,measured in the percentage ofthe object's width, from the leftedge of the object, where thegradient starts.

Y Y Integer

AxisYFontGradientStartY

The vertical position,measured in the percentage ofthe object's height, from thebottom edge of the object,where the gradient starts.

Y Y Integer

AxisYFontGradientEndX

The horizontal position,measured in the percentage ofthe object's width, from the leftedge of the object, where thegradient ends.

Y Y Integer

AxisYFontGradientEndY The vertical position,measured in the percentage of

Y Y Integer

Reporting Feature

205

Page 214: JReport Designer - User Referencespecifies the driver such as JDBC driver (for JDBC) or the Data Source name (for JDBC−ODBC bridge), the user ID and the password for connecting to

the object's height, from thebottom edge of the object,where the gradient ends.

AxisYLabelWidthThe width of the data valuelabels.

Y N Integer

DrawAxisYBestEffortSpecifies whether to draw theaxis for best result effects. Thedefault is false.

Y N Boolean

UseLabelStartValueY1Specifies whether to set thestart value of Y1 axis. Only for2−D charts that have wall.

Y Y Boolean

LabelStartValueY1

Specifies from where the Y1axis label will start to beshown. Only for 2−D chartsthat have wall. Enabled whenthe UseLabelStartValue is setto be true. More Info

Y Y Float

UseLabelStartValueY2Specifies whether to set thestart value of Y2 axis. Only for2−D charts that have wall.

Y Y Boolean

LabelStartValueY2

Specifies from where the Y2axis label will start to beshown. Only for 2−D chartsthat have wall. Enabled whenthe UseLabelStartValueY2 isset to be true.

Y Y Float

AxisZ

ShowAxisZSpecifies whether the Z axis isshown.

Y Y Boolean

TickMarkTypeZSpecifies the type for the tickmarks.

Y N Integer

ShowTickMarkLabelsZSpecifies whether the tickmark labels are shown.

Y Y Boolean

NumOflabelsZ

The number of tick marklabels that will be shown. Use−1 (default) to let JReportDesigner determine thenumber of labels to show.

Y Y Integer

LabelEveryNTickMarksZ

The frequency at which theseries will be labeled. Type 1to label every series, type 2 tolabel every other series, type 3to label every third series, andso on.

Y Y Integer

LabelAxisGapZThe distance between serieslabels and the Z axis, in pixels.

Y Y Integer

TickMarkLengthZ The length of tick marks. Y Y Integer

AxisZPenStyleSpecifies the style for the penobject. More Info

Y N Integer

AxisZPenColor The color for the pen object. Y Y String

AxisZPenThicknessThe thickness for the penobject. More Info

Y N Float

Reporting Feature

206

Page 215: JReport Designer - User Referencespecifies the driver such as JDBC driver (for JDBC) or the Data Source name (for JDBC−ODBC bridge), the user ID and the password for connecting to

AxisZPenEndCaps Specifies the ending style forthe pen object. More Info

Y N Integer

AxisZPenLineJointSpecifies the line joint style forthe pen object. More Info

Y N Integer

AxisZPenOutlineSpecifies whether an object isshown in outline form.

Y N Boolean

AxisZPenVariabledDashSpecifies whether the dash isauto−sized.

Y N Boolean

AxisZTransparencyThe axis transparency, inpercent.

Y Y Integer

TickMarkZPenStyleSpecifies the style for the penobject. More Info

Y N Integer

TickMarkZPenColor The color for the pen object. Y Y String

TickMarkZPenThicknessThe thickness for the penobject. More Info

Y N Float

TickMarkZPenEndCapsSpecifies the ending style forthe pen object. More Info

Y N Integer

TickMarkZPenLineJointSpecifies the line joint style forthe pen object. More Info

Y N Integer

TickMarkZPenOutlineSpecifies whether an object isshown in outline form.

Y N Boolean

TickMarkZPenVariabledDashSpecifies whether the dash isauto−sized.

Y N Boolean

TickMarkZTransparencyThe tick mark transparency, inpercent.

Y Y Integer

AxisZFontFace Specifies a font for an object. Y Y String

AxisZFontStyleSpecifies a font style for anobject.

Y N Integer

AxisZFontUnderlineSpecifies the style of thehorizontal line under text.More Info

Y N Integer

AxisZFontStrikeThroughSpecifies the style of thehorizontal line with which thefont is struck through.

Y N Integer

AxisZFontSizeSpecifies the font size for anobject.

Y N Float

AxisZFontShearing

Specifies the shearingtransformation of an objectaround its center. The defaultvalue is 0, range from −200~200.

Y Y Integer

AxisZFontRotation

Specifies the font rotation ofan object around its center, indegrees. The default value is0.

Y Y Integer

AxisZFontSpecialEffect1Specifies special effect for thefont.

Y N Integer

AxisZFontSpecialEffect2Specifies special effect for thefont.

Y N Integer

AxisZFontPenStyleSpecifies the style for the penobject. More Info

Y N Integer

Reporting Feature

207

Page 216: JReport Designer - User Referencespecifies the driver such as JDBC driver (for JDBC) or the Data Source name (for JDBC−ODBC bridge), the user ID and the password for connecting to

AxisZFontPenColor The color for the pen object. Y Y String

AxisZFontPenEndCapsSpecifies the ending style forthe pen object. More Info

Y N Integer

AxisZFontPenLineJointSpecifies the line joint style forthe pen object. More Info

Y N Integer

AxisZFontPenOutlineSpecifies whether an object isshown in outline form.

Y N Boolean

AxisZFontPenVariabledDashSpecifies whether the dash isauto−sized.

Y N Boolean

AxisZFontPenTransparencyThe font pen transparency, inpercent.

Y Y Integer

AxisZFontFillPatternSpecifies a fill pattern for anobject.

Y N Integer

AxisZFontBackgroundTransparencyThe fill transparency, inpercent.

Y Y Integer

AxisZFontColor The color for the background. Y Y String

AxisZFontTextureStyleSpecifies a texture style for anobject. More Info

Y N Integer

AxisZFontTextureForeColorThe color for the textureforeground.

Y Y String

AxisZFontTextureBackColorThe color for the texturebackground.

Y Y String

AxisZFontGradientStyleSpecifies a gradient style foran object. More Info

Y N Integer

AxisZFontGradientStartColorThe color for the gradient firstcolor.

Y Y String

AxisZFontGradientEndColorThe color for the gradientsecond color.

Y Y String

AxisZFontGradientStartX

The horizontal position,measured in the percentage ofthe object's width, from the leftedge of the object, where thegradient starts.

Y Y Integer

AxisZFontGradientStartY

The vertical position,measured in the percentage ofthe object's height, from thebottom edge of the object,where the gradient starts.

Y Y Integer

AxisZFontGradientEndX

The horizontal position,measured in the percentage ofthe object's width, from the leftedge of the object, where thegradient ends.

Y Y Integer

AxisZFontGradientEndY

The vertical position,measured in the percentage ofthe object's height, from thebottom edge of the object,where the gradient ends.

Y Y Integer

AxisZLabelWidth The width of the labels. Y N Integer

DrawAxisZBestEffort Specifies whether to draw theaxis for best result effects. The

Y N Boolean

Reporting Feature

208

Page 217: JReport Designer - User Referencespecifies the driver such as JDBC driver (for JDBC) or the Data Source name (for JDBC−ODBC bridge), the user ID and the password for connecting to

default is false.

AxisZWordWrap

Makes word wrap enabled forthe string in the axis label. Ifthe string contains specialchars (refers to , . and space),the string will be broken at theproper special char only. Thisword wrap feature cannot beapplied to Radar charts,Bubble charts, Scattercharts and Gauge charts.

Y Y Boolean

Notes: A combination chart (Bar−Line and Line−Line) may contain two value axes, say, the Y1 and Y2 axes, while a 3−Dchart may contain only a Y axis. The properties of the Y1 or Y2 axes are accordingly the same as those of the Y axis in anormal chart.

Index

Chart Label

A chart label can be used as part of a chart legend entry, axis title, or more; you can insert a label anywhere on a chart.You use the properties listed in the following table to control the appearances or behaviors of a chart label object.

The properties for chart coordinate paper are:

Property Name Description Editable Formula Control Data Type

General

ClassTypeShows the class type ofthe label object.

N N −

Geometry

X

The distance betweenthe label and the leftedge of the chartplatform that contains it.

Y N Float

Y

The distance betweenthe label and the topedge of the chartplatform that contains it.

Y N Float

WidthThe width of the labelobject.

Y N Float

HeightThe height of the labelobject.

Y N Float

Label

TextSpecifies the text forthe label object.

Y Y String

TextAlignmentSpecifies how text isaligned in an object.More Info

Y N Integer

BorderStyleSpecifies the borderstyle for an object. MoreInfo

Y N Integer

PenStyle Specifies the style for Y N Integer

Reporting Feature

209

Page 218: JReport Designer - User Referencespecifies the driver such as JDBC driver (for JDBC) or the Data Source name (for JDBC−ODBC bridge), the user ID and the password for connecting to

the pen object. MoreInfo

PenColorThe color for the penobject.

Y Y String

PenThicknessThe thickness for thepen object. More Info

Y N Float

EndCapsSpecifies the endingstyle for the pen object.More Info

Y N Integer

LineJointSpecifies the line jointstyle for the pen object.More Info

Y N Integer

OutlineSpecifies whether anobject is shown inoutline form.

Y N Boolean

VariabledDashSpecifies whether thedash is auto−sized.

Y N Boolean

BorderTransparencyThe bordertransparency, inpercent.

Y Y Integer

FillPatternSpecifies a fill patternfor an object. More Info

Y Y Integer

BackgroundTransparencyThe fill transparency, inpercent.

Y N Integer

Top

The top position of thebackground area,measured in thepercentage of theobject's height, from thetop edge of the object,used together withLeft, Right, and Bottom.

Y N Integer

Left

The left position of thebackground area,measured in thepercentage of theobject's width, from theleft edge of the object,used together withTop, Right, andBottom.

Y N Integer

Right

The right position of thebackground area,measured in thepercentage of theobject's width, from theright edge of the object,used together withTop, Left, and Bottom.

Y N Integer

Bottom The bottom position ofthe background area,measured in thepercentage of the

Y N Integer

Reporting Feature

210

Page 219: JReport Designer - User Referencespecifies the driver such as JDBC driver (for JDBC) or the Data Source name (for JDBC−ODBC bridge), the user ID and the password for connecting to

object's height, from thebottom edge of theobject, used togetherwith Top, Left, andRight.

BackgroundColorThe color for thebackground.

Y Y String

TextureStyleSpecifies a texture stylefor an object. More Info

Y N Integer

TextureForeColorThe color for the textureforeground.

Y Y String

TextureBackColorThe color for the texturebackground.

Y Y String

GradientStyleSpecifies a gradientstyle for an object. MoreInfo

Y N Integer

GradientStartColorThe color for thegradient first color.

Y Y String

GradientEndColorThe color for thegradient second color.

Y Y String

GradientStartX

The horizontal position,measured in thepercentage of theobject's width, from theleft edge of the object,where the gradientstarts.

Y Y Integer

GradientStartY

The vertical position,measured in thepercentage of theobject's height, from thebottom edge of theobject, where thegradient starts.

Y Y Integer

GradientEndX

The horizontal position,measured in thepercentage of theobject's width, from theleft edge of the object,where the gradientends.

Y Y Integer

GradientEndY

The vertical position,measured in thepercentage of theobject's height, from thebottom edge of theobject, where thegradient ends.

Y Y Integer

ImageSpecifies a gif image todisplay on an object.

Y Y String

ImageLayoutSpecifies a layout stylefor the image. More Info

Y N Integer

ImageX Y Y Integer

Reporting Feature

211

Page 220: JReport Designer - User Referencespecifies the driver such as JDBC driver (for JDBC) or the Data Source name (for JDBC−ODBC bridge), the user ID and the password for connecting to

The left position of theimage, measured in thepercentage of theobject's width, from theleft edge of the object.

ImageY

The top position of theimage, measured in thepercentage of theobject's height, from thebottom edge of theobject.

Y Y Integer

ImageWidth

The width of the image,measured in thepercentage of theobject's width. Settingthis value to less than100 percent will cut theimage from the rightedge.

Y Y Integer

ImageHeight

The height of theimage, measured in thepercentage of theobject's height. Settingthis value to less than100 percent will cut theimage from the bottomedge.

Y Y Integer

WordWrap

When the width of thestring is longer than thewidth of the label andthe label is at leasttwice as high as thestring, this propertymakes word wrapenabled for the string inthe label. If the stringcontains special chars(refers to , . and space),the string will be brokenat the proper specialchar only.

Y Y Boolean

Icon

IconStyleSpecifies a style for theicons. More Info

Y N Integer

IconWidthThe width of legendicons.

Y Y Integer

IconHeightThe height of legendicons.

Y Y Integer

IconAlignmentSpecifies how icon isaligned in an object.More Info

Y N Integer

IconPenStyleSpecifies the style forthe pen object. MoreInfo

Y N Integer

Reporting Feature

212

Page 221: JReport Designer - User Referencespecifies the driver such as JDBC driver (for JDBC) or the Data Source name (for JDBC−ODBC bridge), the user ID and the password for connecting to

IconPenColor The color for the penobject.

Y Y String

IconPenThicknessThe thickness for thepen object. More Info

Y N Float

IconEndCapsSpecifies the endingstyle for the pen object.More Info

Y N Integer

IconLineJointSpecifies the line jointstyle for the pen object.More Info

Y N Integer

IconOutlineSpecifies whether anobject is shown inoutline form.

Y N Boolean

IconVariabledDashSpecifies whether thedash is auto−sized.

Y N Boolean

IconBorderTransparencyThe bordertransparency, inpercent.

Y Y Integer

IconFillPatternSpecifies a fill patternfor an object. More Info

Y N Integer

IconBackgroundTransparencyThe fill transparency, inpercent.

Y Y Integer

IconBackgroundColorThe color for thebackground.

Y Y String

IconTextureStyleSpecifies a texture stylefor an object. More Info

Y N Integer

IconTextureForeColorThe color for the textureforeground.

Y Y String

IconTextureBackColorThe color for the texturebackground.

Y Y String

IconGradientStyleSpecifies a gradientstyle for an object. MoreInfo

Y N Integer

IconGradientStartColorThe color for thegradient first color.

Y Y String

IconGradientEndColorThe color for thegradient second color.

Y Y String

IconGradientStartX

The horizontal position,measured in thepercentage of theobject's width, from theleft edge of the object,where the gradientstarts.

Y Y Integer

IconGradientStartY

The vertical position,measured in thepercentage of theobject's height, from thebottom edge of theobject, where thegradient starts.

Y Y Integer

IconGradientEndX Y Y Integer

Reporting Feature

213

Page 222: JReport Designer - User Referencespecifies the driver such as JDBC driver (for JDBC) or the Data Source name (for JDBC−ODBC bridge), the user ID and the password for connecting to

The horizontal position,measured in thepercentage of theobject's width, from theleft edge of the object,where the gradientends.

IconGradientEndY

The vertical position,measured in thepercentage of theobject's height, from thebottom edge of theobject, where thegradient ends.

Y Y Integer

IconImageSpecifies a gif image todisplay on an object.

Y Y String

IconImageLayoutSpecifies a layout stylefor the image. More Info

Y N Integer

IconImageX

The left position of theimage, measured in thepercentage of theobject's width, from theleft edge of the object.

Y Y Integer

IconImageY

The top position of theimage, measured in thepercentage of theobject's height, from thebottom edge of theobject.

Y Y Integer

IconImageWidth

The width of the image,measured in thepercentage of theobject's width. Settingthis value to less than100 percent will cut theimage from the rightedge.

Y Y Integer

IconImageHeight

The height of theimage, measured in thepercentage of theobject's height. Settingthis value to less than100 percent will cut theimage from the bottomedge.

Y Y Integer

Font

FontFaceSpecifies a font for anobject.

Y Y String

FontStyleSpecifies a font style foran object. More Info

Y N Integer

FontUnderlineSpecifies the style ofthe horizontal line undertext. More Info

Reporting Feature

214

Page 223: JReport Designer - User Referencespecifies the driver such as JDBC driver (for JDBC) or the Data Source name (for JDBC−ODBC bridge), the user ID and the password for connecting to

FontStrikeThrough Specifies the style ofthe horizontal line withwhich the font is struckthrough. More Info

Y N Integer

FontSizeSpecifies the font sizefor an object.

Y N Float

FontShearing

Specifies the shearingtransformation of anobject around its center.The default value is 0,range from −200 ~200.

Y Y Integer

FontRotation

Specifies the fontrotation of an objectaround its center, indegrees. The defaultvalue is 0.

Y Y Integer

FontSpecialEffect1Specifies special effectfor the font. More Info

Y N Integer

FontSpecialEffect2Specifies special effectfor the font. More Info

Y N Integer

FontPenStyleSpecifies the style forthe pen object. MoreInfo

Y N Integer

FontPenColorThe color for the penobject.

Y Y String

FontPenThicknessThe thickness for thepen object. More Info

Y N Float

FontPenEndCapsSpecifies the endingstyle for the pen object.More Info

Y N Integer

FontPenLineJointSpecifies the line jointstyle for the pen object.More Info

Y N Integer

FontPenOutlineSpecifies whether anobject is shown inoutline form.

Y N Boolean

FontPenVariabledDashSpecifies whether thedash is auto−sized.

Y N Boolean

FontPenTransparencyThe bordertransparency, inpercent.

Y Y Integer

FontFillPatternSpecifies a fill patternfor an object. More Info

Y N Integer

FontTransparencyThe fill transparency, inpercent.

Y Y Integer

FontcolorThe color for thebackground.

Y Y String

FontTextureStyleSpecifies a texture stylefor an object. More Info

Y N Integer

FontTextureForeColorThe color for the textureforeground.

Y Y String

FontTextureBackColor Y Y String

Reporting Feature

215

Page 224: JReport Designer - User Referencespecifies the driver such as JDBC driver (for JDBC) or the Data Source name (for JDBC−ODBC bridge), the user ID and the password for connecting to

The color for the texturebackground.

FontGradientStyleSpecifies a gradientstyle for an object. MoreInfo

Y N Integer

FontGradientStartColorThe color for thegradient first color.

Y Y String

FontGradientEndColorThe color for thegradient second color.

Y Y String

FontGradientStartX

The horizontal position,measured in thepercentage of theobject's width, from theleft edge of the object,where the gradientstarts.

Y Y Integer

FontGradientStartY

The vertical position,measured in thepercentage of theobject's height, from thebottom edge of theobject, where thegradient starts.

Y Y Integer

FontGradientEndX

The horizontal position,measured in thepercentage of theobject's width, from theleft edge of the object,where the gradientends.

Y Y Integer

FontGradientEndY

The vertical position,measured in thepercentage of theobject's height, from thebottom edge of theobject, where thegradient ends.

Y Y Integer

Chart Legend

Chart legend is a box to identify the patterns or colors assigned to the data series or categories in a chart. You use theproperties listed in the following table to control the appearances or behaviors of a chart legend object.

The properties for chart legend are:

Property Description EditableFormulaControl

DataType

General

ClassType Shows the class type of the legend object. N N −

Geometry

XThe distance between the legend and the left edge of the chartplatform that contains it.

Y N Float

Y Y N Float

Reporting Feature

216

Page 225: JReport Designer - User Referencespecifies the driver such as JDBC driver (for JDBC) or the Data Source name (for JDBC−ODBC bridge), the user ID and the password for connecting to

The distance between the legend and the top edge of the chartplatform that contains it.

Width The width of the legend object. Y N Float

Height The height of the legend object. Y N Float

Legend

HideCategory Specifies whether the category names are shown. Y Y Boolean

HideSeries Specifies whether the series names are shown. Y Y Boolean

Layout Specifies the location of the legend object. Y N Integer

AutoSize Specifies whether to show all the labels of chart legend. Y Y Boolean

TopBottomMinGap The minimum vertical distance between the legend labels. Y Y Integer

LeftRightMinGap The minimum horizontal distance between the legend labels. Y Y Integer

RowColumnMinGapThe minimum distance between series name labels and categoryname labels.

Y Y Integer

LabelWidth The width of the legend labels. Y Y Integer

LabelHeight The height of the legend labels. Y Y Integer

TextAlignment Specifies how text is aligned in an object. More Info Y N Integer

IconAlignment Specifies how icon is aligned in an object. More Info Y N Integer

LabelVSpacingThe vertical distance between legend labels, in pixels. The defaultvalue is −1 (Not Set).

Y Y Integer

LabelHSpacingThe horizontal distance between legend labels, in pixels. The defaultvalue is −1 (Not Set).

Y Y Integer

BorderStyle Specifies the border style for an object. More Info Y N Integer

PenStyle Specifies the style for the pen object. More Info Y N Integer

PenColor The color for the pen object. Y Y String

PenThickness The thickness for the pen object. More Info Y N Float

EndCaps Specifies the ending style for the pen object. More Info Y N Integer

LineJoint Specifies the line joint style for the pen object. More Info Y N Integer

Outline Specifies whether an object is shown in outline form. Y N Boolean

VariabledDash Specifies whether the dash is auto−sized. Y N Boolean

BorderTransparency The border transparency, in percent. Y Y Integer

BackgroundTransparency The fill transparency, in percent. Y Y Integer

FillPattern Specifies a fill pattern for an object. More Info Y N Integer

TopThe top position of the background area, measured in the percentageof the object's height, from the top edge of the object, used togetherwith Left, Right, and Bottom.

Y N Integer

LeftThe left position of the background area, measured in the percentageof the object's width, from the left edge of the object, used togetherwith Top, Right, and Bottom.

Y N Integer

RightThe right position of the background area, measured in the percentageof the object's width, from the right edge of the object, used togetherwith Top, Left, and Bottom.

Y N Integer

BottomThe bottom position of the background area, measured in thepercentage of the object's height, from the bottom edge of the object,used together with Top, Left, and Right.

Y N Integer

BackgroundColor The color for the background. Y Y String

TextureStyle Specifies a texture style for an object. More Info Y N Integer

TextureForeColor The color for the texture foreground. Y Y String

TextureBackColor The color for the texture background. Y Y String

Reporting Feature

217

Page 226: JReport Designer - User Referencespecifies the driver such as JDBC driver (for JDBC) or the Data Source name (for JDBC−ODBC bridge), the user ID and the password for connecting to

GradientStyle Specifies a gradient style for an object. More Info Y N Integer

GradientStartColor The color for the gradient first color. Y Y String

GradientEndColor The color for the gradient second color. Y Y String

GradientStartXThe horizontal position, measured in the percentage of the object'swidth, from the left edge of the object, where the gradient starts.

Y Y Integer

GradientStartYThe vertical position, measured in the percentage of the object'sheight, from the bottom edge of the object, where the gradient starts.

Y Y Integer

GradientEndXThe horizontal position, measured in the percentage of the object'swidth, from the left edge of the object, where the gradient ends.

Y Y Integer

GradientEndYThe vertical position, measured in the percentage of the object'sheight, from the bottom edge of the object, where the gradient ends.

Y Y Integer

Image Specifies a gif image to display on an object. Y Y String

ImageLayout Specifies a layout style for the image. More Info Y N Integer

ImageXThe left position of the image, measured in the percentage of theobject's width, from the left edge of the object.

Y Y Integer

ImageYThe top position of the image, measured in the percentage of theobject's height, from the bottom edge of the object.

Y Y Integer

ImageWidthThe width of the image, measured in the percentage of the object'swidth. Setting this value to less than 100 percent will cut the imagefrom the right edge.

Y Y Integer

ImageHeightThe height of the image, measured in the percentage of the object'sheight. Setting this value to less than 100 percent will cut the imagefrom the bottom edge.

Y Y Integer

LabelFilterSourceSpecifies the data filter the chart legend label uses. The default valueis AxisDataFilter.

Y N Integer

Group1LabelFilterSpecifies the content of group1 label (Available when theLabelFilterSource is set to LegendDataFilter). More Info

Y N String

Group2LabelFilterSepcifies the content of group2 label (Available when theLabelFilerSource is set to LegendDataFilter). More Info

Y N String

ReverseGroup1LabelsSpecifies whether to reverse the order of the group1 labels. Thedefault value is false.

Y Y Boolean

Icon

IconStyleListSpecifies the style for the icon of each category name. The icon stylefor each category name can be different. More Info

Y Y String

SeriesIconStyle Specifies a style for the icons of the data series name. More Info Y N Integer

IconWidth The width of legend icons. Y Y Integer

IconHeight The height of legend icons. Y Y Integer

IconPenStyle Specifies the style for the pen object. More Info Y N Integer

IconPenColor The color for the pen object. Y Y String

IconPenThickness The thickness for the pen object. More Info Y N Float

IconEndCaps Specifies the ending style for the pen object. More Info Y N Integer

IconLineJoint Specifies the line joint style for the pen object. More Info Y N Integer

IconOutline Specifies whether an object is shown in outline form. Y N Boolean

IconVariabledDash Specifies whether the dash is auto−sized. Y N Boolean

IconBorderTransparency The border transparency, in percent. Y Y Integer

IconFillPattern Specifies a fill pattern for an object. More Info Y N Integer

IconBackgroundTransparency The fill transparency, in percent. Y Y Integer

IconBackgroundColor The color for the background. Y Y String

Reporting Feature

218

Page 227: JReport Designer - User Referencespecifies the driver such as JDBC driver (for JDBC) or the Data Source name (for JDBC−ODBC bridge), the user ID and the password for connecting to

IconTextureStyle Specifies a texture style for an object. More Info Y N Integer

IconTextureForeColor The color for the texture foreground. Y Y String

IconTextureBackColor The color for the texture background. Y Y String

IconGradientStyle Specifies a gradient style for an object. More Info Y N Integer

IconGradientStartColor The color for the gradient first color. Y Y String

IconGradientEndColor The color for the gradient second color. Y Y String

IconGradientStartXThe horizontal position, measured in the percentage of the object'swidth, from the left edge of the object, where the gradient starts.

Y Y Integer

IconGradientStartYThe vertical position, measured in the percentage of the object'sheight, from the bottom edge of the object, where the gradient starts.

Y Y Integer

IconGradientEndXThe horizontal position, measured in the percentage of the object'swidth, from the left edge of the object, where the gradient ends.

Y Y Integer

IconGradientEndYThe vertical position, measured in the percentage of the object'sheight, from the bottom edge of the object, where the gradient ends.

Y Y Integer

Font

FontFace Specifies a font for an object. Y Y String

FontStyle Specifies a font style for an object. More Info Y N Integer

FontUnderline Specifies the style of the horizontal line under text. More Info Y N Integer

FontStrikeThroughSpecifies the style of the horizontal line with which the font is struckthrough. More Info

Y N Integer

FontSize Specifies the font size for an object. Y N Float

FontShearingSpecifies the shearing transformation of an object around its center.The default value is 0, range from −200 ~200.

Y Y Integer

FontRotationSpecifies the font rotation of an object around its center, in degrees.The default value is 0.

Y Y Integer

FontSpecialEffect1 Specifies special effect for the font. More Info Y N Integer

FontSpecialEffect2 Specifies special effect for the font. More Info Y N Integer

FontPenStyle Specifies the style for the pen object. More Info Y N Integer

FontPenColor The color for the pen object. Y Y String

FontPenEndCaps Specifies the ending style for the pen object. More Info Y N Integer

FonePenLineJoint Specifies the line joint style for the pen object. More Info Y N Integer

FontPenOutline Specifies whether an object is shown in outline form. Y N Boolean

FontPenVariabledDash Specifies whether the dash is auto−sized. Y N Boolean

FontPenTransparency The border transparency, in percent. Y Y Integer

FontFillPattern Specifies a fill pattern for an object. More Info Y N Integer

FontTransparency The fill transparency, in percent. Y Y Integer

FontColor The color for the background. Y Y String

FontTextureStyle Specifies a texture style for an object. More Info Y N Integer

FontTextureForeColor The color for the texture foreground. Y Y String

FontTextureBackColor The color for the texture background. Y Y String

FontGradientStyle Specifies a gradient style for an object. More Info Y N Integer

FontGradientStartColor The color for the gradient first color. Y Y String

FontGradientEndColor The color for the gradient second color. Y Y String

FontGradientStartXThe horizontal position, measured in the percentage of the object'swidth, from the left edge of the object, where the gradient starts.

Y Y Integer

FontGradientStartYThe vertical position, measured in the percentage of the object'sheight, from the bottom edge of the object, where the gradient starts.

Y Y Integer

Reporting Feature

219

Page 228: JReport Designer - User Referencespecifies the driver such as JDBC driver (for JDBC) or the Data Source name (for JDBC−ODBC bridge), the user ID and the password for connecting to

FontGradientEndX The horizontal position, measured in the percentage of the object'swidth, from the left edge of the object, where the gradient ends.

Y Y Integer

FontGradientEndYThe vertical position, measured in the percentage of the object'sheight, from the bottom edge of the object, where the gradient ends.

Y Y Integer

Index

Chart Platform

Chart platform is the container of the other chart elements, such as chart coordinate paper, chart legend, and so on. Youuse the properties listed in the following table to control the appearances or behaviors of a chart platform object.

The properties for chart platform are:

Property Name Description EditableFormulaControl

DataType

General

ClassType Shows the class type of the chart object. N N −

DataSource

Type Specifies the chart type of a chart object. More Info Y N Integer

Category Shows the category field or group. N N −

Series Shows the data series field or group. N N −

Value The aggregation function for one of the data set. N N −

StartOffset(1st.Data.Set)

Specifies the starting offset of the data series, used together with theother three properties to control the data source range that appears on thechart. This property does not work with chart that involves only one group.More Info

Y Y Integer

EndOffset(1nd.Data.Set)

Specifies the ending offset of the data series, used together with the otherthree properties to control the data source range that appears on thechart. This property does not work with chart that involves only one group.More Info

Y Y Integer

StartOffset(2nd.Data.Set)Specifies the starting offset of the categories, used together with the otherthree properties to control the data source range that appears on thechart. More Info

Y Y Integer

EndOffset(2nd.Data.Set)Specifies the ending offset of the categories, used together with the otherthree properties to control the data source range that appears on thechart. More Info

Y Y Integer

ReverseRows Specifies whether the row sequence is reversed. Y Y Boolean

ReverseColumns Specifies whether the column sequence is reversed. Y Y Boolean

PatternList Specifies the pattern and color of the data markers. More Info Y N String

PrimaryDataFilterSpecifies the data filter for the primary value axis (the Y1 axis) to displaythe tick mark labels the way you want. More Info

Y N String

SecondaryDataFilterSpecifies the data filter for the secondary value axis (the Y2 axis) todisplay the tick mark labels the way you want. More Info

Y N String

CategoryFilterSpecifies the filter for the category axis (the X axis) to display the tickmark labels the way you want. More Info

Y N String

SeriesFilterSpecifies the filter for the series axis (the Z axis) to display the tick marklabels the way you want. More Info

Y N String

SizeOfPart1Specifies the number of data series groups represented on the Y1 axis.More Info

Y Y Integer

Reporting Feature

220

Page 229: JReport Designer - User Referencespecifies the driver such as JDBC driver (for JDBC) or the Data Source name (for JDBC−ODBC bridge), the user ID and the password for connecting to

SortX Specifies the sorting order on the labels of the X axis. Y N Integer

SortZ Specifies the sorting order on the labels of the Z axis. Y N Integer

HyperLink Specifies an URL with a link to the chart. More Info Y Y String

XHyperLink Specifies an URL with a link to the X axis labels. More Info Y Y String

ZHyperLink Specifies an URL with a link to the Y axis labels. More Info Y Y String

Geometry

XThe distance between the chart and the left edge of the report pagemargin.

Y N Float

YThe distance between the chart and the top edge of the report pagemargin.

Y N Float

Width The width of the chart object. Y N Float

Height The height of the chart object. Y N Float

Others

TOCAnchorSpecifies whether to add the node that represents for this object to theTOC tree.

Y Y Boolean

Style The style that is applied to the chart object. Y Y String

Invisible Specifies whether the chart is visible at run−time. Y Y Boolean

Suppressed Specifies whether the chart is suppressed and not shown at run−time. Y Y Boolean

SuppressedIfNoRecordsSpecifies whether to suppress and not show the chart object when thereis no record retrieved for the whole report.

Y Y Boolean

ExportToCSVSpecifies whether the chart object is exported when exporting the reportto a csv file.

Y Y Boolean

ExportToXLSSpecifies whether the chart object is exported when exporting the reportto Excel file.

Y Y Boolean

Platform

AutoLayoutSpecifies whether the elements inside the object are automaticallyre−aligned or resized when the object is resized.

Y Y Boolean

BorderStyle Specifies the border style for an object. More Info Y N Integer

PenStyle Specifies the style for the pen object. Y N Integer

PenColor The color for the pen object. Y Y String

PenThickness The thickness for the pen object. More Info Y N Float

EndCaps Specifies the ending style for the pen object. Y N Integer

LineJoint Specifies the line joint style for the pen object. Y N Integer

Outline Specifies whether an object is shown in outline form. Y N Boolean

VariabledDash Specifies whether the dash is auto−sized. Y N Boolean

BorderTransparency The border transparency, in percent. Y Y Integer

FillPattern Specifies a fill pattern for an object. More Info Y Y Integer

BackgroundTransparency The fill transparency, in percent. Y N Integer

TopThe top position of the background area, measured in the percentage ofthe object's height, from the top edge of the object, used together withLeft, Right, and Bottom.

Y N Integer

LeftThe left position of the background area, measured in the percentage ofthe object's width, from the left edge of the object, used together with Top,Right, and Bottom.

Y N Integer

RightThe right position of the background area, measured in the percentage ofthe object's width, from the right edge of the object, used together withTop, Left, and Bottom.

Y N Integer

Bottom Y N Integer

Reporting Feature

221

Page 230: JReport Designer - User Referencespecifies the driver such as JDBC driver (for JDBC) or the Data Source name (for JDBC−ODBC bridge), the user ID and the password for connecting to

The bottom position of the background area, measured in the percentageof the object's height, from the bottom edge of the object, used togetherwith Top, Left, and Right.

BackgroundColor The color for the background. Y Y String

TextureStyle Specifies a texture style for an object. Y N Integer

TextureForeColor The color for the texture foreground. Y Y String

TextureBackColor The color for the texture background. Y Y String

GradientStyle Specifies a gradient style for an object. More Info Y N Integer

GradientStartColor The color for the gradient first color. Y Y String

GradientEndColor The color for the gradient second color. Y Y String

GradientStartXThe horizontal position, measured in the percentage of the object's width,from the left edge of the object, where the gradient starts.

Y Y Integer

GradientStartYThe vertical position, measured in the percentage of the object's height,from the bottom edge of the object, where the gradient starts.

Y Y Integer

GradientEndXThe horizontal position, measured in the percentage of the object's width,from the left edge of the object, where the gradient ends.

Y Y Integer

GradientEndYThe vertical position, measured in the percentage of the object's height,from the bottom edge of the object, where the gradient ends.

Y Y Integer

Image Specifies a gif image to display on an object. Y Y String

ImageLayout Specifies a layout style for the image. More Info Y N Integer

ImageXThe left position of the image, measured in the percentage of the object'swidth, from the left edge of the object.

Y Y Integer

ImageYThe top position of the image, measured in the percentage of the object'sheight, from the bottom edge of the object.

Y Y Integer

ImageWidthThe width of the image, measured in the percentage of the object's width.Setting this value to less than 100 percent will cut the image from the rightedge.

Y Y Integer

ImageHeightThe height of the image, measured in the percentage of the object'sheight. Setting this value to less than 100 percent will cut the image fromthe bottom edge.

Y Y Integer

HintFormat Specify the number format for the hint message. Y Y String

GroupValueFormatSpecifies the format for the group value. The format here usually refer tothe following encoding: BIG5, EUCJIS, GBK, UTF8, and XXXXX....

Y Y String

Index

Index

Cross Tab

Property name Description EditableFormulaControl

DataType

General

ClassType Display the class type: CTCrossTab. N N _

Geometry

XThe horizontal coordinate of the left top corner in a section, and canbe changed by moving or resizing in the Designer.

Y N Float

YThe vertical coordinate of the left top corner in a section, can bechanged by moving, resizing in the Designer.

Y N Float

Reporting Feature

222

Page 231: JReport Designer - User Referencespecifies the driver such as JDBC driver (for JDBC) or the Data Source name (for JDBC−ODBC bridge), the user ID and the password for connecting to

Width The width of the object. N N Float

Height The height of the object. N N Float

Color

BackgroundThe background color. Specify with a string like "0xff00ff" to control orselect a color from the palette.

Y Y String

Others

TOCAnchorSpecifies whether to add the node that represents for this object tothe TOC tree.

Y Y Boolean

StyleApply predefined styles like invisible, suppress properties to anothercross tab object.

Y N String

Invisible If true, not displayed in both design and view mode. Y Y Boolean

Suppressed If true, not displayed in the View mode. YY (BeforePagebreak)

Boolean

SuppressedIfNoRecordsIf set to true and no record returned for the whole report, the objectwill not be displayed.

Y N Boolean

ExportToCSV*If set to false, the object will not be exported when exporting thereport to a csv file.

Y Y Boolean

ExportToXLS*If set to False, the section will not be exported when exporting thereport to Excel file. (Make sure to check Excel2000 on the Export toXLS dialog.)

Y Y Boolean

Excel

ColumnIndexSpecifies the X coordinate of the selected object in the exported XLSfile, measured in cells.

Y N Integer

RowIndexSpecifies the Y coordinate of the selected object in the exported XLSfile, measured in cells.

Y N Integer

CrossTabProperty

HorizontalGapSet the space between the contents and left&right inside edges ofcells.

Y N Float

VerticalGapSet the space between the contents and top&bottom inside edges ofcells.

Y Y Float

HasBorder Display the grid border if true. Y Y Boolean

BorderColor Grid Color. Y Y String

VerticalLayout* If true, display Aggregate fields Vertically. Y Y Boolean

BoundaryValue* Specify the number to display Aggregate fields in one row/column. Y Y Float

RowTotalOnTopIf true, the row "Total" for each column will be displayed on the top ofthe cross−tab.

Y Y Boolean

ColumnTotalOnLeftIf true, the column "Total" for each line/row will be displayed at thefirst column in the cross−tab.

Y Y Boolean

SuppressRowHeader If true, the row header will not be displayed. Y Y Boolean

SuppressColumnHeader If true, the column header will not be displayed. Y Y Boolean

RepeatRowHeader If true, column headings will repeat to display on every page. Y Y Boolean

AvoidOrphanHeader* If true, column heading will be kept together with the data. Y Y Boolean

SuppressRowHeader If true, the row header will be suppressed in the view mode. Y N Boolean

SuppressColumnHeader If true, the column header will be suppressed in the view mode. Y N Boolean

VerticalLayout

When you set VerticalLayout = true, the Aggregate fields will display vertically as shown below.

Reporting Feature

223

Page 232: JReport Designer - User Referencespecifies the driver such as JDBC driver (for JDBC) or the Data Source name (for JDBC−ODBC bridge), the user ID and the password for connecting to

Oppositely, if set VerticalLayout = false, the Aggregate fields displays horizontally.

BoundaryValue

The default value is −1. By this property, you can specify the number of Aggregate fields to be displayed in one columnwhen displayed vertically, or in one row when displayed horizontally. The left fields will be word−wrapped. For example,we set BoundaryValue = 2, VerticalLayout = true, then the Aggregate fields will display as below.

AvoidOrphanHeader

Sometimes the column header happens to be on the bottom of a page as below:

Reporting Feature

224

Page 233: JReport Designer - User Referencespecifies the driver such as JDBC driver (for JDBC) or the Data Source name (for JDBC−ODBC bridge), the user ID and the password for connecting to

To keep the column header together with the data in the next page, set AvoidOrphan header to be true, then it willdisplay on the next page:

Cross Tab Child−AggField

A Cross Tab is an object that summarizes data and presents the summaries in a compact row and column format. Thisallows comparisons and identification of trends to be displayed. Here are the properties for the Aggregate field inside across tab.

Property Name Description EditableFormulaControl

DataType

Geometry

X The horizontal coordinate of the left top corner in a section. N N _

Y The vertical coordinate of the left top corner in a section. N N _

Width The width of the field, can be changed by resizing. Y N Float

Height The height of the field, can be changed by resizing. Y N Float

Color

BackgroundThe background color. Specify with a string like "0xff00ff" to control or select acolor from the palette.

Y Y String

ForegroundThe foreground color. Specify with a string like "0xff0000" to control or select acolor from the palette.

Y Y String

Border

BorderWidth The width of the border. Y N Float

BorderColorThe color of the border. Specify with a string like "0xff0000" to control or select acolor from the palette.

Y Y String

TopLine The top border line style, can be Solid, Double, Dotted, Dashed, DashDot or None. Y N Int

BottomLineThe bottom border line style, can be Solid, Double, Dotted, Dashed, DashDot orNone.

Y N Int

RightLineThe right border line style, can be Solid, Double or Dotted, Dashed, DashDot,None.

Y N Int

LeftLine The left border line style, can be Solid, Double or Dotted, Dashed, DashDot, None. Y N Int

Shadow Draw the shadow if it is true. Y Y Boolean

ShadowColorThe color for the shadow. Specify with the string like "0xff0000" or select a colorfrom the palette.

Y Y String

Pattern

PatternColor The color to be used to draw the pattern. Specify with the string like "0xff0000". Y Y String

PatternStyleThe style to draw the pattern. There are: Vertical, Slash, Percent50, Horizontal,Hatch and None.

Y N Int

TextFormat

FontFace Font to be used. Y Y String

Reporting Feature

225

Page 234: JReport Designer - User Referencespecifies the driver such as JDBC driver (for JDBC) or the Data Source name (for JDBC−ODBC bridge), the user ID and the password for connecting to

FontSize The size of the font Y N Float

Bold Use bold fontface if true. Y Y Boolean

Italic Use italic fontface if true. Y Y Boolean

StrikeOut Mark strikeout if true. Y Y Boolean

Underline Underline the contents if true. Y Y Boolean

Alignment

Justification of the contents. The first part is for horizontal justification (center,justify, left, right), the second part is for the vertical justification (top, center,bottom). So there are CenterTop, CenterCenter, CenterBottom, JustifyTop,JustifyCenter, JustifyBottom, LeftTop, LeftCenter, LeftBottom, RightTop,RightCenter and RightBottom.

Y N Int

FormatThe display format for the field. Varies for different types of data, and can bemanually defined.

Y Y String

Wordwrap Wrap the displayed contents if true. Y Y Boolean

Others

Suppressed Do not display the field in the View mode if true. YY (BeforePagebreak)

Boolean

ExportToCSV* If set to false, the object will not be exported when exporting the report to a csv file. Y Y Boolean

ExportToXLS*If set to False, the section will not be exported when exporting the report to Excelfile. (Make sure to check Excel2000 on the Export to XLS dialog.)

Y Y Boolean

Index

Cross Tab Child−DBField

Property Name Description Editable Formula Control Data Type

General

FieldTypeDisplay the class type:DBField.

N N _

DBFieldNameThe mapping name in thecatalog.

N N _

Query The query/UDS name. N N _

TableThe table name in theraw DB.

N N _

ColumnThe column name in theraw DB.

N N _

DataType

The Data type. You canchange it in theconnection node inCatalog Browser.

N N _

Color

Background

The background color.Specify with a string like"0xff00ff" to control orselect a color from thepalette.

Y Y String

Foreground

The foreground color.Specify with a string like"0xff0000" to control orselect a color from thepalette.

Y Y String

Reporting Feature

226

Page 235: JReport Designer - User Referencespecifies the driver such as JDBC driver (for JDBC) or the Data Source name (for JDBC−ODBC bridge), the user ID and the password for connecting to

Border

BorderWidthThe width of the border,and can be from 1 to 3.

Y N Float

BorderColor

The color of the border.Specify with a string like"0xff0000" to control orselect from the palette.

Y Y String

TopLine

The top border line style,can be Solid, Double,Dotted, Dashed, DashDotor None.

Y N Int

BottomLine

The bottom border linestyle, can be Solid,Double, Dotted, Dashed,DashDot or None.

Y N Int

RightLine

The right border line style,can be Solid, Double orDotted, Dashed, DashDotor None.

Y N Int

LeftLine

The left border line style,can be Solid, Double,Dotted, Dashed, DashDotor None.

Y N Int

ShadowDraw the shadow if it istrue.

Y Y Boolean

ShadowColor

The color used to drawthe pattern. Specify with astring like "0xff0000" orselect a color from thepalette.

Y Y String

Pattern

PatternStyle

The style to draw thepattern. They are:Vertical, Slash,Percent50, Horizontal,Hatch and None.

Y N Int

TextFormat

FontFace Font to be used. Y Y String

FontSize The size of the font. Y N Float

Bold Use bold fontface if true. Y Y Boolean

Italic Use italic fontface if true. Y Y Boolean

StrikeOut Mark strikeout if true. Y Y Boolean

UnderlineUnderline the contents iftrue.

Y Y Boolean

Alignment Justification of thecontents. The first part isfor horizontal justification(center, justify, left, right),the second part is for thevertical justification (top,center, bottom).Summarily they are

Y N Int

Reporting Feature

227

Page 236: JReport Designer - User Referencespecifies the driver such as JDBC driver (for JDBC) or the Data Source name (for JDBC−ODBC bridge), the user ID and the password for connecting to

CenterTop, CenterCenter,CenterBottom, JustifyTop,JustifyCenter,JustifyBottom, LeftTop,LeftCenter, LeftBottom,RightTop, RightCenterand RightBottom.

Format

The display format for thefield. Vary for differenttypes of data, and can bemanually defined.

Y Y String

WordwrapWrap the displayedcontents if true.

Y Y Boolean

TransWhileToHtml

While exporting to htmlformat, specify whetherthe contents with the htmlkey word, should beescaped to normal stringinstead of the key word.

Y Y Boolean

Others

SuppressedIf true, not displayed inthe View mode.

Y Y (Before Pagebreak) Boolean

ExportToCSV*

If set to false, the objectwill not be exported whenexporting the report to acsv file.

Y Y Boolean

ExportToXLS*

If set to False, the sectionwill not be exported whenexporting the report toExcel file. (Make sure tocheck Excel2000 on theExport to XLS dialog.)

Y Y Boolean

SuppressedIfNullIf true and the field valueis null, not displayed.

Y N Boolean

DisplayNullIf true and the field valueis null, what to bedisplayed.s

Y Y String

Index

Cross Tab Child−Formula

Property Name Description Editable Formula Control Data Type

General

FieldTypeDisplay the class type:Formula.

N N _

FormulaName The formula name. N N _

DataType

The Data type. You canchange it in theconnection node inCatalog Browser.

N N _

Expression N N _

Reporting Feature

228

Page 237: JReport Designer - User Referencespecifies the driver such as JDBC driver (for JDBC) or the Data Source name (for JDBC−ODBC bridge), the user ID and the password for connecting to

The expression of theformula.

FormulaEitorTo activate the formulaeditor dialog.

Y N _

Color

Background

The background color.Specify with a string like"0xff00ff" to control orselect a color from thepalette.

Y Y String

Foreground

The foreground color.Specify with a string like"0xff0000" to control orselect a color from thepalette.

Y Y String

Border

BorderWidthThe width of the border,and can be from 1 to 3.

Y N Float

BorderColor

The color of the border.Specify with a string like"0xff0000" to control orselect from the palette.

Y Y String

TopLine

The top border line style,can be Solid, Double,Dotted, Dashed, DashDotor None.

Y N Int

BottomLine

The bottom border linestyle, can be Solid,Double, Dotted, Dashed,DashDot or None.

Y N Int

RightLine

The right border line style,can be Solid, Double,Dotted, Dashed, DashDotor None.

Y N Int

LeftLine

The left border line style,can be Solid, Double,Dotted, Dashed, DashDotor None.

Y N Int

ShadowDraw the shadow if it istrue.

Y Y Boolean

ShadowColor

The used color for theshadow. Specify with astring like "0xff0000" orselect a color from thepalette.

Y Y String

Pattern

PatternColor

The color used to drawthe pattern. Specify with astring like "0xff0000" orselect a color from thepalette.

Y Y String

PatternStyle The style to draw the Y N Int

Reporting Feature

229

Page 238: JReport Designer - User Referencespecifies the driver such as JDBC driver (for JDBC) or the Data Source name (for JDBC−ODBC bridge), the user ID and the password for connecting to

pattern. They are:Vertical, Slash,Percent50, Horizontal,Hatch and None.

TextFormat

FontFace Font to be used. Y Y String

FontSize The size of the font. Y N Float

Bold Use bold fontface if true. Y Y Boolean

Italic Use italic fontface if true. Y Y Boolean

StrikeOut Mark strikeout if true. Y Y Boolean

UnderlineUnderline the contents iftrue.

Y Y Boolean

Alignment

Justification of your field.The first part is forhorizontal justification(center, justify, left, right),the second part is for thevertical justification (top,center, bottom).Summarily they areCenterTop, CenterCenter,CenterBottom, JustifyTop,JustifyCenter,JustifyBottom, LeftTop,LeftCenter, LeftBottom,RightTop, RightCenterand RightBottom.

Y N Int

Format

The display format for thefield. Varies for differenttypes of data, and can bemanually defined.

Y Y String

WordwrapWrap the displayedcontents if true.

Y Y Boolean

TransWhileToHtml

While exporting to htmlformat, specify whetherthe contents with the htmlkey word should beescaped to normal stringinstead of the key word.

Y Y Boolean

Others

SuppressedIf true, not displayed inthe View mode.

Y Y (Before Pagebreak) Boolean

ExportToCSV*

If set to false, the objectwill not be exported whenexporting the report to acsv file.

Y Y Boolean

ExportToXLS*

If set to False, the sectionwill not be exported whenexporting the report toExcel file. (Make sure tocheck Excel2000 on theExport to XLS dialog.)

Y Y Boolean

Reporting Feature

230

Page 239: JReport Designer - User Referencespecifies the driver such as JDBC driver (for JDBC) or the Data Source name (for JDBC−ODBC bridge), the user ID and the password for connecting to

SuppressedIfNull If true and the field valueis null, not displayed.

Y N Boolean

DisplayNullIf true and the field valueis null, what to bedisplayed.

Y Y String

Index

Cross Tab Child−TextField

The text field in a cross tab object usually refers to the table header in the last row or last column.

Property Name Description Editable Formula Control Data Type

General

ClassTypeDisplay the class type:CTTextField.

N N _

Color

Background

The background color.Specify with a string like"0xff00ff" to control orselect a color from thepalette.

Y Y String

Foreground

The foreground color.Specify with a string like"0xff0000" to control orselect a color from thepalette.

Y Y String

Border

BorderWidthThe width of the border,can be from 1 to 3.

Y N Float

BorderColor

The color of the border.Specify with a string like"0xff0000" to control orselect a color from thepalette.

Y Y String

TopLine

The top border line style,can be Solid, Double,Dotted, Dashed,DashDot or None.

Y N Int

BottomLine

The bottom border linestyle, can be Solid,Double, Dotted, Dashed,DashDot or None.

Y N Int

RightLine

The right border linestyle, can be Solid,Double, Dotted, Dashed,DashDot or None.

Y N Int

LeftLine

The left border line style,can be Solid, Double,Dotted, Dashed,DashDot or None.

Y N Int

Shadow Y Y Boolean

Reporting Feature

231

Page 240: JReport Designer - User Referencespecifies the driver such as JDBC driver (for JDBC) or the Data Source name (for JDBC−ODBC bridge), the user ID and the password for connecting to

Draw the shadow if it istrue.

ShadowColor

The color for the shadow.Specify with the stringlike "0xff0000" or select acolor from the palette.

Y Y String

Pattern

PatternColor

The color to be used todraw the pattern. Specifywith the string like"0xff0000".

Y Y String

PatternStyle

The style to draw thepattern. There are:Vertical, Slash,Percent50, Horizontal,Hatch and None.

Y N Int

TextFormat

TextThe string to bedisplayed.

Y Y String

FontFace Font to be used. Y Y String

FontSize The size of the font. Y N Float

Bold Use bold fontface if true. Y Y Boolean

Italic Use italic fontface if true. Y Y Boolean

StrikeOut Mark strikeout if true. Y Y Boolean

UnderlineUnderline the contents iftrue.

Y Y Boolean

Alignment

Justification of thecontents. The first part isfor horizontal justification(center, justify, left, right),the second part is for thevertical justification (top,center, bottom). So thereare CenterTop,CenterCenter,CenterBottom,JustifyTop, JustifyCenter,JustifyBottom, LeftTop,LeftCenter, LeftBottom,RightTop, RightCenterand RightBottom.

Y N Int

WordwrapWrap the displayedcontents if true.

Y Y Boolean

TransWhileToHtml

If the contents includethe html key word, Esc tonormal string if trueinstead of the key word.

Y Y Boolean

Others

SuppressedDo not display the field iftrue.

Y Y (Before Pagebreak) Boolean

ExportToCSV* If set to false, the objectwill not be exported when

Y Y Boolean

Reporting Feature

232

Page 241: JReport Designer - User Referencespecifies the driver such as JDBC driver (for JDBC) or the Data Source name (for JDBC−ODBC bridge), the user ID and the password for connecting to

exporting the report to acsv file.

ExportToXLS*

If set to False, thesection will not beexported when exportingthe report to Excel file.(Make sure to checkExcel2000 on the Exportto XLS dialog.)

Y Y Boolean

SuppressAggregate*Don’t display row orcolumn aggregate valueif true.

Y N Boolean

SuppressAggregate

You will be very clear what this property is intended for after viewing the two screen shots.

SuppressAggregate: false (default value)

SuppressAggregate: true

Reporting Feature

233

Page 242: JReport Designer - User Referencespecifies the driver such as JDBC driver (for JDBC) or the Data Source name (for JDBC−ODBC bridge), the user ID and the password for connecting to

Data Source

Property Name Description EditableFormulaControl

DataType

General

ClassType Display the class type for the object: DataSource. N N _

Others

QueryName Display the query or UDS name. N N _

QueryEditorClick...on the right of the field to activate the query editor dialog. (Only forthe query not for the UDS)

Y N _

Report Header Section

Property Name Description EditableFormulaControl

DataType

General

ClassType Display the Class Type: ReportHeaderPanel N N _

Geometry

Width The width of the section. N N _

Height The height of the section Y N float

Color

BackgroundThe background color. Use a string like "0xff00ff" to control or select inthe palette.

Y Y String

Others

Style *Apply predefined styles for fonts, colors, alignments and other propertiesto the selected object(s).

Y N String

Reporting Feature

234

Page 243: JReport Designer - User Referencespecifies the driver such as JDBC driver (for JDBC) or the Data Source name (for JDBC−ODBC bridge), the user ID and the password for connecting to

Invisible * If true, don’t display the section both in the view and the design mode. Y Y Boolean

Suppressed * If true, don’t display the section in the view mode. Y Y Boolean

Label* Display the section name in the design mode. Y N String

OnNewPage Start a new page to display this section if set true. YY (BeforePageBreak)

Boolean

Underlay*The section will go to next section’s (except pageheader and pagefooter)underground if set true

YY (BeforePageBreak)

Boolean

CanCrossPageIf the current page can’t hold the whole section contents, it will continuedisplaying the section and cross the page if set true or start new page ifset false

YY (BeforePageBreak)

Boolean

SuppressBlankSection* Don’t display the section if it is blank (no child) and set true. YY (BeforePageBreak)

Boolean

FillWholePage*The next section (except pageheader and pagefooter) will start from anew page if set true.

YY (BeforePageBreak)

Boolean

ShowBottomLineSpecifies whether to show a line at the bottom of the section (only for theTable reports).

Y N Boolean

Many of the properties listed here are commonly used, and you will encounter them for other sections or objects. We willgive you a detailed description of them.

Style

JReport Designer provides the style format painter, so that you can copy object and section formats. In other words, youcan apply the formatting very easily to the objects without having to define again. The style includes fonts, colors,alignments.

To do so,

In the design mode, select the object of which you want to save the style. Right click your mouse, select SaveStyle item in the menu.

1.

Reporting Feature

235

Page 244: JReport Designer - User Referencespecifies the driver such as JDBC driver (for JDBC) or the Data Source name (for JDBC−ODBC bridge), the user ID and the password for connecting to

The Save Style dialog will pop up. Give the style name for your memo in the Label Style Name. Select theproperties you want to save in the All properties panel and click the arrow to add into the Selected propertiespanel. You can also edit the selected properties here.

2.

Reporting Feature

236

Page 245: JReport Designer - User Referencespecifies the driver such as JDBC driver (for JDBC) or the Data Source name (for JDBC−ODBC bridge), the user ID and the password for connecting to

Click on the Save button, and next time when you want to use the style, you can do as follows:3.

The format of the selected object will be changed:4.

Reporting Feature

237

Page 246: JReport Designer - User Referencespecifies the driver such as JDBC driver (for JDBC) or the Data Source name (for JDBC−ODBC bridge), the user ID and the password for connecting to

The above example is for an object, but for a section it is the same. You need to first select a section and save its styleand then apply it to another section. But most often, we use this for an object.

Invisible

As the name suggests, it is to hide/show the section. The default value is false to show this section, but you set it to true,then this section will be hidden both in the design mode and view mode. You can in this case, go to Report Inspector andset it back to false to show it again. Compare it with Suppressed property.

Reporting Feature

238

Page 247: JReport Designer - User Referencespecifies the driver such as JDBC driver (for JDBC) or the Data Source name (for JDBC−ODBC bridge), the user ID and the password for connecting to

Suppressed

The default value for the Suppressed property is false, so that you can view this section both in the view mode anddesign mode. But if true, this section will be hidden in the view mode. Note the difference from the Invisible property.

Design Mode

Reporting Feature

239

Page 248: JReport Designer - User Referencespecifies the driver such as JDBC driver (for JDBC) or the Data Source name (for JDBC−ODBC bridge), the user ID and the password for connecting to

View mode:

Reporting Feature

240

Page 249: JReport Designer - User Referencespecifies the driver such as JDBC driver (for JDBC) or the Data Source name (for JDBC−ODBC bridge), the user ID and the password for connecting to

For an object, whenever you set the property Suppressed or Invisible to be true, you will not view it or print it out. ForInvisible to true, JREngine generates resultset, but for Suppressed to true, JREngine does not generate the resultset. Forexample: suppose you have a summarized field (Sub−total) inserted in group footer. If you set the detail section to beInvisible, when you view the report in JReport Designer, you will not see the detail section. Click the Sub−total field, youwill see the drilldown of the detail section. But if you set the detail section to be Suppressed, you will see no drill down forthe detail section.

Label

This will be the section name for your memo. The default will be ReportHeader, you can specify another name here.

Reporting Feature

241

Page 250: JReport Designer - User Referencespecifies the driver such as JDBC driver (for JDBC) or the Data Source name (for JDBC−ODBC bridge), the user ID and the password for connecting to

Underlay

This property is used often for background picture or water mark. The default value is false, if set to true, this section willbe the background for the next section.

Design Mode:

View Mode:

Reporting Feature

242

Page 251: JReport Designer - User Referencespecifies the driver such as JDBC driver (for JDBC) or the Data Source name (for JDBC−ODBC bridge), the user ID and the password for connecting to

SuppressBlankSection

If no other objects are in this section, that is, this section is blank, then it will be suppressed. The default value for it isfalse.

FillWholePage

Lets this section extend to the bottom of this page, so that the contents in the section just below it will start from a newpage.

DB−Field

Property Name Description Editable Formula Control Data Type

General

FieldTypeDisplay the class type:DBField

N N _

DBFieldNameThe mapping name inthe catalog.

N N _

Query The query/UDS name. N N _

TableThe table name in theraw DB.

N N _

ColumnThe column name in theraw DB.

N N _

DataType

The Data type. You canchange it in theconnection node inCatalog Browser.

N N _

Geometry

X The horizontalcoordinate of the left top

Y Y (Before Pagebreak)

Float

Reporting Feature

243

Page 252: JReport Designer - User Referencespecifies the driver such as JDBC driver (for JDBC) or the Data Source name (for JDBC−ODBC bridge), the user ID and the password for connecting to

corner in a section, andcan be changed bymoving and resizing inthe Designer.

Y

The vertical coordinateof the left top corner in asection, and can bechanged by moving andresizing in the Designer.

YY (Before Pagebreak)

Float

WidthThe width of the field,and can be changed byresizing or auto−fit.

YY (Before Pagebreak)

Float

HeightThe height of the field,and can be changed byresizing or word−wrap.

YY (Before Pagebreak)

Float

Color

Background

The background color.Specify with a string like"0xff00ff" to control orselect a color from thepalette.

Y Y Sting

Foreground

The foreground color.Specify with a string like"0xff0000" to control orselect a color from thepalette.

Y Y Sting

Border

BorderWidthThe width of the border,and can be from 1 to 3.

Y N Float

BorderColor

The color of the border.Specify with a string like"0xff0000" to control orselect from the palette.

Y Y Sting

TopLine

The top border line style,can be Solid, Double,Dotted, Dashed,DashDot or None.

Y N Int

BottomLine

The bottom border linestyle, can be Solid,Double, Dotted, Dashed,DashDot or None.

Y N Int

RightLine

The right border linestyle, can be Solid,Double, Dotted, Dashed,DashDot or None.

Y N Int

LeftLine

The left border line style,can be Solid, Double,Dotted, Dashed,DashDot or None.

Y N Int

ShadowDraw the shadow if it istrue.

Y Y Boolean

ShadowColor The color for theshadow. Specify with a

Y Y Sting

Reporting Feature

244

Page 253: JReport Designer - User Referencespecifies the driver such as JDBC driver (for JDBC) or the Data Source name (for JDBC−ODBC bridge), the user ID and the password for connecting to

string like "0xff0000" orselect a color from thepalette.

Pattern

PatternColor

The color to draw thepattern. Specify with astring like "0xff0000" orselect a color from thepalette.

Y Y Sting

PatternStyle

The style to draw thepattern. They are:Vertical, Slash,Percent50, Horizontal,Hatch and None.

Y N Int

TextFormat

FontFace Font to be used. Y Y Sting

FontSize The size of the font. Y N Float

Bold Use bold fontface if true. Y Y Boolean

Italic Use italic fontface if true. Y Y Boolean

StrikeOut Mark strikeout if true. Y Y Boolean

UnderlineUnderline the contents iftrue.

Y Y Boolean

Alignment

Justification of the text inthe field box. The firstpart is for horizontaljustification (center,justify, left, right), thesecond part is for thevertical justification (top,center, bottom).Summarily they areCenterTop,CenterCenter,CenterBottom,JustifyTop,JustifyCenter,JustifyBottom, LeftTop,LeftCenter, LeftBottom,RightTop, RightCenter,and RightBottom.

Y N Int

Format*

The display format forthe field. Vary fordifferent types of data,and can be manuallydefined.

Y N String

Autofit

Adjust the widthaccording to thecontents, can beenlarged, but can not bedecreased.

YY (Before Pagebreak)

Boolean

MaxWidth Often work with theautofit property. If autofit= true, MaxWidth is not

Y N Float

Reporting Feature

245

Page 254: JReport Designer - User Referencespecifies the driver such as JDBC driver (for JDBC) or the Data Source name (for JDBC−ODBC bridge), the user ID and the password for connecting to

equal to 0, themcontents extend until thewidth is this value.Normally, also setwordwrap = true to let godownward.

WordwrapWrap the displayedcontents if true.

YY (Before Pagebreak)

Boolean

TransWhileToHtml

While exporting to htmlformat, specify whetherthe contents with thehtml key word should beescaped to normal stringinstead of the key word.

Y Y Boolean

Others

TOCAnchor

Specifies whether to addthe node that representsfor this object to the TOCtree.

Y Y Boolean

Style

Apply predefined styleslike invisible, suppressproperties to anotherDB−Field object.

Y N String

InvisibleIf true, not displayed inthe View mode.

Y Y Boolean

SuppressedIf true, not displayed inthe View mode.

Y Y Boolean

SuppressedIfNoRecords

If set to true and norecord is returned for thewhole report, the objectwill not be displayed.

Y Y Boolean

ExportToCSV*

If set to false, the objectwill not be exportedwhen exporting thereport to a csv file.

Y Y Boolean

ExportToXLS*

If set to False, thesection will not beexported when exportingthe report to Excel file.(Make sure to checkExcel2000 on the Exportto XLS dialog.)

Y Y Boolean

Link

Make a link pointing toanother report, a website or an email addressfor the DBField.

Y N String

EnableHyperlinkOnPDF Y Y Boolean

EnableHyperlinkOnExcel Y Y Boolean

EnableHyperlinkOnHTML Y Y Boolean

SuppressedIfNullIf true and the field valueis null, not displayed.

Y Y Boolean

DisplayNull If true and the field value Y Y String

Reporting Feature

246

Page 255: JReport Designer - User Referencespecifies the driver such as JDBC driver (for JDBC) or the Data Source name (for JDBC−ODBC bridge), the user ID and the password for connecting to

is null, specify what to bedisplayed.

ColumnName*To substitute the currentfield with another field.

Y N String

Format

This format is what will be displayed in the report result. In other words, no matter in what kind of format the data isstored in your database, you can specify the format to be displayed in the result. For example, for a price of Numbertype, we have the following formats for you to choose:#,####,###.##$#,##0.00...

You select it as $#,##0.00, then it displays as $6.05. You can enter manually as $#,##0.000, then the field is displayed as$6.050.

For the BigDecimal type, to avoid losing precision, you should enter a prefix JRD to set the format property value.

For more information about BigDecimal, refer to User Reference | JReport Objects | Tables/Views, Table&View Fields.

Link

This property is used to add a link to the DBField which refers to another report, a web site, or an email address. Linksthat you create in the report are available when you view the report in HTML, PDF, or Excel format.

Linking to another report

To do this, Highlight the DBField you want in the report.1. In Report Inspector, go to the Link property and click the ... button to bring out the Link dialog. 2. Select the Link To Report radio button.3. Click the Browse button to select the report to be linked.4. Build links between the two reports.5. Click OK to make the link take effect.6.

View the report, move the mouse cursor over the label, and click when the mouse cursor becomes a hand. Thelinked report will be displayed automatically.

Notes:

If Show Filtered Page is checked, the records of the linked report will be filtered and each record will bedisplayed on a new page.

Loop link is not supported, namely, if you have linked reportA to reportB, you are not allowed to linkreportB to reportA.

Reporting Feature

247

Page 256: JReport Designer - User Referencespecifies the driver such as JDBC driver (for JDBC) or the Data Source name (for JDBC−ODBC bridge), the user ID and the password for connecting to

Linking to a URL

Before linking a DBField to a URL, make sure that the selected DBField contains one of the following data: Email Address (with the value like [email protected])♦ Web site (with the value like www.jinfonet.com)♦ Company name (with the value like Jinfonet)♦

With the value of the DBField, JReport enables you to convert the values to a link of an email address or a website.

Here we take an example to add a link to a DBField which contains the email address.

Assume that the DBField Notes contains the values of email addresses, and the field is in the DetailSection of the report.

1.

Select the DBField Notes in the report, then in Report Inspector, go to the Link property, click the... button to bring out the Link dialog.

2.

Check the Link To URL radio button.

Type mailto: in the first text box, select Notes from the drop−down list in the second text box, and keepthe third text box blank. Please look at the screen shot below:

Click OK to dismiss the Link dialog.

3.

When viewing the report in HTML format, you will find the links shown as below:4.

Reporting Feature

248

Page 257: JReport Designer - User Referencespecifies the driver such as JDBC driver (for JDBC) or the Data Source name (for JDBC−ODBC bridge), the user ID and the password for connecting to

If you want to add a hyperlink such as Jinfonet web site to a DBField, and the DBField contains the data like Jinfonet,type http://www. in the first text box, select the field name in the second field, type .com in the third text box.

If the field contains data of complete URL like mailto:[email protected], http://www.jinfonet.com or FTP address, youjust need to select the field name from the drop−down list in the second text box, and leave the first and last text boxesblank.

ColumnName

Normally, you are not allowed to modify this property, we usually remove the field and insert another one directly in thereport. But if you want to substitute here, you should first go to File | Options...| Advanced tab, uncheck Forbidchanging column. Then come back to Report Inspector, select another field from the drop−down list.

Detail Section

Property Name Description EditableFormulaControl

DataType

General

ClassType Display the class type: DetailPanel. N N _

Geometry

Width The width of the section. Y N Float

Height The height of the section. Y N Float

Color

BackgroundThe background color. Use a string like "0xff00ff" to control or select acolor in the palette.

Y Y String

Others

StyleApply predefined styles for the background color, width, invisible,underlay etc. properties to another Detail section.

Y N String

Invisible If true, not displayed in the View and the Design mode. Y Y Boolean

Suppressed If true, not displayed in the View mode. Y Y Boolean

ExportToCSV*If set to false, the section will not be exported when exporting the reportto a csv file.

Y Y Boolean

ExportToXLS*If set to False, the section will not be exported when exporting the reportto Excel file. (Make sure to check Excel2000 on the Export to XLSdialog.)

Y Y Boolean

Label Display the section name in the Design mode. Y N String

OnNewPageIf the current page can’t hold the whole contents of the section, thecontents will cross the page if set true or start from a new page if setfalse.

YY (BeforePageBreak)

Boolean

Reporting Feature

249

Page 258: JReport Designer - User Referencespecifies the driver such as JDBC driver (for JDBC) or the Data Source name (for JDBC−ODBC bridge), the user ID and the password for connecting to

Underlay The section will go to the next section’s underground if set true. Thefeature works only the next section is Detail.

YY (BeforePageBreak)

Boolean

CanCrossPageIf the current page can’t hold the whole contents in the section, thecontents will cross the page if set true or start from a new page if setfalse.

YY (BeforePageBreak)

Boolean

SuppressBlankSectionIf set to true, and the section is blank (no child), then it is suppressed inthe View mode.

YY (BeforePageBreak)

Boolean

FillWholePage The next section will start from a new page if set true. YY (BeforePageBreak)

Boolean

ShowBottomLineSpecifies whether to show a line at the bottom of the section (only for theTable reports).

Y N Boolean

TileDetailSection*One page can display more than one section in a horizontal direction ifset true. You need to set detail width to 1/2 or 1/3 of the page width.

Y N Boolean

TileHorizontal*Available if the TileDetailSection property is set to true. It startsdisplaying from the row then column direction if set true.

Y N Boolean

TileDetailSection

You will find this property is useful when you are making mail−label type report to save your print papers.

You can develop your report just as blank. Then in Report Inspector, clickthe DetailPanel, change the following properties of detail section:TileDetailSection = trueWidth = *** (width of the detail section. You can set this valueaccording to the width of one column need.)

Reporting Feature

250

Page 259: JReport Designer - User Referencespecifies the driver such as JDBC driver (for JDBC) or the Data Source name (for JDBC−ODBC bridge), the user ID and the password for connecting to

TileHorizontal

After choosing TailDetailSection property, you are concerned about how to arrange them, first horizontally then verticallyor first vertically then horizontally. You can use the TileHorizontal property to adjust:

The default value is true, it displays as:1 2 34 5 67 8 910 11 12

For false, it displays as:1 5 92 6 103 7 114 8 12

The above two ways are to lay your report details. In addition to the normal vertically listed sections, we providehorizontal page break template − HBlank. You can take advantage of it. Reference Note: Tutorial | Lesson 5Developing Columnar Report.

Index

Formula

Property Name Description Editable Formula Control Data Type

General

FieldTypeDisplay the class type:Formula.

N N _

FormulaName The formula name. N N _

DataType

The Data type. You canchanged it in theconnection node inCatalog Browser.

N N _

ExpressionThe expression of theformula.

N N _

FormulaEditorTo activate the formulaeditor dialog.

Y N _

Geometry

X

The horizontalcoordinate of the left topcorner in a section andcan be changed bymoving or resizing in theDesigner.

YY (BeforePagebreak)

Float

Y

The vertical coordinateof the left top corner in asection, and can bechanged by moving orresizing in the Designer.

YY (BeforePagebreak)

Float

WidthThe width of the field,and can be changed byresizing or autofit.

YY (BeforePagebreak)

Float

Reporting Feature

251

Page 260: JReport Designer - User Referencespecifies the driver such as JDBC driver (for JDBC) or the Data Source name (for JDBC−ODBC bridge), the user ID and the password for connecting to

Height The height of the field,and can be changed byresizing or wordwrap.

YY (BeforePagebreak)

Float

Color

Background

The background color.Specify with a string like"0xff00ff" to control orselect a color from thepalette.

Y Y String

Foreground

The foreground color.Use a string like"0xff0000" to control orselect a color from thepalette.

Y Y String

Border

BorderWidthThe width of the border,and can be from 1 to 3.

Y N Float

BorderColor

The color of the border.Specify with a string like"0xff0000" to control orselect from the palette.

Y Y String

TopLine

The top border line style,can be Solid, Double,Dotted, Dashed,DashDot or None.

Y N Int

BottomLine

The bottom border linestyle, can be Solid,Double, Dotted, Dashed,DashDot or None.

Y N Int

RightLine

The right border linestyle, can be Solid,Double, Dotted, Dashed,DashDot or None.

Y N Int

LeftLine

The left border line style,can be Solid, Double,Dotted, Dashed,DashDot or None.

Y N Int

ShadowDraw the shadow if it istrue.

Y Y Boolean

ShadowColor

The used color for theshadow. Specify with astring like "0xff0000" orselect a color from thepalette.

Y Y String

Pattern

PatternColor

The color used to drawthe pattern. Specify witha string like "0xff0000"or select a color from thepalette.

Y Y String

PatternStyle The style to draw thepattern. They are:Vertical, Slash,

Y N Int

Reporting Feature

252

Page 261: JReport Designer - User Referencespecifies the driver such as JDBC driver (for JDBC) or the Data Source name (for JDBC−ODBC bridge), the user ID and the password for connecting to

Percent50, Horizontal,Hatch and None.

TextFormat

FontFace Font to be used. Y Y String

FontSize The size of the font. Y N Float

Bold Use bold fontface if true. Y Y Boolean

Italic Use italic fontface if true. Y Y Boolean

StrikeOut Mark strikeout if true. Y Y Boolean

UnderlineUnderline the contents iftrue.

Y Y Boolean

Alignment

Justification of the text inthe field box. The firstpart is for horizontaljustification (center,justify, left, right), thesecond part is for thevertical justification (top,center, bottom).Summarily they areCenterTop,CenterCenter,CenterBottom,JustifyTop,JustifyCenter,JustifyBottom, LeftTop,LeftCenter, LeftBottom,RightTop, RightCenter,and RightBottom.

Y N Int

Format*

The display format forthe field. Vary fordifferent types of data,and can be manuallydefined.

Y N String

Autofit

Adjust the widthaccording to thecontents, can beenlarged, but can not bedecreased.

YY (BeforePagebreak)

Boolean

MaxWidth

Often work with theautofit property. If autofit= true and MaxWidth isnot equal to 0, then thecontents extend until thewidith is this value.Normally, also setwordwrap = true to let godownward.

Y N Float

WordwrapWrap the displayedcontents if true.

YY (BeforePagebreak)

Boolean

TransWhileToHtml While exporting to htmlformat, specify whetherthe contents with thehtml key word should be

Y Y Boolean

Reporting Feature

253

Page 262: JReport Designer - User Referencespecifies the driver such as JDBC driver (for JDBC) or the Data Source name (for JDBC−ODBC bridge), the user ID and the password for connecting to

escaped to normal stringinstead of the key word.

Others

Style

Apply predefined styleslike invisible, suppressproperties to anotherformula object.

Y N String

InvisibleIf true, not displayedboth in the View mode.

Y Y Boolean

SuppressedIf true, not displayed inthe View mode.

Y Y Boolean

SuppressedIfNoRecords

If set to true and no isrecord returned for thewhole report, the objectwill not be displayed.

Y Y Boolean

ExportToCSV*

If set to false, the objectwill not be exportedwhen exporting thereport to a csv file.

Y Y Boolean

ExportToXLS*

If set to False, thesection will not beexported when exportingthe report to Excel file.(Make sure to checkExcel2000 on theExport to XLS dialog.)

Y Y Boolean

LinkLink to an embeddedreport.

Y N String

SuppressedIfNullIf true and the field valueis null, not displayed

Y Y Boolean

DisplayNullIf true and the field valueis null, specify what tobe displayed.

Y Y String

ColumnName*To substitute the currentformula with anotherfield.

Y N String

Format

This format is what will be displayed in the report result. In other words, no matter in what kind of format the data isstored in your database, you can specify the format to be displayed in the result. For example, for a price of Numbertype, we have the following formats for you choose:#,####,###.##$#,##0.00...

You select it as $#,##0.00, then it displays as $6.05. You can enter manually as $#,##0.000, then the field is displayed as$6.050.

For the BigDecimal type, to avoid losing precision, you should enter a prefix JRD to set the format property value.

Reporting Feature

254

Page 263: JReport Designer - User Referencespecifies the driver such as JDBC driver (for JDBC) or the Data Source name (for JDBC−ODBC bridge), the user ID and the password for connecting to

For more information about BigDecimal, refer to User Reference | JReport Objects | Tables/Views, Table&View Fields.

ColumnName

Normally, you are not allowed to modify this property, we usually remove the formula and insert another field directly inthe report. But if you want to substitute here, you should first go to File | Options ...| Advanced tab, uncheck Forbidchanging column. Then come back to Report Inspector, select another field from the drop−down list.

Group Footer Section

Property Name Description EditableFormulaControl

DataType

General

ClassType Display the class type: GroupFooterPanel. N N _

Geometry

Width The width of the section. N N _

Height The height of the section. Y N Float

Color

BackgroundThe background color. Use a string like "0xff00ff" to control or select acolor in the palette.

Y Y Sting

Others

StyleApply predefined styles like background color, width, invisible, underlayetc. properties to another Group Footer section.

Y N Sting

Invisible If true, not displayed both in the View and the Design mode. Y Y Boolean

Suppressed If true, not displayed in the View mode. Y Y Boolean

ExportToCSV*If set to false, the section will not be exported when exporting the report toa csv file.

Y Y Boolean

ExportToXLS*If set to False, the section will not be exported when exporting the reportto Excel file. (Make sure to check Excel2000 on the Export to XLS dialog.)

Y Y Boolean

Label Display the section name in the design mode. Y N String

OnNewPage if set to true, the section will start on a new page. Y

Y(beforepagebreak)

Boolean

UnderlayThe section will go to the next section’s underground on a group basis ifset true.

Y

Y(beforepagebreak)

Boolean

CanCrossPageIf the current page can’t hold the whole contents of the section, thecontents will cross the page if set true or start on a new page if set false

Y

Y(beforepagebreak)

Boolean

Reporting Feature

255

Page 264: JReport Designer - User Referencespecifies the driver such as JDBC driver (for JDBC) or the Data Source name (for JDBC−ODBC bridge), the user ID and the password for connecting to

SuppressBlankSectionIf set to true, and the section is blank (no child), then it is suppressed inthe View mode.

Y

Y(beforepagebreak)

Boolean

FillWholePage* The next section will start from a new page if set true Y

Y(beforepagebreak)

Boolean

ShowBottomLineSpecifies whether to show a line at the bottom of the section (only for theTable reports).

Y N Boolean

FillWholePage

The default value for FillWholePage is false. You set it to true for a section to make it extend until the bottom of the pageso that the section after it will start from a new page. It is often used for the Group Footer section to start a group on anew page. But you should also suppress the Report Footer section at the same time to prevent an extra empty page inthe end.

Group Header Section

Property Name Description EditableFormulaControl

DataType

General

ClassType Display the class type: GroupHeaderPanel. N N _

Geometry

Width The width of the section. N N _

Height The height of the section. Y N Float

Color

BackgroundThe background color. Use a string like "0xff00ff" to control or select acolor in the palette.

Y Y String

Others

StyleApply predefined styles like background color, width, invisible, underlayetc. properties to another Group Header section.

Y N String

Invisible If true, not displayed both in the View and the Design mode. Y Y Boolean

Suppressed If true, not displayed in the View mode. Y Y Boolean

ExportToCSV*If set to false, the section will not be exported when exporting the reportto a csv file.

Y Y Boolean

ExportToXLS*If set to False, the section will not be exported when exporting the reportto Excel file. (Make sure to check Excel2000 on the Export to XLS dialog.)

Y Y Boolean

Label Display the section name in the design mode. Y N String

OnNewPage* If set to true, the section will start on a new page. Y

Y(beforepagebreak)

Boolean

UnderlayThe section will go to the next section’s underground on a group basis ifset true.

Y

Y(beforepagebreak)

Boolean

CanCrossPage* If the current page can’t hold the whole section contents, the contents willcross the page if set true or start from a new page if set false.

Y Y(beforepage

Boolean

Reporting Feature

256

Page 265: JReport Designer - User Referencespecifies the driver such as JDBC driver (for JDBC) or the Data Source name (for JDBC−ODBC bridge), the user ID and the password for connecting to

break)

SuppressBlankSectionIf set to true, and the section is blank (no child), then it will be suppressedin the View mode.

Y

Y(beforepagebreak)

Boolean

FillWholePage* The next section will start from a new page if set true. Y

Y(beforepagebreak)

Boolean

ShowBottomLineSpecifies whether to show a line at the bottom of the section (only for theTable reports).

Y N Boolean

Repeat* The group headers are duplicated in every new page if set true. YY(beforepagebreak)

Boolean

OnNewPage

If you want each group to start on a new page, you have two approaches. One is to configure with Group Header sectionas below, the other is to set the FillWholePage property for the Group Footer section.

There is a problem when you only set OnNewPage to be true for the GroupHeader section. You will find that the firstpage has no details. JREngine starts the detail section from the second page. To solve the issue, use a formula tocontrol this property. The formula will judge that for the first group, the property is set to false, and later groups, theproperty is set to true to display on a new page. We need to write three formulas and you will also learn how to controlproperty value with a formula. However, if you feel this is too complicated, go to the Group Footer section for the secondapproach.

global:global integer i=0;

groupHD:i=i+1;

FormulaControl:@groupHD;if (i>1)return trueelsereturn false

Insert formula global into the Report Header section to assign it an initial value 0. Insert formula groupHD into the GroupHeader section so that for each group i will be calculated as i+1. Select the Group Header section and let formulaFormulaControl to control its OnNewPage property. This formula will only return true for the property if i>1.

Reporting Feature

257

Page 266: JReport Designer - User Referencespecifies the driver such as JDBC driver (for JDBC) or the Data Source name (for JDBC−ODBC bridge), the user ID and the password for connecting to

Now, let us see the first page of the report. Pay attention to the values for the first two formulas. Suppress the twoformulas if you do not want them to be shown.

CanCrossPage

The default value for CanCrossPage is false. For one detail section which spans a large space vertically to be shown inthe first page, then the default false value will make it shown in the second page. Therefore, set it to true so as to avoidthe empty first page.

Reporting Feature

258

Page 267: JReport Designer - User Referencespecifies the driver such as JDBC driver (for JDBC) or the Data Source name (for JDBC−ODBC bridge), the user ID and the password for connecting to

FillWholePage

The default value for FillWholePage is false. You set it to false for a section to make it extend until the bottom of the pageso that the section below it will start from a new page. It is often used for the Group Footer section to start a group in anew page. Please go to Group Footer section for details.

Repeat

The default value for Repeat is false. For one detail section which spans a large space vertically to be shown in severalpages, we support the Repeat property if you want to see the group header information in each page. When the Repeatproperty is set true and group headers are visible, the group headers are duplicated in every new page. The Repeatproperty is a Boolean variable and can be changed by a formula.

Notes:

One circumstance may appear. When the page split happens just in the bottom blank part of the detail section(or margins in the detail section) and the CanCrossPage property in the Detail section is set true, the output willbe: Repeated group header + a slice of blank detail section + Group footer (shown as below). It looks like thatthe repeated group headers are followed only by group footers without any detail section. In order to solve thisproblem, you can resize the detail section.

If the Repeat property is set true in both outer group header and inner group header, JReport will treat the twogroup headers as a completely repeated object.

If the outer and inner group headers are set to be one completely repeated object, then when the page can onlyhold the group headers or has no enough space for the group headers, both outer and inner group headers willnot be duplicated.

The Repeat property does not work in Subreport.•

Group Panel

Property name Description EditableFormulaControl

DataType

General

ClassType Display class type: GroupPanel. N N _

BreakBy Display the group name. N N _

GroupLayout

KeepGroupTogether* If set true, the whole group will try to keep together. Y N Boolean

RepeatWhileGF*When the Group Header is set to be repeated, specify whether the GroupHeader is still repeated if the page break happens exactly on Group Footer.

Y Y Boolean

TOC

GroupMask* Customize the group name in TOC view. Y Y String

UnderlineIf true, the group name in the TOC view will be underlined. It's used forviewing a report in DHTML format on the server side.

Y Y Boolean

Security

Grant* Specify the GroupBy field to set page level security Y N String

Cascade*If set true, the detail section as well as the group header and footer willdisplay. If set false, only the group header and footer display.

Y N Boolean

Others

Reporting Feature

259

Page 268: JReport Designer - User Referencespecifies the driver such as JDBC driver (for JDBC) or the Data Source name (for JDBC−ODBC bridge), the user ID and the password for connecting to

TOCAnchor* Specifies whether this object is shown as a node in DHTML TOC. Y Y Boolean

KeepGroupTogether

KeepGroupTogether property is commonly used. Let us see an example:

Obviously, the Group I in the above example will start on the next page due to the lack of space. But it does not looknice, so we will set the KeepGroupTogether property to true to see the result:

Reporting Feature

260

Page 269: JReport Designer - User Referencespecifies the driver such as JDBC driver (for JDBC) or the Data Source name (for JDBC−ODBC bridge), the user ID and the password for connecting to

The remaining space could not hold Group I, so it is laid out on a new page.

GroupMask

By default, the group names in TOC view display the values of the field you are grouping on. For example, you groupcustomer information in alphabetical order. When you view the report in DHTML format on the server side, you willobtain TOC as following:

Reporting Feature

261

Page 270: JReport Designer - User Referencespecifies the driver such as JDBC driver (for JDBC) or the Data Source name (for JDBC−ODBC bridge), the user ID and the password for connecting to

However, you can customize the group names with the property "GroupMask". The format of the property value is like:

xxx% or xxx%xxx%xxx, where % indicates the value of the field grouped on, which can appear one more times, at anyposition in the defined group name, xxx is the string to define the group name.

For example: Customize the group name as Group %: with the first letter % in Customer_Name, then the TOC view willbe:

Note: If you want use the sign % in text " xxx" not as the value of field, you should add escape operator −− \ before thesign %. For example, if the default name inn TOC view is "Percent =70", customize the name as "Group − %\%", then thegroup name will be "Group−70%".

Page Level Security − Grant and Cascade

Page Level Security is implemented with two security properties on the group level: Grant and Cascade. By utilizingthese two properties, you can specify which group contents should be displayed in your reports. This feature alsoapplies to the nested group. Note: You can export the report with page level security to PDF, HTML, TXT etc., but theRST format is not supported in this instance.

For example, we create a report of customer information, which is grouped by the Customers_Country field. In ReportInspector, set the Grant property to Customer_Country, Cascade to true.

Reporting Feature

262

Page 271: JReport Designer - User Referencespecifies the driver such as JDBC driver (for JDBC) or the Data Source name (for JDBC−ODBC bridge), the user ID and the password for connecting to

Then view the report. You will be prompted to input the SID ( Security Indentifier). Type USA to view the USA group.

Now the USA group displays.

Notes:

Reporting Feature

263

Page 272: JReport Designer - User Referencespecifies the driver such as JDBC driver (for JDBC) or the Data Source name (for JDBC−ODBC bridge), the user ID and the password for connecting to

The first page and last page are empty.1. If the Cascade property is set to be false, the specified group will display only its group header and footer.

After setting Cascade to be false, view the report. Only the group header displys without details.

2.

For further usage of Page Level Security, refer to User's Guide | Page Level Security.3.

RepeatWhileGF

Suppose the property Repeat is set to be True in the GroupHeader panel.

When Group Footer crosses the page and the property RepeatWhileGF is true, Group Header will be displayed as it isset to repeat.

But if you set RepeatWhileGF to be false, only Group Footer displays without Group Header.

Reporting Feature

264

Page 273: JReport Designer - User Referencespecifies the driver such as JDBC driver (for JDBC) or the Data Source name (for JDBC−ODBC bridge), the user ID and the password for connecting to

TOCAnchor

When you view your report in DHTML format on server, you can use TOC to browse the report data. By default, thenodes in TOC window includes the following objects: group panels, summaries, sub−reports, and data objects. Besides,you are allowed add your own nodes to the TOC Browser. Most objects in JReport Designer have a property calledTOCAnchor, which holds a Boolean value. If the TOCAnchor property is true, a node for this object will be added to theTOC tree. When you click such a node, the page that contains this object will be displayed in the report area. For moreinformation about DHTML TOC, please refer to the topics on DHTML in JREntServer's manual.

Image/Picture

Property Name Description EditableFormulaControl

DataType

General

ClassType Display the class type: image N N _

Geometry

XThe horizontal coordinate of the left top corner in a section. Can bechanged by the moving or resizing action in the Designer.

Y

Y(BeforePagebreak)

Float

YThe vertical coordinate of the left top corner in a section. Can bechanged by the moving or resizing action in the Designer.

Y

Y(BeforePagebreak)

Float

WidthThe width of the field. Can be changed by the resizing action in theDesigner.

Y

Y(BeforePagebreak)

Float

HeightThe height of the field. Can be changed by the resizing action in theDesigner.

Y

Y(BeforePagebreak)

Float

Others

StyleApply predefined styles like invisible, suppress, autosize properties toanother image object.

Y N String

Invisible If true, not displayed in the View mode. Y Y Boolean

Suppressed If true, not displayed in the View mode. Y Y Boolean

SuppressedIfNoRecords*If set to true and no record returned for the whole report, the object willnot be displayed.

Y Y Boolean

ExportToCSV*If set to false, the object will not be exported when exporting the reportto a csv file.

Y Y Boolean

ExportToXLS* If set to False, the section will not be exported when exporting thereport to Excel file. (Make sure to check Excel2000 on the Export toXLS dialog.)

Y Y Boolean

PictureProperty

Autosize Adjust the height and width to the real size. Y N Boolean

PictureName The picture name. N N String

Reporting Feature

265

Page 274: JReport Designer - User Referencespecifies the driver such as JDBC driver (for JDBC) or the Data Source name (for JDBC−ODBC bridge), the user ID and the password for connecting to

SuppressedIfNoRecords

The default value is false. If you set it to true and the whole report returns no record, then the image will be suppressed inthe View mode.

SuppressIfNoRecords=false:

SuppressIfNoRecords=true:

Label

Property Name Description EditableFormulaControl>

DataType

General

ClassType Display the class type: Label N N _

Geometry

XThe horizontal coordinate of the left top point of the object in a section, andcan be changed by moving resizing in the Designer.

YY (BeforePagebreak)

Float

YThe vertical coordinate of the left top point of the object in a section. Canbe changed by moving or resizing in the Designer.

YY (BeforePagebreak)

Float

Width The width of the field, and can be changed by resizing or autofit. YY (BeforePagebreak)

Float

Reporting Feature

266

Page 275: JReport Designer - User Referencespecifies the driver such as JDBC driver (for JDBC) or the Data Source name (for JDBC−ODBC bridge), the user ID and the password for connecting to

HeightThe height of the field, and can be changed by resizing or wordwrap. Y

Y (BeforePagebreak)

Float

Color

BackgroundThe background color. Specify with a string like "0xff00ff" to control orselect a color from the palette.

Y Y String

ForegroundThe foreground color. Specify with a string like "0xff0000" to control orselect a color from the palette.

Y Y String

Border

BorderWidth The width of the border, can be from 1 to 3 points. Y N Float

BorderColor*The color of the border. Specify with a string like "0xff0000" to control orselect a color from the palette. This works only if you have specified linesfor the borders.

Y Y String

TopLine*The top border line style, can be Solid, Double, Dotted, Dashed, DashDot,None.

Y N Int

BottomLineThe bottom border line style, can be Solid, Double, Dotted, Dashed,DashDot, None.

Y N Int

RightLineThe right border line style, can be Solid, Double, Dotted, Dashed, DashDot,None.

Y N Int

LeftLineThe left border line style, can be Solid, Double, Dotted, Dashed, DashDot,None.

Y N Int

Shadow* Draw the shadow if it is true. Y Y Boolean

ShadowColor*The color for the shadow. Specify with a string like "0xff0000" or select acolor from the palette.

Y Y String

Pattern

PatternColor*The color to be used to draw the pattern. Specify with a string like"0xff0000" or select a color from the palette.

Y Y String

PatternStyle*The style to draw the pattern. There are: Vertical, Slash, Percent50,Horizontal, Hatch and None.

Y N Int

TextFormat

Text The string to be displayed. Y Y String

FontFace Which font to be used. Y Y String

FontSize The size of the font Y N Float

Bold Use bold fontface if true. Y Y Boolean

Italic Use italic fontface if true. Y Y Boolean

StrikeOut Mark strikeout if true. Y Y Boolean

Underline Underline the contents if true Y Y Boolean

AlignmentJustification of the contents. The first part is for horizontal justification(center, justify, left, right), the second part is for the vertical justification(top, center, bottom).

Y N Int

Autofit*Adjust the width according to the contents, can be enlarged, but can not bedecreased.

YY (BeforePagebreak)

Boolean

MaxWidth*Work with autofit property. If autofit = true, MaxWidth is not equal to 0,them contents extend to this value. Normally, also set wordwrap = true tolet go downward.

Y N Float

Wordwrap* Wrap the displayed contents if true. YY (BeforePagebreak)

Boolean

TransWhileToHtml*While exporting to html format, specify whether the contents with the htmlkey word, should be escaped to normal string instead of the key word.

Y N Boolean

Others

Reporting Feature

267

Page 276: JReport Designer - User Referencespecifies the driver such as JDBC driver (for JDBC) or the Data Source name (for JDBC−ODBC bridge), the user ID and the password for connecting to

Style Apply predefined styles like invisible, suppress properties to another labelobject.

Y N String

Invisible If true, not displayed both in the Design and View mode. Y Y Boolean

Suppressed If true, not displayed in the View mode. Y Y Boolean

SuppressedIfNoRecordsIf set to true and no record returned for the whole report, the object will notbe displayed.

Y Y Boolean

RecordLocation* Calculation point for the properties of the label. Y N Int

ExportToCSV*If set to false, the object will not be exported when exporting the report to acsv file.

Y Y Boolean

ExportToXLS*If set to False, the section will not be exported when exporting the report toExcel file. (Make sure to check Excel2000 on the Export to XLS dialog.)

Y Y Boolean

Link*Make a link pointing to another report, a web site, or an email address forthe label.

Y N String

Sortable*Specifies whether this label object can be used to control the sorting orderof a certain column when the report is being viewed in DHTML format,works together with the BindColumn property.

Y Y Boolean

Filterable*Specifies whether this label object can be used to control the filterconditions for the report data when the report is being viewed in DHTMLformat, works together with the BindColumn property.

Y Y Boolean

BindColumnBinds the label object with a datafield so that the label object can be usedto control the data filter conditions or sorting order of this column. For theusage of this property, please refer to the properties: Sortable, Filterable.

Y N String

Border, Line and Shadow

Here is a label displayed in the view mode:

We give it the following property configurations:

TopLine: SolidBottomLine: SolidLeftLine: SolidRightLine: SolidBorderColor: 0xafafffShadow: TrueShadowColor: 0x000000PatternColor: 0x00ffffPatternStyle: Hatch

Now, it looks like:

Reporting Feature

268

Page 277: JReport Designer - User Referencespecifies the driver such as JDBC driver (for JDBC) or the Data Source name (for JDBC−ODBC bridge), the user ID and the password for connecting to

Autofit, MaxWidth, Wordwrap

Now here is another label for illustration:Label product sales by region

We want to show it as:Label productsales by region

We can set the following:Autofit: trueMaxWidth: 1Wordwrap: true.

Autofit=true lets the contents to grow horizontally but stop until the width =1. Wordwrap=true lets the remaining contentsgo downward if no space is left horizontally.

TransWhileToHtml

This property is useful for exporting the report result to html file. You may want to write the label contents the html withtags in your report, and for the exported html file, the tags will be transferred just as it is or translated into html.

For example, you'd like to export to the following report to html format:

Default TransWhileToHtml value=true

TransWhileToHtml value=false:

Reporting Feature

269

Page 278: JReport Designer - User Referencespecifies the driver such as JDBC driver (for JDBC) or the Data Source name (for JDBC−ODBC bridge), the user ID and the password for connecting to

RecordLocation

This property is to specify the calculation point for the properties of the object. Let us get familiar with it with a usefulexample:

A report specifies to display "Continued on next Page" for every page that has another following it. If this label is insertedin PageHeader/PageFooter, then every page including the last page will have it. Is there a way to write formulas that canresolve the problem? Yes.

Continue1:global boolean j=true;j=false;

Continue2:pagenumber;j=true;

Continue3:pagenumber;return j;

Insert Continue1 into Report Header, Continue2 into Report Footer. To track the calculation, you can insertContinue3 into Page Footer. If you do not want to see them in the View mode, just suppress them.

Insert label Continued on Next Page in Page Header, and use Continue3 to control its property Invisible.

Set the property RecordLocation of the above label to be page footer, so that Continue3 returns value which iscalculated in Page Footer instead of in Page Header.

Link

The property is used to add a link to the label which refers to another report, a web site or an email address. Links thatyou create in the report are available when you view the report in HTML, PDF, or Excel format.

Linking a label to another report

To do this, Highlight the label that you want in the report.1. In Report Inspector, go to the Link property, and then click the ... button to bring out the Link dialog.2. Select the Link To Report radio button.3. Click the Browse button to select the report to be linked.4.

Reporting Feature

270

Page 279: JReport Designer - User Referencespecifies the driver such as JDBC driver (for JDBC) or the Data Source name (for JDBC−ODBC bridge), the user ID and the password for connecting to

Build links between the two reports if necessary.5. Click OK to make the link take effect.6.

View the report, move the mouse cursor over the label, and click when the mouse cursor becomes a hand. Thelinked report will be displayed automatically.

Notes:

If Show Filtered Page is checked, the records of the linked report will be filtered and each record will bedisplayed on a new page.

Loop link is not supported, namely, if you have linked reportA to reportB, you are not allowed to linkreportB to reportA.

Linking a label to a URL

To do this, Highlight the label that you want in the report.1. In Report Inspector, go to the Link property, and then click the ... button to bring out the Link dialog.2. Select the Link To URL radio button.3. Type the web site or the email address in the first text box. For example, type http://www.jinfonet.com ifyou want to visit Jinfonet web site, or type mailto:[email protected] if you want to send the report toJinfonet support team.

4.

Click OK to make the link take effect.5.

View the report, move the mouse cursor over the label, and click when the mouse cursor becomes a hand. Youwill see the email box or the web site you have specified.

Sortable

When you view your report in JReport DHTML format on server, you can sort records in the data buffer on certainDBFields. You are allowed to use a label to control the sorting order for a certain column, which is to be enabled inJReport Designer by the Sortable property of the label object.

In JReport Designer, set the Sortable property of this label to True.1. Bind this label to the column on which you want to sort by setting this column as the value of the BindColumnproperty.

2.

Save and deploy the report to the server.3.

Filterable

When you view your report in JReport DHTML format on server, you can set a series of conditions and apply to aDHTML server to filter the data buffer and reproduce the report. Youu are allowed to use a label to control the filterconditions for the data, which is to be enabled in JReport Designer by the Filterable property of the label object.

In JReport Designer, set the Filterable property of this label to true.1. Bind this label to a column on which you want to filter by setting this column as the value of the BindColumnproperty.

2.

Reporting Feature

271

Page 280: JReport Designer - User Referencespecifies the driver such as JDBC driver (for JDBC) or the Data Source name (for JDBC−ODBC bridge), the user ID and the password for connecting to

Save and deploy the report to server.3. Click the button to filter the data, using the same way as the pop−up menu. And you can also get thecorresponding filtering conditions on the Filter Panel.

4.

JReport Line

To insert a line into a report,

click the Insert Line button on the Edit toolbar,• or go to the Insert menu, select Draw, and then click Line.•

JReport Line can cross sections.

Property name Description EditableFormulaControl

DataType

General

ClassType Display the class type: Line N N _

Geometry

TopAttacthPosXThe horizontal coordinate of the top left point of the line in a section, and theposition can also be changed by moving in the Design mode.

Y N Float

TopAttacthPosYThe vertical coordinate of the top left point of the line in a section, and theposition can also be changed by moving in the Design mode.

Y N Float

BottomAttachPosXThe horizontal coordinate of the bottom right point of the line in a section, andthe position can also be changed by moving in the Design mode.

Y N Float

BottomAttachPosYThe vertical coordinate of the bottom right point of the line in a section, andthe position can also be changed by moving in the Design mode.

Y N Float

Others

StyleApply predefined styles for colors, width and line style properties to the selectobject(s).

Y N String

Invisible If true, not displayed in the View mode. Y N Boolean

LineProperty

LineColor Line’s color. Y N String

LineStyle Line’s style (dash line, dot line, dashdot line and solid line). Y N Int

LineWidth Line’s thickness. Y N Float

Note: When a report is exported to html, the lines in it should be vertical or horizontal lines, otherwise they will cannot beproperly shown in the html file. That is, make sure that for the line, TopAttacthPosX = BottomAttachPosX orTopAttacthPosY= BottomAttachPosY. There is no such problem for PDF, PS, RTF and other output formats.

Reporting Feature

272

Page 281: JReport Designer - User Referencespecifies the driver such as JDBC driver (for JDBC) or the Data Source name (for JDBC−ODBC bridge), the user ID and the password for connecting to

JReport Oval

To insert an oval into a report,

click the Insert Oval button on the Edit toolbar,• or go to the Insert menu, select Draw, and then click Oval.•

JReport Oval can cross sections.

Property Name Description EditableFormulaControl

DataType

General

ClassType Display the class type: OvalShape N N _

Geometry

TopAttacthPosXThe horizontal coordinate of the top left point of the box in a section, and theposition can also be changed by moving in the Design mode.

Y N Float

TopAttacthPosYThe vertical coordinate of the top left point of the box in a section, and theposition can also be changed by moving in the Design mode.

Y N Float

BottomAttachPosXThe horizontal coordinate of the bottom right point of the box in a section,and the position can also be changed by moving in the Design mode.

Y N Float

BottomAttachPosYThe vertical coordinate of the bottom right point of the box in a section, andthe position can also be changed by moving in the Design mode.

Y N Float

Color

BackgroundThe background color inside the oval, specify with a string like "0xff00ff" tocontrol or choose a color in the palette.

Y N String

Others

Invisible Not displayed if true. Y N Boolean

BoxProperty

Bordercolor The color of the oval’s frames/borders. Y N String

BorderStyleThe style of the oval’s frames/borders (dash line, dot line, dashdot line andsolid line).

Y N Int

BorderWidth The thickness of the oval frames/borders. Y N Float

Note:

1. When you insert an oval into a report, you will notice the selected object is a box. You can control its position with thecoordinates of the top left and bottom right point of the box.

2. When a report is exported to a html or rtf format file, ovals in it can not be shown. There is no such problem for PDF,PS and other outputs.

Page Footer Section

Property Name Description EditableFormulaControl

DataType

General

Reporting Feature

273

Page 282: JReport Designer - User Referencespecifies the driver such as JDBC driver (for JDBC) or the Data Source name (for JDBC−ODBC bridge), the user ID and the password for connecting to

ClassType Display the class type: PageFooterPanel. N N _

Geometry

Width The width of the section. N N _

Height The height of the section. Y N Float

Color

BackgroundThe background color. Use a string like "0xff00ff" to control or select acolor in the palette.

Y Y String

Others

StyleApply predefined styles for the background color, width, invisible,underlay etc. properties to another PageFooter section.

Y N String

Invisible If true, not displayed both in the View and the Design mode. Y Y Boolean

Suppressed If true, not displayed in the View mode. Y Y Boolean

ExportToCSV*If set to false, the section will not be exported when exporting the reportto a csv file.

Y Y Boolean

ExportToXLS*If set to False, the section will not be exported when exporting the reportto Excel file. (Make sure to check Excel2000 on the Export to XLSdialog.)

Y Y Boolean

Label Display the section name in the design mode. Y N String

UnderlayThe section will go to the next section’s underground on a page basis ifset true.

Y Y Boolean

SuppressBlankSectionIf set to true, and the section is blank (no child), then it is suppressed inthe View mode.

Y Y Boolean

ShowBottomLineSpecifies whether to show a line at the bottom of the section (only for theTable reports).

Y N Boolean

SuppressInLastPage If set to true, Page Footer in the last page will be suppressed. Y Y Boolean

Page Header Section

PropertyName Description EditableFormulaControl

DataType

ClassType

ClassType Display the class type: PageHeaderPanel. N N _

Geometry

Width The width of the section. N N _

Height The height of the section. Y N Float

Color

BackgroundThe background color. Use a string like "0xff00ff" to control or select acolor in the palette.

Y Y String

Others

StyleApply predefined styles for background color, width, invisible, underlayetc. properties to another PageHeader section.

Y N String

Invisible If true, not displayed both in the View and the Design mode. Y Y Boolean

Suppressed If true, not displayed in the View mode. Y Y Boolean

ExportToCSV*If set to false, the section will not be exported when exporting the reportto a csv file.

Y Y Boolean

ExportToXLS*If set to False, the section will not be exported when exporting the reportto Excel file. (Make sure to check Excel2000 on the Export to XLSdialog.)

Y Y Boolean

Reporting Feature

274

Page 283: JReport Designer - User Referencespecifies the driver such as JDBC driver (for JDBC) or the Data Source name (for JDBC−ODBC bridge), the user ID and the password for connecting to

Label Display the section name in the Design mode. Y N String

UnderlayThe section will go to the next section’s underground on a page basis ifset true.

Y Y Boolean

SuppressBlankSectionIf set to true, and the section is blank (no child), then it will besuppressed in the View mode.

Y Y Boolean

ShowBottomLineSpecifies whether to show a line at the bottom of the section (only forthe Table reports).

Y N Boolean

Page Panel

Property name Description EditableFormulaControl

DataType

General

ClassType Display the class type: PagePanel. N N _

Paper

PageType Paper size: you can select A4,Letter, Legal and so on. Y N Int

Orientation Direction of the paper, you can select either portrait or landscape. Y N Int

Width The width of the page. Y N Float

HeightThe height of the page. When you key in MAX here, the height value of thepage will be Integer.MAX_VALUE which means the height of this page is set tobe the maximal value.

Y N Float

Margin

TopMargin A margin from the top of the page. Y N Float

LeftMargin A margin from the left side of the page. Y N Float

BottomMargin A margin from the bottom of the page. Y N Float

RightMargin A margin from the right side of the page. Y N Float

Instead of specifying the page setup here, you can also go to File | Page Setup menu item. Your options are reflectedboth here and in the Page Setup dialog.

Reporting Feature

275

Page 284: JReport Designer - User Referencespecifies the driver such as JDBC driver (for JDBC) or the Data Source name (for JDBC−ODBC bridge), the user ID and the password for connecting to

Parameter

Property Name Description Editable Formula Control Data Type

General

FieldTypeDisplay the class type:Parameter

N N _

ParameterName The parameter name. N N _

Default ValueThe default value for theparameter.

N N _

DataType

The Data type. You canchanged it in theconnection node inCatalog Browser.

N N _

Geometry

X

The horizontalcoordinate of the left topcorner in a section andcan be changed bymoving or resizing in theDesigner.

YY (BeforePagebreak)

Float

Y

The vertical coordinateof the left top corner in asection, and can bechanged by moving orresizing in the Designer.

YY (BeforePagebreak)

Float

WidthThe width of the field,and can be changed byresizing or autofit.

YY (BeforePagebreak)

Float

HeightThe height of the field,and can be changed byresizing or wordwrap.

YY (BeforePagebreak)

Float

Color

Background

The background color. Specify with a string like"0xff00ff" to control orselect a color from thepalette.

Y Y String

Foreground

The foreground color. Specify with a string like"0xff0000" to control orselect a color from thepalette.

Y Y String

Border

BorderWidthThe width of the border,and can be from 1 to 3.

Y N Float

BorderColor

The color of the border.Specify with a string like"0xff0000" to control orselect a color from thepalette.

Y Y String

TopLine The top border line style,can be Solid, Double,

Y N Int

Reporting Feature

276

Page 285: JReport Designer - User Referencespecifies the driver such as JDBC driver (for JDBC) or the Data Source name (for JDBC−ODBC bridge), the user ID and the password for connecting to

Dotted, Dashed,DashDot or None.

BottomLine

The bottom border linestyle, can be Solid,Double, Dotted, Dashed,DashDot or None.

Y N Int

RightLine

The right border linestyle, can be Solid,Double, Dotted, Dashed,DashDot or None.

Y N Int

LeftLine

The left border line style,can be Solid, Double,Dotted, Dashed,DashDot or None.

Y N Int

ShadowDraw the shadow if it istrue.

Y Y Boolean

ShadowColor

The color for theshadow. Specify with astring like "0xff0000" orselect a color from thepalette.

Y Y String

Pattern

PatternColor

The color used to drawthe pattern. Specify witha string like "0xff0000"or select a color from thepalette.

Y Y String

PatternStyle

The style to draw thepattern. They are:Vertical, Slash,Percent50, Horizontal,Hatch and None.

Y N Int

TextFormat

FontFace Font to be used. Y Y String

FontSize The size of the font. Y N Float

Bold Use bold fontface if true. Y Y Boolean

Italic Use italic fontface if true. Y Y Boolean

StrikeOut Mark strikeout if true. Y Y Boolean

UnderlineUnderline the contents iftrue.

Y Y Boolean

Alignment Justification of the text inthe field box. The firstpart is for horizontaljustification (center,justify, left, right), thesecond part is for thevertical justification (top,center, bottom).Summarily they areCenterTop,CenterCenter,CenterBottom,

Y N Int

Reporting Feature

277

Page 286: JReport Designer - User Referencespecifies the driver such as JDBC driver (for JDBC) or the Data Source name (for JDBC−ODBC bridge), the user ID and the password for connecting to

JustifyTop,JustifyCenter,JustifyBottom, LeftTop,LeftCenter, LeftBottom,RightTop, RightCenter,and RightBottom.

Format*

The display format forthe parameter. Vary fordifferent types of data,and can be manuallydefined.

Y N String

Autofit

Adjust the widthaccording to thecontents, can beenlarged, but can not bedecreased.

YY (BeforePagebreak)

Boolean

MaxWidth

Often work with theautofit property. Ifautofit = true andMaxWidth is not equal to0, then the contentsextend until the width isthis value. Normally,also set wordwrap = trueto let go downward.

Y N Float

WordwrapWrap the displayedcontents if true.

YY (BeforePagebreak)

Boolean

TransWhileToHtml

While exporting to htmlformat, specify whetherthe contents with thehtml key word should beescaped to normal stringinstead of the key word.

Y Y Boolean

Others

Style

Apply predefined styleslike invisible, suppressproperties to anotherparameter.

Y N String

InvisibleIf true, not displayed inthe View mode.

Y Y Boolean

SuppressedIf true, not displayed inthe View mode.

Y Y Boolean

SuppressedIfNoRecords

If set to true and norecord returned for thewhole report, the objectwill not be displayed.

Y Y Boolean

ExportToCSV*

If set to false, the objectwill not be exportedwhen exporting thereport to a csv file.

Y Y Boolean

ExportToXLS* If set to False, thesection will not beexported when exporting

Y Y Boolean

Reporting Feature

278

Page 287: JReport Designer - User Referencespecifies the driver such as JDBC driver (for JDBC) or the Data Source name (for JDBC−ODBC bridge), the user ID and the password for connecting to

the report to Excel file.(Make sure to checkExcel2000 on theExport to XLS dialog.)

LinkLink to an embeddedreport.

Y N Sting

SuppressedIfNullIf true and the field valueis null, not displayed.

Y Y Boolean

DisplayNullIf true and the field valueis null, specify what tobe displayed.

Y Y String

Parameter*To substitute the currentparameter with anotherone.

Y N String

Format

This format is what will be displayed in the report result. In other words, you can specify the format to be displayed inthe result. For example, for a price of Number type, we have the following formats for you choose:#,####,###.##$#,##0.00...

You select it as $#,##0.00, then it displays as $6.05. You can enter manually as $#,##0.000, then the field is displayedas $6.050.

Parameter

Normally, you are not allowed to modify this property, we usually remove the parameter and insert another one directly inthe report. But if you want to substitute here, you should first go to File | Options...| Advanced tab, uncheck Forbidchanging parameter. Then come back to Report Inspector, select another from the drop−down list.

Report Footer Section

Property Name Description EditableFormulaControl

DataType

General

ClassType Display the class type: ReportFooterPanel N N _

Geometry

Width The width of the section. N N _

Height The height of the section. Y N Float

Color

BackgroundThe background color. Use a string like "0xff00ff" to control or select inthe palette.

Y Y String

Others

StyleApply predefined styles for fonts, colors, alignments and other propertiesto the select object(s).

Y N String

Invisible If true, don’t display the section both in the view and the design mode. Y Y Boolean

Suppressed If true, don’t display the section in the view mode. Y Y Boolean

Label Display the section name in the design mode. Y N String

Reporting Feature

279

Page 288: JReport Designer - User Referencespecifies the driver such as JDBC driver (for JDBC) or the Data Source name (for JDBC−ODBC bridge), the user ID and the password for connecting to

OnNewPageStart a new page to display this section if set true. Y

Y (BeforePageBreak)

Boolean

UnderlayThe section will go to next section’s (except pageheader and pagefooter)underground if set true.

YY (BeforePageBreak)

Boolean

CanCrossPageIf the current page can’t hold the whole section, it will continue displayingthe section and cross the page if true, or start from a new page if false.

YY (BeforePageBreak)

Boolean

SuppressBlankSection Don’t display the section if it is blank (no child) and set true. YY (BeforePageBreak)

Boolean

FillWholePageThe next section (except pageheader and pagefooter) will start from anew page if true

YY (BeforePageBreak)

Boolean

ToBottomIf true, the Report Footer in the last page will display at the bottom of thepage.

Y Y Boolean

ShowBottomLineSpecifies whether to show a line at the bottom of the section (only for theTable reports).

Y N Boolean

The properties listed here share the same functionality and usage of those of Report Header, please refer to the ReportHeader section.

Data Source

Property Name Description EditableFormulaControl

DataType

General

ClassType Display the class type for the object: DataSource. N N _

Others

QueryName Display the query or UDS name. N N _

QueryEditorClick...on the right of the field to activate the query editor dialog. (Only forthe query not for the UDS)

Y N _

Report Header Section

Property Name Description EditableFormulaControl

DataType

General

ClassType Display the Class Type: ReportHeaderPanel N N _

Geometry

Width The width of the section. N N _

Height The height of the section Y N float

Color

BackgroundThe background color. Use a string like "0xff00ff" to control or select inthe palette.

Y Y String

Others

Style *Apply predefined styles for fonts, colors, alignments and other propertiesto the selected object(s).

Y N String

Invisible * If true, don’t display the section both in the view and the design mode. Y Y Boolean

Suppressed * If true, don’t display the section in the view mode. Y Y Boolean

Label* Display the section name in the design mode. Y N String

OnNewPage Start a new page to display this section if set true. YY (BeforePageBreak)

Boolean

Reporting Feature

280

Page 289: JReport Designer - User Referencespecifies the driver such as JDBC driver (for JDBC) or the Data Source name (for JDBC−ODBC bridge), the user ID and the password for connecting to

Underlay* The section will go to next section’s (except pageheader and pagefooter)underground if set true

YY (BeforePageBreak)

Boolean

CanCrossPageIf the current page can’t hold the whole section contents, it will continuedisplaying the section and cross the page if set true or start new page ifset false

YY (BeforePageBreak)

Boolean

SuppressBlankSection* Don’t display the section if it is blank (no child) and set true. YY (BeforePageBreak)

Boolean

FillWholePage*The next section (except pageheader and pagefooter) will start from anew page if set true.

YY (BeforePageBreak)

Boolean

ShowBottomLineSpecifies whether to show a line at the bottom of the section (only for theTable reports).

Y N Boolean

Many of the properties listed here are commonly used, and you will encounter them for other sections or objects. We willgive you a detailed description of them.

Style

JReport Designer provides the style format painter, so that you can copy object and section formats. In other words, youcan apply the formatting very easily to the objects without having to define again. The style includes fonts, colors,alignments.

To do so,

In the design mode, select the object of which you want to save the style. Right click your mouse, select SaveStyle item in the menu.

1.

Reporting Feature

281

Page 290: JReport Designer - User Referencespecifies the driver such as JDBC driver (for JDBC) or the Data Source name (for JDBC−ODBC bridge), the user ID and the password for connecting to

The Save Style dialog will pop up. Give the style name for your memo in the Label Style Name. Select theproperties you want to save in the All properties panel and click the arrow to add into the Selected propertiespanel. You can also edit the selected properties here.

2.

Reporting Feature

282

Page 291: JReport Designer - User Referencespecifies the driver such as JDBC driver (for JDBC) or the Data Source name (for JDBC−ODBC bridge), the user ID and the password for connecting to

Click on the Save button, and next time when you want to use the style, you can do as follows:3.

The format of the selected object will be changed:4.

Reporting Feature

283

Page 292: JReport Designer - User Referencespecifies the driver such as JDBC driver (for JDBC) or the Data Source name (for JDBC−ODBC bridge), the user ID and the password for connecting to

The above example is for an object, but for a section it is the same. You need to first select a section and save its styleand then apply it to another section. But most often, we use this for an object.

Invisible

As the name suggests, it is to hide/show the section. The default value is false to show this section, but you set it to true,then this section will be hidden both in the design mode and view mode. You can in this case, go to Report Inspector andset it back to false to show it again. Compare it with Suppressed property.

Reporting Feature

284

Page 293: JReport Designer - User Referencespecifies the driver such as JDBC driver (for JDBC) or the Data Source name (for JDBC−ODBC bridge), the user ID and the password for connecting to

Suppressed

The default value for the Suppressed property is false, so that you can view this section both in the view mode anddesign mode. But if true, this section will be hidden in the view mode. Note the difference from the Invisible property.

Design Mode

Reporting Feature

285

Page 294: JReport Designer - User Referencespecifies the driver such as JDBC driver (for JDBC) or the Data Source name (for JDBC−ODBC bridge), the user ID and the password for connecting to

View mode:

Reporting Feature

286

Page 295: JReport Designer - User Referencespecifies the driver such as JDBC driver (for JDBC) or the Data Source name (for JDBC−ODBC bridge), the user ID and the password for connecting to

For an object, whenever you set the property Suppressed or Invisible to be true, you will not view it or print it out. ForInvisible to true, JREngine generates resultset, but for Suppressed to true, JREngine does not generate the resultset. Forexample: suppose you have a summarized field (Sub−total) inserted in group footer. If you set the detail section to beInvisible, when you view the report in JReport Designer, you will not see the detail section. Click the Sub−total field, youwill see the drilldown of the detail section. But if you set the detail section to be Suppressed, you will see no drill down forthe detail section.

Label

This will be the section name for your memo. The default will be ReportHeader, you can specify another name here.

Reporting Feature

287

Page 296: JReport Designer - User Referencespecifies the driver such as JDBC driver (for JDBC) or the Data Source name (for JDBC−ODBC bridge), the user ID and the password for connecting to

Underlay

This property is used often for background picture or water mark. The default value is false, if set to true, this section willbe the background for the next section.

Design Mode:

View Mode:

Reporting Feature

288

Page 297: JReport Designer - User Referencespecifies the driver such as JDBC driver (for JDBC) or the Data Source name (for JDBC−ODBC bridge), the user ID and the password for connecting to

SuppressBlankSection

If no other objects are in this section, that is, this section is blank, then it will be suppressed. The default value for it isfalse.

FillWholePage

Lets this section extend to the bottom of this page, so that the contents in the section just below it will start from a newpage.

Report Panel

Property Name Description EditableFormulaControl

DataType

General

ClassType Display the class type for the object: Report. N N _

DataBuffer

RecordsPerPage* Set the number of records in each page in the data buffer. Y N _

MaxPageNumber* Set the maximum number of pages in the date buffer. Y N _

ResultBuffer

ResultBufferSize* Set the size of the result buffer to store report result. Y Y _

Others

DataDriver* Set cached query result file or report result file as the data resource. Y N String

MaxRecordsSet maximum record number you want to display for the wholereport. Default −1 is to display all the records.

Y N Int

NationlLanguageSupport*To bind with different language properties file to display specifiedlabel string if set true, and only for label field.

Y N Boolean

AppletWidth* Set Applet width for the exported applet to be run in a web server. Y N Float

AppletHeight* Set Applet height for running in a web server. Y N Float

Reporting Feature

289

Page 298: JReport Designer - User Referencespecifies the driver such as JDBC driver (for JDBC) or the Data Source name (for JDBC−ODBC bridge), the user ID and the password for connecting to

PageBackground Set report background color. Y N String

BeforeRun*Exit function usage. You can run an external application file (javaclass file) before report running.

Y N String

AfterRun*Exit function usage. You can run an external application file (javaclass file) just after the report result is run out.

Y N String

AfterInitParameter*Exit function usage. You can run an external application file (javaclass file) after report parameters are initiated.

Y N String

ZipResult Exported rst file will be compressed if set true. Y N Boolean

showsubHeaderFooter*Display subreport PageHeader and PageFooter information in mainreport (in page level) if set true.

Y Y Boolean

ImportParamValues*The class name with the full package name for importing parametervalues.

Y N String

ParaListAutoSpecify to get parameter default values whether from the specifiedclass or from values defined in Catalog.

Y N Boolean

EmbeddedFonts*Specify the true type fonts that have been used in the report. NOTE: This property is only for exporting PDF files.

Y N String

StyleGroup Specifies a style group for the report. Y N String

TOC

RootLabel Specify the name for the TOC root label. Y N String

Excel

ExcelBufferSize*Specifies the size of the Excel buffer to store excel format reportresult.

Y Y _

RowsPerSheet*Specifies the maximal number of rows for every worksheet whenexporting to Excel.

Y Y Integer

ColumnWidthList* Specifies the width for columns, measured in characters. Y N Integer

FastPass

Improves the performance of the engine when runs the report toCSV format on JReport Enterprise Sever if its value is true. Pleasenote that only when the property Columned is true, this propertycan be true.

Y N Boolean

Columned

Improves the performance when exporting the report to CSV formator Excel format if its value is true, and in this case, users can definethe position of the object in the CSV format file or Excel format bysetting the values of ColumnIndex and RowIndex.

Y N Boolean

Setup Callback or Exit Functions

The report file is there, and you will run it to get the data binding. During the actual running, displaying of the report isdone by JReport engine. You have no control over this. However the JReport functionality allows you to interact with thismechanism at 3 points:

After the parameter is initiated.• Just at the point JReport engine is about to run the report. If you have parameters, the parameter so far hasbeen initiated, and you have given the parameter value.

Immediately after JReport engine has run out the report result.•

At any or all of these three points you have the option of executing a class of your choice. JReport has developed threeexit functions for you: BeforeRun, AfterInitParameter and AfterRun. These functions enable you to develop an action tobe called before, after or during the process of running the report. Your applications will return true or false. For true,JReport Engine will go on running. For false, JReport Engine will stop there.

Reporting Feature

290

Page 299: JReport Designer - User Referencespecifies the driver such as JDBC driver (for JDBC) or the Data Source name (for JDBC−ODBC bridge), the user ID and the password for connecting to

Exec Interfaces

JReport Designer provides three interfaces for you to implement:

jet.util.JURLExecuter, it provides a method public boolean exec(String[] params) which throwsJURLExecuterException to get the status for JReport engine.

PARAMETER:params − Array of strings, whose elements are defined by yourself and also parsed by yourself. You areallowed to enter the PARAMETERs in Report Inspector. If no PARAMETER is entered, theparams.length is zero.

Return: A boolean value. If true, JReport engine will continue running. If false, JReport engine will stopthere.

jet.util.JURLEngineExecuter, it provides a method public boolean exec(String[] params,EngineExecutor executor) which throws JURLExecutorException to get the status for JReport engine.

PARAMETER:params − Array of strings, whose elements are defined by yourself and also parsed by yourself. You areallowed to enter the PARAMETERs in Report Inspector. If no PARAMETERs are entered, theparams.length is zero.executer − Executer is of EngineExecuter which is another interface provided to you for exporting reportto HTML, TXT or PDF format within the exit functions. See below.

Return: A boolean value. If true, JReport engine will continue running. If false, JReport engine will stopthere.

jet.util.EngineExecuter provides three methods: •

public boolean exportToHtml( String htmlFileName, boolean bChartApplet, booleanisMultiFile, boolean bUsingTable, boolean bHyperlink, boolean bPageNum, booleanbAbsolute, int iBrowser );

exports the report result to the HTML format.

Parameters:HtmlFileName − Name of the HTML format result file with full path.bChartApplet − A boolean value indicates whether the chart in html file is an applet.isMultiFile − A boolean value indicates whether the html is generated to one file or to multiple files.bUsingTable − A boolean value indicates whether to use html table format for exporting html files.bHyperLink − A boolean value indicates whether to generate hyperlinks.bPageNum − A boolean value indicates whether to generate page number.bAbsolute − A boolean value indicates if the font size is absolute or relative.iBrowser − A int value indicates whether the html browser is IE or NETSCAPE.

Return: A boolean value for the exporting status. If true, it means that the report has been successfullyexported; vice versa.

public boolean exportToPdf( String pdfFileName)

exports the report result to the PDF format.

Parameter:PdfFileName − The name of the PDF format result file with full path.

Return: A boolean value for the exporting status. If true, it means that the report has been successfullyexported; vice versa.

public boolean exportToText( String textFileName, boolean isNormalText, booleanisRepeat, char delimiter)

exports the report result to the TXT format.

Reporting Feature

291

Page 300: JReport Designer - User Referencespecifies the driver such as JDBC driver (for JDBC) or the Data Source name (for JDBC−ODBC bridge), the user ID and the password for connecting to

Parameters:TextFileName − Name of the TEXT format result file with full path, "true/false" is to set whether this textfile is a normal text format or a Standard Data Format (the standard data format text file is the text filethat each row of it represents each record in the report. It can be used as a text data source to exchangedata with other application).isNormalText − A boolean value indicates whether this text file is a normal text format or not.isRepeat − A boolean value indicates whether the same contents are repeated.delimiter − A character which will be used in SDF (Standard Data Format) format. The delimiter will beused only when the "true/false" parameter is set to be false. A delimiter could be a ',' (the CSV format) orany other characters. The default is ' ' (a blank), that is, the SSV format.

Return: A boolean value for the exporting status. If true, it means that the report has been successfullyexported; vice versa.

Reference Note : Please refer to the JReport Javadoc jet.util package: JURLExecutor, JURLEngineExecutor andEngineExecutor interfaces. The most updated Javadoc is available on our Web site athttp://www.jinfonet.com/webpage/kbase/kbase.htm.

Exit Functions Case

Reference Note: You may start off with a simple example of using exit function. Please Refer to User's Guide | ExitFunction.

Applet Setting

Reports are developed with JReport Designer and saved as .cls file. Deploy report files and their associated resourcefiles (.cat and .fml file) to JReport Enterprise Server to run the reports in the server/client mode. Once the reportrepository is properly setup, it can be accessed using any web browser, JReport viewer or client viewer bean. Or you canchoose to export the report result to printer, pdf, text, and more.

If the report result is specified to be transferred and viewed in the format of applet, you can change the display area byinputting the correct number in Report Inspector. Alternatively, you can edit the applet file directly in a text editor.

AppletHeight: It refers to the height of the applet. • AppletWidth: It refers to the width of the applet.•

Reference Note: User's Guide | Exporting Report Result.

ColumnWidthList

Specifies the width for columns, measured in characters. Type the width for the columns in turn, using semicolon (;) toseparate each value. If you don't want to specify the width for a certain column, omit the value, JReport will use thedefault value, which is 8, for that column.

This property takes effect only when the Columned property is set to True.

For example, the value list 12;15;;20 makes the first column width 12, the second 15, the third 8, which is the defaultvalue, and the fourth 20.

Data Driver

This property is usually for our internal use. When you have problems with your report, we need to run it and reproducethe problem so that we can fix it. Sometimes, the database is too large to send to us. If this property is correctly input,then JReport engine will choose that query file to view the report instead of using JDBC driver or User Data Source toview the report .

Reporting Feature

292

Page 301: JReport Designer - User Referencespecifies the driver such as JDBC driver (for JDBC) or the Data Source name (for JDBC−ODBC bridge), the user ID and the password for connecting to

To generate the cached query result, in catalog browser, right click on the query of your report, click Creating CachedQuery Result, you can specify the folder and file name with or without extension (.txt). The file and additional .desc arethere.

The input format for cached query result is:jrquery:/jet.universe.resultfile.UResultFileResultSet;Fullpath of cached query result.The input format for report result file is:jrquery:/jet.universe.resultfile.RResultFileResultSet;Fullpath of report result file.

National Language Support

JReport is proud to announce the national language support for static label field. In other words, set the property to trueand save your report to generate the property (say ReportName_en.properties) file. Modify the label display string to thelanguage you would like and specify the encoding in the property file, save it as another ReportName_de.properties.Then run your report, all the labels concerned will be the string you just entered in the new property file. In addition, theformat for other fields is automatically changed to the encoding−related format.

Reference Note: User's Guide | National Language Support

ImportParamValues

This property is for importing parameter values, so that you have a number of default parameter values to choose whenyou view the report.Reference Note: User's Guide | JReport Parameter and its Applications | Importing Parameter Values

showsubHeaderFooter

Usually, the PageHeader/PageFooter sections of subreport can not be shown. Set the showsubHeaderFooter property totrue to display PageHeader/PageFooter in the main report.

Data Buffer

You can improve the report performance by setting data buffer size. By default, the size of data buffer is 2M. When dataexceeds the default size, they will be written on the disk, which will surely slow down the data processing. However, youmay have enough memory which is much larger than the default buffer size, to use the computer efficiently to achieve abetter performance, JReport enables you to set data buffer size by specifying two properties of Report Panel:RecordsPerPage and MaxPageNumber.

When a buffer is defined, we divide it into many pages and allocate records to be stored in the pages. Data will betransferred with the unit of page. The data buffer size is determined by values of maximum number of pages in the bufferand the number of records in every page. The default max. page number in the data buffer is 500, page size is 4k (Pagesize = record size * RecordsPerPage/1024; Buffer size = Page size * MaxPageNumber).

For example:There are 10000 records in a report, and RecordSize is 574 Byte, you can set RecordPerPage to 10000,MaxPageNumber aroud 10.

Reporting Feature

293

Page 302: JReport Designer - User Referencespecifies the driver such as JDBC driver (for JDBC) or the Data Source name (for JDBC−ODBC bridge), the user ID and the password for connecting to

The value of MaxPageMumber should be changed based on different reports. Generally speaking, it can be from 1 to 50.

The data buffer information can be get by clicking the Edit menu and selecting Data Buffer Information.

Notes:

The property should be set according to the different databases, say that different databases should havedifferent configurations of data buffer.

If the report runs in another different environment, the property should be specified again.• If the report contains subreports, the data buffer for subreports should also be configured to get betterperformance.

As tested, if enough physical memory is available, and you have known Total Record Number, to achieve abetter performance, you can set RecordPerPage approximate to Total Record Number. MaxPageNumber isbased on different reports, it should not be very large.

The size of Data Buffer should be less than the available physical memory.• The Heap Size should be set when your data buffer is quite large. For example, the physical memory is 512M.You can set −Xmx480M in the file %installroot%\bin\JReport.bat which you use to start up JReport Designer.

Result Buffer

The result buffer is used to store the report result in pages which one report contains. Its default size is 4 which indicates4 pages of the report result are allocated to the result buffer, other pages will be stored on disk. If you have enoughmemory,to get better performance, you can increase the result buffer size to store more pages of report result.

Excel Buffer

The Excel buffer is used to store the report result in excel buffer sheets when exporting to Excel format. Its default size is1, which indicates 1 sheet of the report result are allocated to the result buffer; other sheets will be stored on disk. If youhave enough memory,to get better performance, you can increase the Excel buffer size to store more sheets of excelformat report result.

Reporting Feature

294

Page 303: JReport Designer - User Referencespecifies the driver such as JDBC driver (for JDBC) or the Data Source name (for JDBC−ODBC bridge), the user ID and the password for connecting to

RowsPerSheet

The RowsPerSheet (added since build 600) is used to control the maximal number of rows in every worksheet in theexported Excel report. The default value is −1, which means a maximal number of 65000 rows is allowed in a singleworksheet. The value range is 0 ~ 65000, values out of this range will be considered as 65000.

EmbeddedFonts

Beginning with build 569, you can use true type fonts in a report and display it correctly in the exported PDF files. Pleasefollow the steps blow:

Copy the True Type Font files * .ttf from system's Font directory to the Font subdirectory of JReport Designer.1. Select a Label or DBField in the report, and then specify the true type font you want from the FontEditor drop−down list.

2.

Launch Report Inspector, in the above pane, click the name of the report. On the Properties tab, click theEmbeddedFonts property. Select all true type fonts from the drop−down list, because only the true type fontsthat have been used in this report will be shown here. Use the Ctrl or Shift key to select multiple items. Save thereport.

3.

Reporting Feature

295

Page 304: JReport Designer - User Referencespecifies the driver such as JDBC driver (for JDBC) or the Data Source name (for JDBC−ODBC bridge), the user ID and the password for connecting to

Export the report to PDF format. You will find that the true type fonts can be displayed correctly in the exportedPDF files.

Reference Note: JReport Designer Manual | User's Guide | True Type Font

4.

Reporting Feature

296

Page 305: JReport Designer - User Referencespecifies the driver such as JDBC driver (for JDBC) or the Data Source name (for JDBC−ODBC bridge), the user ID and the password for connecting to

RootLabel

National Language Support is available for this property. To use other languages, you should setNationlLanguageSupport property to true, save NLS. After that, modify the corresponding .properties file to specifycorrect language, region, and encoding information. Finally, restart JReport Designer and export the report to PDF filewith TOC option selected.

Reference Note: JReport Designer Manual | User's Guide | National Language Support

JReport Round Box

To insert a round box into a report,

click the Insert RoundBox button on the Edit toolbar, • or go to the Insert, select Draw, and then click RoundBox.•

JReport round box can cross sections.

Property name Description EditableFormulaControl

DataType

General

ClassType Display the class type: RoundBoxShape N N _

Geometry

TopAttacthPosXThe horizontal coordinate of the top left point of the box in a section, and theposition can also be changed by moving in the Design mode.

Y N Float

TopAttacthPosYThe vertical coordinate of the top left point of the box in a section, and theposition can also be changed by moving in the Design mode.

Y N Float

BottomAttachPosXThe horizontal coordinate of the bottom right point of the box in a section, andthe position can also be changed by moving in the Design mode.

Y N Float

BottomAttachPosYThe vertical coordinate of the bottom right point of the box in a section, andthe position can also be changed by moving in the Design mode.

Y N Float

Color

BackgroundThe background color inside the round box, specify with a string like "0xff00ff"to control or choose a color in the palette.

Y N String

Others

Invisible Not displayed if true. Y N Boolean

BoxProperty

Bordercolor Frames/borders color. Y N String

BorderStyle Frames/borders style (dash line, dot line, dashdot line and solid line). Y N Int

BorderWidth Frames/borders thickness. Y N Float

Note:

1. When you insert a round box into a report, you will notice the selected object is a box. You can control its position withthe coordinates of the top left and bottom right point of the box.

Reporting Feature

297

Page 306: JReport Designer - User Referencespecifies the driver such as JDBC driver (for JDBC) or the Data Source name (for JDBC−ODBC bridge), the user ID and the password for connecting to

2. When a report is exported to a html or PS format file, round boxes in it cannot be shown. There is no such problem forPDF, RTF and other outputs.

Index

Special Field

Special fields include User Name, Print Date, Print Time, Fetch Date, Fetch Time, Modified Date, Modified Time, RecordNumber, Group Name, Group Number, Total Group Number, Page Number, Total Page Number etc.

Property Name Description Editable Formula Control Data Type

General

ClassTypeDisplay the class type:Special Fields

N N _

Geometry

X

The horizontal coordinateof the left top corner in asection and can bechanged by moving orresizing in the Designer.

YY (Before Pagebreak)

Float

Y

The vertical coordinate ofthe left top corner in asection, and can bechanged by moving orresizing in the Designer.

YY (Before Pagebreak)

Float

WidthThe width of the field, andcan be changed byresizing or auto−fit.

YY (Before Pagebreak)

Float

HeightThe height of the field,and can be changed byresizing or word−wrap.

YY (Before Pagebreak)

Float

Color

Background

The background color.Specify with a string like"0xff00ff" to control orselect a color from thepalette.

Y Y String

Foreground

The foreground color.Specify with a string like"0xff0000" to control orselect a color from thepalette.

Y Y String

Border

BorderWidthThe width of the border,and can be from 1 to 3.

Y N Float

BorderColor

The color of the border.Specify with a string like"0xff0000" to control orselect from the palette.

Y Y String

TopLine The top border line style,can be Solid, Double,Dotted, Dashed, DashDot

Y N Int

Reporting Feature

298

Page 307: JReport Designer - User Referencespecifies the driver such as JDBC driver (for JDBC) or the Data Source name (for JDBC−ODBC bridge), the user ID and the password for connecting to

or None.

BottomLine

The bottom border linestyle, can be Solid,Double, Dotted, Dashed,DashDot or None.

Y N Int

RightLine

The right border line style,can be Solid, Double,Dotted, Dashed, DashDotor None.

Y N Int

LeftLine

The left border line style,can be Solid, Double,Dotted, Dashed, DashDotor None.

Y N Int

ShadowDraw the shadow if it istrue.

Y Y Boolean

ShadowColor

The used color for theshadow. Use a string like"0xff0000" or select acolor from the palette.

Y Y String

Pattern

PatternColor

The color used to drawthe pattern. Specify with astring like "0xff0000" orselect a color from thepalette.

Y Y String

PatternStyle

The style to draw thepattern. They are:Vertical, Slash,Percent50, Horizontal,Hatch and None.

Y N Int

TextFormat

FontFace Font to be used. Y Y String

FontSize The size of the font. Y N Float

Bold Use bold font−face if true. Y Y Boolean

Italic Use italic font−face if true. Y Y Boolean

StrikeOut Mark strikeout if true. Y Y Boolean

UnderlineUnderline the contents iftrue.

Y Y Boolean

Alignment Justification of the text inthe field box. The first partis for horizontaljustification (center, justify,left, right), the second partis for the verticaljustification (top, center,bottom). Summarily theyare CenterTop,CenterCenter,CenterBottom, JustifyTop,JustifyCenter,JustifyBottom, LeftTop,LeftCenter, LeftBottom,

Y N Int

Reporting Feature

299

Page 308: JReport Designer - User Referencespecifies the driver such as JDBC driver (for JDBC) or the Data Source name (for JDBC−ODBC bridge), the user ID and the password for connecting to

RightTop, RightCenterand RightBottom.

Format

The display format for thefield. Varies for differenttypes of data, and can bemanually defined.

Y N String

AutofitAdjust the width accordingto the contents, can beenlarged.

YY (Before Pagebreak)

Boolean

MaxWidth

Often work with theauto−fit property. Ifauto−fit = true, Max Widthis not equal to 0, thencontents extend until thewidth is this value.Normally, also setword−wrap = true to let godownward.

Y N Float

WordwrapWrap the displayedcontents if true.

YY (Before Pagebreak)

Boolean

TransWhileToHtml

While exporting to htmlformat, specify whetherthe contents with the htmlkey word should beescaped to normal stringinstead of the key word.

Y Y Boolean

Others

Style

Apply predefined styleslike invisible, suppressproperties to anotherDB−Field object.

Y N String

InvisibleNot displayed and nospace taken if true.

Y Y Boolean

SuppressedNot displayed but leavethe place if true.

Y Y Boolean

ExportToCSV*

If set to false, the objectwill not be exported whenexporting the report to acsv file.

Y Y Boolean

ExportToXLS*

If set to False, the sectionwill not be exported whenexporting the report toExcel file. (Make sure tocheck Excel2000 on theExport to XLS dialog.)

Y Y Boolean

LinkLink to an embeddedreport.

Y N String

FieldTypeTo substitute the currentspecial field with anotherone.

Y N Int

Reporting Feature

300

Page 309: JReport Designer - User Referencespecifies the driver such as JDBC driver (for JDBC) or the Data Source name (for JDBC−ODBC bridge), the user ID and the password for connecting to

Sub−report

When you insert report A into report B, then report A is called the sub−report, and B is the main/primary report.

Property Name Description EditableFormulaControl

DataType

General

ClassType Display the class type: Sub−report N N _

Geometry

XThe horizontal coordinate of the left top corner in a section, and can bechanged by moving or resizing in the Designer.

Y N Float

YThe vertical coordinate of the left top corner in a section, and can bechanged by moving, resizing in the Designer.

Y N Float

Width The width of the field, can be changed by resizing. Y N Float

Height The height of the field, can be changed by resizing. Y N Float

Color

BackgroundThe background color. Specify with a string like "0xff00ff" to control orselect a color from the palette.

Y Y Sting

Others

TOCAnchorSpecifies whether to add the node that represents for this object to theTOC tree.

Y Y Boolean

StyleApply predefined styles like invisible, suppress properties to anothersub−report.

Y N String

Invisible Do not display the object if true (but occupy the place). Y Y Boolean

Suppressed Do not display the object if true (do not occupy the place). Y Y Boolean

SuppressedIfNoRecordsIf there is no record returned for the main report, when it is true, thesub−report will be suppressed.

Y Y Boolean

ExportToCSV*If set to false, the object will not be exported when exporting the reportto a csv file.

Y Y Boolean

ExportToXLS*If set to False, the section will not be exported when exporting thereport to Excel file. (Make sure to check Excel2000 on the Export toXLS dialog.)

Y Y Boolean

SuppressedEmptyIf there is no record returned for the sub−report, when it is true, thesub−report will be suppressed.

Y N Boolean

Embedded*Specify whether the inserted sub−report is an object or a embeddedsub−report

Y Y Boolean

CacheSpecifies whether to cache the sub−report data buffer to improve theperformance of the engine.

Y Y Boolean

RecPerPage Sets the number of records in each page in the data buffer. Y Y _

MaxPageNum Sets the maximum number of pages in the data buffer. Y Y _

SRSourceNameDisplays the name of the data source used by the sub−report. If nothingis displayed, the Default data source is used.

N N Sring

SRQueryName Displays the name of the query used by the sub−report. N N String

SRSecurityDisplays the security name (record level security) used by thesub−report.

N N String

Excel

ColumnIndexSpecifies the X coordinate of the selected object in the exported XLSfile, measured in cells.

Y N Integer

RowIndex Y N Integer

Reporting Feature

301

Page 310: JReport Designer - User Referencespecifies the driver such as JDBC driver (for JDBC) or the Data Source name (for JDBC−ODBC bridge), the user ID and the password for connecting to

Specifies the Y coordinate of the selected object in the exported XLSfile, measured in cells.

Embedded

The default value is false which means the sub−report is inserted as an object, the section properties used to controlpage break in the sub−reports such as FillWholePage, OnNewPage, UnderLay, KeepGroupTogether, CanCrossPage,etc. do not work, and the properties cannot be controlled by formulae. Set the Embedded property to be true, thesub−report will work as an actual report. For details, refer to User's Guide | Editing a Report | Sub−report, EmbeddedSub−report and Chart.

Cache

In a report, when the sub−report needs to be run more than once, set the property Cache to true, the data of thesub−report will be cached in the data buffer, when the sub−report is run the next time, the sub−engine will get the datafrom the data buffer instead of DBMS, and if sub−link exists, it will also be calculated in the data buffer, thus theperformance of the engine is improved.

When a data buffer is defined in the sub−engine, the data buffer is divided into many pages and records are allocated inthe pages. You can use the properties RecPerPage and MaxPageNum to set the number of the records in one page andthe maximum number of pages in the data buffer. If enough physical memory is available and you know the total recordnumber of the sub−report, to achieve a better performance, you can set RecPerPage approximate to the total recordnumber.

Note: The Cache property can not work in the following cases:

when the parameter displayed on the Parameters in subreport tab is contained in the query of the sub−report;• when HDS is used by the sub−report;• when dynamic query is used by the sub−report.•

Summary

Property Name Description Editable Formula Control Data Type

General

FieldTypeDisplay the class type:Summary.

N N _

SummaryName The summary name. N N _

SummaryFunction

The function of the summary.The function can be Sum,Count, DistinctCount,Average, Maximum,Minimum, PopulationStdDev,PopulationVariance, StdDev,Variance etc.

N N _

SummaryOnThe field name that thesummary field performs thefunction on.

N N _

BreakField

The level that the summarywill be performed at:summary for each group,each page, or the wholereport.

N N _

Geometry

Reporting Feature

302

Page 311: JReport Designer - User Referencespecifies the driver such as JDBC driver (for JDBC) or the Data Source name (for JDBC−ODBC bridge), the user ID and the password for connecting to

X The horizontal coordinate ofthe left top corner in asection and can be changedby moving or resizing in theDesigner.

YY (BeforePagebreak)

Float

Y

The vertical coordinate of theleft top corner in a section,and can be changed bymoving or resizing.

YY (BeforePagebreak)

Float

WidthThe width of the field, andcan be changed by resizingor autofit.

YY (BeforePagebreak)

Float

HeightThe height of the field, andcan be changed by resizingor wordwrap.

YY (BeforePagebreak)

Float

Color

Background

The background color.Specify with a string like"0xff00ff" to control or selecta color from the palette.

Y Y String

Foreground

The foreground color.Specify with a string like"0xff0000" to control or selecta color from the palette.

Y Y String

Border

BorderWidthThe width of the border, andcan be from 1 to 3.

Y N Float

BorderColor

The color of the border.Specify with a string like"0xff0000" to control or selecta color from the palette.

Y Y String

TopLineThe top border line style, canbe Solid, Double, Dotted,Dashed, DashDot or None.

Y N Int

BottomLineThe bottom border line style,can be Solid, Double, Dotted,Dashed, DashDot or None.

Y N Int

RightLineThe right border line style,can be Solid, Double, Dotted,Dashed, DashDot or None.

Y N Int

LeftLineThe left border line style, canbe Solid, Double, Dotted,Dashed, DashDot or None.

Y N Int

Shadow Draw the shadow if it is true. Y Y Boolean

ShadowColor

The color for the shadow.Specify with a string like"0xff0000" or select a colorfrom the palette.

Y Y Boolean

Pattern

PatternColor The color for drawing thepattern. Specify with a stringlike "0xff0000" or select a

Y Y String

Reporting Feature

303

Page 312: JReport Designer - User Referencespecifies the driver such as JDBC driver (for JDBC) or the Data Source name (for JDBC−ODBC bridge), the user ID and the password for connecting to

color from the palette.

PatternStyle

The style to draw the pattern.They are: Vertical, Slash,Percent50, Horizontal, Hatchand None.

Y N Int

TextFormat

FontFace Font to be used. Y Y String

FontSize The size of the font. Y N Float

Bold Use bold fontface if true. Y Y Boolean

Italic Use italic fontface if true. Y Y Boolean

StrikeOut Mark strikeout if true. Y Y Boolean

Underline Underline the contents if true. Y Y Boolean

Alignment

Justification of the text in thefield box. The first part is forhorizontal justification(center, justify, left, right), thesecond part is for the verticaljustification (top, center,bottom). Summarily they areCenterTop, CenterCenter,CenterBottom, JustifyTop,JustifyCenter, JustifyBottom,LeftTop, LeftCenter,LeftBottom, RightTop,RightCenter, andRightBottom.

Y N Int

Format*

The display format for thefield.Vary for different typesof data, and can be manuallydefined.

Y N String

Autofit

Adjust the width according tothe contents, can beenlarged, but can not bedecreased.

YY (BeforePagebreak)

Boolean

MaxWidth

Often work with the autofitproperty. If autofit = true andMaxWidth is not equal to 0,then contents extend untilthe width is this value.Normally, also set wordwrap= true to let go downward.

Y N Float

WordwrapWrap the displayed contentsif true.

YY (BeforePagebreak)

Boolean

Others

StyleApply predefined styles likeinvisible, suppress propertiesto another DB−Field object.

Y N String

InvisibleIf true, not displayed in theView mode.

Y Y Boolean

SuppressedIf true, not displayed in theView mode.

Y Y Boolean

SuppressedIfNoRecords Y Y Boolean

Reporting Feature

304

Page 313: JReport Designer - User Referencespecifies the driver such as JDBC driver (for JDBC) or the Data Source name (for JDBC−ODBC bridge), the user ID and the password for connecting to

If set to true and no record isreturned for the whole report,the object will not bedisplayed.

ExportToCSV*

If set to false, the object willnot be exported whenexporting the report to a csvfile.

Y Y Boolean

ExportToXLS*

If set to False, the sectionwill not be exported whenexporting the report to Excelfile. (Make sure to checkExcel2000 on the Export toXLS dialog.)

Y Y Boolean

Link Link to an embedded report. Y N String

SuppressedIfNullIf true and the field value isnull, not displayed.

Y Y Boolean

DisplayNullIf true and the field value isnull, specify what to bedisplayed.

Y Y String

ColumnName*To substitute the current fieldwith another one.

Y N String

Format

This format is what will be displayed in the report result. In other words, no matter in what kind of format the data isstored in your database, you can specify the format to be displayed in the result. For example, for a price of Numbertype, we have the following formats for you choose:#,####,###.##$#,##0.00...

You select it as $#,##0.00, then it displays as $6.05. You can enter manually as $#,##0.000, then the field is displayed as$6.050.

For the BigDecimal type, to avoid losing precision, you should enter a prefix JRD to set the format property value.

For more information about BigDecimal, refer to User Reference | JReport Objects | Tables/Views, Table&View Fields.

ColumnName

Normally, you are not allowed to modify this property, we usually remove the summary and insert another field directly inthe report. But if you want to substitute here, you should first go to File | Options...| Advanced tab, uncheck Forbidchanging column. Then come back to Report Inspector, select another field from the drop−down list.

Reporting Feature

305

Page 314: JReport Designer - User Referencespecifies the driver such as JDBC driver (for JDBC) or the Data Source name (for JDBC−ODBC bridge), the user ID and the password for connecting to

Index

Text Object

You can edit text similar to a Label but with more format features. Within a text object field, you are free to insert objectslike DBField, Formula Field, Summary field, Parameter Field, System Field, Image File, Label field. There are two levelsof properties for Text Object: those for the text object, and those for the text added.

Object−Level Properties:

Property Name Description EditableFormulaControl

DataType

General

ClassType Display the class type: Text N N _

Geometry

XThe horizontal coordinate of the left top corner in a section, and can bechanged by moving or resizing in the Designer.

Y N Float

YThe vertical coordinate of the left top corner in a section. Can be changedby moving or resizing in the Designer.

Y N Float

Width The width of the field, can be changed by resizing. Y N Float

Height The height of the field, can be changed by resizing. Y N Float

Color

BackgroundThe background color. Specify with a string like "0xff00ff" to control orselect a color from the palette.

Y Y String

Others

TOCAnchorSpecifies whether to add the node that represents for this object to theTOC tree.

Y Y Boolean

StyleApply predefined styles like invisible, suppress properties to another labelobject.

Y N String

Invisible If true, not displayed in both design and view mode. Y Y Boolean

Suppressed Not displayed if true. Y Y Boolean

SuppressedIfNoRecords if true and no records return, not displayed. Y N Boolean

RecordLocation Calculation point for the properties of the label. Y N Int

ExportToCSV*If set to false, the object will not be exported when exporting the report to acsv file.

Y Y Boolean

ExportToXLS*If set to False, the section will not be exported when exporting the report toExcel file. (Make sure to check Excel2000 on the Export to XLS dialog.)

Y Y Boolean

AutoFitAdjust the width or the height of the text object according to the contents,can be enlarged, but can not be decreased.

Y Y Boolean

Excel

ColumnIndexSpecifies the X coordinate of the selected object in the exported XLS file,measured in cells.

Y N Int

RowIndexSpecifies the Y coordinate of the selected object in the exported XLS file,measured in cells.

Y N Int

Border

BorderWidth The width of the border. Y N Float

BorderColorThe color of the border. Specify with a string like "0xff0000" to control orselect a color from the palette. This works only if you have specifiedlines for the borders.

Y Y String

Reporting Feature

306

Page 315: JReport Designer - User Referencespecifies the driver such as JDBC driver (for JDBC) or the Data Source name (for JDBC−ODBC bridge), the user ID and the password for connecting to

TopLine The top border line style, can be Solid, Double, Dotted, Dashed, DashDotor None.

Y N Int

BottomLineThe bottom border line style, can be Solid, Double, Dotted, Dashed,DashDot or None.

Y N Int

RightLineThe right border line style, can be Solid, Double, Dotted, Dashed, DashDotor None.

Y N Int

LeftLineThe left border line style, can be Solid, Double, Dotted, Dashed, DashDotor None.

Y N Int

Shadow Draw the shadow if it is true. Y Y Boolean

ShadowColorThe color for the shadow. Specify with a string like "0xff0000" or select acolor from the palette.

Y Y String

Text−Level (in the edit mode, for characters inside) Properties:

Property name Description Editable

Default Font Select the default font. Y

Document Level

Default Tab Specify pixels for a Tab. Y

Left Margin Enter a number, in pixels, to set the space between the contents and left inside edge of cells. Y

Right MarginEnter a number, in pixels, to set the space between the contents and right inside edge ofcells.

Y

Top Margin Enter a number, in pixels, to set the space between the contents and top inside edge of cells. Y

Bottom MarginEnter a number, in pixels, to set the space between the contents and bottom inside edge ofcells.

Y

Text VerticalAlignment

Vertical alignment of document. can be: Top−Aligned, bottom−aligned and center vertically. Y

Background Set background color in document. Y

Paragraph Format

Para alignmentSet alignment of paragraph. Can be: Left−aligned, right−aligned, Auto−justified, or Centered.

Y

First line indent Only first−line indent for the text in a paragraph. Y

Left indent Distance of the text from the left margins for the whole paragraph. Y

Right indent Distance of the text from the right margins for the whole paragraph. Y

Line spacing

Specifies the line spacing of the paragraph. Options provided are as follows: Single, 1.5lines, or Double. Also you can type a float type number (from 0.5 to 132, and doubleprecision) in the text box.

Notes: When you type a number value, 1 is equal to Single, 1.5 is equal to 1.5 lines, and 2is equal to Double.

Values that exceed the range (0.5 to 132) will be ignored; say the spacing of thelines will be remained like before.

Y

Character Format

Bold Bold of character(s) if true. Y

All Capitals All character(s) will be uppercase if true. Y

Font Set font for the character(s). Y

Font size Set font size of character(s). Y

Italic Use italic font if true. Y

Strikeout Strike out the character(s) if true. Y

Reporting Feature

307

Page 316: JReport Designer - User Referencespecifies the driver such as JDBC driver (for JDBC) or the Data Source name (for JDBC−ODBC bridge), the user ID and the password for connecting to

Underline Under line the character(s) if true. Y

Foreground color Set the color for the character(s). Y

Background color Set background color. Y

Text Object's Child − DBfield

You can insert a DBfield into a text object as its child. Let's see the properties of a db−field inside a text object:

Property name Description Editable Formula Control Data Type

General

FieldTypeDisplay the class type:DBField

N N _

DBFieldNameThe mapping name in thecatalog.

N N _

Query The query/UDS name. N N _

TableThe table name in the rawdatabase.

N N _

ColumnThe column name in theraw database.

N N _

DataType

The Data type. You canchanged it in theconnection node inCatalog Browser.

N N _

Color

Background

The background color.Specify with a string like"0xff00ff" to control orselect a color from thepalette.

Y N String

Foreground

The foreground color.Specify with a string like"0xff0000" to control orselect a color from thepalette.

Y N String

Pattern

PatternColor

The color used to draw thepattern. Specify with astring like "0xff0000" orselect a color from thepalette.

Y N String

PatternStyle

The style to draw thepattern. They are: Vertical,Slash, Percent50,Horizontal, Hatch andNone.

Y N Int

TextFormat

FontFace Font to be used. Y N String

FontSize The size of the font. Y N Float

Bold Use bold fontface if true. Y N Boolean

Italic Use italic fontface if true. Y N Boolean

Reporting Feature

308

Page 317: JReport Designer - User Referencespecifies the driver such as JDBC driver (for JDBC) or the Data Source name (for JDBC−ODBC bridge), the user ID and the password for connecting to

StrikeOut Mark strikeout if true. Y N Boolean

UnderlineUnderline the contents iftrue.

Y N Boolean

Alignment

Justification of the text inthe field box. The first partis for horizontal justification(center, justify, left, right),the second part is for thevertical justification (top,center, bottom). Summarilythey are CenterTop,CenterCenter,CenterBottom, JustifyTop,JustifyCenter,JustifyBottom, LeftTop,LeftCenter, LeftBottom,RightTop, RightCenter andRightBottom.

Y N Int

Format

The display format for thefield. Vary for differenttypes of data, and can bemanually defined.

Y N String

TransWhileToHtml

While exporting to htmlformat, specify whether thecontents with the html keyword should be escaped tonormal string instead of thekey word.

Y Y Boolean

Others

ExportToCSV*

If set to false, the objectwill not be exported whenexporting the report to acsv file.

Y Y Boolean

ExportToXLS*

If set to False, the sectionwill not be exported whenexporting the report toExcel file. (Make sure tocheck Excel2000 on theExport to XLS dialog.)

Y Y Boolean

SuppressedIfNullIf true and the field value isnull, not displayed.

Y N Boolean

DisplayNullIf true and the field value isnull, specify what to bedisplayed.

Y N String

ColumnNameTo substitute the currentfield with another one.

Y N String

OrderBy

Specify the column nameto sort by. By default, therecords are sorted by thedisplayed column name.

Y Y String

Index

Reporting Feature

309

Page 318: JReport Designer - User Referencespecifies the driver such as JDBC driver (for JDBC) or the Data Source name (for JDBC−ODBC bridge), the user ID and the password for connecting to

Text Object's Child − Formula

You can insert a formula into a text object as its child. Let's see the properties of a formula inside a text object:

Property name Description EditableFormulaControl

DataType

General

FieldType Display the class type: Formula. N N _

FormulaName The formula name. N N _

DataTypeThe Data type. You can change it in the connection node in CatalogBrowser.

N N _

Expression Expression of the formula. N N _

FormulaEditor To activate the formula editor dialog. Y N _

Color

BackgroundThe background color. Specify with a string like "0xff00ff" to control orselect a color from the palette.

Y N String

ForegroundThe foreground color. Specify with a string like "0xff00ff" to control orselect a color from the palette.

Y N String

Pattern

PatternColorThe color used to draw the pattern. Specify with a string like "0xff0000" orselect a color from the palette.

Y N String

PatternStyleThe style to draw the pattern. They are: Vertical, Slash, Percent50,Horizontal, Hatch and None.

Y N Int

TextFormat

FontFace Font to be used. Y N String

FontSize The size of the font. Y N Float

Bold Use bold fontface if true. Y N Boolean

Italic Use italic fontface if true. Y N Boolean

StrikeOut Mark strikeout if true. Y N Boolean

Underline Draw underline if true. Y N Boolean

FormatDisplay format for the field. Vary for different types of data, and can bemanually defined.

Y N String

TransWhileToHtmlWhile exporting to html format, specify whether the contents with the htmlkey word, should be escaped to normal string instead of the key word.

Y N Boolean

Others

Suppressed If true, not displayed in the View mode. Y Y Boolean

SuppressedIfNoRecordsIf set to true and no record returned for the whole report, the object willnot be displayed.

Y N Boolean

Link Link an embedded report. Y N String

ExportToCSV*If set to false, the object will not be exported when exporting the report toa csv file.

Y Y Boolean

ExportToXLS*If set to False, the section will not be exported when exporting the reportto Excel file. (Make sure to check Excel2000 on the Export to XLS dialog.)

Y Y Boolean

SuppressedIfNull If true and the field value is null, not displayed Y N Boolean

DisplayNull If true and the field value is null, specify what to be displayed. Y N Sting

ColumnName To substitute the current field with another one. N N String

Index

Reporting Feature

310

Page 319: JReport Designer - User Referencespecifies the driver such as JDBC driver (for JDBC) or the Data Source name (for JDBC−ODBC bridge), the user ID and the password for connecting to

Text Object's Child − Label

You can insert a label into a text object as its child. Let's see the properties of a label inside a text object:

Property Name Description EditableFormulaControl

DataType

General

ClassType Display the class type: Label N N _

TextFormat

Text The string to be displayed. Y N Sting

FontFace Font to be used Y N Sting

FontSize The size of the font. Y N Float

Bold Use bold fontface if true. Y N Boolean

Italic Use italic fontface if true. Y N Boolean

StrikeOut Mark strikeout if true. Y N Boolean

Underline Underline the contents if true. Y N Boolean

TransWhileToHtmlWhile exporting to html format, specify whether the contents with thehtml key word should be escaped to normal string instead of the keyword.

Y N Boolean

Color

BackgroundThe background color. Specify with a string like "0xff00ff" to control orselect a color from the palette.

Y N String

ForegroundThe foreground color. Specify with a string like "0xff00ff" to control orselect a color from the palette.

Y N String

Pattern

PatternColorThe color used to draw the pattern. Specify with a string like "0xff0000"or select a color from the palette.

Y N String

PatternStyleThe style to draw the pattern. They are: Vertical, Slash, Percent50,Horizontal, Hatch and None.

Y N Int

Others

Suppressed If true, not displayed in the View mode. YY (BeforePagebreak

Boolean

SuppressedIfNoRecordsIf set to true and no record returned for the whole report, the object willnot be displayed.

Y N Boolean

ExportToCSV*If set to false, the object will not be exported when exporting the reportto a csv file.

Y Y Boolean

ExportToXLS*If set to False, the section will not be exported when exporting the reportto Excel file. (Make sure to check Excel2000 on the Export to XLSdialog.)

Y Y Boolean

Link Link an embedded report. Y N String

Text Object's Child − Parameter

You can insert a parameter into a text object as its child. Let's see the properties of a parameter inside a text object:

Property Name Description EditableFormulaControl

DataType

General

FieldType Display the class type: Parameter N N _

Reporting Feature

311

Page 320: JReport Designer - User Referencespecifies the driver such as JDBC driver (for JDBC) or the Data Source name (for JDBC−ODBC bridge), the user ID and the password for connecting to

ParameterName The parameter name. N N _

DefaultValue The default value. N N _

DataTypeThe Data type.You can change it in the connection node in CatalogBrowser.

N N _

TextFormat

FontFace Font to be used. Y N String

FontSize The size of the font. Y N Float

Bold Use bold fontface if true. Y N Boolean

Italic Use italic fontface if true. Y N Boolean

StrikeOut Mark strikeout if true. Y N Boolean

Underline Draw an underline if true. Y N Boolean

FormatThe display format for the field. Vary for different types of data, and canbe manually defined.

Y Y String

TransWhileToHtmlWhile exporting to html format, specify whether the contents with thehtml key word, should be escaped to normal string instead of the keyword.

Y N Boolean

Color

BackgroundThe background color. Specify with a string like "0xff00ff" to control orselect a color from the palette.

Y N String

ForegroundThe foreground color. Specify with a string like "0xff00ff" to control orselect a color from the palette.

Y N String

Pattern

PatternColorThe color used to draw the pattern. Specify with a string like "0xff0000"or select a color from the palette.

Y N Sting

PatternStyleThe style to draw the pattern. They are: Vertical, Slash, Percent50,Horizontal, Hatch and None.

Y N Int

Others

Suppressed If true, not displayed in the View mode. YY(BeforePagebreak)

Boolean

SuppressedIfNoRecordsIf set to true and no record returned for the whole report, the object willnot be displayed.

Y N Boolean

ExportToCSV*If set to false, the object will not be exported when exporting the reportto a csv file.

Y Y Boolean

ExportToXLS*If set to False, the section will not be exported when exporting the reportto Excel file. (Make sure to check Excel2000 on the Export to XLSdialog.)

Y Y Boolean

Link Define an embedded report with a link to the label. Y N Sting

Text Object's Child − Special Fields

You can insert a special field into a text object as its child. Let's see the properties of a special field inside a text object:

Property name Description EditableFormulaControl

DataType

General

ClassType Display the class type: Special Fields N N _

Color

BackgroundThe background color. Specify with a string like "0xff00ff" to controlor select a color from the palette.

Y N Sting

Reporting Feature

312

Page 321: JReport Designer - User Referencespecifies the driver such as JDBC driver (for JDBC) or the Data Source name (for JDBC−ODBC bridge), the user ID and the password for connecting to

Foreground The foreground color. Specify with a string like "0xff00ff" to controlor select a color from the palette.

Y N Sting

Pattern

PatternColorThe color used to draw the pattern. Specify with a string like"0xff0000" or select a color from the palette.

Y N Sting

PatternStyleThe style to draw the pattern. They are: Vertical, Slash, Percent50,Horizontal, Hatch and None.

Y N Int

TextFormat

FontFace Font to be used. Y N String

FontSize The size of the font. Y N Float

Bold Use bold fontface if true. Y N Boolean

Italic Use italic fontface if true. Y N Boolean

StrikeOut Mark strikeout if true. Y N Boolean

Underline Underline the contents if true. Y N Boolean

FormatThe display format for the field. Vary for different types of data, andcan be manually defined.

Y N String

Others

Suppressed If true, not displayed in the View mode. YY (BeforePagebreak)

Boolean

SuppressedIfNoRecordsIf set to true and no record returned for the whole report, the objectwill not be displayed.

Y N Boolean

ExportToCSV*If set to false, the object will not be exported when exporting thereport to a csv file.

Y Y Boolean

ExportToXLS*If set to False, the section will not be exported when exporting thereport to Excel file. (Make sure to check Excel2000 on the Export toXLS dialog.)

Y Y Boolean

Link Link an embedded report. Y N String

FieldType To substitute the current field with another one. Y N Int

Text Object's Child − Summary

You can insert a summary into a text object as its child. Let's see the properties of a summary inside a text object:

Property Name Description EditableFormulaControl

DataType

General

FieldType Display the class type: Summary. N N _

SummaryName The summary name. N N _

SummaryFunctionThe function of the summary. The function can be Sum, Count,DistinctCount, Average, Maximum, Minimum, PopulationStdDev,PopulationVariance, StdDev, Variance etc..

N N _

SummaryOn The field name that the summary field performs the function on. N N _

BreakFieldThe scale/level that the summary will perform: summary for each group,each page, or the whole report.

Y N _

Color

BackgroundThe background color.; Specify with a string like "0xff00ff" to control orselect a color from the palette.

Y N String

ForegroundThe foreground color. Use a string like "0xff0000" to control or select acolor from the palette.

Y N String

Reporting Feature

313

Page 322: JReport Designer - User Referencespecifies the driver such as JDBC driver (for JDBC) or the Data Source name (for JDBC−ODBC bridge), the user ID and the password for connecting to

Pattern

PatternColorThe color used to draw the pattern. Specify with a string like "0xff0000" orselect a color from the palette.

Y N String

PatternStyleThe style to draw the pattern. They are: Vertical, Slash, Percent50,Horizontal, Hatch and None.

Y N Int

TextFormat

FontFace Font to be used. Y N String

FontSize The size of the font. Y N Float

Bold Use bold fontface if true. Y N Boolean

Italic Use italic fontface if true. Y N Boolean

StrikeOut Mark strikeout if true. Y N Boolean

Underline Underline the contents if true. Y N Boolean

FormatThe display format for the field. Vary for different types of data, and canbe manually defined.

Y N String

Others

Suppressed If true, not displayed in the View mode. YY(BeforePagebreak)

Boolean

SuppressedIfNoRecordsIf set to true and no record returned for the whole report, the object willnot be displayed.

Y N Boolean

ExportToCSV*If set to false, the object will not be exported when exporting the report toa csv file.

Y Y Boolean

ExportToXLS*If set to False, the section will not be exported when exporting the reportto Excel file. (Make sure to check Excel2000 on the Export to XLSdialog.)

Y Y Boolean

Link Link to an embedded report. Y N String

ColumnName To substitute the current field with another one. N N String

User Defined Object

As the name suggests, a UDO is an object defined by users. It has special properties defined by users. The propertieslisted in JReport Report Inspector correspond with the ones defined your UDO programs. Here are some defaultproperties:

Property Name Description EditableFormulaControl

DataType

General

ClassType Display the UDO class name. N N _

Geometry

XThe horizontal coordinate of the left top corner in a section and can bechanged by moving or resizing in the Designer.

Y

Y(BeforePagebreak)

Float

YThe vertical coordinate of the left top corner in a section, and can bechanged by moving or resizing in the Designer.

Y

Y(BeforePagebreak)

Float

Width The width of the field, and can be changed by resizing or auto−fit. Y

Y(BeforePagebreak)

Float

Reporting Feature

314

Page 323: JReport Designer - User Referencespecifies the driver such as JDBC driver (for JDBC) or the Data Source name (for JDBC−ODBC bridge), the user ID and the password for connecting to

Height

The height of the field, and can be changed by resizing or word−wrap. Y

Y(BeforePagebreak)

Float

Color

BackgroundThe background color. Specify with a string like "0xff00ff" to control or selecta color from the palette.

Y Y String

Others

Style Apply predefined styles like invisible, suppress properties to another UDO. Y N String

Invisible If true, not displayed in the View mode. Y Y Boolean

Suppressed If true, not displayed in the View mode. Y Y Boolean

ExportToCSV*If set to false, the object will not be exported when exporting the report to acsv file.

Y Y Boolean

ExportToXLS*If set to False, the section will not be exported when exporting the report toExcel file. (Make sure to check Excel2000 on the Export to XLS dialog.)

Y Y Boolean

Notes:

1. The above are the basic properties for a UDO, and more will be added with those defined in your program.

2. JReport UDO does not support RTF and PDF format output. That is, when exported to RTF and PDF, a report with aUDO may not be rendered correctly, but there is no such problem for HTML and PS.

3. We provide a built−in object, JHyperLink, which is rather useful and operates pretty much like the hyperlink in an htmlfile. This is only for Windows NT. Let's take a look at the those special properties of it:

Property Name Description EditableFormulaControl

DataType

URL URL for the linked file or Web site page. Y Y String

displayValue The text displayed for the hyperlink. Lower priority than displayImage. Y Y String

displayImageThe local path of the image displayed for the hyperlink (like a hotspot in HTML).Higher priority then displayValue.

Y Y String

originalIf true, JReport will find the image from the local directory when you view thereport from web browser at client end. If false, the image will be taken fromserver side.

Y Y Boolean

Example: Insert two JHyperLink UDOs, and specify the following:

URL: http://www.jinfonet.comdisplayValue: Click here.

URL: c:\docword.txtdisplayValue: abcdisplayImage: c:\jreport\demo\reports\coffeesmall.gif

View the report:

Reporting Feature

315

Page 324: JReport Designer - User Referencespecifies the driver such as JDBC driver (for JDBC) or the Data Source name (for JDBC−ODBC bridge), the user ID and the password for connecting to

When you point your mouse at either, a hand shows you that it is a hyperlink. Click it, you will be brought to the linkedfile. The application launched to open it (the linked file) is from your Windows NT system. Another point: with bothdisplayValue and displayImage specified, the image has the top priority.

Reporting Feature

316

Page 325: JReport Designer - User Referencespecifies the driver such as JDBC driver (for JDBC) or the Data Source name (for JDBC−ODBC bridge), the user ID and the password for connecting to

JReport Windows and Dialogs

Get JDBC Connection Information

This dialog is used to get or create the connection information, which lists the database objects accessible through JDBCor JDBC−ODBC Bridge.

Connection ListIt contains the connection information added before. The format of the connection information should be:JDBC URL / (JDBC Driver Name)For example:"jdbc:odbc:jinfonet / (sun.jdbc.odbc.JdbcOdbcDriver)Choose one of the items to display the JDBC URL and JDBC driver name in the corresponding text box.

Use ODBC Data SourceBy default, this check box is checked. It indicates that the name input in the Name field is the ODBC data sourcename. User Name and Password allow you to input the user id and password to access the database through theODBC data source.

Use Connection PoolSpecifies to connect the database through WebLogic connection pool.

JDBC DriverThis is enabled when "Use ODBC Data Source" is unchecked. Input the class name for the JDBC driver this connectionwill use. Otherwise, JReport will try all the JDBC drivers specified in %installroot%/bin/jdbcdrivers.properties file for thegiven JDBC URL when it tries to setup database connection. That is to say, JDBC driver's names also can be addedinto that text file.

JDBC URLInput a valid JDBC URL which can establish a connection to the database to be used. The valid format of the URLshould be provided by your JDBC Driver.

OptionsThese options are designed for the experienced users, and when your database has some special requirements.

QualifiedDecide if Catalog or Schema is used when JReport send SQL statement to the database. Unqualified Name: Neither Catalog nor Schema is included in data manipulation.2−parts Names: Use Schema in data manipulation.3−parts Names: Use both Catalog and Schema in data manipulation.

This is very useful when there are the same table names in the different catalogs and schemas. If you only useunqualified name, the SQL statement that is generated by JReport will not contain the catalog and schema name, so theresult will be unpredictable.

Date FormatSince different database systems have different Date and Time formats for Date and Time value, this is used to specifythe format, so that when JReport sends the SQL statement with Date or Time parameters, they can be translated to theformat of the database system correctly.

Symbol Meaning Presentation

y year number

M month in year number

d day in month number

h hour in day (0~23) number

317

Page 326: JReport Designer - User Referencespecifies the driver such as JDBC driver (for JDBC) or the Data Source name (for JDBC−ODBC bridge), the user ID and the password for connecting to

m minute in hour number

s second in minute number

S millisecond number

For example, in the Oracle database, the Date format in default is 'dd−MMM−yy', but in Sybase system, the date formatis 'yyyy−MM−dd'. So you need to correct the Date format in the connection object so that the SQL statementsgenerated by JReport can work with your database.

Quote QualifierYou can specify the characters, then a qualifier name which contains the characters will not be quoted. In JReport, we need to quote them with the character defined by DBMS, the default character is double quotation marks("). There are two properties of Quote Qualifier.

Default (JDBC): Program will get the extra name characters from JDBC.User Defined: Users can modify the Quote Character by themselves according to the database system they are using.

EncodingThis property is used to decide whether the data fetched from the database is encoded.

Auto − Whether the data fetched from the database is encoded is decided by the statement.Yes − the data fetched from the database will be encoded.No − the data fetched from the database will not be encoded.

When manipulating the data, you can determine which encoding format will be used.

Transaction:

Read Only Default − Accepts the settings from the database that you are connecting to. Read Only − Users will access the database in read−only mode.Read Write − Users will access the database in read−write mode.

Transaction IsolationDefault − Accepts the settings from the database that you are connecting to. None − Transactions are not supported.Read Uncommitted − Transactions are not isolated from each other. If the DBMS supports other transaction isolationlevels, it ignores whatever mechanism it uses to implement those levels. So that they do not adversely affect othertransactions, transactions running at the Read Uncommitted level are usually read−only. Please note that, when ReadOnly is set and Transaction Isolation to be Read Uncommitted, it will speed up the transaction of the catalog.Read committed − When one transaction is reading, updating or deleting a row, other transactions cannot update ordelete it until this transaction is committed or rolled back. Repeatable read − When one transaction is updating, deleting several rows or inserting new rows into them, the othertransactions cannot update or delete these rows, until this transaction is committed or rolled back.Serializable − When one transaction is updating, deleting several rows or inserting new rows into them, the othertransactions cannot update, delete these rows, or insert any new rows into these rows, until this transaction is committedor rolled back.

Pre−joinSpecifies whether to enable the pre−join feature.

Open Report − New

On the New tab of the Open Report dialog, select a report type, then create the report with Report Wizard. In this way,JReport will prompt you to define what tables, fields, summaries, and other options are used in a rough report design. Ithelps you to quickly create a basic design of a report and saves your time in the basic organization and layout of data

JReport Windows and Dialogs

318

Page 327: JReport Designer - User Referencespecifies the driver such as JDBC driver (for JDBC) or the Data Source name (for JDBC−ODBC bridge), the user ID and the password for connecting to

from the database.

CatalogThe Catalog box is the place where a catalog file (.cat) is indicated with its name and path. Typing in this box is disabled.To specify a catalog file used by a report, click Browse... button to search for it.

TemplateJReport provides some typical templates for different types of reports. Each template is represented by a specific icon.Select one template to create your report.

Blank ReportThis is the simplest report format. The report will not initially display any fields. Organization criteria such as Display,Group, Sort and Summary can be added to enhance the report.

Block ReportThis type places your data in a columnar format. No title and fields are placed in the Group Header. Summary fields areplaced in the Group Footer and the background of that section is gray.

Cross−TabA report that summarizes data and presents the summaries in a compact row and column format.

Drop TableData is laid out in a table and summaries are given in a separate drop table.

Executive BreakMuch like the Block format, only with borders and shadows.

IndentMuch like the Executive Break, but objects in the page are indented.

InvoiceThis format allows you to create a report just like an invoice in the business world. With the invoice format, JReport canautomatically add Bill to, Ship to, Invoice Number, or Date etc. But make sure to select two groups first.

LabelThis template helps you create a label report.

Left AlignmentThe layout of this format is a combination of borders, shadows, and lines with fields all left justified.

Standard ReportThis format allows a very quick organization of data. The report will automatically display lists and groupings of data. TheStandard Report is highly recommended, because this template includes six items: Indent (default), Alignment Left,Table, Drop Table, Executive Break and Block. You can define a certain item on the Style tab in the Report Wizardflexibly.

SubReportIt merges two reports into one.

TableThis type places all your data into a complete table.

HBlankThis is a simple report format which builds up a horizontal aligned report. The report will not initially display any fields.Organization criteria such as Display, Group, Sort and Summary can be added to enhance the report

JReport Windows and Dialogs

319

Page 328: JReport Designer - User Referencespecifies the driver such as JDBC driver (for JDBC) or the Data Source name (for JDBC−ODBC bridge), the user ID and the password for connecting to

Show TemplatePreview the overall format of the selected template.

CreatePressing this button will lead you to the Report Wizard to create a report with the selected template.

CancelClose the dialog and delete any unsaved changes.

HelpDisplays help document.

Open Report − Existing

The Existing tab allows you to open previously created reports.

CatalogIn order to open a report, you should first open its corresponding Catalog file (*.cat). Each Catalog has its own set ofreports. Click the Browse button to search for a catalog. Once a catalog is selected, a list of reports should appear in thebottom menu. Select one report to open. If report does not appear in the directory where it was saved, make sure thecorrect Catalog file is opened.

Report NameList the report name selected.

Report Type*.cls − Report Binary File*.rpt − Report Source File*.cls.xlm − XML Format Report*.clx − Self Contained Report

When saving a report, you can save it as four kinds of files: cls, rpt, cls.xml, or .clx. A *.rpt file can be opened and editedas a text file.

Notes:

When you save a report to the XML Format Report (*.cls.xml), a special key is needed. If you want, pleasecontact Jinfonet support ([email protected]).

Report that contains customized UDOs cannot be saved to XML format. If you want to do so, please contactJinfonet support ([email protected]).

Other report typesThis option enables users to open other reports types in JReport Designer (ex: Crystal reports).

BrowseEnables users to specify location of report.

Report NameDisplays the name of the selected report with its full path.

JReport Windows and Dialogs

320

Page 329: JReport Designer - User Referencespecifies the driver such as JDBC driver (for JDBC) or the Data Source name (for JDBC−ODBC bridge), the user ID and the password for connecting to

OpenOpens the selected report.

To open consecutive reports, click the first report, press and hold down SHIFT, click the last report, and thenclick the Open button. The last report will be the active report.

To open reports that are not consecutive, press and hold down CTRL, click each report, and then click theOpen button. The report selected last will be the active report.

CancelClose the dialog and deletes any unsaved changes.

HelpDisplays help document.

Open Report − Recent

The Recent tab lists reports which have been accessed most recently of the currently opened catalog.

Report NameThe name of the report file.

CatalogThe path of the catalog file.

LocationThe path of the report file.

DescriptionA description of the report file.

OpenOpen the selected report.

CancelClose the dialog and delete any unsaved changes.

HelpDisplay help document.

Report Wizard − Data Tab

On the Data tab in the Report Wizard, you are allowed to select what tables and fields will be accessed in the report.

Catalog Data SourceSelect a data source from the dropdown list. In the column there is a list of all the data from the specified data sourcewhich can be used in the report, such as tables, formulae, queries and so on. Double−click one objects node or click onits icon to reveal it. Select and place the selected objects into the Working Set menu by highlighting a specific objectand clicking on the arrow button.

Report Data Source ListLists all the queries existing in the catalog selected in the Choose Report dialog. Select one from the list or create anew one. If no new query name typed, JReport will give a default name.

Working Set MenuThe Working Set menu is a listing of all the tables and fields you selected from the Catalog data source menu. Theworking set can be named in the Report Data Source List menu. The fields and tables selected here can be accessed

JReport Windows and Dialogs

321

Page 330: JReport Designer - User Referencespecifies the driver such as JDBC driver (for JDBC) or the Data Source name (for JDBC−ODBC bridge), the user ID and the password for connecting to

later in your report by Catalog Browser, menu command Insert |DBField or the DBField icon in the edit toolbar.

the New Formula button

Brings out the formula editor for you to create a new formula, which will be added to the source tree.

the New Summary button

Brings out the New Summary dialog for you to create a new summary. There is no summary in the source tree, so thisbutton is disabled here.

the New Parameter button

Brings out the Create Parameter dialog for you to create a new parameter. There is no parameter in the source tree, sothis button is disabled here.

Template...Preview the selected template.

All TabsBy default, not all the tabs are displayed, it is determined by the selected template. For example, when you choose tocreate a cross−tab report, you will find the Summary tab does not appear in the Report Wizard. But when you clickthe All Tabs button at any time, all the tabs will display in the wizard.

NextRetain changes and continue to the next tab.

CancelDo not retain any changes and close the dialog.

FinishFinish and create the report with the information you provided.

HelpDisplay this help document.

Report Wizard − Joins Tab

The Joins tab shows how multiple tables selected in the Data tab are linked.

Linking Multiple TablesIf multiple tables are selected in the Data tab, JReport will automatically link them together based on the default.

To manually link the tables together, first select a field from one table. Next, drag the highlighted field to another tableand onto the field to link. A link will be created that is shown by a green line from one field to another. Click theArrange button to have JReport arrange the tables into an organized manner where the crossing of green linking lines isminimized.

To modify the method of joining two tables, double click the" =" icon that is located on the green linking lines and the JoinOptions dialog is revealed.

ArrangeArrange the tables into an organized manner to minimize the crossing of green linking lines.

ExpandTo have a clear view of the linking layout of the tables, click the Expand button to maximize the panel. At the sametime, in the expanded panel, you can specify the query conditions in the QBE format.

JReport Windows and Dialogs

322

Page 331: JReport Designer - User Referencespecifies the driver such as JDBC driver (for JDBC) or the Data Source name (for JDBC−ODBC bridge), the user ID and the password for connecting to

View SQL...View the SQL statement used to execute the Query. It gives you a clear idea about your selection for query so far.

Template...Preview the selected template.

All TabsBy default, not all the tabs are displayed, it is determined by the selected template. For example, when you choose tocreate a cross−tab report, you will find the Summary tab does not appear in the Report Wizard. But when you clickthe All Tabs button at any time, all the tabs will display in the wizard.

BackRetain all changes and return to the previous tab.

NextRetain changes and continue to the next tab.

CancelDo not retain any changes and close the dialog.

FinishFinish and create the report with the information you provided.

HelpDisplay this help document.

Report Wizard − Conditions Tab

The Conditions tab allows you to specify certain criteria for the fields to be retrieved from the database.

FilterBy default, conditions are specified in Filter. Compared with QBE, Filter provides you with more flexibility to enter yourconditions.

ExpressionThis is the main section of the Filter window. Place your criteria in this area. Expression includes not only the DBField,but also formulas and parameters. You can manually type the strings supported by the database or click the icon toselect column names or fields values in the popped Expression dialog.

Where,

+ icon: Add numbers or fields together in the Expression menu. − icon: Subtract numbers or fields together in the Expression menu. * icon: Multiply numbers or fields together in the Expression menu. / icon: Divide numbers or fields together in the Expression menu. = icon: Equate fields together ' icon: Place quotations on long character strings or name that have blanks (example: place quotes on values like 'NewYork' or 'Washington DC'). If the string contains single quotation mark, use two single quotations instead, for example,'Bob''s Coffee'. || icon: Place fields together in the same Expression menu. (example: 'New York' || 'Washington DC') ( ) icon: Place your fields in parentheses

OperatorLists all the conditions for the criteria.

JReport Windows and Dialogs

323

Page 332: JReport Designer - User Referencespecifies the driver such as JDBC driver (for JDBC) or the Data Source name (for JDBC−ODBC bridge), the user ID and the password for connecting to

MoreClick the drop down list arrow to get the following items:

END: Finish entering the conditionAND: Logic operator AND which is applied to this line and the next line. OR: Logic operator OR which is applied to this line and the next line.Insert Row: Insert single Expression row.Delete Row: Delete single Expression row. New Group: The Expression row from next line will be a new group.

QBESelect QBE (Query By Example) search condition by pressing the QBE radio button. All the data fields are shown on thispanel. Type information that restricts the search to the specified criteria.

For example, let's say one of our fields is labeled Region. This field is a list of all 50 states in the United States. Yourreport only wants to see information from New York (NY) and California (CA). In the criteria menu, pick NY and CA out byplacing their names in the column as seen below.

Just type in NY and CA. JReport automatically places the ='xx' (equal sign and quotes) in the column. Below is a list ofthe syntax that is available:

Comparison predicates ( =, >, <, >=, <=, <> )BETWEEN predicate (example: BETWEEN 1 AND 100)IN predicate (example: NOT IN (1, 3, 5))LIKE predicate (example: LIKE '%apple%')NULL predicate (example: IS NOT NULL)

Note: You can type your search criteria both in the format of Filter and QBE, the overall conditions will include them both.Always come to SQL to view your conditions.

Select DistinctIf checked, in the SQL statement, the SELECT DISTINCT command will be used instead of SELECT.

Ignore Predicate If Parameter Value Is NullIf the query uses a parameter, and the parameter value is null at run−time, then this condition will be removed from thequery's criterion.

For string type parameters, when the value is left blank, if the "Ignore Predicate If Param Is Null" is set to true, the valueof this parameter will be considered as NULL, and this predicate will not appear in the where clause; if false, it will betreated as an empty string(¡®¡¯).

View SQL...Allows you to view and edit the SQL statements used to execute the Query. It gives you a clear idea about your selectionquery so far. You can edit the query statements in the text area, click Execute to see whether it can be successfullyprocessed. Click OK to execute and dispose the Query Text Editor window, and if changes are made to the statements,you will be prompted to choose to save the changes and exit, exit without saving the changes, or just go back to the

JReport Windows and Dialogs

324

Page 333: JReport Designer - User Referencespecifies the driver such as JDBC driver (for JDBC) or the Data Source name (for JDBC−ODBC bridge), the user ID and the password for connecting to

Query Text Editor dialog.

Note: Currently, the search criteria on the Conditions tab are not able to be synchronized with the manually typed SQLstatements. JReport will generate reports using the SQL statements edited in the Query Text Editor. If a query ischanged, it will not be editable using query editor in the future.

the New Formula button

Brings out the formula editor for you to create a new formula, which will be added to the source tree.

the New Summary button

Brings out the New Summary dialog for you to create a new summary.

the New Parameter button

Brings out the Create Parameter dialog for you to create a new parameter.

Template...Preview the selected template.

All TabsBy default, not all the tabs are displayed, it is determined by the selected template. For example, when you choose tocreate a cross−tab report, you will find the Summary tab does not appear in the Report Wizard. But when you click theAll Tabs button at any time, all the tabs will be displayed in the wizard.

BackRetain all changes and return to the previous tab.

NextRetain changes and continue to the next tab.

CancelDo not retain any changes and close the dialog.

FinishFinish and create the report based on the information you have provided.

HelpDisplay this help document.

Report Wizard − Display Tab

The Display tab allows you to specify which fields will be shown in your report. It is different from selecting fields on theData tab. On the Data tab, you select fields for the query, which allows you to access them later in the report.

Data sourceExpand the directory structure by double clicking on the table name or clicking on the icon. Then highlight either thetable name or the field name to be placed in the Report fields menu. Press the arrow button to place the selected

field or table into the Report fields menu.

Default SectionDefault Section specifies the section in which to place the selected field or table. Please note that you should first selectin this list, then highlight the field or table in Data source and add it to the Report fields. In other words, if you first addthe field or table for display, then select section from the Default Section field, it will not take effect.

JReport Windows and Dialogs

325

Page 334: JReport Designer - User Referencespecifies the driver such as JDBC driver (for JDBC) or the Data Source name (for JDBC−ODBC bridge), the user ID and the password for connecting to

Report fieldTo change the order of the fields in the Report fields menu, simply highlight the field and click the button to move it

up or down.

To remove the fields you just placed in the Report fields menu to be seen in your report, select the unwanted field andpress the arrow button .

To get rid of all the fields from the Report field, press the button.

NamePress on the Name column, you will see the icon . Click this icon to pop up the Properties dialog which enables you tochange the DBField properties.

AutoLabelClick on the AutoLabel column to edit the label of the fields by entering a new label.

Section>Change another section for the selected field in the Section column. The section is the default place where the field willbe shown in the report. Click the drop−down list to select other sections to lay it in.

StyleSpecify one style you desired.

the New Formula button

Brings out the formula editor for you to create a new formula, which will be added to the source tree.

the New Summary button

Brings out the New Summary dialog for you to create a new summary. There is no summary in the source tree in thispanel, so this button is disabled here.

the New Parameter button

Brings out the Create Parameter dialog for you to create a new parameter.

Template...Preview the selected template.

All TabsBy default, not all the tabs are displayed, it is determined by the selected template. For example, when you choose tocreate a cross−tab report, you will find the Summary tab does not appear in the Report Wizard. But when you click theAll Tabs button at any time, all the tabs will display in the wizard.

BackRetain all changes and return to the previous tab.

NextRetain changes and continue to the next tab.

CancelDo not retain any changes and close the dialog.

FinishFinish and create the report with the information you provided.

Help

JReport Windows and Dialogs

326

Page 335: JReport Designer - User Referencespecifies the driver such as JDBC driver (for JDBC) or the Data Source name (for JDBC−ODBC bridge), the user ID and the password for connecting to

Display this help document.

Report Wizard − Group Tab

Records in a report are usually organized into groups based on certain criteria. With the Group tab you can enter thecriteria to define multi−level groups and specify the ordering of groups and records.

Report fieldsExpand the table directory in the Report fields menu by double clicking the table icon or clicking the icon, highlight thefield you want as a criteria for the grouping, then place the criteria into the Group by (ordered) menu by clicking on the

button.

the New Formula button

Brings out the formula editor for you to create a new formula, which will be added to the source tree.

the New Summary button

Brings out the New Summary dialog for you to create a new summary. There is no summary in the source tree, so thisbutton is disabled here.

the New Parameter button

Brings out the Create Parameter dialog for you to create a new parameter.

Group by (ordered)

NameHere the field names selected as criteria for the grouping are listed. To change the order of the fields , simply highlightthe field and click the button to move it up or down.

DirectionThere is an up arrow besides each field selected to be grouped. This means that the fields will be grouped and sorted inascending order (A, B, C). Clicking on the up arrow icon, and a menu list will pop up for you to choose the sorting type.

If No Sort is selected , the data will not be sorted, and JReport will generate a group break according to the originalorder. If Descend is selected, the fields will be grouped and sorted in a descending order (C, B, A). If Special Group is selected, you can get a special way to define how to group your information. For example, youplaced a field named "Region" for grouping, this field contains all 50 states in the United States. You want to see the databetween Maryland (MD) and New York (NY). With this way, you can define the criteria by selecting the "between"operator to further define your grouping information.

SpecialFunctionThe function applies only if the field to be sorted is the date type. Click the drop down arrow, a list will be displayed.Select one to specify to fetch the record for every day, every week, half month, each month, each quarter, each half yearor each year.

Template...Preview the selected template.

All TabsBy default, not all the tabs are displayed, it is determined by the selected template. For example, when you choose to

JReport Windows and Dialogs

327

Page 336: JReport Designer - User Referencespecifies the driver such as JDBC driver (for JDBC) or the Data Source name (for JDBC−ODBC bridge), the user ID and the password for connecting to

create a cross−tab report, you will find the Summary tab does not appear in the Report Wizard. But when you click theAll Tabs button at any time, all the tabs will display in the wizard.

BackRetain all changes and return to the previous tab.

NextRetain changes and continue to the next tab.

CancelDo not retain any changes and close the dialog.

FinishFinish and create the report with the information you provided.

HelpDisplay this help document.

Report Wizard − Sort Tab

The Sort tab allows you to organize the information within the group by sorting records. It is very similar to the Grouptab in appearance. You can select an item from the choices to indicate the group for which the sort option will be applied.

Sort inBy default, the selected field(s) will be sorted within the whole report. However, you can also select to further sort thegroup. In this case, first specify the summary for the group on the Summary tab. Then, return to the Sort tab, sort thegroup according to the summary field.

FieldsExpand the table directory in this menu by double clicking the table icon or clicking the icon, highlight the field youwant as a criteria for the sorting. Then click on the button to place the criteria into the Sort by menu.

the New Formula button

Brings out the formula editor for you to create a new formula, which will be added to the source tree.

the New Summary button

Brings out the New Summary dialog for you to create a new summary. If the selected item of Sort In is The wholereport, there is no summary in the Fields panel, so this button is disabled here. However, if the selected item of Sort In isother field, this button is available.

the New Parameter button

Brings out the Create Parameter dialog for you to create a new parameter. If the selected item of Sort In is The wholereport, the button is available. However, if the selected item of Sort In is other field, there is no parameter in the Fieldspanel, so the button is disabled.

Ordering Your DataYou will notice an up arrow besides each field selected to be sorted. This means that the fields will be sorted in anascending order (A, B, C). Clicking on the up arrow icon, you can change it to a down arrow to sort data in adescending order (C, B, A) or you can customize to sort on runtime.

TopNClick on the TopN box and place a number "N" in menu box, JReport will only display the first N records in the group.

JReport Windows and Dialogs

328

Page 337: JReport Designer - User Referencespecifies the driver such as JDBC driver (for JDBC) or the Data Source name (for JDBC−ODBC bridge), the user ID and the password for connecting to

Group FilterPop up a dialog to allow you to modify more advanced group filtering conditions.

Template...Preview the selected template.

All TabsBy default, not all the tabs are displayed, it is determined by the selected template. For example, when you choose tocreate a cross−tab report, you will find the Summary tab does not appear in the Report Wizard. But when you clickthe All Tabs button at any time, all the tabs will display in the wizard.

BackRetain all changes and return to the previous tab.

NextRetain changes and continue to the next tab.

CancelDo not retain any changes and close the dialog.

FinishFinish and create the report with the information you provided.

HelpDisplay this help document.

Report Wizard − Summary Tab

The Summary tab allows you to generate count, average, sum, standard deviation and other aggregate functions for yourdata. The Summary functions are based upon how you grouped the data from the Group tab.

Data SourceThe Data Source menu contains the fields selected on the Data tab. Select a field to be summarized, then add it to theSummary Field menu by clicking .

the New Formula button

Brings out the formula editor for you to create a new formula, which will be added to the source tree.

the New Summary button

Brings out the New Summary dialog for you to create a new summary. There is no summary in the source tree, so thisbutton is disabled here.

the New Parameter button

Brings out the Create Parameter dialog for you to create a new parameter. There is no parameter in the source tree, sothis button is disabled here.

Summary Fields

FieldList the fields selected to be summarized. Highlight a field, the icon will appear which allows you to modify the fieldproperty.

JReport Windows and Dialogs

329

Page 338: JReport Designer - User Referencespecifies the driver such as JDBC driver (for JDBC) or the Data Source name (for JDBC−ODBC bridge), the user ID and the password for connecting to

FunctionSelect a function in the Function drop down list. It allows you to select a summary function like sum, count, minimum,maximum, etc. to generate a value for your data.

Below is a list of the functions provided for you to create a summary for a selected field.

Count − Give a total count of all the values in a field.Sum − Sum up all the numerical values in a field. Minimum − Find the smallest numerical value in a field. Maximum − Find the largest numerical value in a field. Average − Take the average of all the numerical values in a field. Distinct Count − Take a total count of all the distinct fields in a report. Population Variance − Sum up the square of the difference between a value and its average and divide it by the totalnumber of values. Population Standard Deviation − Take the square root of the Population Variance. Variance −Sum up the square of the difference between a value and its average and divide it by the total number ofvalues subtracted by one. Standard Deviation − Take the square root of the Variance.

Break FieldA Break Field is a defined field in which JReport calculates values according to your requests. For example, assumethat you have set two groups based on Region and City. Now you would like to generate a sum of a field, called annualsales. If you choose region in Break Field, JReport will generate a total sum of the sales in the region. If you choosecity in Break Field, we will get the total sum of the sales in the city.

Style Leave the Break Fields empty, Grandtotal will be displaed in the Style column, JReport will calculate the overall valuefor a specific field and function in a report. It will be shown at the end in the Report Footer. If you choose the field forgrouping in the Break Field drop down list, you can see SubTotal in the Style column. It means JReport will calculatethe total value within a group.

LabelType in the summary name here. If no name is input, JReport will give a default name .

Template...Preview the selected template.

All TabsBy default, not all the tabs are displayed, it is determined by the selected template. For example, when you choose tocreate a cross−tab report, you will find the Summary tab does not appear in the Report Wizard. But when you clickthe All Tabs button at any time, all the tabs will display in the wizard.

BackRetain all changes and return to the previous tab.

NextRetain changes and continue to the next tab.

CancelDo not retain any changes and close the dialog.

FinishFinish and create the report with the information you provided.

JReport Windows and Dialogs

330

Page 339: JReport Designer - User Referencespecifies the driver such as JDBC driver (for JDBC) or the Data Source name (for JDBC−ODBC bridge), the user ID and the password for connecting to

HelpDisplay this help document.

Report wizard − Graph Tab

The Graph tab allows you to add and create graphs in your report.

TypeClick the Type tab, a window appears with different chart types. Select one of the types to create a graph in your report.

For the detailed information about chart, please see Reference | JReport Windows and Dialogs | Chart Wizard.

Template...Preview the selected template.

All TabsBy default, not all the tabs are displayed, it is determined by the selected template. For example, when you choose tocreate a cross−tab report, you will find the Summary tab does not appear in the Report Wizard. But when you click theAll Tabs button at any time, all the tabs will display in the wizard.

BackRetain all changes and return to the previous tab.

NextRetain changes and continue to the next tab.

CancelDo not retain any changes and close the dialog.

FinishFinish and create the report with the information you provided.

HelpDisplay this help document.

Report Wizard − CrossTab Tab

The CrossTab tab summarizes data and presents the summaries in a compact row and column format.

FieldsIn the Field box, highlight a specific field from the query created on the Data tab. Click the corresponding arrows in themiddle of the dialog to add it into Columns, Rows and Aggregations respectively.

the New Formula button

Brings out the formula editor for you to create a new formula, which will be added to the source tree.

the New Summary button

Brings out the New Summary dialog for you to create a new summary. There is no summary in the source tree, so thisbutton is disabled here.

the New Parameter button

Brings out the Create Parameter dialog for you to create a new parameter. There is no parameter in the source tree, sothis button is disabled here.

JReport Windows and Dialogs

331

Page 340: JReport Designer - User Referencespecifies the driver such as JDBC driver (for JDBC) or the Data Source name (for JDBC−ODBC bridge), the user ID and the password for connecting to

Columns/RowsHere the fields displayed vertically or horizontally in your cross−tab are listed. You may remove unwanted fields byhighlighting them and clicking on . If you want set the field background, click the Color column and select a color from

the drop−down list.

If there is more than one field in the Rows, Columns, or Aggregations boxes, click and to alter their sequence.

AggregationsHighlight the field in this box and select a function from the Aggregation drop−down list on the left. It enables you tocreate summaries for the field selected.

In the Label column, type in some strings to indicate the meaning of the function.

Click the button, the Special Aggregation dialog appears which enables you to add additional calculations to the

cross−tab.

For detailed information, please see: User'guide | Editing a Report | Cross−Tab.

TemplatePreview the selected template.

All TabsBy default, not all the tabs are displayed, it is determined by the selected template. For example, when you choose tocreate a cross−tab report, you will find the Summary tab does not appear in the Report Wizard. But when you click theAll Tabs button at any time, all the tabs will display in the wizard.

BackRetain all changes and return to the previous tab.

NextRetain changes and continue to the next tab.

CancelDo not retain any changes and close the dialog.

FinishFinish and create the report with the information you have provided.

HelpDisplay help document.

Report Wizard − Subreport Tab

The Subreport tab allows you to merge two reports into one. JReport allows a report (referred to as the subreport) to beinserted into another report (referred to as the primary report). There is no difference between the primary report andthe subreport. A subreport can be standalone, i.e. it can be run separately like a normal report or it can also includeanother subreport.

SubreportHere is the number of the subreports inserted in the main report.

SectionDisplay the area JReport will place the subreport into.

JReport Windows and Dialogs

332

Page 341: JReport Designer - User Referencespecifies the driver such as JDBC driver (for JDBC) or the Data Source name (for JDBC−ODBC bridge), the user ID and the password for connecting to

StyleDisplay the default style defined in the template.

Choose a reportSelect an existing report as the subreport with the Browse Button. Please note that the reports which can be chosen asa subreport must be the those within the same catalog.

Sub LinksLink is the way of creating connections between the primary report and the subreport. A Sub Link is the relationshipbetween the two reports to be merged. You can build up one or more links between a primary report and a subreport. When you build a link, JReport will match up the records with equal relationships within the subreport and the primaryreport. For example, you have a primary report that is focused for customers and the subreport for orders. When webuild the link between them, JReport will build a subreport for each customer. The subreport will only include thoseorder records for that customer.To build a link between two reports, select the field to be linked in Field in main report, click to add the field into

the Links menu. In the Links menu, choose the operator from the OP drop down list. Then select the field linked inFields (Subreport) drop down list.

Parameters in SubreportDefine values for the subreport parameters on the left Parameter list by choosing the primary report objects on the rightValue list. Formulas or parameters can be selected from the drop−down list.

Return ValueReturn certain values to the main report. For example, you want to create a main report focused on the "CompanyInformation", and you also want to know the information about the grand total of the Employee Salaries of the company. To do this, first in the Fields in main report panel, select the parameter you created in the main report and add it intothe Return Values panel. Then in the Fields column, select the value to be returned, for this example, select asummary on grand total, press OK.

Note: When you insert the subreport, you should insert it into the section above the parameter, or the parameter valuewill be returned as Null.

the New Formula button

Brings out the formula editor for you to create a new formula, which will be added to the source tree.

the New Summary button

Brings out the New Summary dialog for you to create a new summary, which will be added to the source tree.

the New Parameter button

Brings out the Create Parameter dialog for you to create a new parameter, which will be added to the source tree.

Template...Preview the selected template.

All TabsBy default, not all the tabs are displayed, it is determined by the selected template. For example, when you choose tocreate a cross−tab report, you will find the Summary tab does not appear in the Report Wizard. But when you clickthe All Tabs button at any time, all the tabs will display in the wizard.

BackRetain all changes and return to the previous tab.

NextRetain changes and continue to the next tab.

JReport Windows and Dialogs

333

Page 342: JReport Designer - User Referencespecifies the driver such as JDBC driver (for JDBC) or the Data Source name (for JDBC−ODBC bridge), the user ID and the password for connecting to

CancelDo not retain any changes and close the dialog.

FinishFinish and create the report with the information you provided.

HelpDisplay this help document.

Report Wizard − Other Tab

The Other tab is used to preview your selection so far in Report Wizard. You can now make some adjustments, insertnecessary images, labels and fields or delete unwanted objects.

This feature somewhat is like Catalog Browser and Report Inspector. Surely, when you edit in the Design mode with thehelp of Catalog Browser and Report Inspector, it is convenient to frequently check your changes in the View mode.

ObjectThis field can change the current object to system defined special field. For example, change GroupName toFetchDate. When displayed, the group name in the group section becomes the date when the data is fetched.

SectionSelect from the Section column to place the inserted object into the desired section. However, you cannot change thisfeature for the template style object.

StyleHighlight an object, then double click in the Style field. In the popped up dialog, change the property for the selectedobject. Note that properties of template styles are not editable.

Insert Label/Insert Image/Insert FieldAs the name suggests, these three buttons are used to insert a label, image and field respectively. After inserting, youcan switch to the Object, Section and Style column to make further changes.

DeleteDelete the selected object.

Template...Preview the selected template.

All TabsBy default, not all the tabs are displayed, it is determined by the selected template. For example, when you choose tocreate a cross−tab report, you will find the Summary tab does not appear in the Report Wizard. But when you clickthe All Tabs button at any time, all the tabs will display in the wizard.

BackRetain all changes and return to the previous tab.

NextRetain changes and continue to the next tab.

CancelDo not retain any changes and close the dialog.

FinishFinish and create the report with the information you provided.

JReport Windows and Dialogs

334

Page 343: JReport Designer - User Referencespecifies the driver such as JDBC driver (for JDBC) or the Data Source name (for JDBC−ODBC bridge), the user ID and the password for connecting to

HelpDisplay this help document.

Report Wizard − Style Tab

The Style tab allows you to define the layout and style of the report.

PaperIn the Paper section, specify a type of paper from the Type drop list. Or, set the paper Type to Custom size and enterthe Width and Height for the paper you want.

MarginSet the left, right, top or bottom page margin exactly.

OrientationSelect Portrait or Landscape to set the print orientation: vertical or horizontal.

Save As DefaultAll the changes made in the above three sections (Paper, Margin and Orientation) can be saved as default by clickingthe Save As Default button. Next time, when you come to the Style tab, the saved settings will be displayed.

TypesIn this section, you may notice that some templates contain more than one type of the template item. By default,JReport will build your report with the format of the first template displayed in this section. This is defined inc:JReport\template\template.properties (assuming JReport is installed under c:\). For example, the Standard templateincludes six items, the default is Indent. You can select another item to layout your report. If you want to create acustom template, simply edit the template.properties file in Notepad.

Template...Preview the selected template.

All TabsBy default, not all the tabs are displayed, it is determined by the selected template. For example, when you choose tocreate a cross−tab report, you will find the Summary tab does not appear in the Report Wizard. But when you clickthe All Tabs button at any time, all the tabs will display in the wizard.

BackRetain all changes and return to the previous tab.

NextRetain changes and continue to the next tab.

CancelDo not retain any changes and close the dialog.

FinishFinish and create the report with the information you provided.

HelpDisplay this help document.

Catalog Browser − Queries

A query is used to build a report data source. With it, you can view, change, and analyze data in different ways.

JReport Windows and Dialogs

335

Page 344: JReport Designer - User Referencespecifies the driver such as JDBC driver (for JDBC) or the Data Source name (for JDBC−ODBC bridge), the user ID and the password for connecting to

The Query Menu

ApplyAccept the changes on the query.

Save asSave the query with the name you specify.

Add TableClick Add Table to get a menu list of all the available tables. Select table(s) and click the Add button to add them into thecatalog. Click the Done button to finish adding more tables. Based on the PSQL options that are selected, JReport willauto join the new table together with the previous tables. Click the Arrange button or click Query | Arrange Tables toorganize these tables.

Delete TableDelete the selected table.

FilterThis allows you to further add more criteria to limit the amount of data.

Select DistinctWhen you select it, in the SQL statement, the SELECT DISTINCT command will be used instead of SELECT.

Ignore Predicate If Parameter Value Is NullIf the query uses a parameter, and the parameter value is null at run−time, then this condition will be removed from thequery's criterion.

For string type parameters, when the value is left blank, if the "Ignore Predicate If Param Is Null" is set to true, the valueof this parameter will be considered as NULL, and this predicate will not appear in the where clause; if false, it will betreated as an empty string(¡®¡¯).

SQLAllows you to view and edit the SQL statements used to execute the query.

Reference Note : For information about the SQL Editor dialog, please see User's Guide | Editing a Report | Query Editor

Arrange TablesOrganize the tables in the query.

Show Mapping NamesShow the full name of the field in the tables on the Query Editor.

Show Table NamesShow which table each field in the Criteria menu belongs to.

Join ColumnsJoin the highlighted columns in tables together .

Auto JoinJoin tables together based upon the default criteria in Auto Join. The default criteria are Primary Keys with LikeNames,Foreign Keys and Like Column Names.

Current Query OptionsChange Auto Join and showing options.

JReport Windows and Dialogs

336

Page 345: JReport Designer - User Referencespecifies the driver such as JDBC driver (for JDBC) or the Data Source name (for JDBC−ODBC bridge), the user ID and the password for connecting to

The Column Menu

Create Computed ColumnThe create functions are used for a particular query. It allows you to quickly and easily create columns with the functionsavailable instead of writing a formula.

Add Formula FieldsBrings out the Getting formulas dialog to add formulas to the query.

Delete ColumnDelete the selected column in the Criteria menu. To undelete, find the field in the table you deleted and place a checkmark beside it.

Criteria

These columns and menus allow you to specifically define criteria for the fields in JReport Designer.

ArrangeOrganize joined or auto joined tables.

SQLShow the sql statement of the query.

PreviewBring out the Preview Option dialog for you to preview the records.

Show PathShow the information of the pre−join paths among the tables in the query, when the pre−join feature is enabled.

ApplyAccept all changes in the dialog.

OKAccept all changes and close the dialog.

CancelDo not retain any changes and close the dialog.

HelpDisplay this help document.

Add Table ( View )

It allows you to add the tables and views in the database to Catalog Browser.

Database CatalogIt is only available for the SQL Server database. It lists the database catalog of the SQL Server for you to select.

SchemaThis function lists the schemas in the database for you to select.

Tables (Views)This function lists the tables (views) contained in the selected schema after you click the Refresh button.

JReport Windows and Dialogs

337

Page 346: JReport Designer - User Referencespecifies the driver such as JDBC driver (for JDBC) or the Data Source name (for JDBC−ODBC bridge), the user ID and the password for connecting to

ConnectionThis function shows the current connection name.

Table Name Pattern (Check box)This function enables you to filter the tables (views) according to the filtering condition specified in the Table NamePattern text box.

Include system TablesWhen this function is checked, the system tables will become available in the Tables panel.

Include Added TablesWhen this function is checked, the tables that have been added to Catalog Browser will become available in the Tablespanel. It means you can add them into Catalog Browser again with a different name.

Load TablesThis function loads the tables (views) to the Tables (Views) panel when changes have been made.

AddThis function adds the selected tables (views) to the catalog.

DoneThis function completes adding tables (views) and close the dialog.

HelpThis function displays help document.

Add (Edit) User Data Source

This dialog is used to add the User Data Source Object into the catalog of JReport. To be compatible with the old DataSource Driver, the dialog can also accept the old Data Source Driver.

NameThe name text box is a place to input the name of UDS. The name of UDS can’t have duplicate names in itsnamespace, that is to say, its name cannot be the same as that of the existing table, view, procedure, file query andquery. The name field cannot be empty either.

Class NameThe class name text box is a place to input the full name (including package name) of the class represented by theUDS. The class should be in the classpath in the system environment. In order to be compatible with the old UDS, theold API class name can be used here. The old data source API is depreciated in JReport. After filling in this field, theclassname of the interface that the class implements will be displayed in below the field.

ParametersThis text box is used to input the parameter string for the UDS. The parameter string must match the format defined inthe UDS class. In JReport Designer version 2.0, you can use parameters pre−defined in the catalog of JReport. Theformat used in string is "@" + parameter name. For example: the string may look like: "SQL=select * from employee". If you want to change the part after "=" in the string, you can first add a parameter into the catalog first, for example, adda parameter named sql into the catalog. Then use the parameter in the parameter string of UDS. So the string maylook like: "SQL=@sql"

Specify columnsIf checked, the column definitions list will be enabled and column definitions can be added. If not checked, the column definitions list will be disabled.If you don't specify the column definitions, program will get them from result set automatically.

JReport Windows and Dialogs

338

Page 347: JReport Designer - User Referencespecifies the driver such as JDBC driver (for JDBC) or the Data Source name (for JDBC−ODBC bridge), the user ID and the password for connecting to

Column definitions list

Name Input any valid name of a column. The name of the column should have the same validation as the common tablecolumn. The default name of column definition is ‘column1’, ‘column2’… etc.

SQLTypeSelect one of the types. So far, all the types that JReport supports are listed below:

Precision, Length, Scale, RadixThe default value for each SQL type will be displayed automatically. Click on the cell and modify the value if necessary.

NullableDouble−click on the cell, and the label will cycle among the three symbols.

+Add a column definition. When the + button is clicked on, a default row will appear in the column definitions. If there isno selected row, the empty row will be added in the last line.

−Delete a column definition. When the "−" button is clicked, a selected row will be deleted.

\/ and /\Change the order of columns by moving up and down.

JReport Windows and Dialogs

339

Page 348: JReport Designer - User Referencespecifies the driver such as JDBC driver (for JDBC) or the Data Source name (for JDBC−ODBC bridge), the user ID and the password for connecting to

OKAdd the UDS into the catalog of JReport.

CancelDo not retain any changes and close this dialog.

HelpDisplay this help Document.

Import Hierarchical Data Source From XML

Imports hierarchical data source from the external XML file.

XML URISpecifies the location of the external XML format data source or the URL that returns an XML stream. Can be a localpath or a web URL. Static string inline with multiple parameters is supported. In addition, JReport parameters can bedynamically referenced in the URI for setting different values at runtime.

Click Browse to find the file on the local disk.

XSD URISpecifies the location of the schema file for the XML format data source. Can be a local path or a web URL. Click Browseto find the file on the local disk.

Root NameIndicates the hierarchical data source root, starting from which JReport Designer imports the data.

ParseAnalyze and loads data tree from the external data source file. The structure is shown in the Structure panel after youclick this button.

Column definitions listSpecifies settings for the columns, , click here to see the definitaion description.

OKAdd the HDS into the JReport catalog.

CancelDo not retain any changes and close this dialog.

HelpDisplays this help Document.

Import Hierarchical Data Source From General

Imports hierarchical data source from the external data source file.

Class NameSpecifies the name of the entrance class that implements the HDS APIs. The class should be in the classpath in thesystem environment.

JReport Windows and Dialogs

340

Page 349: JReport Designer - User Referencespecifies the driver such as JDBC driver (for JDBC) or the Data Source name (for JDBC−ODBC bridge), the user ID and the password for connecting to

ParameterSpecifies the parameter string that is required by the class, if any. The parameter string must match the format definedin the HDS class.

LoadTreeAnalyze and loads data tree from the external data source file. The structure is shown in the Structure panel after youclick this button.

Column definitions listSpecifies settings for the columns, , click here to see the definitaion description.

OKAdd the HDS into the JReport catalog.

CancelDo not retain any changes and close this dialog.

HelpDisplays this help Document.

Column definitions list

Column Description

Element The field name in the selected node of table.

Selected Specifies whether to import this field to the catalog.

FormatSpecifies the format in which the field value is to be displayed in the reportresult. Varies for different types of data, and can be manually defined. SeeReference | Reporting Features | DBField

Type

Select one of the data types. The following table lists all the data types thatJReport Designer supports.

Java Type JDBC Type

java.sql.Types.BIT BIT

java.sql.Types.TINYINT TINYINT

java.sql.Types.SMALLINT SMALLINT

java.sql.Types.INTEGER INTEGER

java.sql.Types.BIGINT BIGINT

java.sql.Types.FLOAT FLOAT

java.sql.Types.REAL REAL

java.sql.Types.DOUBLE DOUBLE

java.sql.Types.NUMERIC NUMERIC

java.sql.Types.DECIMAL DECIMAL

java.sql.Types.CHAR CHAR

java.sql.Types.VARCHAR VARCHAR

java.sql.Types.LONGVARCHAR LONGVARCHAR

java.sql.Types.DATE DATE

java.sql.Types.TIME TIME

java.sql.Types.TIMESTAMP TIMESTAMP

java.sql.Types.LONGVARBINARY LONGVARBINARY

JReport Windows and Dialogs

341

Page 350: JReport Designer - User Referencespecifies the driver such as JDBC driver (for JDBC) or the Data Source name (for JDBC−ODBC bridge), the user ID and the password for connecting to

Precision The default value for each SQL type will be displayed automatically. Clickthe cell and modify the value if necessary.

Scale

Nullable

Currency

Array

Insert DBFields

There are three tabs in this dialog: DBFields, Formulas and Parameters.

DBFields TabIt contains the tables and fields selected on the Data tab in Report Wizard. You will notice that some of the field iconshave red arrows, it indicates that these fields are active and being used in your report. Select a field and click on theInsert button, position the cursor at the desired location in your report and click.

Formulas TabIt contains the formulas in Working Set. The red arrows on some formula icons indicate that these formulas are activeand being used in your report. Select a formula and click on the Insert button, then position the cursor at the desiredlocation in your report and click.

Parameters TabIt contains the parameters in Working Set. The red arrows on the parameter icons indicate that these parameters areactive and being used in your report. Select a parameter and click the Insert button, then position the cursor at thedesired location in your report and click.

LayoutWhen multiple objects are selected, arrange these objects horizontally or vertically by selecting Horizontal or Vertical.

Horizontal Space(Pixel)Specify the space between objects which are arranged horizontally.

Vertically Space(Pixel)Specify the space between objects which are arranged vertically.

ModifyModify the selected formula or parameter. It works only on Formulas tab and Parameters tab.

NewCreate a new formula or parameter. It works only on Formulas tab and Parameters tab.

InsertInsert the selected objects into the desired location in the report.

CloseAccept the changes and close the dialog.

WHERE Portion Editor

The WHERE Portion Editor dialog allows you to create or edit the WHERE portions in the JReport catalogs.

A WHERE portion, as the term suggests, is the WHERE clause in a SQL SELECT statement. In JReport, we call SQL

JReport Windows and Dialogs

342

Page 351: JReport Designer - User Referencespecifies the driver such as JDBC driver (for JDBC) or the Data Source name (for JDBC−ODBC bridge), the user ID and the password for connecting to

SELECT statements queries. Both queries and WHERE portions are stored in the catalog. And WHERE portions aresaved in the catalog independently (not related to queries). When a report is running, JReport will construct the SQLstatement based on the query used in the report and may substitute the WHERE clause in the SQL statement if there isa given WHERE portion.

Users can specify a WHERE portion to JReport system before running a report, so that he can generate the report ondifferent data.

The WHERE portion can be stored in the catalog in two formats: structure and string. In the structure format, the groupsof conditions are stored. The WHERE portion consists of many condition groups and the groups are connected by alogical operator. Each group consists of many conditions and the conditions are connected by a logical operator too; Each condition consists of the left expression, the relationship operator and the right expression. In the string format,the text of the WHERE portion is stored.

The WHERE portion editor window varies with the formats of WHERE portion.

NameThe name to assign to the WHERE portion. TypeThe choice lists the two types of the WHERE portions, Structure and String. Select one of them from the drop downmenu..

QueryIt lists all queries in the catalog. Select one query to build or edit the WHERE portion.

Editing area

The editing area is the place to input the WHERE portion. When editing the string type WHERE portion, a text editor willbe shown and you can key in the WHERE clause; When editing the structure type WHERE portion, a condition editor willbe displayed and you can construct the WHERE portion by clicking buttons.

OKClose this WHERE portion editor dialog and accept changes.

CheckCheck the validation of the WHERE portion according to the query. The validation of a WHERE portion isdefined as: all the fields and formulas referred to by the WHERE portion are available to the chosen query. The validation check will also ensure that the WHERE portion can work with the specified query.

CancelClose this WHERE portion editor dialog and cancel the changes.

Show SQLDisplay the string of the WHERE portion. HelpDisplay this help document.

Group Wizard

Groups the records according to the defined criteria.

Group tabWith the Group tab you can modify the criteria to define multi−level groups.

Report fieldsExpand the table directory in the Report fields panel by double clicking the table icon or clicking the icon, highlight thefield you want as a criteria for the grouping, then place your criteria into the Group by (ordered) menu by clicking on the

JReport Windows and Dialogs

343

Page 352: JReport Designer - User Referencespecifies the driver such as JDBC driver (for JDBC) or the Data Source name (for JDBC−ODBC bridge), the user ID and the password for connecting to

button.

Group by (ordered)You may also notice a choice beside each field in the group list. In the list there are normally four icons.

− Fields will be grouped and sorted in an ascending order (A, B, C). − Fields will be grouped and sorted in a descending order (C, B, A). − Fields will not be sorted, and JReport will generate a group break according to the original order − You can define how to group your information. For example, you placed a field named "Region" for grouping, this

field contains all 50 states in the United States. You want to see the data between Maryland (MD) and New York (NY).With this way, define the criteria by selecting the "between" operator to further define your grouping information.

If the selected field for grouping is related to date, you will see a choice on the right of the field when you add it to thegroup list. In the list there are normally the following choices.

None − records will be fetched as normal.for each day − records will be fetched by each day.for each week − records will be fetched by each week.for each half month − records will be fetched by each half month.for each month − records will be fetched by each month.for each quarter − records will be fetched by every three months.for each half year − records will be fetched by each half year.for each year − records will be fetched by each year.Click the button to remove the selected group field in this panel, or click the button to change its order.

Sort tabThe Sort tab allows you to organize the information within each group by sorting records. It is much similar to the Grouptab in appearance. You can select field from the Fields panel for sorting, then click the add button to place your

criteria into the Sort by menu. You will notice an up arrow besides each field selected to be sorted. This means that thefields will be sorted in an ascending order (A, B, C). Clicking the Up arrow icon, you can change it to a down arrow to sortdata in a descending order (C, B, A) or you can customize to sort on runtime.

Sort inSpecifies the sorting scope. Selecting the whole report sorts the records in the whole report according to the sortingcriteria you defined. Choosing to sort in a group sorts the records in that specific group according to the sorting criteriayou defined. To select the sorting scope, select The whole report or a group name in the drop down list. You canindividually define the sorting conditions for different sorting scope, one by one.

TopNIf the whole report is selected in the Sort in list, when you specify a number in the TopN box, the first N records in eachgroup will be displayed while others are hidden.

If a group name is selected in the Sort in list, when you specify a number in the TopN box, the first N groups in the reportwill be displayed while others are hidden.

OtherAll the other records that don't match the TopN condition can be displayed (which are by default hidden) in anothergroup. Check this box and provide a name for this group.

This option is available only when a group is selected in the Sort in list and the TopN box is checked.

Group FilterPop up a dialog to allow you to modify more advanced group filtering conditions.

JReport Windows and Dialogs

344

Page 353: JReport Designer - User Referencespecifies the driver such as JDBC driver (for JDBC) or the Data Source name (for JDBC−ODBC bridge), the user ID and the password for connecting to

Related Information : Reference | Dialog | Group Filter

OKApply the changes and close the dialog.

CancelDo not retain any changes and close the dialog.

HelpDisplay this help document.

Chart Wizard

The Chart Wizard dialog allows you to add and create graphs in your report.

TypeClick the Type tab, a window appears with different chart types. Select one type to create a graph in your report.

BAR

Clustered Bar 2−D Clustered Bar. Displays and compares datavalues across categories.

Stacked Bar 2−D Stacked Bar. Displays and compares thecontribution of each data value to a total acrosscategories.

100% Stacked Bar 2−D 100% Stacked Bar. Displays and compares thepercentage that each data value contributes to atotal across categories.

Clustered Bar 3−D Clustered bar with a 3−D visual effect.

Stacked Bar 3−D Stacked bar with a 3−D visual effect.

100% Stacked Bar 3−D 100% stacked bar with a 3−D visual effect.

Bar 3−D 3−D Bar. Displays and compares data valuesacross categories and series.

BENCH

Clustered Bench 2−D Clustered Bench. Displays and compares datavalues across categories.

Stacked Bench 2−D Stacked Bench. Displays and compares thecontribution of each data value to a total acrosscategories.

JReport Windows and Dialogs

345

Page 354: JReport Designer - User Referencespecifies the driver such as JDBC driver (for JDBC) or the Data Source name (for JDBC−ODBC bridge), the user ID and the password for connecting to

100% Stacked Bench2−D

100% Stacked Bench. Displays and comparesthe percentage that each data value contributesto a total across categories.

Clustered Bench 3−D Clustered bench with a 3−D visual effect.

Stacked Bench 3−D Stacked bench with a 3−D visual effect.

100% Stacked Bench3−D

100% stack bench with a 3−D visual effect.

Bench 3−D 3−D Bench. Displays and compares data valuesacross categories and series.

LINE

Line 2−D Line. Displays trend over categories.

Stacked Line 2−D Stacked Line. Displays the trend of thecontribution of each data value over categories.

100% Stacked Line 2−D 100% Stacked Line. Displays the trend of thepercentage each data value contributes overcategories.

Line 3−D Line with a 3−D visual effect.

AREA

Area 2−DDisplays the trend of the values over time orcategories.

Stacked Area 2−D Stacked Area. Displays the trend of thecontribution of each data value over categories.

100% Stacked Area 2−D 100% Stacked Area. Displays the trend of thepercentage each data value contributes overcategories.

Area 3−D Area with a 3−D visual effect.

Stacked Area 3−D Stacked area with a 3−D visual effect.

JReport Windows and Dialogs

346

Page 355: JReport Designer - User Referencespecifies the driver such as JDBC driver (for JDBC) or the Data Source name (for JDBC−ODBC bridge), the user ID and the password for connecting to

100% Stacked Area 3−D 100% stacked area with a 3−D visual effect.

PIE

Clustered Pie 2−D Pie. Displays the contribution of each data valueto a total over time or categories.

Clustered Pie 3−D Pie with a 3−D visual effect.

RADAR

Radar 2−D Radar. Displays and compares the data valuesrelative to a center point.

GAUGE

Gauge Dial 2−D Gauge. Usually displays the performance ofeach member in a group, using three colors,green, yellow, and red (by default) to representthree levels: normal, alert, and error. This type,displays each data value by a dial.

Gauge Bar 2−D Gauge. Displays each data value by a bar.

Gauge Bubble 2−D Gauge. Displays each data value by a coloredbubble.

SURFACE

Surface 3−D Surface. Indicates what level of different valuesreside in, and shows the cross−relationshipsbetween category and series.

SCATTER

Scatter 2−D Compares pairs of values.

Scatter Curved Line 2−D Scatter with data points connected by smoothedlines.

Scatter Straight Line2−D

Scatter with data points connected by lines.

BUBBLE

Bubble 2−D Compares sets of 3 values. Like a scatter chartwith the third value displayed as the size of thebubble marker.

STOCK

High−Low 2D High−Low. Requires two series of values in thisorder.

JReport Windows and Dialogs

347

Page 356: JReport Designer - User Referencespecifies the driver such as JDBC driver (for JDBC) or the Data Source name (for JDBC−ODBC bridge), the user ID and the password for connecting to

High−Low−Close 2−D High−Low−Close. Requires three series ofvalues in this order.

Open−High−Low−Close2−D

Open−High−Low−Close. Requires four series ofvalues in this order.

COMBO

ComboCombination charts. Two types of data markersare used to represent different data values.

DataYou create charts in JReport using DBFields, summaries, formulae, and groups. You manage the relationship amongthese elements to show the data better in chart. Normally, DBFields, summaries, and formulae in a report arerepresented in a chart using chart data markers, and groups are usually used to produce category names and dataseries names. DBFields also can be used as category names.

Place chart inYou can place the chart in Report Header section, Report Footer section, Group Header section, or Group Footersection. Once the chart is placed, it cannot be moved to any other section.

The section or group where the chart resides will affect the chart data structure and organization, say, only thesummaries and formulae in the first two groups whose nesting−levels are lower than and adjacent to the group where thechart resides are available for constructing the chart.

For example, suppose that you have four groups in your report: date1, Last Name, Customer_Customer ID, andOrders_Order ID, where the groups are nested, such as group date1 contains group Last Name and group Last Namecontains group Customer_Customer ID, and so on. If you place the chart in the Report section, then the summaries andformulae in the groups other than the highest and second highest level groups, date1 and Last Name in this case, will notbe able to add to the Show Data field. If you place the chart in the group section of group Last Name, only summariesand formulae in the group Customer_Customer ID, and Orders_Order ID will be used.

GroupsList the groups in the report. From top to bottom, all the other groups are listed in group level sequence, say, outergroups are placed higher than inner groups. The Report node, displayed on the top of other nested groups, representsthe whole report.

The summaries and formulae are placed in the proper groups separately, according to the group they are based on.

FieldsList the DBFields and formulae used in the report. You can use any DBField or formula as group name. You can also addany DBField or formula to the Show Data field, so long as its data type is number.

Parameter is not supported in JReport charts.

Group NamesList the group name field (inner group) that is to be used as data labels on the X axis.

Series Names List the series name field (outer group) that is to be used as data labels on the Z axis.

Show DataList the data value field (DBField, summary, or formula) that is to be used as data values on the Y axis.

JReport Windows and Dialogs

348

Page 357: JReport Designer - User Referencespecifies the driver such as JDBC driver (for JDBC) or the Data Source name (for JDBC−ODBC bridge), the user ID and the password for connecting to

OKApply the changes and insert the chart into the report.

CancelDo not retain any changes and close the dialog.

HelpDisplay this help document.

Cross−Tab

The Cross−Tab summarizes data and presents the summaries in a compact row and column format.

FieldsIn the Field box, highlight a specific field from the query. Click the corresponding arrows in the middle on of the dialog toadd it into Columns, Rows and Aggregations respectively.

Columns (Rows)Here the fields displayed vertically or horizontally in your cross tab are listed.

Highlight and select unwanted fields to remove them by clicking . If you want to set the field background, click the

Color column and select a color from the drop−down list.

If there is more than one field in the Rows, Columns, or Aggregations boxes, click and to alter their sequence.

Click the Direction column, select a sort type for the column/row.

AggregationsHighlight the field in this box and select a function from the Aggregation drop−down list on the left. It enables you tocreate summaries for the field selected.

In the Label column, you can type in some strings to indicate the meaning of the function.

Click the button, the Special Aggregation dialog appears which enables you to add additional calculations to the

cross−tab.

Orientation

Vertical Layout − Display the aggregate fields vertically.Horizontal Layout − Display the aggregate fields horizontally.Number of Row/Column − Specify the number of Row/Column to display.

Row Total on TopNormally, the row "Total" for each column will be displayed on the bottom of the cross−tab. If you check this option, therow "Total" will be displayed on the top of the cross−tab.

Column Total on LeftNormally, the column "Total" for each line/row will be displayed at the last column in cross−tab. If you check this option,the column "Total" will be displayed at the first column in the cross−tab.

Repeat Row HeaderIf checked, the column heading will be repeated on every page.

JReport Windows and Dialogs

349

Page 358: JReport Designer - User Referencespecifies the driver such as JDBC driver (for JDBC) or the Data Source name (for JDBC−ODBC bridge), the user ID and the password for connecting to

Avoid Orphan HeaderIf checked, the column heading will be kept together with data.

OKApply all changes and close the dialog.

CancelClose the dialog and delete all the unsaved changes on this dialog.

HelpDisplay help document.

Reference Note : User'guide | Editing a Report | Cross−Tab.

Enter Parameter Values

A parameter is a variable whose value is input at run time. It helps a lot to control your report result dynamically.

In this dialog, which pops up at run time, all the parameter names used in the report and prompting information are listed.Input the parameter value as prompted or accept the default value.

OKApply your input and run the report.

DefaultAccept the default value and run the report.

CancelCancel your operation and exit running the report.

HelpDisplay the help document.

Create/Edit Parameter

Parameter NameGive the name of the parameter.

Value TypeSpecify a value type of parameter. Only those types which are listed in the drop−down list can be used as types.

Prompting TextType the text which prompts you to type some information for the parameter input.

Prompting ValuesThis is the default value for the parameter. The default value must be the same type as the type selected in Value Type.When you add a new value into the "Prompting Values" and press the button , the value will be added in it.

When you press the button , the values in the "Prompting Values" will be deleted accordingly.

Minimum ValueInput the minimum value.

Maximum ValueInput the maximum value. Note that the prompting value you input must be between the minimum value and themaximum value, or an error message will pop up.

JReport Windows and Dialogs

350

Page 359: JReport Designer - User Referencespecifies the driver such as JDBC driver (for JDBC) or the Data Source name (for JDBC−ODBC bridge), the user ID and the password for connecting to

User Defined FormatWhen you define the value format, for example: MMM−dd−yy, all the values you input should be based on it. Otherwisethere will be an error message.

Bind with ColumnIf checked, you can specify a column name to list all its values in the database in the Enter Parameter Value dialog.

JReport provides such a mechanism that link each field value of Display Column with the exact value of Bind Column.When you select the field value from Display Column, the field value of Bind Column is actually sent to the query andfilter the query result.

Bind ColumnThe column name used to filter the data in the database.

Display ColumnWhen viewing a report which contains parameters, the field value related to the column name you selected in thedrop−down list of Display Column will display in the dialog popped up at runtime. You can select a value from the list toquery data with the bound field.

DistinctWhen viewing the report which contains parameters, the Enter Parameter Values dialog will pop up. If the Distinct optionis checked, in the Enter Parameter Values dialog only identical values list instead of duplicate values. This option isenabled only when the Bind with Column option is checked.

SQLWhen Bind with Column is checked, this button is used to bring out the Import SQL dialog for you to view and edit theSQL statments.

RequiredIf checked, you must supply a value before the report can run.If not checked, you can either type a value, or leave it as it is. If you do not want to see this parameter in report, makesure the field is left blank.

The following options are only used for the String type paramters:

Minimum LengthSpecifies the minimum length for the parameter values, say, the length of the value you input when you run the reportmust be equal to or longer than the length you specify here.

Maximum LengthSpecifies the maximum length for the parameter values, say, the length of the value you input when you run the reportmust be equal to or shorter than the length you specify here.

String EncodingSpecifies the string encoding for the String type value, and it can be UTF8 or 8859_1.

User Defined FormatSpecifies the format for the string type parameter values, and when you run the report, the parameter value you inputmust follow the format specified here. For how to format the value, please see the table about the wildcard below first:

WildcardCharacter

Description Example

%

_ (underscore) Any single character.

[ ]

JReport Windows and Dialogs

351

Page 360: JReport Designer - User Referencespecifies the driver such as JDBC driver (for JDBC) or the Data Source name (for JDBC−ODBC bridge), the user ID and the password for connecting to

Any single character in the specifiedrange (e.g. [a−f]) or set (e.g. [abcdef]).

[^]Any single character not in thespecified range (e.g. [^a−f]) or set(e.g. [^abcdef]).

New Summary

SummariesSelect <Create> from the drop−down list if you want to create a new summary. Or select one of the summaries in thedrop down list to modify it.

FunctionIt lists functions available for the selected field to be summed on.

Sum On Select a field for summary to compute from the Resource panel. Click on the > button next to Sum On.

Group ByFields that are used to group the data. If selected, summary of each group will be calculated.

Special FunctionIf the Group By field is date/time type, you can further define to calculate the summary for each day, for each week etc.(select one from the Special Function drop−down list).

OKAccept all changes and close the New Summary dialog.

ApplyApply all changes of the existing summary or add the new summary to the catalog.

CancelDo not retain any changes and close the dialog.

HelpDisplay this help document.

Insert Summary

Create a new summaryIt allows you to create a new summary on the field selected in your report. Select an aggregate function from the dropdown menu, then select the field by which the records are grouped. Click Insert to place the new summary into yourreport.

Select a summary from catalogInsert a summary into the report from the Select a summary from catalog panel.

InsertInsert the selected or newly created summary into the report.

CancelDo not retain any changes and close the dialog.

HelpDisplay this help document.

JReport Windows and Dialogs

352

Page 361: JReport Designer - User Referencespecifies the driver such as JDBC driver (for JDBC) or the Data Source name (for JDBC−ODBC bridge), the user ID and the password for connecting to

Insert SubReport

JReport allows a report (referred to as the subreport) to be inserted into another report (referred to as the primaryreport). There is no difference between the primary report and the subreport. A subreport can be standalone, i.e. itcan be run separately like a normal report or it can also include another subreport.

Choose a reportSelect an existing report as the subreport with the Browse Button. Please note that the reports which can be chosen asa subreport must be those within the same catalog.

Sub LinksLink is the way of creating connections between the primary report and the subreport. A Sub Link is the relationshipbetween the two reports to be merged. You can build up one or more links between a primary report and a subreport. When a link is built, JReport will match up the records with equal relationships within the subreport and the primaryreport. For example, you have a primary report that is focused for customers and the subreport for orders. When youbuild the link between them, JReport will build a subreport for each customer. The subreport will only include thoseorder records for that customer.To built a link between two reports, select the field to be linked in Fields(Primary), click to add the field into

the Links menu. In the Links menu, choose the operator from the OP drop down list. Then select the field linked in theFields (Subreport) drop down list.

Parameters in SubreportDefine values for the subreport parameters on the left Parameter list by choosing the primary report objects on the rightValue list. Formulas or parameters can be selected from the drop−down list.

Return ValueReturn certain values from subreport to main report.

For example, you want to create a main report focused on the "Company Information", and you also want to know theinformation about the grand total of the Employee Salaries of the company. To do this, first in the Fields in mainreport panel, select the parameter you created in the main report and add it into the Return Values panel. Then in theFields column, select the value to be returned, for this example, select a summary on grand total, press OK.

Note: When you insert the subreport, you should insert it into the section above the parameter, or the parameter valuewill be returned as Null.

OKApply all changes and close the dialog.

CancelDo not retain any changes and close the dialog.

HelpDisplay this help document.

Formula Editor

The Formula Editor is used to create and edit formulas.

FieldsThis panel displays a list of those fields that are available for formulas. Those fields contain table columns, formulas,summaries, parameters and special fields. Select one field and double click it or click the Insert button to insert it into theFormula text panel at the insertion point.

JReport Windows and Dialogs

353

Page 362: JReport Designer - User Referencespecifies the driver such as JDBC driver (for JDBC) or the Data Source name (for JDBC−ODBC bridge), the user ID and the password for connecting to

FunctionsThis panel displays a list of JReport functions that are available for formulas. When you select one function and doubleclick it or click the Insert button, JReport will insert the selected function into the Formula text panel at the insertion pointcompletely with its required syntax items (parentheses, commas, etc). For the usage of these functions, please refer tothe User Reference | Built−in Functions.

OperatorsThis panel displays a list of operators that are available for formulas. Select one operator and double click it or click theInsert button to insert the selected operator into the Formula text panel at the insertion point. For the usage of theseoperators, please refer to the User Reference | Operator.

Formula TextIn this panel, you can build and edit your formula. There are several ways to work with formula:

Select formula components from the fields, functions and operators panel in the top of Formula Editor, thendouble−click on the components or press the Insert button, JReport will insert them in the formula;

Type your formula in the text box; • Use these two methods together; • Paste formula text from text document of other programs.•

The line numbers of the formula are marked in the left of the panel to help you check it easily.

OKTest the syntax of your formula. If the formula contains some errors, JReport will pop up a dialog to show detailedinformation about the error. Whether the formula is correct or not, the editor will be closed.

CheckTest the syntax of your formula. If the syntax is incorrect, JReport gives the opportunity to correct the errors, and doesnot close the editor.

PropertiesSpecify the precision and scale properties of the formula.

HelpThe help is context sensitive. Select one component in fields, functions or operators panel, then press the help button,and the corresponding help document will appear.

Reference Note: User Reference | Formula Syntax.

Special Group

Group NameCreate a new name for the grouping criteria.

OperatorSelect an Operator function to group your data.

There are many other options in the Specified Option section that can define how to group your data. Define them by:between, not between. > (greater than), < (less than), = (equal to), <= (less than or equal to), >= (greater than or equalto), or != (not equal to).

OperandEither op1 or both op1 and op2 will be seen in the Operand menu. Type the criteria here. JReport will automaticallyplace quotation marks on the criteria.

JReport Windows and Dialogs

354

Page 363: JReport Designer - User Referencespecifies the driver such as JDBC driver (for JDBC) or the Data Source name (for JDBC−ODBC bridge), the user ID and the password for connecting to

Keep values outside of the range in a special groupIf checked, JReport will keep the values that are not included in the specified criteria into a special group. The name ofthe group will show in the Name for the special group menu.

AddAdd a new grouping feature, click the Add button. This will bring you to the Group Name dialog. Clicking this button alsoenables you to add more grouping features when you finish the current one.

RemoveRemove the grouping feature you specified.

OKApply all changes and go back to Group tab.

CancelDo not retain any changes and go back to the Group tab.

HelpDisplay this help document.

Create Computed Column

The create functions are used for a particular query. It helps create functions quickly and easily instead of writingformulas.

Computed Column NameSpecify the name of computed column to be created.

FunctionsThe functions here are not of JReport system. They are from the connected database you use. Thus, if you changeyour data source, some of these functions may no longer exist. For each database, the different supported functions listwill be returned.

icon: add the numbers or fields together in the Expression menu.

icon: Subtract numbers or fields together in the Expression menu.

icon: Multiply numbers or fields together in the Expression menu.

icon: Divide numbers or fields together in the Expression menu.

icon: equate fields together.

icon: place quotations on long character strings or name that have blanks in them (example: place quotes on values

like "New York" or "Washington DC"). icon: place fields together in the same Expression menu. (Example: "New York" || "Washington DC").

icon: place your fields in parentheses.

Table/ColumnList all the tables and fields available for creating computed column.

OKApply all changes and close the dialog.

CancelDo not retain any changes and close the dialog.

JReport Windows and Dialogs

355

Page 364: JReport Designer - User Referencespecifies the driver such as JDBC driver (for JDBC) or the Data Source name (for JDBC−ODBC bridge), the user ID and the password for connecting to

HelpDisplay this help document.

Join Options

Once the links have been established, you may double click on the join icon "=" on the green linking lines to modify thelinks.

Outer JoinCheck this box to indicate an "outer join" performed. There are two kinds of join formats: SQL92 and Use"(+)". Withconventional joins, records that do not satisfy the join condition are eliminated from the result. Outer join preservesthese records in the result and replaces the missing value with nulls. We call the join "left (right) outer join" if the recordsin the left (right) side table are preserved. For example, consider the following two tables:

Table 1

Order O# C#

101 001

102 002

103 004

Table 2

Customer C# Name

001 GE

002 IBM

003 DELL

The conventional join of Customer.C# = Order.C# will produce the following result:

JoinResult O# C# Name

101 001 GE

102 002 IBM

The left outer join of Customer.C# = Order.C# will produce the following result:

JoinResult O# C# Name

101 001 GE

102 002 IBM

JReport Windows and Dialogs

356

Page 365: JReport Designer - User Referencespecifies the driver such as JDBC driver (for JDBC) or the Data Source name (for JDBC−ODBC bridge), the user ID and the password for connecting to

103 004 <null>

The right outer join of Customer.C# = Order.C# will produce the following result:

JoinResult O# C# Name

101 001 GE

102 002 IBM

<null> 003 DELL

Drop Down Menu

= Will display values that are equal to each other.> Will display values that are greater on the left side.< Will display values that are greater on the right side.>= Will display values that are greater than or equal to the left side.<= Will display values that are greater than or equal to the right side.<> Will display values that are not equal to each other.

DeleteDelete the selected green linking line.

CancelDo not retain any changes and close the dialog.

OKApply all changes and go back to the Join tab of Report Wizard.

Page Setup

It allows you to control the print output for the selected page size.

PaperSpecify the paper size. If you select the Custom Size, input paper Width and Height.

MarginSpecify the distance of report data to the top, bottom, left, or right edge of the page.

OrientationSpecify the paper orientation by checking either Portrait (vertical) or Landscape (horizontal).

OKApply all changes and close the dialog.

HelpDisplay this help document.

CancelDo not retain any changes and exit the page setup.

JReport Windows and Dialogs

357

Page 366: JReport Designer - User Referencespecifies the driver such as JDBC driver (for JDBC) or the Data Source name (for JDBC−ODBC bridge), the user ID and the password for connecting to

Deployment Wizard

It is the tool that is used to deploy catalogs and reports locally.

From CatalogSpecifies the catalog of the report to be deployed. Input the name with its full path of the catalog file or click theBrowse button to search it on the Open Catalog File dialog.

Select ReportAll the reports of the selected catalogs are listed here. Select the reports you want to deploy by highlighting them.

Adds the highlighted reports from the Select Report list to the list in the right.

Removes the highlighted reports from the list in the right to the Select Report list.

Adds all the reports in the Select Report list to the list in the right.

Removes all the reports from the list in the right to the Select Report list.

To Local Directory Specifies the directory where the catalog and reports are to be deployed to. Type the directory in the text box or click theBrowse button to find a directory on the Get Directory dialog.

Note: You can type a directory that does not exist, and JReport Designer will create the new directory automatically.

After specifying the directory, click the Next button to modify the connection properties.

Catalog Data SourceSelect a data source in the catalog from the drop−down list.

ModifyBrings out the Get JDBC Connection Information dialog to modify the properties of the connection to the selected datasource.

NameLists the name of the connection properties.

PropertyLists the value of the properties.

BackRetains the changes and returns to the previous page.

NextRetains the changes and go to the next page.

FinishSaves the changes and makes JReport Designer deploy the catalog and reports.

CloseExits the Deployment Wizard and deletes any unsaved changes.

Help

JReport Windows and Dialogs

358

Page 367: JReport Designer - User Referencespecifies the driver such as JDBC driver (for JDBC) or the Data Source name (for JDBC−ODBC bridge), the user ID and the password for connecting to

Displays this help document.

Save Style Dialog

Sometimes, after you build a report, you may be very satisfied with the format of some objects, such as Page Header,title, Page Footer etc. You may want to use the same format in the next report but you do not want to set all theproperties again. In this case, use the property Save Style.

Style NameInput the name of the saved style.

Style Group NameInput the name of the style group.

All PropertiesLists all the properties available. Select the properties to be saved.

Selected PropertiesLists the properties you just selected to be saved.

SaveSave the style and close the dialog.

CancelDo not retain any changes and close the dialog.

HelpDisplay this help document.

Report Options − Editor Tab

Show Bars

Standard ToolbarIf checked , the standard toolbar will display in the main window of JReport.

Edit ToolbarIf checked, the edit toolbar will display in the main window of JReport.

Status barIf checked, the status bar will display in the main window of JReport.

Show Ruler Options

RulersIf checked, the horizontal and vertical rulers will be added in the main window of JReport.

GuidelinesIf checked, the guidelines will be displayed in the main window of your report.

MarginsIf checked, the margins will be added in your report.

JReport Windows and Dialogs

359

Page 368: JReport Designer - User Referencespecifies the driver such as JDBC driver (for JDBC) or the Data Source name (for JDBC−ODBC bridge), the user ID and the password for connecting to

Grid Options

SizeAdjust the size of the grids in the design area.

Show GridsReveal or hide the grids.

Snap to GridsEither snap and lock objects with the grids, or move and place objects around.

Display Attributes

DecimalSpecify the precision of the fractional data in your report. For instance, if you set Decimal to 3, then all the propertyvalues of the objects in the Report Inspector will round to the thousandth.

UnitSpecify the unit of the measurement in the report. It can be centimeter or inch.

ResolutionSpecify resolution as you desired. When the value is −1, it will be the resolution of your monitor.

Field Options

Insert Field Name with FieldIf checked, fields are inserted with their default label.

Insert Group Name with GroupIf checked, groups are inserted with their own label.

OKAccept all changes and close the dialog.

CancelDo not retain any changes and close the dialog.

ApplyApply all changes.

HelpDisplay this help document.

Report Options − Format Tab

Data typeSpecify the data type from its drop down list.

JReport Windows and Dialogs

360

Page 369: JReport Designer - User Referencespecifies the driver such as JDBC driver (for JDBC) or the Data Source name (for JDBC−ODBC bridge), the user ID and the password for connecting to

FormatSpecify the format from its drop down list.

FontFaceSpecify which font to be used.

FontSizeSpecify the size of the font.

AlignmentJustify the contents horizontally (center, justify, left, right) and vertically (top, center, bottom).

BackgroundSelect which color you would like for the background of your field or object from the drop−down menu.

ForegroundSelect which color you would like for font foreground from the drop−down menu.

PatternColorSpecify the color to draw the pattern using a string like "0xff0000" or select a color from the drop−down menu.

PatternStyleSelect an available pattern for the object or field from the drop−down menu.

BorderWidthThe width of the border, can be from 1 to 3 points.

BorderColorThe color of the border, used a string like "0xff0000" to control or select a color from the palette. This works only if youspecify lines for the borders.

TopLineThe top border line style, can be Solid, Double, Dotted, Dashed, DashDot, None.

BottomLineThe bottom border line style, can be Solid, Double, Dotted, Dashed, DashDot, None.

RightLineThe right border line style, can be Solid, Double, Dotted, Dashed, DashDot, None.

LeftLineThe left border line style, can be Solid, Double, Dotted, Dashed, DashDot, None.

ShadowColorThe color for the shadow. Used the string like "0xff0000" or select a color from the palette.

DisplayNullIf there is no value in the selected field, the system will display NULL by default. You can also set what will bedisplayed when there is no value in the selected field by inserting the mouse in Report Inspector and inputting the valueyou want.

AutoFitAdjust the width according to the contents.

UnderLineThe contents will be underlined if checked.

JReport Windows and Dialogs

361

Page 370: JReport Designer - User Referencespecifies the driver such as JDBC driver (for JDBC) or the Data Source name (for JDBC−ODBC bridge), the user ID and the password for connecting to

WordWrapWrap the displayed contents if checked.

StrikeOutMark strikeout if checked.

ItalicUse italic fontface if checked.

BoldUse bold fontface if checked.

ShadowDraw the shadow if checked.

OKAccept all changes and close the dialog.

CancelDo not retain any changes and close the dialog.

ApplyApply all changes.

HelpDisplay this help document.

Report Options − Catalog Tab

The Catalog tab allows you to change options on showing warning messages and options on sorting items, it also allowsyou to decide whether to use cached query result.

Show Warning MessageSpecify whether and when to show warning message.

Edit FormulaSpecifies whether to show the warning message when you modify the formulas.

Sort itemsSpecify whether and how to sort items in Catalog Browser and Report Wizard. You can specify Not Sort, Sort Ascendingor Sort Descending to sort items.

Merge CatalogsSpecifies the checking level of merging catalogs when you save a report to a directory at where a same name catalogalready exists.

Source catalog − The catalog of the report to be saved. Target catalog − The catalog under the directory at where the report will be saved.

When you merge the two catalogs, the resources that have the same mapping names in the two catalogs may conflictfrom each other (have different property values). JReport Designer will check the differences for you according to thelevel you specified here:

Identify All Differences − JReport Designer will check all the differences between the two catalogs. All the resources ofthe report will be displayed on the Merge dialog with all the conflicting resources marked.Identify Critical Differences − JReport Designer will check the differences that can cause the engine fail to run the report.

JReport Windows and Dialogs

362

Page 371: JReport Designer - User Referencespecifies the driver such as JDBC driver (for JDBC) or the Data Source name (for JDBC−ODBC bridge), the user ID and the password for connecting to

All the resources of the report will be displayed on the Merge dialog with the critical conflicting resources marked. As aresult, when this option is selected, some different values may be returned when you run the saved report later.Ignore Differences − Do not show the differences between the two catalogs. If there are conflicts between them, remainthe resources in the target catalog. As a result, when this option is selected, the saved report might not run later.

Schema file locationThis option is only for the users who use the special key, which enables the users to save the internal file to readableformat. It specifies the location of the Report.xsd, Catalog.xsd and JetUPrejoins.xsd files. By default, after you save thereport to .cls.xml format or catalog to .cat.xml format, you can find the three files under %JRepportInstallRoot%\template.To change their location, you have to copy the three files to the location you want first and then specify the location here.

Use cache query resultIf you use cache query result, in Catalog Browser, right click on the query or stored procedure of your report, chooseCreate Cached Query Result, two JReport internal files are generated, a data file (has no extension) and a .desc file.After that when you view the report, a dialog box will pop up for you to choose the data file to view the report instead ofusing ODBC to view the report.

OKAccept all changes and close the dialog.

CancelDo not retain any changes and close the dialog.

ApplyApply what you have specified in this dialog.

HelpDisplay this help document.

Report Options − Internet

Export to HTML

ChartBy default, JReport Designer will not display charts in HTML. Image can be displayed by selecting Embed chart asApplet or Embed chart as GIF file.

FileBy default, JReport Designer will convert the report into multiple files, and designates a serial number for each HTMLpage. For example, if a 3−page report is named Sales, JReport Designer will create three files called Sales_1.html,Sales_2.html, and Sales_3.html. By selecting the Single option, the report will be exported into one file.

Export To Fax

DialingSpecifies the dialing mode for the fax modem. Options are as follows: Pulse or Tone.

Flow ControlSpecifies the flow control mode between DTE (Data Terminal Equipment) and DCE (Data Circuit−terminatingEquipment). Options are as follows:

RtsCts − Flow control of the hardware.Xon/Xoff − Flow control of the software.none − No flow control specified.

JReport Windows and Dialogs

363

Page 372: JReport Designer - User Referencespecifies the driver such as JDBC driver (for JDBC) or the Data Source name (for JDBC−ODBC bridge), the user ID and the password for connecting to

Specifying flow control can help the compressing data function of the modem work better.

Using the RtsCts mode is recommended.

Flow CommandSpecifies the flow command according to the flow control mode. Command should be obtained from modem manual.

Modem ClassSpecifies the class of the modem. Options are as follows: Class 1, Class 2 or Class 2.0. All are fax protocols. Mostmodem only support Class 1, so be sure that higher protocols are supported by the modem if Class 2 or Class 2.0 areselected.

Init StringInitializes the modem. String should be obtained from the modem manual.

Port(COM1)Specifies the port number. Port should be obtained from the modem manual.

Times Out(s)Specifies the maximum amount of time (in second) the fax should wait for a response from the destination.

RetriesWhen the line is busy, the report result cannot be faxed, so you can specify the maximum number of times the modemre−try faxing the report result.

Export To E−mail

SMTP ServerThe IP address of mail server.

SMTP Server PortThe mail server port number.

Mail BoxThe address of sender's mailbox.

Default Mail FormatThe format to send the report result.

OKAccept all changes and close the dialog.

CancelClose the dialog and delete any unsaved changes.

ApplyApply all changes to the dialog.

HelpDisplays help document.

JReport Windows and Dialogs

364

Page 373: JReport Designer - User Referencespecifies the driver such as JDBC driver (for JDBC) or the Data Source name (for JDBC−ODBC bridge), the user ID and the password for connecting to

Report Options − PSQL

The PSQL tab allows you to change Join options.

Auto Join

Join on primary keys with same namesA field or a combination of fields that uniquely and specifically identifies a record. For example, your credit card numberis a primary key because it specifically links to your birthday, credit history, address, etc.

Join on foreign keysA reference from Table A to a primary key in Table B. For example, an order form in Table A shows information onpurchases that are made by a customer. It can also show this customer's ID #. That customer ID # refers to a record inTable B that lists a specific address, phone number, name, etc for that customer. The customer ID # in Table A is aforeign key because it links the customer's ordering information in Table A to the customer's information in Table B.

Join on same namesA link between two columns in which the same name is found in two different tables.

Others

Show Table NamesIf selected, table each field belongs to displayed in the Criteria menu.

Show Mapping NamesIf selected, the full name of the field in the table is displayed.

Prohibit Cartesian ProductsA Cartesian product is used when tables link together with no specifications.

For example, Table A has three values: A,B and C and Table B has three values: 1,2 and 3. Value A matches value 1,value B matches value 2, and so on. This is a specific match.

A Cartesian product could have value A matching with 1,2 and 3, and value B matching with 1,2 and 3, and so on. Depending the data values Cartesian products can produce a large and complicated data set as unnecessary informationmay be contained.

Add Quote Mark AutomaticallyEnables JReport Designer to add quote marks automatically after a string type value is inputted into the secondExpression text box in the AND format when you specify certain criteria for the fields to be retrieved from the database.

Note: JReport Designer adds the quote mark when an action is taken. For example, when a button in the Conditiondialog is clicked.

Pre−join

Show adding tables warning message With the pre−join feature, when table(s) are added to a query, other table(s) may also need to be added to the query inorder to form a per−join path. This check box specifies whether the adding table(s) warning message should bedisplayed.

JReport Windows and Dialogs

365

Page 374: JReport Designer - User Referencespecifies the driver such as JDBC driver (for JDBC) or the Data Source name (for JDBC−ODBC bridge), the user ID and the password for connecting to

Preview Result Set

Max RecordsSpecifies the default total number of records to be displayed when you previewing a query.

Max Records per PageSpecifies the default maximum number of records to be displayed on one page when previewing a query.

DefaultResets all options on dialog to default values.

OKAccept all changes and close the dialog.

CancelClose the dialog and delete any unsaved changes.

ApplyApply all changes to the dialog.

HelpDisplays help document.

Report Options − Language Tab

On this tab, you can convert the encoding for the Chinese data. To make this feature enabled,

On the File menu, click Options to bring out the Report Option dialog.1. Click the Advanced tab, and uncheck Forbid editing data object properties.2. On Catalog Browser, select the currently used connection, expand the Properties sheet, and then change thevalue of EncodingPattern to No.

3.

Now you can change values here and apply them in the report. Below are the descriptions of the options on this tab.

ConvertEnables the converting encoding function. This function is applied to the data that are stored using the Unicode UTF8 inthe database. Only when you view the report or export the report to some certain formats, you can see the changes ifyou have enabled this function.

BIG5 to GB2312 − Converts the encoding from BIG5 to GB2312.GB2312 to BIG5 − Converts the encoding from GB2312 to BIG5.

OKAccepts all the changes and close the dialog.

CancelDo not retain any changes and close the dialog.

ApplyApply all the changes on this dialog.

HelpDisplay this help document.

JReport Windows and Dialogs

366

Page 375: JReport Designer - User Referencespecifies the driver such as JDBC driver (for JDBC) or the Data Source name (for JDBC−ODBC bridge), the user ID and the password for connecting to

Report Options − Advanced Tab

The Advanced tab allows you to make further changes to the default settings of Report Inspector and Catalog Browser.

Report Inspector By default, one cannot change these three property values, since JReport products cannot guarantee your report willwork smoothly in such a case. For example, if you changed the query name in Report Inspector, some fields used in thereport may not be available in the new query. However, if you are very familiar with JReport product, you can makenecessary changes to these values to satisfy your special needs. For example, if you have two similar reports with thesame template, but they only use a different query, and only several fields are different. In this case, you can simplifyyour creating work by checking off these options to build another report with the same template, group, summary etc.

Security ManagerIf this feature is enabled, when you launch JReport Designer, you are asked to type in user name and password forsecurity protection.

Start Security − Specifies whether to enable this feature or not. For the first time you check this check box, you areprompt to create a user account.Manage − Brings out the User Manage dialog to remove or add user accounts.Modify − Modifies a specified user account.

Group/Sort By default, any field you added to the catalog in JReport can be used to group and sort. However, you can specify in thissection to ask the JReport to qualify whether a field can be used to group or sort. Note, the information of the qualificationwill be stored in the database connection.

Catalog Browser By default, you are not allowed to change the property value of Catalog Browser. However, there may be a need tochange it, for example, sometimes JDBC driver cannot return proper Precision and Scale value for a column. In thiscase, uncheck this option. Then, activate Catalog Browser, highlight the column name that you have problems with, clickon the expand button to show the properties list. Now you can change the property values, such as SQL type, precision,scale to what it should be.

Print Specify the printing methods accordingly. JDK 1.1 printing method is quick in speed but the printing quality cannot beguaranteed. JDK 1.2 can give you a satisfactory result, even for a gif file, but it is slow in speed.

Separate a large pageIf the report page size is larger than the print paper size, and you want to separate the large report page during printing,you should set this property to true. If the print page size which you choose is less than the report page size, then thereport will be printed as multiple pages serially, this means JReport will separate the large page of the reportautomatically.

Backup file automatically before modification is savedSpecifies whether to generate the backup files (.cat.bak and .cls.bak) of the catalog and report when they aresaved. By default, this check box is unselected.

OKAccept all changes and close the dialog.

CancelDo not retain any changes and close the dialog.

ApplyApply all changes in this dialog.

JReport Windows and Dialogs

367

Page 376: JReport Designer - User Referencespecifies the driver such as JDBC driver (for JDBC) or the Data Source name (for JDBC−ODBC bridge), the user ID and the password for connecting to

HelpDisplay this help document.

Catalog Doctor − Connection

Select the name of a connection from the resources tree in the left panel of Catalog Doctor, and the information of theconnection is listed on the right panel.

PropertiesLists the properties and their values of the connection.

Name − The name of the connection property.• Value − The value of the connection property. You can modify the values in this column.•

Modify (Right click the connection name on the resources tree)Enables you to modify the connection through the Get JDBC Connection Information dialog.

Please refer to User's Guide | Connection for more information.

Catalog Doctor − Tables and Fields

Tables/Views and FieldsAll the mapping tables, views and DB−Fields in the catalog are listed on the resources tree. The icon in front of eachobject has its specific meaning. It indicates whether the object is invalid.

: Table

: Table which does not exist in the database

: Table which has invalid fields

: View

: View which does not exist in the database

: View which has invalid fields

: Field

: Field which does not exist

: Field whose name can be found in the database, but type mismatch

PropertiesLists the properties and their values of the selected objects.

Choose from following to re−mapYou can find all the raw tables/views in this panel when you select one table/view in the resources tree. It also shows thequalifier and owner of the table/view. Select a raw table/view, the raw columns will be retrieved.

Note: If you selected a mapping table/view whose raw table/view exists, then the raw table/view will be automaticallyselected.

UpdateRe−maps the mapping tables/views and fields.

JReport Windows and Dialogs

368

Page 377: JReport Designer - User Referencespecifies the driver such as JDBC driver (for JDBC) or the Data Source name (for JDBC−ODBC bridge), the user ID and the password for connecting to

To update a mapping table/view, first select the table/view to be updated, and the raw table/view which the mappingtable/view refers to, then click the Update button on the toolbar.

Note: The tree is sorted by the validation status of each object, that is, the invalid objects are listed ahead. So after youupdate a mapping table/view, the order of the objects will probably be changed.

To update a field, first select the field to be updated, and the column you want the field refer to, then click Update. Beforeupdating a DB−Field, you should make sure that the mapping table/view of this DB−Field is valid, that is to say the rawtable/view that the mapping table/view refers to exists in this database.

Menu ItemsRight click a table/view on the resources tree, you can get the following menu items:

Add Tables/Views − Appends tables/views into the catalog.• Insert Column − Inserts columns into the table.• Delete − Removes the selected objects.•

Catalog Doctor − Formulas and Summaries

On the resources tree, if the icon of a formula/summary is marked with a red cross, it means the formula/summary isinvalid and fails on compiling.

PropertiesLists the properties and their values of the selected object.

ErrorShows the compile error messages of the selected formula/summary.

EditEnables you to modify the selected formula/summary.

Replace AllEnables you to replace the mapping fields which are not found in the catalog with another one.

Catalog Doctor − Queries

PropertiesLists the properties and their values of the selected query.

ErrorShows the error information of the selected query.

EditEnables you to edit the selected query through the Query Editor.

RunSaves a selected query as Cached Query Result.

Record Level Security Info

Changes the record level security settings.

Use "|" to separate more values in one cell

JReport Windows and Dialogs

369

Page 378: JReport Designer - User Referencespecifies the driver such as JDBC driver (for JDBC) or the Data Source name (for JDBC−ODBC bridge), the user ID and the password for connecting to

If you want to use more values in one cell, use "|" to separate them. Applies to User, E−mail, and Title column. This isuseful when you want to apply the same conditions to multiple users. For example, if you want user1, user2, anduser3 to share the same security setting, list user1, user2, and user3 in the same cell, separated by "|", and then definethe security conditions.

Columns

User: The user ID to whom the security settings will be applied.Role: The role of the user. More than one user can share one role; for one role, you only need to define once, and otherusers can share this role without type the same conditions again.Column: The condition expression is comprised of three parts − Column, Operator, and Value.The column name, can be the name of a DBField in the current query, the name of a formula (summary) based on anyDBField in the current query, and the name of a parameter. You do not need to quote the name when the name containsspaces. However, you must make sure the names you type actually exist.Operator: The operator can be one of the following operators: =, <>, <, >, <=, >=, and IN.Value: The value part of the condition expression.For String type values, use single quotation mark (') to quote the values, e.g., 'Absolute Java';For Boolean type values, use 0 (false) or 1 (true).For Date type values, please make sure the format of the value you enter is consistent with that of your database. Note:On the Record Level Security Info dialog, the date values provided on the drop down list may not be valid for your actualdatabase, because they are date values that have already been reformatted using your date format settings in JReport.For detailed information on how to set the date format in JReport Designer, please refer to the Date Format section of thedocument at http://www.jinfonet.com/manualpro/userguide/connect.htm.For the values of other types, type them in their original form.E−mail: The e−mail address of the user.Title: The title for the user.

Import TextAllows you to import record level security settings from an external .txt file.

AddInsert a new row of user condition after the selected row.

RemoveRemove the selected row of user condition.

Clear AllClear all the rows in the list.

OKAccept the changes and close this dialog.

CancelDiscard the changes and close this dialog.

HelpDisplay this help document.

Chart Dialog − Axes

The Axes dialog provides options for formatting the axis. Applies to Chart Axis.

Draw Axis XSpecifies whether the X axis is shown.

JReport Windows and Dialogs

370

Page 379: JReport Designer - User Referencespecifies the driver such as JDBC driver (for JDBC) or the Data Source name (for JDBC−ODBC bridge), the user ID and the password for connecting to

Draw Axis YSpecifies whether the Y axis is shown.

Draw Axis ZSpecifies whether the Z axis is shown.

Format AxisBrings out the corresponding Axis dialog. For detailed information, see Reference | JReport Windows and Dialogs | ChartDialog − Axis.

CancelDo not retain any changes and close the dialog.

OKApply the changes and close the dialog.

Notes:

Different chart may have different axis name. • For radar chart, only the Draw Axis Y option is available.• For pie chart, it has no axis.•

Chart Dialog − Axis

The Axis dialog provides options for formatting chart axis. Applies to Chart Axis.

On the Axis tab, there are the options for Axis Properties.

Axis (X) Properties

Show tick mark labels Specifies whether the tick mark labels are shown.

Number Of LabelsSpecifies the number of tick mark labels that will be shown. Use −1 (default) to let JReport Designer determine thenumber.

Label Every N Tick MarksSpecifies the frequency at which the categories will be labeled. Type 1 to label every category, type 2 to label every othercategory, type 3 to label every third category, and so on.

Label Axis GapSpecifies the distance between category labels and the X axis, in pixels.

Tick MarkSpecifies the shown type of the tick mark. It can be one of the following: None, Outside, Inside, and Cross.

LengthSpecifies the length of the tick marks.

Axis (Y) Properties

Show Tick Mark LabelsSpecifies whether the tick mark labels are shown.

JReport Windows and Dialogs

371

Page 380: JReport Designer - User Referencespecifies the driver such as JDBC driver (for JDBC) or the Data Source name (for JDBC−ODBC bridge), the user ID and the password for connecting to

MaximumSpecifies the highest data value appears on the axis.

MinimumSpecifies the lowest data value appears on the axis.

Label Axis GapThe distance between data labels and the Y axis, in pixels.

TypeSpecifies the type for the tick marks. It can be one of the following, NONE, Outside, Inside, and Cross.

LengthSpecifies the length of the tick marks.

Number of tick marksSpecifies the number of tick marks that will be shown. Use 0 (default) to let JReport Designer determine the number oflabels to show.

Axis IncrementSpecifies the increment between two adjacent values of Y axis. Use 0 (default) to let JReport Designer determine thevalue of the increment.

Axis (Z) Properties

Show tick mark labels Specifies whether the tick mark labels are shown.

Number Of LabelsSpecifies the number of tick mark labels that will be shown. Use −1 (default) to let JReport Designer determine thenumber.

Label Every N Tick MarksSpecifies the frequency at which the series will be labeled. Type 1 to label every series, type 2 to label every other series,type 3 to label every third series, and so on.

Label Axis GapSpecifies the distance between series labels and the Z axis, in pixels.

Tick MarkSpecifies the shown type of the tick mark. It can be one of the following, None, Outside, Inside, and Cross.

LengthSpecifies the length of the tick marks.

CancelDo not retain any changes and close the dialog.

OKApply the changes and close the dialog.

Reference Notes:

For the information of the following tabs, Axis Pen, Tick Mark Pen and Label Pen Style, please refer to•

JReport Windows and Dialogs

372

Page 381: JReport Designer - User Referencespecifies the driver such as JDBC driver (for JDBC) or the Data Source name (for JDBC−ODBC bridge), the user ID and the password for connecting to

Reference | JReport Windows and Dialogs | Chart Dialog − Pen Style.For the Label Font tab, please refer to Reference | JReport Windows and Dialogs | Chart Dialog − Font.• For the Label Font Color tab, please refer to Reference | JReport Windows and Dialogs | Chart Dialog − FontColor.

Chart Dialog − Background

The Background dialog provides options for formatting the background of an object. Applies to Chart Platform, ChartCoordinate Paper and Chart Legend.

Border StyleSpecifies the border style of the object. It can be one of the following: None, Raised, Recess, Shadow, and Solid.

For more information, please refer to Reference | A Detailed Reference of JReport Charts

Border ColorSpecifies the color of the border. When the Border Style is None or Shadow, this option is disabled.

Fill ColorSpecifies the background color of the object.

InsetsDefines the position and the size of the background area.

Left: The left position of the background area, measured in the percentage of the object's width, from the left edge of theobject, and used together with Top, Right, and Bottom.Bottom: The bottom position of the background area, measured in the percentage of the object's height, from the bottomedge of the object, and used together with Top, Left, and Right.Right: The right position of the background area, measured in the percentage of the object's width, from the right edge ofthe object, and used together with Top, Left, and Bottom.Top: The top position of the background area, measured in the percentage of the object's height, from the top edge ofthe object, and used together with Left, Right, and Bottom.

AdvancedBrings out the Chart Pen & Fill Effect dialog.

CancelDo not retain any changes and close the dialog.

OKApplies the changes and close the dialog.

For more information about the the Chart Pen & Fill Effect dialog, please refer to

Reference | JReport Windows and Dialogs | Chart Dialog − Pen Style• Reference | JReport Windows and Dialogs | Chart Dialog − Fill Pattern•

Chart Dialog − Chart Data

The Chart Data dialog provides options for formatting the chart data. Applies to Chart object.

Reverse RowsSpecifies whether the row sequence is reversed.

Reverse ColumnsSpecifies whether the column sequence is reversed.

JReport Windows and Dialogs

373

Page 382: JReport Designer - User Referencespecifies the driver such as JDBC driver (for JDBC) or the Data Source name (for JDBC−ODBC bridge), the user ID and the password for connecting to

HyperlinksSpecifies an URL with a link to the chart.

CancelDo not retain any changes and close the dialog.

OKApply the changes and close the dialog.

Chart Dialog − Coordinate Paper

The Coordinate Paper dialog provides the options for formatting coordinate paper. Applies to Chart Coordinate Paper.

Rotate X−Z planeSpecifies the rotation of the coordinate paper around the Y axis, in degrees. Only for 3−D charts.

Rotate Y−Z planeSpecifies the rotation of the coordinate paper around the X axis, in degrees. Only for 3−D charts.

Scale Axis(X)Specifies a percentage of coordinate paper enlargement or reduction along the X axis, in percent. The default value is 80.

Scale Axis(Y)Specifies a percentage of coordinate paper enlargement or reduction along the Y axis, in percent. The default value is 80.

CancelDo not retain any changes and close the dialog.

OKApply the changes and close the dialog.

Chart Dialog − Fill Pattern

The Fill Pattern dialog provides the options for formatting the fill patterns. Applies to Chart Platform (Background), ChartLegend (Background), Chart Coordinate Paper (Background), Label (Background), Label Icon, and Wall (WallBackground).

NoneNothing specified.

TextureFills the object with specified texture.

Choose Fill TextureSpecifies a type of texture to fill the object.

ForegroundSpecifies the foreground color of the texture.

BackgroundSpecifies the background color of the texture.

Transparency

JReport Windows and Dialogs

374

Page 383: JReport Designer - User Referencespecifies the driver such as JDBC driver (for JDBC) or the Data Source name (for JDBC−ODBC bridge), the user ID and the password for connecting to

Specifies the transparency of the texture, in percent.

GradientFills the object with specified gradient colors.

Choose Fill GradientSpecifies the type of gradient to fill the object. It can be one of the following: Linear, Cyclic Linear, Square Radial, andRound Radial.

Start ColorSpecifies a color in the gradient graph.

End ColorSpecifies the other color in the gradient graph.

TransparencySpecifies the transparency of the gradient color, in percent.

X1Specifies the horizontal position, measured in the percentage of the object's width, from the left edge of the object, wherethe gradient starts.

Y1Specifies the vertical position, measured in the percentage of the object's height, from the bottom edge of the object,where the gradient starts.

X2Specifies the horizontal position, measured in the percentage of the object's width, from the left edge of the object, wherethe gradient ends.

Y2Specifies the vertical position, measured in the percentage of the object's height, from the bottom edge of the object,where the gradient ends.

ColorFills the object with specified colors.

Choose Fill ColorSpecifies the color to fill the object.

TransparencySpecifies the transparency of the color.

ImageFills the object with specified images.

Choose Image FileSpecifies the image file from the current catalog folder.

The four options X, Y, Width, Height is used to define an area in the image and put the defined area of the image intothe object.

X

JReport Windows and Dialogs

375

Page 384: JReport Designer - User Referencespecifies the driver such as JDBC driver (for JDBC) or the Data Source name (for JDBC−ODBC bridge), the user ID and the password for connecting to

The left position of the area, measured in the percentage of the image's width, from the left edge of the image.

YThe bottom position of the image, measured in the percentage of the image's height, from the bottom edge of the image.

WidthThe width of the area, measured in the percentage of the image's width. Setting this value to less than 100 percent willcut the image from the right edge.

HeightThe height of the area, measured in the percentage of the image's height. Setting this value to less than 100 percent willcut the image from the bottom edge.

Tile, Center, and ScaleSpecifies the layout style of the image in the object.

For more information, please refer to Reference | A Detailed Reference of JReport Charts.

CancelDo not retain any changes and close the dialog.

OKApply the changes and close the dialog.

Chart Dialog − Filter

Filter TypeSpecifies the type of the filtered data. It can be one of the following: Scale, Number, Date/Time, Text, Mapping. For moreinformation, please refer to Reference | A Detailed Reference of JReport Charts.

Filter StackStacks the filtered data in this table.

CustomizeCustomize the data type by the users here and put them into the Filter Stack list to filter the data.

If you choose the Mapping filter type,

Argument#: Specifies the argument number that you want to replace.Map to: Specifies the new value.

The tabs at the bottom specify the axis which you want to filter data from.

AddAdd the specified filter type into the Filter Stack list.

RemoveRemove the filter type from the Filter Stack list.

ApplyAdd the changed filter type into the Filter Stack list.

Primary DataSpecifies the data filter for the primary value axis (the Y1 axis) to display the tick mark labels the way you want.

JReport Windows and Dialogs

376

Page 385: JReport Designer - User Referencespecifies the driver such as JDBC driver (for JDBC) or the Data Source name (for JDBC−ODBC bridge), the user ID and the password for connecting to

Secondary DataSpecifies the data filter for the secondary value axis (the Y2 axis) to display the tick mark labels the way you want.

CategorySpecifies the filter for the category axis (the X axis) to display the tick mark labels the way you want.

SeriesSpecifies the filter for the series axis (the Z axis) to display the tick mark labels the way you want.

CancelDo not retain any changes and close the dialog.

OKApply the changes and close the dialog.

Chart Dialog − Font Color

The Font Color dialog provides the options for formatting the font color of the object. Applies to Chart Label, Axis Label(called Label Font Color ), and Legend Label.

This dialog's configuration options are the same as the Fill Pattern dialog, so for the detailed description of the dialog,please refer to Reference | JReport Windows and Dialogs | Chart Dialog − Fill Pattern.

Chart Dialog − Font

The Font dialog provides the options for formatting the font of the object. Applies to Chart Label, Axis Label (called LabelFont ), and Legend Label.

Font NameSpecifies the font face for the label.

Font StyleSpecifies the font style for the label. It can be one of the following: Plain, Bold, Italic, and Bold Italic.

UnderlineSpecifies the style of the horizontal line under the text. It can be one of the following: None, Single, Single Lower, BoldLine, Bold Lower, Double Lines, Bold Double, Patterned Line, and Bold Patterned.

For more information, please refer to Reference | A Detailed Reference of JReport Charts.

StrikethroughSpecifies the style of the horizontal line with which the font is struck through. It can be one of the following: None, ThinLine, Bold Line, and Double Lines.

For more information, please refer to Reference | A Detailed Reference of JReport Charts.

Font SizeSpecifies the font size for the label.

ShearingSpecifies the shearing transformation of an object around its center. The default value is 0, range from −200 ~200.

RotationSpecifies the font rotation of an object around its center, in degrees. The default value is 0.

JReport Windows and Dialogs

377

Page 386: JReport Designer - User Referencespecifies the driver such as JDBC driver (for JDBC) or the Data Source name (for JDBC−ODBC bridge), the user ID and the password for connecting to

EffectsSpecifies special effect for the font. It can be one or more of the following: Embossed, Engraved, Shadowed, Outlined,Superscript, and Subscript.

CancelDo not retain any changes and close the dialog.

OKApply the changes and close the dialog.

Chart Dialog − Label

The Label dialog provides options for formatting chart label. Applies to Chart Label and Legend Label.

TextSpecifies the text for the label object.

AlignmentSpecifies how the text is aligned in the label. It can be one of the following: Left, Center, Right, Top, Bottom.

Alignment (In the Icon frame)Specifies alignment format of the text and the icon. It can be one of the following: Left−Top, Left−Center, Left−Bottom,Bottom−Center, Bottom−Right, Right−Center, Right−Top, and Top−Center.

WidthSpecifies the width of the icon.

HeightSpecifies the height of the icon.

Icon−Text GapSpecifies the distance between the icon and the text.

The Icon Style button opens the Legend Key dialog. For more information, please refer to Reference | JReportWindows and Dialogs | Chart Dialog − Legend Key.

Chart Dialog − Legend

The Legend dialog provides options for formatting chart legend. Applies to Chart Legend.

Hide Category LegendSpecifies whether the category names are shown.

Hide Series LegendSpecifies whether the series names are shown.

PlacementSpecifies the location of the legend object.

Vertical MarginSpecifies the minimum vertical distance between the legend labels.

Horizontal MarginSpecifies the minimum horizontal distance between the legend labels.

JReport Windows and Dialogs

378

Page 387: JReport Designer - User Referencespecifies the driver such as JDBC driver (for JDBC) or the Data Source name (for JDBC−ODBC bridge), the user ID and the password for connecting to

Vertical Label SpacingSpecifies t he vertical distance between legend labels, in pixels. The default value is −1 (Not Set).

Horizontal Label SpacingSpecifies the horizontal distance between legend labels, in pixels. The default value is −1 (Not Set).

Label Group GapSpecifies the minimum distance between series name labels and category name labels.

CancelDo not retain any changes and close the dialog.

OKApply the changes and close the dialog.

Chart Dialog − Legend Key

The Legend Key dialog provides options for formatting label icons. Applies to Chart Labels and Legend Labels.

IconSpecifies the type of the icon.

WidthSpecifies the width of the icon.

HeightSpecifies the height of the icon.

CancelDo not retain any changes and close the dialog.

OKApply the changes and close the dialog.

Chart Dialog − Pen Style

The Pen Style dialog provides the options for formatting the pen object. Applies to Chart Platform (Background), ChartLegend (Background), Chart Coordinate Paper (Background), Chart Label (+, and Background), Label Icon, Grid line,Axis (called Axis Pen), Tick mark (called Tick Mark Pen), and Label (called Label Pen Style).

Pen styleSpecifies the style of the pen object. It can be one of the following: Solid Line, Dotted, Dashed, Long Dashed,Dash−Dotted, 2Dots,3Dashes, Fine Dotted, Line Dots, 2Dots,2Dashes, and Invisible.

Pen ColorSpecifies the color of the pen object.

End CapsSpecifies the ending style of the pen object. It can be one of the following: Butt, Round, and Square.

Line JointSpecifies the line joint style for the pen object. It can be one of the following: Miter, Round, and Bevel.

Pen ThicknessSpecifies the thickness of the pen object, in pix.

JReport Windows and Dialogs

379

Page 388: JReport Designer - User Referencespecifies the driver such as JDBC driver (for JDBC) or the Data Source name (for JDBC−ODBC bridge), the user ID and the password for connecting to

TransparencySpecifies the transparency of the pen object, in percent.

Outline Path or Fill PathSpecifies the fill pattern of the pen object, the outline or the whole path.

Auto Adjust Dash or Fixed Dash SizeSpecifies the dash size of the pen object. Whether it is adjusted automatically or just to be fixed.

CancelDo not retain any changes and close the dialog.

OKApply the changes and close the dialog.

Chart Dialog − Walls

The Walls dialog provides options for formatting chart walls. Applies to Chart Walls.

Show WallsSpecifies whether to show walls of the chart.

Draw axis(Y) grid linesSpecifies whether the gridlines perpendicular to the Y axis are shown.

Draw axis(X) grid linesSpecifies whether the gridlines perpendicular to the X axis are shown.

Draw axis(Z) grid lines (only for 3−D charts)Specifies whether the gridlines perpendicular to the Z axis are shown.

Draw axis(Y2) grid lines (only for combination charts)Specifies whether the gridlines perpendicular to the Z axis are shown.

Pen StylePlease refer to Reference | JReport Windows and Dialogs | Chart Dialog − Pen Style.

Click any button of XY Wall Background, YZ Wall Background and Floor Background, then you will get the Fill Patterndialog. For more information About the Fill Pattern dialog, please refer to Reference | JReport Windows and Dialogs |Chart Dialog − Fill Pattern.

XY Wall BackgroundBrings out the XY Wall Background Dialog to specify the layout of the XY wall background.

YZ Wall Background (only for 3−D charts that have walls) Brings out the YZ Wall Background Dialog to specify the layout of the YZ wall background.

Floor Background (only for 3−D charts that have walls)Brings out the Floor Background Dialog to specify the layout of the floor background.

Bound Fill Wall BackgroundBrings out the Bound Fill Wall Background Dialog to fill the wall with two fill pattern.

Apply to YZ wall (only for 3−D charts that have walls) Specifies whether to apply the configurations of XY wall background to YZ wall.

JReport Windows and Dialogs

380

Page 389: JReport Designer - User Referencespecifies the driver such as JDBC driver (for JDBC) or the Data Source name (for JDBC−ODBC bridge), the user ID and the password for connecting to

Apply to XY wall (only for 3−D charts that have walls)Specifies whether to apply the configurations of YZ wall background to XY wall.

CancelDo not retain any changes and close the dialog.

OKApply the changes and close the dialog.

Notes:

For the pie chart, it has no chart wall.• For the radar chart, only the Draw axis(Y) grid lines option is available.•

Map Dialog − the Map Tab

NameSpecifies the name of the map. It can be any name you like.

PositionSpecifies the position of the map in the report.

Image SourceSpecifies an image to be the background of the map from the drop−down list.

From DatabaseSpecifies whether the data used in the map is from the database or not.

AddAdd summaries from the left list to the right list.

RemoveRemove summaries from the right list to the left list.

Show label and summaries in design modeSpecifies whether to show the label and summaries in the design mode.

NextRetain changes and continue to the Area tab.

CancelDo not retain any changes and close the dialog.

FinishFinish and create the map with the information you provided.

HelpDisplay this help document.

Map Dialog − the Area Tab

When the From Database check box is selected on the Map tab, the options on the Area tab are used to continuecreating the map.

NameSpecifies the name of the area. Choose the corresponding item from the drop−down list.

JReport Windows and Dialogs

381

Page 390: JReport Designer - User Referencespecifies the driver such as JDBC driver (for JDBC) or the Data Source name (for JDBC−ODBC bridge), the user ID and the password for connecting to

Add (disabled when the From Database check box is selected)Adds areas in the map.

Delete (disabled when the From Database check box is selected)Deletes the selected area from the map.

Repair (disabled when the From Database check box is selected)Applies the changes to the selected area.

CoordsSpecifies the coordinate values of the areas.

How the data is displayed in the database for each shape:

Rectangle: Four numbers are listed in the record, and separated by commas. It will be displayed like this: X, Y, W, H (X:The X−coordinate of the rectangle's top left point. Y: The Y−coordinate of the rectangle's top left point. W: The width ofthe rectangle. H: The height of the rectangle). Circle: Three numbers are listed in the record, and separated by commas. It will be displayed like this: X, Y, R (X: TheX−coordinate of the circle's center. Y: The Y−coordinate of the circle's center. R: The length of the radius). Polygon: Numbers are listed in the record, and separated by commas. It will be displayed like this: X1, Y1, X2, Y2, X3,Y3, ... (X: The X−coordinate of one of the polygon's point. Y: The Y−coordinate of one of the polygon's point).

Alt TypeSpecifies the area alt type when export the report to HTML format. It can be one of the following: Name, Value, andCustomized (Enabled when the From Database check box is cleared).

Name: Specifies the area name to be the area tip after the report is exported to HTML format. Value: Specifies the values of the summaries to be the area tip after the report is exported in HTML format. The values ofthe summaries will be separated by commas.Customized: Specifies the area tip by users themselves in the Alt option.

AltSpecifies the area tip when the report is exported to HTML format. When the From Database check box is selected,choose the corresponding item from the drop−down list. When the From Database check box is cleared, key in the tipcontent here.

URLSpecifies a hyperlink for the area. Choose the corresponding item from the drop−down list.

FillColorSpecifies the color of the area. Choose the "0xffffff" format from the drop−down list.

ColorSpecifies the border color of the area. Choose the "0xffffff" format from the drop−down list.

TypeSpecifies the type of the area border. It can be one of the following: None, Solid, Dashed, Dotted, DashDot, and Double.

WidthSpecifies the width of the area border.

BackRetain all changes and return to the Map tab.

CancelDo not retain any changes and close the dialog.

JReport Windows and Dialogs

382

Page 391: JReport Designer - User Referencespecifies the driver such as JDBC driver (for JDBC) or the Data Source name (for JDBC−ODBC bridge), the user ID and the password for connecting to

FinishFinish and create the map with the information you have provided.

HelpDisplay this help document.

Edit Area

When the From Database check box is cleared, click Edit button to get this Edit Area and continue creating the map.

MenuEach item on the menu has a corresponding button on the toolbar.

File: There is only one item on this menu: Close. A message box will pop up to ask you whether to save the changes tothe map by clicking this item. If Yes, retain the changes and return to the Map dialog. If No, do not retain any changesand return to the Map dialog. If Cancel, retain the changes and go back to the Edit Area to continue edit the map.Edit: It has four items: Undo, Redo, Insert, and Delete.Help: There is only one item on the menu: Help. This help documentation will be displayed when click this item.

Toolbar

It is a switch button which is used to control the mode of the Edit Area. When this button is pressed down, it is Insert

Mode and you can insert areas into the map. When this button is up, it is Edit Mode and you can edit the specified area.

Delete a specified area in Editor Status.

Undo your last operation.

The opposite operation of Undo.

Display this help documentation.

Area NameKey in the name of the specified area. The area names should be consistent with the group names of the report.

Shape Style Choose the shape style from the drop−down list. It can be one of the following: Rectangle, Circle, and Polygon.

Fill ColorSet the background color for the specified area.

Border ColorSet the border color of the specified area.

JReport Windows and Dialogs

383

Page 392: JReport Designer - User Referencespecifies the driver such as JDBC driver (for JDBC) or the Data Source name (for JDBC−ODBC bridge), the user ID and the password for connecting to

Border StyleSet the border style of the specified area. It can be one of the following: None, Solid, Dashed, Dotted, DashDot, andDouble.

Border WidthKey in the border width of the specified area.

JReport Windows and Dialogs

384