How to Use Adhoc Parameters in Actuate Reports

Similar documents
How Actuate Reports Process Adhoc Parameter Values and Expressions

chapter 2 G ETTING I NFORMATION FROM A TABLE

Language Basics. /* The NUMBER GAME - User tries to guess a number between 1 and 10 */ /* Generate a random number between 1 and 10 */

C How to Program, 6/e by Pearson Education, Inc. All Rights Reserved.

Understanding Regular Expressions, Special Characters, and Patterns

VHDL Lexical Elements

Getting Information from a Table

Lesson 1: Writing Your First JavaScript

CNIT 129S: Securing Web Applications. Ch 12: Attacking Users: Cross-Site Scripting (XSS) Part 2

Tivoli Management Solution for Microsoft SQL. Rule Designer. Version 1.1

Working with Actuate e.reports

Chapter 5 Retrieving Documents

Lexis for Microsoft Office User Guide

TUTORIAL FOR IMPORTING OTTAWA FIRE HYDRANT PARKING VIOLATION DATA INTO MYSQL

The Unicode Standard Version 12.0 Core Specification

Getting Started Values, Expressions, and Statements CS GMU

How to Split PDF files with AutoSplit

Gabriel Hugh Elkaim Spring CMPE 013/L: C Programming. CMPE 013/L: C Programming

Expr Language Reference

Lecture 2 Tao Wang 1

A Balanced Introduction to Computer Science, 3/E

Full file at

There are four numeric types: 1. Integers, represented as a 32 bit (or longer) quantity. Digits sequences (possibly) signed are integer literals:

Chapter 2, Part I Introduction to C Programming

Features of C. Portable Procedural / Modular Structured Language Statically typed Middle level language

ucalc Patterns Examine the following example which can be pasted into the interpreter (paste the entire block at the same time):

Data Types and Variables in C language

Overview: Programming Concepts. Programming Concepts. Names, Values, And Variables

Overview: Programming Concepts. Programming Concepts. Chapter 18: Get With the Program: Fundamental Concepts Expressed in JavaScript

Searching Guide. September 16, Version 9.3

Today s Experts. Mastering Dates Using SEQUEL 1. Technical Consultant. Technical Consultant

Using Actuate BIRT Java Components

Language Reference Manual

Using Custom Number Formats

Chapter 17. Fundamental Concepts Expressed in JavaScript

EDIABAS BEST/2 LANGUAGE DESCRIPTION. VERSION 6b. Electronic Diagnostic Basic System EDIABAS - BEST/2 LANGUAGE DESCRIPTION

ER/Studio Enterprise Portal 1.1 New Features Guide

NCSS Statistical Software. The Data Window

CS 115 Data Types and Arithmetic; Testing. Taken from notes by Dr. Neil Moore

Database Programming with SQL 5-1 Conversion Functions. Copyright 2015, Oracle and/or its affiliates. All rights reserved.

Regular Expressions. Regular expressions are a powerful search-and-replace technique that is widely used in other environments (such as Unix and Perl)

LESSON 1. A C program is constructed as a sequence of characters. Among the characters that can be used in a program are:

MICROSOFT EXCEL 2000 LEVEL 3

IT 374 C# and Applications/ IT695 C# Data Structures

8 Querying and Selecting Data

X Language Definition

Visual Streamline FAQ

Searching for Events. Event Searches. The following topics describe how to search for events within a workflow:

TUTORIAL FOR IMPORTING OTTAWA FIRE HYDRANT PARKING VIOLATION DATA INTO MYSQL

Fundamentals of Programming Session 4

The Direct Excel Connection plugin PRINTED MANUAL

Industrial Data Forwarder for Splunk Kepware, Inc.

Programming for Engineers Introduction to C

SELF TEST. List the Capabilities of SQL SELECT Statements

In addition to the primary macro syntax, the system also supports several special macro types:

OUTLINES. Variable names in MATLAB. Matrices, Vectors and Scalar. Entering a vector Colon operator ( : ) Mathematical operations on vectors.

FOCUS ON: DATABASE MANAGEMENT

The Very Basics of the R Interpreter

Crayon (.cry) Language Reference Manual. Naman Agrawal (na2603) Vaidehi Dalmia (vd2302) Ganesh Ravichandran (gr2483) David Smart (ds3361)

STUDENT LESSON A7 Simple I/O

Cindex 3.0 for Windows. Release Notes

Intro to Computer Programming (ICP) Rab Nawaz Jadoon

University of Wisconsin System SFS Business Process RPT Basic PeopleSoft Query

RFID Label Design and Encoding Management Pro User s Guide

CSc 10200! Introduction to Computing. Lecture 2-3 Edgardo Molina Fall 2013 City College of New York

1 Lexical Considerations

Assoc. Prof. Dr. Marenglen Biba. (C) 2010 Pearson Education, Inc. All rights reserved.

2 nd Week Lecture Notes

CONVERSION STANLEY MANUFACTURED ACCESS CONTROL. Invented for life UPGRADING FROM BOSCH READYKEY X V3.1

More Examples. Lex/Flex/JLex

Maciej Sobieraj. Lecture 1

Importing, Exporting, and ing Data

JavaScript Basics. The Big Picture

12/22/11. Java How to Program, 9/e. Help you get started with Eclipse and NetBeans integrated development environments.

Introduction to Unix

UNIT- 3 Introduction to C++

ITC213: STRUCTURED PROGRAMMING. Bhaskar Shrestha National College of Computer Studies Tribhuvan University

Application Notes for 911 ETC CrisisConnect for Softphones and CrisisConnect for VoIP with Avaya IP Office Issue 1.0

3 The Building Blocks: Data Types, Literals, and Variables

>>> * *(25**0.16) *10*(25**0.16)

Expert Reference Series of White Papers. Five Simple Symbols You Should Know to Unlock Your PowerShell Potential

Contents. Jairo Pava COMS W4115 June 28, 2013 LEARN: Language Reference Manual

3 PREPROCESSOR. Overview. Listing 3-0. Table 3-0.

The CSV data parser plugin PRINTED MANUAL

Title:[ Variables Comparison Operators If Else Statements ]

Educational Web Series Maximo 7.6 Application Designer & Start Centers. Callie Straka 01/30/15

EnableBasic. The Enable Basic language. Modified by Admin on Sep 13, Parent page: Scripting Languages

Chapter 3: Operators, Expressions and Type Conversion

[NALENND WIRELESS BLOCK IDENTIFIER SOFTWARE USER S GUIDE] NALENND data scrubber utility reference manual. Quentin Sager Consulting, Inc.

Full file at C How to Program, 6/e Multiple Choice Test Bank

)454 : 4(% #(!2!#4%2 3%4!.$ "!3)# %,%-%.43 -!.-!#().%,!.'5!'% )454 Recommendation : INTERNATIONAL TELECOMMUNICATION UNION

Outbound Routing Regular Expressions

Customization Manager

Business Online TM. Positive Pay - Adding Issued Items. Quick Reference Guide

Defining Program Syntax. Chapter Two Modern Programming Languages, 2nd ed. 1

Codes in ManuDyn may be numerical or alphabetical or an alpha-numeric combination. Where the latter is the case the sorting hierarchy is as follows:

Fundamentals of Programming. Lecture 3: Introduction to C Programming

10/9/2012. Computers are machines that process data. assignment in C# Primitive Data Types. Creating and Running Your First C# Program

Table of Contents Date(s) Title/Topic Page #s. Abstraction

Getting started with C++ (Part 2)

Transcription:

How to Use Adhoc Parameters in Actuate Reports By Chris Geiss chris_geiss@yahoo.com http://www.chrisgeiss.com

How to Use Adhoc Parameters in Actuate Reports By Chris Geiss Revised 3/31/2002 This document may be redistributed providing that the document is distributed unmodified and intact, with all copyright notices preserved. Information in this document is subject to change without notice. This document is not affiliated with, nor endorsed by, Actuate Corporation. Actuate, e.analysis, e.report, e.reporting, Live Report Document, Live Report Extension, ReportBlast, ReportCast, Report Encyclopedia, SmartSearch, Transporter, Virtual Report Distribution, and XML Reports are trademarks or registered trademarks of Actuate Corporation. All other brand or product names are trademarks or registered trademarks of their respective companies or organizations. This document is being provided free of charge to my clients, and to the Actuate user and developer communities. This document is provided as is. No warranty or guarantee, either expressed or implied, is made about the suitability of this information to any particular application. Every reasonable attempt has been made to ensure that the information contained in this document is accurate. However, no guarantee is made that the information contained within this document is free from errors or omissions. Use this information at your own risk. Table of Contents About the Author... 1 Introduction... 1 The Mailing List and How to Report Errors and Omissions... 1 How do You Know that a Parameter is an Adhoc Parameter?... 1 How do You Know the Data Type Associated with an Adhoc Parameter?... 3 Rules for Entering Adhoc Parameter Values and Expressions... 3 Tables of Adhoc Parameter Value and Expression Examples... 4 Examples for a String Type Adhoc Parameter... 5 Examples for a Numeric Type Adhoc Parameter... 7 Examples for a Date Type Adhoc Parameter... 8

About the Author Chris Geiss is an independent consultant and software developer with over 16 years of software development and IT industry experience. He has been working with the Actuate reporting products for 4 years and specializes in consulting, development, training and mentoring services for the Actuate e.reporting Suite. Chris can be contacted at chris_geiss@yahoo.com. See his web site at http://www.chrisgeiss.com. Introduction Adhoc report parameters are one of the many useful and powerful features of Actuate e.reporting Suite 5. An Adhoc parameter is an optional report parameter in which you can provide expressions to specify how the report should filter the data that appears in your report document. Each Adhoc parameter corresponds to a field (column) in the database. If you do not provide a value for an adhoc parameter, then Actuate will not filter the data in your generated document based on the corresponding database field. If you provide a single value in an adhoc parameter, then the report will only return data where the corresponding field in the database matches the value that you specified. However, if you need a broader set of data, you can also use expressions in adhoc parameters, in which you can specify a range or set of values that you are interested in. Thus adhoc parameters give you very flexible control over the data that is output to your report document. Please note that while adhoc parameters are usually optional, the report developer can specify that certain adhoc parameters are required. Unfortunately, users occasionally run into problems when using reports that have adhoc parameters because they are not aware of all of the rules regarding how to use adhoc parameters. The rules for numeric and date parameters are straightforward, but the rules for string type parameters can be a little tricky and confusing to users because Actuate tries to make the user s life easier by providing automatic wildcard handling (pattern matching) for string type parameters. As a result, the user sometimes does not get the data that he or she expected. This document summarizes the rules for entering adhoc parameter values and provides examples that illustrate these concepts. Please note that the adhoc parameter behavior discussed in this document is based on my work with Actuate Version 5.0 SP1. The Mailing List and How to Report Errors and Omissions If you find any errors or omissions in this document, or have any suggestions, please email them to chris_geiss@yahoo.com so I can update this document accordingly. Also, if you email your contact information to me, I will include you on the mailing list for future updates to this document. How do You Know that a Parameter is an Adhoc Parameter? Actuate uses a variety of mechanisms to alert the user that a parameter is an adhoc parameter. When you are using a client side tool (such as End User Desktop, Administrator Desktop, e.report Designer, or e.report Designer Professional) you will see a special A icon in black on a yellow background next to each adhoc parameter when you run the report. The screenshot below shows examples of this icon. In this case, all of the parameters are adhoc parameters. Printed 4/1/02 How to Use Adhoc Parameters in Actuate Reports Page 1

If you are running reports via a web browser, then Actuate will use the text AdHoc to mark the report parameters that are adhocs. This is illustrated in the screenshot below. Printed 4/1/02 How to Use Adhoc Parameters in Actuate Reports Page 2

Please note, that the screenshots above are from the default screen designs that are provided by Actuate. The Actuate environment you use to run reports may have been customized, and the screens you see may not look like the ones illustrated above. If this is the case in your environment, please contact your system administrator or software development department to find out how you can tell if a report parameter is an adhoc parameter. How do You Know the Data Type Associated with an Adhoc Parameter? When you enter values and expressions for adhoc parameters, it is important to know if you are entering an adhoc expression for a string, date or number type adhoc parameter. The reason this is important, is the parameter type determines the rules for entering values for the parameter. Be sure to refer to your user documentation, or contact your system administrator or software development department to find out the data types for the adhoc parameters in each of the reports that you use. Rules for Entering Adhoc Parameter Values and Expressions This section summarizes the rules for entering adhoc parameter values and expressions. String Type Parameters 1) If you enter a string value that is not enclosed in single quote marks, Actuate assumes you want a wildcard character (%) at the end of the string so that the query matches any strings that start with the text you entered. This helps deal with database columns that are defined as char instead of varchar and are thus right padded with spaces. The user does not have to enter the trailing spaces to get a match. 2) You can explicitly include wildcard characters (%) within the text you provide and Actuate will use the wildcards you provide and will not automatically place one at the end of the text you entered. 3) If you want to search for an exact text value, and do not want wildcard handling, then enclose the text you are searching for in single quote marks, for example ABC. If you specify a value that is not contained within single quotes, then Actuate will make it into a wildcard, unless the text you enter starts with =. 4) The asterisk is not treated as a wild card, but instead as a literal character for which you are searching. For example, A*B only matches the text A*B, and not ACB or ACDB. 5) Double quotation marks are treated as literal characters, and do not have any special meaning; thus entering a double quote mark searches for the character. 6) If you want to search for more than one item, then you can separate items with commas. This works for wildcard and literal searches. For example: A,B,C or A%,B%,C% are wildcard searches and search for any string that starts with A or B or C. A, B, C does a literal search for the exact strings A or B or C. A, B, C% is also acceptable syntax. 7) If you want to search for a range of items, then you can separate them with a dash (-). For example, ABC-DEF matches all values that are alphabetically between the strings ABC and DEF, inclusive. When you use the dash syntax, wildcard handling is disabled for the strings you specify. 8) Backslash acts as an escape character that removes the special meaning for some characters. For example A\-P searches for all items starting with A-P instead of looking for items between A and P. 9) The escape character does not work with %. Therefore, you cannot search for strings containing the % character by specifying \%. 10) The = character can be used to search for strings containing literal % characters. For example, =A%B searches for strings that equal the text A%B, and does not treat the % as a wildcard. Basically, if the text you enter starts with =, then Actuate treats it as a literal string to search for and not as a wildcard expression. However, unless you place any text after the = between single quotes, or you place a % somewhere in the text, Actuate will place a % at the end of the string. 11) The comma (,) takes precedence over the single quote mark ( ). A comma basically becomes OR unless it is escaped with the \ character. 12) The various syntaxes can be combined. For example, a list of ranges can be specified as: A-C, G-I, X-Z. 13) The inequality operators (<, <=, >, >=) work as expected so long as you place the string values you are looking for within single quotes. For example, < ABC,> XYZ. Printed 4/1/02 How to Use Adhoc Parameters in Actuate Reports Page 3

Numeric and Date Type Parameters 1) These adhoc parameters are straightforward and behave the way you would expect since there is no default wildcard behavior as there is with strings. 2) These parameters support the comma (,) to specify a list of values or ranges. 3) These parameters support the dash (-) to specify a range of values. 4) These parameters support the equality and inequality operators. 5) With numeric parameters, negative signs can be confused as range dashes, so use the inequality operators to avoid problems. For example, instead of -300--200, use >=-300,<=-200. 6) The only date formats permitted for date type adhoc parameters are mm/dd/yy and mm/dd/yyyy. However, note that 3/1/02 can be used instead of 03/01/02. Please note that these comments apply to US locales only, I have not tested this with non-us installations or localized versions of Actuate products. Tables of Adhoc Parameter Value and Expression Examples The sections that follow provide tables of examples for each of the major adhoc parameter types: string, numeric and date. Each table provides examples of parameter values and expressions, the data that will be returned by each example expression, and any applicable comments. In the following tables, the single quote and double quote characters are used in the example parameter values and expressions. To avoid confusion, when a reference is made to a specific character string that is matched by a parameter value or expression, the string is delimited with the { and } bracket characters. The { and } characters should not be interpreted as being a part of the string that is matched. Printed 4/1/02 How to Use Adhoc Parameters in Actuate Reports Page 4

Examples for a String Type Adhoc Parameter Parameter Data Returned in the Report Document Comments Expression A Wildcard. Matches all values that start with {A}. A single string value is automatically treated like a wildcard expression. A% Same as above. You can provide the % explicitly. A\% Same as above. The backslash character does not escape the meaning of the %. A% Same as above. Using % forces wildcard handling. A\% Same as above. Same as above. %A Wildcard. Matches all values that end with {A}. You can change the default location of the % in a wildcard expression. A%B Wildcard. Matches all values that start Same as above. with {A} and end with {B}. %A%B% Wildcard. Matches all values that have an You can include more than one % wildcard {A} and {B} within them. A* Wildcard. Matches all values that start with {A*}. A Equality. Matches all values that equal {A}. character. The asterisk does not act like a wildcard character. Only use * if you are searching for the asterisk character. Placing parameter values in single quotes forces them to be treated literally instead of as wildcard expressions. A* Equality. Matches all values that equal {A*}. Only use * if you are searching for the asterisk character. A Matches all values that start with { A }. The double quote character does not have any special meaning. Double quote marks are treated as characters you are trying to match. A Equality. Matches all values that equal { A }. Enclosing the parameter value above in single quotes takes away the wildcard behavior. A,B,C List of wildcards. Matches any value that starts with {A} or {B} or {C}. A\,B,C Matches all values that start with {A,B} or {C}. The backslash character escapes the meaning of the comma. A,B, C Results in error. Do not use. Comma has precedence over the single quote. Use \ to escape the meaning of the comma. A\,B, C Matches all values that equal {A,B} or {C}. This provides the result desired above. Use \ to escape the meaning of the comma. %A,%B,%C Matches all values that end in {A} or {B} or {C}. A, B, C Matches all values that equal {A} or {B} List of exact values to match. or {C}. A, B, C Matches all values starting with { A } or The comparison includes the quote marks. { B } or { C } A-P Match all values that are alphabetically between {A} and {P}. Dash is used to specify a range of values and removes the default wildcard behavior. A\-P Matches all values that start with {A-P}. The backslash escapes the range meaning of the dash. A\-P Matches all values that equal {A-P}. The single quotes take away the wildcard behavior. A-P SQL syntax error. Do not use. Must use a backslash to escape the meaning of the dash. Printed 4/1/02 How to Use Adhoc Parameters in Actuate Reports Page 5

Examples for a String Type Adhoc Parameter (cont.) Parameter Expression A-P Data Returned in the Report Document Comments Match all values that are alphabetically between { A} and {P }. A - P Matches the same values as: A-P The single quotes have no effect. A - P Match all values that are alphabetically between { A } and { P }. =A Matches all values that equal {A%}. Using the equal sign avoids the conversion to a wildcard, but includes a %. Does not perform a wildcard match. =A% Same as above. =%A Matches all values that equal {%A}. Does not perform a like. =%A%B%C% Matches all values that equal {%A%B%C%}. = A Same as: A Using the equal sign here does not make a = A =A,B,C Matches all values that equal { A %}. Matches all values that equal {A%} or that start with {B} or {C}. difference. A,B, C Matches all values that equal {A} or that start with {B} or {C}. =A,=B,=C Matches all values that equal {A%} or {B%} or {C%}. = A,= B,= C Matches all values that equal {A} or {B} or {C}. =A-P Same as: A-P Use A-P instead. ABC-DEF Matches all values that are alphabetically The range is inclusive. between {ABC} and {DEF}. A,B,C-F Matches all values that are equal to {A} or start with {B} or are alphabetically between {C} and {F}. A-C,X-Z Matches all values that are alphabetically between {A} and {C} or {X} and {Z}. 3/1/02 Matches all values that start with {3/1/02}. Using the equal sign results in the % character being automatically inserted, but the % does not act like a wildcard. Use = if you want to search for strings containing %. The list, equality and range features can be combined. Date values used with string parameters are handled differently than when used with date parameters. 3/1/02 Matches all values that equal {3/1/02}. Same as above. <ABC Matches all values alphabetically less The added % may cause matching problems. than {ABC%}. < ABC Matches all values alphabetically less than {ABC}. Placing the text in single quotes solves the added % problem. <= ABC Matches all values alphabetically less than or equal to {ABC}. > ABC Matches all values alphabetically greater than {ABC}. >= ABC Matches all values alphabetically greater than or equal to {ABC}. < ABC,> XYZ Matches all values alphabetically less than {ABC} or greater than {XYZ}. <= ABC,DEF- XYZ Matches all values alphabetically less than or equal to {ABC} or alphabetically between {DEF} and {XYZ}. Printed 4/1/02 How to Use Adhoc Parameters in Actuate Reports Page 6

Examples for a Numeric Type Adhoc Parameter Parameter Expression Data Returned in the Report Document Comments 10 Matches all values equal to 10. Single value. =10 Same as above. Equal sign is not required. 10,20,30 Matches all values equal to 10, 20 and 30. List of values. 10-30 Matches all values between 10 and 30 (inclusive). Range of values, inclusive. 10-30,100-120 Matches all values between 10 and 30 and all values List of value ranges. between 100 and 120. <10 Matches all values less than 10. Less than. <=10 Matches all values less than or equal to 10. Less than or equal to. >10 Matches all values greater than 10. Greater than. >=10 Matches all values greater than or equal to 10. Greater than or equal to. <10,>=100 Matches all values less than 10 and all values greater List of comparisons. than or equal to 100. <10,100-500 Matches all values less than 10 and all values between 100 and 500. Comparison combined with a range. <10,100-500,1000 Matches all values less than 10 and all values between Compound list. 100 and 500 and all values equal to 1000. -300,-200 Matches the values -300 and -200. List using negative values. \-300,\-200 Same as above. \ does not have any effect here. \-300-\-200 n/a Does not work. >=-300,<=-200 Matches all values greater than or equal to -300 and all values less than or equal to -200. Negative values can be problematic when using the dash notation for ranges. Use inequality expressions instead. 3/1/02 Matches all values equal to 3. Everything after first / is ignored. Printed 4/1/02 How to Use Adhoc Parameters in Actuate Reports Page 7

Examples for a Date Type Adhoc Parameter Parameter Expression Data Returned in the Report Document Comments 3/1/02 Matches the date 3/1/02. Single value; do not have to include leading zeroes. 03/01/02 Same as above. Leading zeroes are OK. 3/1/02,3/10/02 Matches the dates 3/1/02 and 3/10/02. List of dates. 3/1/02-3/10/02 Matches dates between 3/1/02 and 3/10/02 (inclusive). Range of dates, inclusive. 3/1/02,3/10/02-3/20/02 Matches the date 3/1/02 and dates between 3/10/02 and Single value and a list. 3/20/02. =3/1/02 Matches the date 3/1/02. Equal sign is unnecessary. <3/1/02 Matches dates less than 3/1/02. Less than. <=3/1/02 Matches dates less than or equal to 3/1/02. Less than or equal to. >3/10/02 Matches dates greater than 3/10/02. Greater than. >=3/10/02 Matches dates greater than or equal to 3/10/02. Greater than or equal to. <3/1/02,>=3/30/02,3/20/02-3/24/02 Matches dates less than 3/1/02, greater than or equal to 3/30/02 and dates between 3/20/02 and 3/24/02 (inclusive). Ranges can be combined with comparison expressions. 3-1-02 n/a Invalid date format. 2002-3-1 n/a Invalid date format. Printed 4/1/02 How to Use Adhoc Parameters in Actuate Reports Page 8