PUBLIC SECTOR Click, Drag, and Drill CLICK, DRAG, AND DRILL 2 NOTICE SUNGARD PUBLIC SECTOR BI-TECH LLC MAKES NO REPRESENTATIONS OR WARRANTIES, ORAL OR WRITTEN, EXPRESS OR IMPLIED, WITH RESPECT TO THE SYSTEM, SERVICES, SOFTWARE, DOCUMENTATION, OPERATING ENVIRONMENT, ANY OTHER SOFTWARE OR SERVICES PROVIDED HEREUNDER OR ANY OTHER MATTER ADDRESSED HEREUNDER, AND SUNGARD PUBLIC SECTOR BI-TECH LLC EXPLICITLY DISCLAIMS ALL OTHER WARRANTIES, EXPRESS OR IMPLIED, INCLUDING THE IMPLIED WARRANTIES OF TITLE, MERCHANTABILITY AND FITNESS FOR A SPECIFIC PURPOSE. SunGard Public Sector Bi-Tech LLC shall not be liable for errors contained herein or for incidental or consequential damages in connection with the furnishing, performance or use of this material. This documentation is proprietary and confidential information of SunGard Public Sector BiTech LLC. Copying, reproduction or distribution is strictly prohibited. All rights reserved. Copyright © 2008 by SunGard Public Sector Bi-Tech LLC 890 Fortress Street Chico, CA 95973 Should you wish to make a comment, or if you find an error in the text, please contact us via email: doc@bi-tech.com CLICK, DRAG, AND DRILL Document Change Log Version Date Change Description 7.9 February 2008 7.9 Version 3 CLICK, DRAG, AND DRILL Contents 1 Introducing Click, Drag, and Drill™ ................................................................................. 12 1.1 1.2 1.3 What is Click, Drag, and Drill™?......................................................................................... 12 Features.............................................................................................................................. 12 Common Terms and Concepts ........................................................................................... 13 1.3.1 1.3.2 1.3.3 1.4 How CDD Works ................................................................................................................. 23 1.4.1 1.5 1.6 Starting CDD ...................................................................................................................................... 23 Using CDD .......................................................................................................................... 26 Menu and Tool Bars............................................................................................................ 27 1.6.1 1.6.2 1.6.3 1.7 1.8 1.9 1.10 Alias ................................................................................................................................................... 13 Border ................................................................................................................................................ 13 Can Grow ........................................................................................................................................... 13 Toolbars ............................................................................................................................................. 27 Toolbar Functions............................................................................................................................... 28 Menu Options ..................................................................................................................................... 31 Customizing Your Workspace............................................................................................. 41 Re-sizing Windows.............................................................................................................. 42 Repositioning Tool Sets ...................................................................................................... 42 Setting Preferences ............................................................................................................ 43 1.10.1 General Tab ....................................................................................................................................... 44 1.11 1.12 1.13 1.14 1.15 1.16 1.17 1.18 Startup Tab ......................................................................................................................... 45 Design Tab.......................................................................................................................... 46 Macros Tab ......................................................................................................................... 47 Report Tab .......................................................................................................................... 48 IFAS Specifications Tab...................................................................................................... 49 Export Tab .......................................................................................................................... 50 Exiting CDD ........................................................................................................................ 50 Where To Go From Here .................................................................................................... 51 i CLICK, DRAG, AND DRILL 2 Information Categories: Preparing Data......................................................................... 52 2.1 Create a New Information Category.................................................................................... 52 2.1.1 2.1.2 2.2 2.3 Editing Joins........................................................................................................................ 59 Adding/Removing Tables .................................................................................................... 61 2.3.1 2.4 Adding Tables .................................................................................................................................... 61 Removing Tables ................................................................................................................ 61 2.4.1 2.5 Step 1 - Selecting the Tables ............................................................................................................. 52 Step 2: Creating Joins ........................................................................................................................ 55 Step 3: Saving the Information Category............................................................................................ 63 Where To Go From Here .................................................................................................... 64 3 Designing Reports with Wizards ...................................................................................... 65 3.1 3.2 3.3 3.4 3.5 3.6 3.7 3.8 3.9 3.10 3.11 3.12 3.13 3.14 3.15 3.16 3.17 3.18 3.19 Opening the Report Wizard................................................................................................. 65 Report Types ...................................................................................................................... 66 Blank Report ....................................................................................................................... 66 Columnar Report................................................................................................................. 66 Auto Report......................................................................................................................... 67 Formatted report ................................................................................................................. 67 SQL Report ......................................................................................................................... 67 Using the Report Wizard ..................................................................................................... 67 Blank Reports ..................................................................................................................... 67 Columnar Reports ............................................................................................................... 71 View Design ........................................................................................................................ 78 Report to Screen ................................................................................................................. 79 Report to Printer.................................................................................................................. 79 Auto Reports ....................................................................................................................... 80 Formatted Reports .............................................................................................................. 83 View Design ........................................................................................................................ 89 Report to Screen ................................................................................................................. 90 Report to Printer.................................................................................................................. 90 SQL Reports ....................................................................................................................... 91 ii CLICK, DRAG, AND DRILL 3.20 3.21 Saving the Report ............................................................................................................... 97 Where To Go From Here .................................................................................................... 97 4 Running a Report............................................................................................................... 98 4.1 4.2 4.3 How To Run A Report ......................................................................................................... 98 Using Selection Criteria....................................................................................................... 99 Dynamic Selection Criteria................................................................................................ 101 4.3.1 4.3.2 4.3.3 4.4 4.5 4.6 Introduction ...................................................................................................................................... 101 Adding Dynamic Prompts................................................................................................................. 102 Using Dynamic Prompts................................................................................................................... 104 Scheduling Reports........................................................................................................... 105 Task Properties ................................................................................................................. 113 Pages in Memory .............................................................................................................. 115 5 Adding Visual Elements .................................................................................................... 117 5.1 Adding Rectangles ............................................................................................................ 121 6 Adding Graphs ................................................................................................................... 126 6.1 6.2 6.3 6.4 6.5 6.6 Defining Graphic Terminology........................................................................................... 126 Groups .............................................................................................................................. 126 Series................................................................................................................................ 127 Legend .............................................................................................................................. 127 Axis ................................................................................................................................... 127 Graph Types ..................................................................................................................... 128 6.6.1 6.6.2 6.6.3 6.6.4 6.6.5 6.6.6 6.7 6.8 Area.................................................................................................................................................. 128 Column (Bar) .................................................................................................................................... 128 Cube................................................................................................................................................. 128 Fit-To-Curve ..................................................................................................................................... 128 Line .................................................................................................................................................. 128 Mark ................................................................................................................................................. 128 Before You Begin .............................................................................................................. 129 Questions to Ask ............................................................................................................... 129 iii CLICK, DRAG, AND DRILL 6.9 6.10 6.11 6.12 6.13 Sketching Your Graph....................................................................................................... 129 Adding Graphs .................................................................................................................. 131 Selecting Graph Style Settings ......................................................................................... 137 Style Gallery...................................................................................................................... 138 Appearance Selections ..................................................................................................... 138 6.13.1 6.13.2 6.13.3 6.13.4 6.14 6.15 6.16 6.17 6.18 6.19 6.20 6.21 6.22 6.23 6.24 6.25 6.26 Stacked Style Selections.................................................................................................................. 138 Grid Line Selections ......................................................................................................................... 139 Color Scheme Selections ................................................................................................................. 140 Point Type Selections....................................................................................................................... 141 Editing Existing Graphs..................................................................................................... 142 General Options .................................................................................................................. 143 3D Properties .................................................................................................................... 145 Title Properties .................................................................................................................. 146 Chart Legends .................................................................................................................. 147 Graph Styles ..................................................................................................................... 147 Column Graphs ................................................................................................................. 148 Horizontal Bar Graphs ...................................................................................................... 155 Line Graphs ...................................................................................................................... 156 Fit-To-Curve Graphs ......................................................................................................... 158 Mark Graphs ..................................................................................................................... 160 Area Graphs...................................................................................................................... 162 Cube Graphs..................................................................................................................... 165 7 Sub Reports........................................................................................................................ 167 7.1 What are Sub Reports?..................................................................................................... 167 7.1.1 7.2 7.3 7.4 7.5 7.6 7.7 Adding Information Categories to the Sub Report ............................................................................ 170 Adding SQL Statements.................................................................................................... 175 Editing SQL Statements.................................................................................................... 179 General Tab ...................................................................................................................... 180 SQL Tab............................................................................................................................ 181 Items Tab .......................................................................................................................... 182 Sort Tab ............................................................................................................................ 185 iv CLICK, DRAG, AND DRILL 7.8 7.9 Deleting Sub Report Data ................................................................................................. 185 Removing Sub Reports ..................................................................................................... 186 8 Data Lookups ..................................................................................................................... 187 8.1 System Field Names ......................................................................................................... 207 9 Refining the Design ........................................................................................................... 209 9.1 Working with Data Elements ............................................................................................. 211 9.1.1 9.2 Adding Data Elements Using “Insert”................................................................................ 212 9.2.1 9.2.2 9.3 9.4 9.5 9.6 9.7 “Insert, Text Field” ............................................................................................................................ 212 “Insert, User Field”............................................................................................................................ 213 Changing the Width of a Data Element............................................................................. 217 Moving Data Elements ...................................................................................................... 217 Aligning Data Elements..................................................................................................... 218 Formatting Data Elements ................................................................................................ 218 Working with Regions ....................................................................................................... 222 9.7.1 9.8 9.9 9.10 9.11 9.12 9.13 9.14 9.15 9.16 9.17 9.18 9.19 9.20 9.21 Adding Data Elements in View Design ............................................................................................. 211 Adding Regions to the Report .......................................................................................................... 222 Formatting Regions........................................................................................................... 225 Re-sizing Region View ...................................................................................................... 228 Refine Using “Report Properties” ...................................................................................... 229 General Tab ...................................................................................................................... 231 Sort Tab ............................................................................................................................ 233 Design Layout Tab ............................................................................................................ 234 Selection Criteria Tab ....................................................................................................... 235 Creating Picklists .............................................................................................................. 239 Drill Tab............................................................................................................................. 243 Report Prompts Tab.......................................................................................................... 244 Prompt Order Tab ............................................................................................................. 245 Refine Using Macros......................................................................................................... 245 The Macros Tab ................................................................................................................ 246 Macro Languages ............................................................................................................. 247 v CLICK, DRAG, AND DRILL 9.22 Writing Macros using Classic CDD Macro Language ....................................................... 249 9.22.1 Statements ....................................................................................................................................... 249 9.22.2 Calculation Macro............................................................................................................................. 249 9.23 9.24 9.25 9.26 9.27 9.28 9.29 9.30 9.31 9.32 9.33 9.34 9.35 9.36 Conditional Macro ............................................................................................................. 253 Declaration Macro ............................................................................................................. 254 Six Basic Statements ........................................................................................................ 254 Function Macro ................................................................................................................. 257 Misc IFAS Functions ......................................................................................................... 261 The Active Macro Language ............................................................................................. 263 Macro Language Preferences........................................................................................... 267 Macro Editor Features....................................................................................................... 267 Finding Text ...................................................................................................................... 268 Replacing Text .................................................................................................................. 269 Using Bookmarks .............................................................................................................. 270 Using Scriptlets ................................................................................................................. 271 ActiveMacro Functions in CDD ......................................................................................... 274 Function Macros ............................................................................................................... 275 9.36.1 Compute Functions .......................................................................................................................... 275 9.37 9.38 Date Functions.................................................................................................................. 276 Other Active Macro Features ............................................................................................ 279 9.38.1 9.38.2 9.38.3 9.38.4 Active Print Conditions ..................................................................................................................... 279 Active Script Drills ............................................................................................................................ 280 Passing Parameters to a Drill Down Report ..................................................................................... 282 Automating Other Applications ......................................................................................................... 283 10 Drill Down ........................................................................................................................... 285 10.1 10.2 10.3 What is a Drill Down?........................................................................................................ 285 Creating a Drill Down ........................................................................................................ 285 Using Drill Down ............................................................................................................... 290 11 Load/Unload Reports ........................................................................................................ 293 11.1 Introduction ....................................................................................................................... 293 vi CLICK, DRAG, AND DRILL 11.2 Unloading CDD Reports.................................................................................................... 293 11.2.1 11.2.2 11.2.3 11.2.4 11.2.5 11.3 Loading CDD Reports ....................................................................................................... 298 11.3.1 11.3.2 11.3.3 11.3.4 11.3.5 11.3.6 11.3.7 11.4 11.5 Step 1: Select Reports to Unload ..................................................................................................... 294 Step 2: Select Scriptlets to Unload ................................................................................................... 295 Step 3: Select Categories to Unload ................................................................................................ 296 Step 4: Select Tables to Unload ....................................................................................................... 297 Step 5: Select Unload File................................................................................................................ 298 Step 1: Select Load File ................................................................................................................... 299 Step 2: Select Reports to Load ........................................................................................................ 300 Step 3: Select Destination Folder for Reports .................................................................................. 301 Step 4: Select Scriptlets to Load ...................................................................................................... 302 Step 5: Select Categories to Load.................................................................................................... 303 Step 6: Select Destination Folder for Categories.............................................................................. 304 Step 7: Select Tables to Load .......................................................................................................... 305 Load Conflicts ................................................................................................................... 305 Apply vs. Apply to All......................................................................................................... 306 11.5.1 Report Conflict ................................................................................................................................. 306 11.6 11.7 11.8 Scriptlet Conflict ................................................................................................................ 307 Category Conflict .............................................................................................................. 307 Table Conflict .................................................................................................................... 308 12 FAQs ................................................................................................................................... 309 12.1 12.2 12.3 12.4 12.5 12.6 12.7 12.8 12.9 FAQ: HOW DO I MANAGE CDD REPORT FILE STORAGE ON THE 7I SERVER?....... 309 FAQ: WHAT REGISTRY SETTINGS ARE AVAILABLE FOR CDD?................................ 310 FAQ: HOW DO I ENABLE SQL TRACING IN CDD?........................................................ 313 FAQ: HOW DO I ELIMINATE DOMAIN SWITCHING FOR SINGLE 7I SERVER ............ 315 FAQ: WHY ARE CDD VIEWS NOT WORKING IN 7I USING TABLE.COLUMN SYNTAX IN316 FAQ: HOW CAN I DO NUMBER TO ENGLISH CONVERSION IN CDD? ....................... 316 FAQ: HOW DO I USE THE UCX TABLES IN CDD REPORTS? ...................................... 327 FAQ: WHAT DOES THE "MULTIPLE CONTROLS WITH SAME ID" ERROR MESSAGE MEAN 327 FAQ: WHY DOES THE CDD DRILL DOWN IN A GROUP FOOTER RETURNS WRONG DATA 329 vii CLICK, DRAG, AND DRILL viii 12.10 FAQ: WHY IS NUUPUS SECURITY NOT ENFORCED IN CDD?.................................... 330 12.11 FAQ: HOW DO I VIEW THE REPORT SQL IN CDD?...................................................... 331 12.12 FAQ: HOW DO I HANDLE INVALID CHARACTERS IN 7I AND CDD? ........................... 332 12.13 FAQ: WHY DO MY DATES NOW DISPLAY AS "11/30/1999" OR "1/1/1000" IN CDD? .. 332 12.14 FAQ: HOW DO I EXPORT TO EXCEL USING A SCRIPTLET IN CDD? ......................... 334 12.15 FAQ: WHAT SETTINGS ARE AVAILABLE FOR CDD REPORT FILE MANAGEMENT SETTINGS ON THE 7I SERVER? ................................................................................................................... 335 12.16 FAQ: HOW DO I HANDLE DATABASE SCHEMA CHANGES IN CDD REPORTS? ....... 336 12.17 FAQ: WHY DO I GET THE "OBJECT REFERENCE NOT SET TO AN INSTANCE OF AN337 12.18 FAQ: WHY DOESN'T THE CDD/7I DRILL DOWN DOES NOT DRILL ON DOUBLE CLICK? 338 12.19 FAQ: WHY DOESN'T MY CDD REPORT RUN?.............................................................. 339 12.20 FAQ: HOW DO I CREATE CDD SELECTION CRITERIA AGAINST DATETIME (TIMESTAMP) 340 12.21 FAQ: HOW CAN I USE CDD REPORTS TO PERFORM MAIL MERGE WITH MS WORD?340 12.22 FAQ: WHY ARE CDD REPORTS NOT DISPLAYING TRANSLATED DESCRIPTIONS?341 12.23 FAQ: WHY AM I GETTING THE ERROR IN 7I RUNNING CDD REPORTS: "A SEMI COLON 341 12.24 FAQ: HOW CAN I USE CDD TO DO A DOCUMENT ATTACHMENT LOOKUP FOR DOCUMENTS ............................................................................................................................... 342 12.25 FAQ: WHY DON'T CDD DRILL DOWNS USING SYSPERIOD WORK THE SAME IN 7I?342 12.26 FAQ: HOW DO I EXPORT TO XLSGEN USING A SCRIPTLET IN CDD? ...................... 343 12.27 FAQ: WHY DO I GET THE ERROR "SEEK FAILED ON COMPLETE DAISY PRINT" IN 344 12.28 FAQ: WHY AM I GETTING THE ERROR "MASK DOES NOT EXIST IN NEXT QUESTION344 12.29 FAQ: HOW DO I ADD SUBSTRING COLUMNS IN THE CDD CATALOG MANAGER? . 345 12.30 FAQ: ERROR "SERVER ERROR IN '/' APPLICATION" RUNNING ................................. 346 12.31 FAQ: WHY ARE SOME (OR ALL) OF MY CDD REPORTS NOT VISIBLE IN 7I? ........... 346 12.32 FAQ: WHAT DOES THE "UPDATE APPLICATION DIALOG" DIALOG MEAN? ............. 347 12.33 FAQ: WHY ARE DECIMAL VALUES TRUNCATED IN XLSGEN EXPORT?................... 348 12.34 FAQ: WHY DOES ISDBNULL NOT WORK CORRECTLY IN A GROUP FOOTER?....... 348 12.35 FAQ: WHY DOESN'T ISDBNULL WORK WITH ELEMENTS FROM DATA LOOKUPS OR349 CLICK, DRAG, AND DRILL 12.36 FAQ: HOW DO I ADJUST THE OPENLINK CLIENT RECEIVE TIMEOUT?.................... 349 12.37 FAQ: CDD SELECTION CRITERIA AGAINST DATETIME (TIMESTAMP) IN AN ORACLE DATABASE? ................................................................................................................................. 349 12.38 FAQ: PRINTED CDD REPORT FROM 7I DOES NOT SHOW SHADING ....................... 350 12.39 FAQ: HOW TO SCHEDULE CDD REPORT TO RUN DAILY ......................................... 352 12.40 FAQ: ATTACHING EXCEL OUTPUT TO CDD REPORTS IN 7I..................................... 365 12.40.1Installing XLSGEN............................................................................................................................ 365 12.40.2Using XLSGen.DLL for Attaching Excel Output to 7i CDD Reports ................................................. 366 12.41 FAQ: CDD REPORT FILE MANAGEMENT SETTINGS ON THE 7I SERVER ................ 376 12.42 FAQ: REVIEW CDD PAGES IN MEMORY....................................................................... 378 12.42.1Review Pages in Memory................................................................................................................. 378 13 Appendix A: Catalog Manager.......................................................................................... 381 13.1 13.2 13.3 13.4 13.5 13.6 13.7 13.8 13.9 13.10 13.11 13.12 13.13 13.14 13.15 Catalog Manager .............................................................................................................. 381 Catalog Table Properties .................................................................................................. 384 General Tab ...................................................................................................................... 385 Details Tab........................................................................................................................ 386 Add Column ...................................................................................................................... 387 Validate ............................................................................................................................. 388 Remove Table................................................................................................................... 389 Column Properties ............................................................................................................ 390 General Tab ...................................................................................................................... 391 Details Tab........................................................................................................................ 392 Display Tab ....................................................................................................................... 393 Catalog View Manager...................................................................................................... 394 General Tab ...................................................................................................................... 399 Details Tab........................................................................................................................ 400 Display Tab ....................................................................................................................... 401 14 Appendix B: Edit Masks .................................................................................................... 403 14.1 Edit Masks for Numeric Data Elements ............................................................................ 403 14.1.1 Using Edit Masks to Apply Color to Numeric Data Elements ........................................................... 403 ix CLICK, DRAG, AND DRILL 14.1.2 Edit Masks for Date and Time Data Elements.................................................................................. 407 14.1.3 Edit Masks for Character Data Elements .........................................................................................408 15 Appendix C: IFAS 7i IQ Mapping ...................................................................................... 410 16 Appendix D: Attaching Excel Output to 7i Reports........................................................ 412 16.1 16.2 16.3 Using XLSGEN.DLL for Attaching Excel Output to 7i CDD Report................................... 412 The macros: ...................................................................................................................... 413 Installing the XLSGEN DLL............................................................................................... 417 17 Appendix E: Tutorial.......................................................................................................... 419 17.1 17.2 17.3 17.4 17.5 17.6 17.7 Creating an Accounts Payable Report .............................................................................. 419 Catalog Manager .............................................................................................................. 420 Information Categories...................................................................................................... 422 Report Design ................................................................................................................... 424 Group Headers and Group Footers .................................................................................. 431 User-Defined Fields .......................................................................................................... 436 Macros .............................................................................................................................. 444 17.7.1 17.7.2 17.7.3 17.7.4 17.7.5 17.7.6 17.7.7 17.7.8 445 Initialize the Grand Total Field.......................................................................................................... 445 Initialize Other User Fields ............................................................................................................... 446 Calculate Running Totals ................................................................................................................. 447 451 Selection Criteria .............................................................................................................................. 451 Report Enhancements...................................................................................................................... 456 Run a Report .................................................................................................................................... 458 18 Appendix F: CDDsearch.exe............................................................................................. 459 18.1 18.2 18.3 18.4 18.5 Schema Change ............................................................................................................... 459 XPath Query ..................................................................................................................... 459 Results File ....................................................................................................................... 459 Search Button ................................................................................................................... 459 Schema Files .................................................................................................................... 460 x CLICK, DRAG, AND DRILL xi CLICK, DRAG, AND DRILL 12 1 Introducing Click, Drag, and Drill™ 1.1 What is Click, Drag, and Drill™? Click, Drag, and Drill™ (CDD) is a Windows®-based report writer that allows you to select report elements and design reports using click and drag definitions. CDD allows you to “drill down” to linked reports, with optional pop-up selection criteria prompts that appear prior to these drill downs. CDD may be used with any ODBC-supported, relational database. 1.2 Features • User-defined AKA (Also Known As) feature allows you to apply aliases to data elements so that the names are meaningful. • Report output can be displayed in graphic format, i.e., pie charts, three-dimensional bar graphs, etc. In this way, high quality, professional reports can be produced. • By double-clicking on a retrieved data element, the user may drill down to detail levels. “Pop-up” prompts may be designated to occur prior to the drill down. For instance, if drilling down to transaction level details from the master level report entries, the report can be set up so that the user is prompted for a date range. • An unlimited number of sort levels may be defined to accommodate complex sorts. • Printers can be selected to accommodate a variety of outputs. • Multiple fonts, pitches, and colors are supported on a single report so that visual impact may be designed into the final product. • Comprehensive totaling and subtotaling logic allows for total lines in a variety of regions on the report. For instance, subtotals may be easily inserted at every sort break. • Derived values may be defined based on rows, columns, rates, and constants so that values other than those stored in the database may be reported. • The report creation process is visual; while picking data elements, a sample report is shown at the same time. What-You-See-Is-What-YouGet (WYSIWYG) format gives the user instant feedback about how the report will look. This speeds creating reports. • Linkages between tables (“joins”) are easily created and identified. • Report output may be routed to the screen, a printer, a file, or exported to popular spreadsheet software. CLICK, DRAG, AND DRILL 13 • Special “hidden” row and column elements allow the user to perform calculations at the detail level and display the results at the total level. • Complex selection criteria is supported so that the report contains only the information desired. • Comprehensive security may be set. For instance, a user could be restricted to see only the records belonging to a specific department. • Sub-report feature allows users to nest reports within reports for greater power and flexibility. • Reports can be grouped in hierarchical folders for easier management. • Catalog View Manager allows user to create views in their Informix database without using dbaccess or esql-c. CDD enforces all applicable security (IFAS and/or TRIAD) on these user-created views. • Reports can be converted to Hypertext Markup Language (HTML) for viewing through your favorite web browser. 1.3 Common Terms and Concepts With Click, Drag, and Drill™, preparing data for a report, designing a report, and running a report are all easy tasks. A few basic terms and concepts will help in understanding the steps involved in performing these tasks. Understanding the relationship between these terms and concepts will also make creating and running reports easier. 1.3.1 Alias The name given to particular table or data element to better identify it. Often, an alias is used to replace the sometimes cumbersome database name (i.e., GLK_KEY_MSTR or GLK_KEY_PART01) with a more familiar name (i.e., GLKEYS or GLFUND). 1.3.2 Border Signifies that the bounding box surrounding a field or region of a report will be graphically displayed on the printed report. 1.3.3 Can Grow This option is used with text fields to indicate that the field box can grow in size as the size of the text grows (see Multi-Line). cdd.online cdd.online is the application through which reports are viewed on a web browser. CLICK, DRAG, AND DRILL 14 Column (see also Field) This refers to the individual elements that comprise a table in the database. Data Dictionary (see System Catalog) Data Row A data row is a collection of columns, and their corresponding data, that comprise one pass through the report data. There are many data rows in a CDD report. Data Source A set of parameters that define a network connection to a database. This includes the name of the host machine, the name of the database, the protocol used to connect to the database and information that identifies the user. Data source is also known as “connect source” and “database connection.” Data The actual values that are stored in the database. Database A logical collection of data. This can be the entire host database or the CDD System Catalog. Default Value The value that a field will contain after it is initialized, but prior to receiving user input, calculated input, or data from the database. Description Most items within CDD have an associated description. The description allows the user to convey detailed information about a report, a field or other item. Design CLICK, DRAG, AND DRILL 15 (See Report Design) Design Shape Graphical objects (rectangles and lines) that can be placed into a report design. Display Size The default size of the field box used when a field is placed onto the report design. Drill Down A method that allows dynamic linking of reports. After one report has been displayed to the screen, the user can follow a drill down to view a more detailed analysis of the data row. Edit Mask Character string that controls the format of the data in a report. For example, the character string for a phone number, as stored in the database, might be 8005551111. An edit mask of (###) ###-#### could be used to cause the string to appear in the report as (800) 555-1111. Export Allows report data to be saved in a format that can be use by other programs such as spreadsheet and Internet browser (i.e., Netscape Navigator® or Microsoft Internet Explorer®). Field An individual item on a report design. Each field has an associated edit mask, description and field box. Field Box When a particular field within the report design is selected for formatting purposes, i.e., changing size or formatting text, a field box is drawn around the selected field. This rectangle will not be drawn on the printed report, but it does define the area in which the data will be displayed. Footer A region of the report that follows the detail region. Sorted footers, page footers, and/or a final footer may appear at the end of the report. CLICK, DRAG, AND DRILL 16 Functional Security This CDD-specific security allows the administrator to define which features within CDD can be accessed by a given user. An example would be the ability to limit access to the ‘delete report’ option. Functions Actions that can be performed during the execution of a report in order to generate specific results. For example, a function exists to determine the number of days between two dates. Graphs Also known as “charts,” graphs display data retrieved from the database in a graphic manner. Pie graphs, bar graphs, line graphs and others can all be added to CDD reports. Group (see also Sort) A group, or grouping, identifies which fields in the data row define the level of detail within the report. Many groups may be in a single report design. Header A region of the report that precedes the detail region. Sorted headers, page headers, and/or a general header may appear at the beginning of the report. Heading The text that appears above a field when it is placed in the report using the report wizard. Host Name The name of the computer that is hosting the database. Hypertext Markup Language (HTML) HTML is used to view text and graphics on a web browser. CDD reports can be converted to HTML and viewed via cdd.online. INET CLICK, DRAG, AND DRILL 17 A connectivity program required when using the ODBC Driver. This program resides on the PC. Information Category A logical grouping of one or more tables from the System Catalog, as well as user-defined fields, macros and system fields. Information categories are used to define the data sets available to a report design. Inner Join A relationship used in an information category that joins two (or more) tables. The tables can be joined on one or more columns. The relationship is such that the resulting data row includes only the records where the joining columns are equivalent in both tables. IP Address The address of a network computer. Generally this address is associated with a name (see Host Name). ISTAR A connectivity program required when using the ODBC Driver. This program resides on the host machine. Item Name A name that refers to a report item. This name must be unique within the information category used for the report. Join A relationship established between two (or more) tables in an information category (see also Inner Join, Outer Join and Information Category). Literal A user-supplied value. This can be a character or string of characters, a numeric value or a date value. Generally used to specify the scope of a report (see Selection Criteria). Load/Unload The Load/Unload utility, found in Tools, Load/Unload from the main menu, is used to move CDD reports from one database to another. In this way, CDD reports created at one location can be used by someone with the same database at a second location. The unload function copies a CLICK, DRAG, AND DRILL 18 report (together with its information category) to a new network location, or even to a floppy diskette. The load function copies an “unloaded” report from the network or floppy to the desired database. Macro A statement or set of statements in the CDD macro language that performs some action. Macros can exist in both the Report Design and the Information Category. In either case, macros are generally associated with a specific region. The exception is the ‘Init’ macro which is executed once at the beginning of a report. If attached to a region, it is executed once for every data row that is formatted in the region (see also Function, Region, Literal). Matches A comparison operator that allows for pattern matching, including wildcard (*) searches. Multi-Line Specifies that a given field may grow to cover more than one line on a report. Null A value that indicates the lack of data for a field on a report. NULL is not equivalent to blanks or spaces or zero. ODBC A PC standard for database access (Open Database Connectivity) (see also ODBC Manager and ODBC Driver). ODBC Driver A DBMS-specific implementation of the ODBC standard. ODBC Manager The Microsoft System Utility for integrating ODBC drivers with the Windows® Operating System. OpenLink A vendor for ODBC drivers. CLICK, DRAG, AND DRILL 19 Outer Join A relationship used in an information category that joins two (or more) tables. The relationship is directional and conditional, in that there is a ‘from’ table and a ‘to’ table. All data in the ‘from’ table will be returned regardless of condition, but only data in the ‘to’ table which meets the join condition will be returned. The relationship is such that the resulting data row includes all of the data in the ‘from’ table and only the data in the ‘to’ table where the joining column is equivalent in both tables. Page Eject An action specified in a report that causes a page break to be generated. Page Eject can be specified to occur either before or after a specific region on the report design. Picklist A picklist is a user-defined set of information from which a particular item can be retrieved for inclusion in the report. User-defined picklists can be attached to any region of the report. Picklists are used in conjunction with selection criteria prompts; they can be defined for user fields, system fields, or generic selection prompts. Picklists allow the user to offer a picklist of selectable data, as in “all the Organization Keys within the General Fund.” Prompt The request for literal values from the user. Prompts are specified in the selection criteria and appear to the user at run-time. Protocol The network communication standard used when connecting to the host machine. Generally, the protocol is TCP/IP. Query Any request for data made to the database. Often a report is referred to as a query. Region Any number of lines of printable space on the report triggered to print with the occurrence of a particular sort grouping, or a particular aspect of the report. There are seven types of regions: Start of Report, Page Header, Group Header, Detail, Group Footer, Page Footer and End of Report. There can be multiple copies of each region on a report design. CDD is regionally driven, meaning that events occur as regions occur (e.g., macros, database lookups, sub reports, graphs, etc., execute when and if the region they are attached to occurs.) CLICK, DRAG, AND DRILL Report The formatted data generated by executing a report design. Report Design The layout of regions and fields that designate how a report will be generated. Report Field (Database Item) An item from the Information Category, or a report-specific user-defined field. Report Wizard A step-by-step report creation tool that allows the user to create a basic report in a short amount of time. Request Broker A connectivity program required when using the OpenLink ODBC Driver. This program resides on the host machine. Selection Criteria cdd.online <4.3 The statement or statements that specify what values are desired for a given report. Specifically limits the amount of data returned from the database by assigning particular data attributes a value. Example: Org. Key is equal to 101010 and Post Date is equal to 11/16/2000. Selection Rectangle Using the mouse, the user can click on the design and drag a selection rectangle around one or more objects to select them. Service The name of the remote service that an Informix DBMS uses to ‘listen’ for queries to the database. Sort The order in which the data set for a report is arranged; sorts can be ascending or descending. There can be multiple sort levels in a single report design. 20 CLICK, DRAG, AND DRILL Sort Level A specific sort within a report design. SQL Structured Query Language (SQL) is the standard language used to query a database. Within CDD, the SQL statement can be viewed at both the information category level and at the report design level. The SQL at the report design level can be viewed after running the report to the screen and includes any selection criteria specified by the user. Static Text Field A literal character string on a report design. All static text fields are displayed “as-is” on the report. Sub-Report A report nested within another report. A sub-report may contain one or more queries, based upon information categories, or SQL, each being selected and sorted independently. System Catalog This is the structure that Click, Drag and Drill uses as a road map to the organization of the database. Table A collection of columns in the database or System Catalog. Note that a table in the System Catalog is a mapping to a table in the physical database. It may or may not contain all the same columns as the actual table. TCP/IP A standard network protocol that allows computers of different types to communicate via a network. Total Fields A total field is a field that is specified as generating a total on a report. See Total Types for all the available options. Total Types 21 CLICK, DRAG, AND DRILL 22 A total field may be one of the following: None (specifics that a field in a footer region is not a Total Field), Total, Count, Average, Variance, Standard Deviation, Maximum Value or Minimum Value. User-Defined Field A field created and named by the user. Once created, the field can be used on a report design just like any other field. Winsock A Microsoft Windows® Operating System standard designed to allow network communication via UNIX style sockets. The standard requires an implementation of the winsock.dll library. The standard is generally implemented by network software vendors, although some applications can provide their own. It is critical that there be only one implementation per PC to avoid communication problems. CLICK, DRAG, AND DRILL 23 1.4 How CDD Works 1.4.1 Starting CDD To activate CDD from the PC desktop, double click on the CDD icon. Typically, you will be prompted with a series of dialog boxes designed to establish your connection to a selected database. The first of these dialog boxes is the System Catalog window. Choose the desired System Catalog and click Select. The ODBC login window will appear. Note: In the example below, the OpenLink login window is shown. If you are using an ODBC driver, your login dialog box will be different in appearance. CLICK, DRAG, AND DRILL Enter your user name and your password. (If you have questions about these values, contact your system administrator.) Click Connect. The Connect to Database window will be displayed. At this time you again enter the appropriate user name and password. Note: If you would like to change the database to which you are about to connect, click Pick Other…. The Connection Manager window will appear as displayed below 24 CLICK, DRAG, AND DRILL Select the database to which you want to connect by double clicking on the appropriate icon. You will once again be prompted to enter your name and password in order to connect to the selected database. Once you have connected to the desired database and have entered your name and password, click Connect. The CDD Window will appear. 25 CLICK, DRAG, AND DRILL 26 1.5 Using CDD You have a number of possible options within three basic categories: Report Design, Information Category or Scriplet. Report Design includes but is not limited to creating new reports or modifying existing ones. Report Output involves actualizing the report design for output to the screen, a printer, a file or to the Internet via your web browser. Information Category includes modifying existing information categories, or CDD table definitions as well as creating new information categories, or CDD table definitions. To choose the option you wish to execute, click on File from the Menu bar and select “New…” or “Open…”, or select “Open & Run Report…”. Designing a new report involves: • Selecting an information category for the data elements you want to display on the report. • Choosing the type of report you want to run using the Report Wizard. • Customizing the look of the report with design screens. CLICK, DRAG, AND DRILL 27 Running an existing report involves: • Selecting the report from a list of previously designed reports. • Entering selection criteria, if desired. • Selecting whether to print the report to the screen, to a printer or to a file. Creating or modifying a System Catalog involves: • Selecting an existing system catalog from a list of previously designed catalogs or creating a new catalog using the Table Wizard. • Choosing tables to include in the catalog and creating linkages (joins) between the tables. 1.6 Menu and Tool Bars 1.6.1 Toolbars The toolbar is a row of buttons that provides shortcuts for performing many commonly used functions. All of these toolbar functions are also accessible through the menu bar, however, the toolbar provides single-click access to these functions. For example, to print a report, just click on the Print button located on the toolbar. If it is not already displayed, select Toolbar from the View menu to view the toolbar. Repeat these steps to turn off the toolbar. (A check mark appears next to menu items that are activated.) Note: All tool bars in CDD are “floating” toolbars. This means that these toolbars can be moved to any position on your desktop. To move a CLICK, DRAG, AND DRILL toolbar, simply click on the toolbar's handle and drag it to the desired location. To return the toolbar to the top of the CDD window just under the title bar (the default location for all toolbars), simply drag the toolbar back to the top of the window and “redock” it on the title bar. This feature allows you to customize your workspace to best facilitate your work in CDD. Upon opening CDD, the buttons on the toolbar have the following functions: 1.6.2 Toolbar Functions 28 CLICK, DRAG, AND DRILL 29 CLICK, DRAG, AND DRILL 30 CLICK, DRAG, AND DRILL 31 1.6.3 Menu Options Like in many Windows® applications, the options available on the menu bar in CDD will vary somewhat depending on what operation you are performing. There are, however, a standard set of options accessed through the menu which you will find useful during a typical CDD session. The standard options accessed through the CDD menu bar are defined below. The menu options available under the File selection are: New… Allows you to create a new Report or Information Category. Open… Allows you to open an existing report in the Design Window. Open & Run Report… Allows you to open an existing report and immediately run the report to the screen or to a printer. Schedule Report Allows you to schedule a report to run at a later date and time. Close Allows you to close open reports. If you have made changes to the report, you will be prompted to save the report before closing. Save Allows you to save the open report. Save As… Allows you to save and name the open report. CLICK, DRAG, AND DRILL Delete… Allows you to delete an existing report or Information Category. You will be asked to verify the deletion. Connect Database… Allows you to establish a new database connection. Disconnect Database… Allows you to disconnect from the current database. You will be asked to verify the disconnection. Print… Allows you to print the report. Print Preview Allows to view the report prior to printing. Print Setup… Allows you to adjust your printer settings. Recent Categories Allows you to open and use or edit recently accessed categories. Recent Designs Allows you to open and use or edit recently accessed designs. Recent Reports Allows you to open and use or edit recently accessed reports. Exit Exits Click, Drag, and Drill™. The menu options available under the Edit selection are: 32 CLICK, DRAG, AND DRILL Undo Allows you to undo your most recent action Cut Cut and Copy are used to edit fields within a report as well as entire regions within a report and all the fields that reside within that region. The paste function allows one the options of moving fields or regions within the report, or between multiple reports. Copy See above. Paste See above. Align Allows you to align multiple data fields in a report design. These options are only available when more than one field has been selected. Left Right Top Bottom Make Same Size Allows you resize data fields in a report design. This option is only available when more than one field has been selected. Delete Allows you to delete an existing data field. You will be asked to verify the deletion. Remove User Field… Allows you to delete a user field from the report design. This option is only available when a user-defined field is selected. Remove Region Allows you to delete a region from the report design. You will be asked to verify the deletion. 33 CLICK, DRAG, AND DRILL Remove Data Lookup Allows you to remove a selected data lookup. Remove Sub Report Allows you to remove a selected sub report. Preferences… Allows for a wide variety of general report preferences to be defined. The Preferences window contains six tabs: General, Startup, Design, Report, Export, and IFAS Specifications. The Preferences window is described in greater detail later in this chapter. The menu options available under the View selection are: Main Toolbar Allows you to toggle these toolbars on or off. Format Toolbar See above. Design Toolbar See above. Design Items Toolbar See above. Output Toolbar See above. Report Items Toolbar See above. 34 CLICK, DRAG, AND DRILL Status Bar See above. System Catalog Browser See above. Show Grid Displays or hides the grid in the design window. Snap To Grid Turns on or off the snap to grid function. When turned on, data fields align with the nearest grid line. Item Display The Item Display selections (Name, Description, Mask) allows you alter the way the data in the data fields in a report design is displayed while you work in the main design window.. Name Description Mask Report Properties… Allows you to set general report properties. The Report Properties window contains eight tabs: General, Sort, and Selection Criteria, Report Prompts, Prompt Order, Design Layout, HTML and Drill. These options are discussed in greater detail later in this manual. Data Lookup Proper- Allows you to define the properties of a selected data lookup. ties 35 CLICK, DRAG, AND DRILL Item Properties… Selecting Item Properties displays the Catalog Details window through which item details and display options are set. The Catalog Details window is discussed in greater detail later in this chapter. The menu options available under the Insert selection are: Text Field… Selecting “Insert, Text Field…” displays the Text Field window through which new text fields can be created. Once you have entered the desired text (for example “1997 Budget” as a report title) in the Text Field window, when you return to the design window your pointer will be “holding” the new text. When you click on a region of the report, the text new text field will be placed. User Field… Selecting “Insert, User Field…” displays the User Defined Field window. Create userdefined fields using General, Display, and Calculation tabs. 36 CLICK, DRAG, AND DRILL Region… Selecting “Insert, Region…” displays the Region Level window where you can create new page heading, detail and page footer regions. Here you also specify where the new region is to appear, at “start of report” or at “end of report.” Sub Report… Selecting “Insert, Sub Report…” allows you to add a sub-report anywhere in your main report. The sub report dialog allows you to specify where in the main report the sub report is to appear and to design the sub report in much the same way as the main report is created. For more information on sub reports see chapter 7. Data Lookup… Selecting “Insert, Data Lookup…” allows you to execute database queries on conditional values based either on existing categories or on an SQL statement. Note: Sub Reports will return multiple rows of data, while a Data Lookup only returns a single row. Design Shape Selecting “Design, Shape” presents two options for inserting shapes into your report, rectangle and line. Shapes drawn in the report can be customized, moved and resized. Design shapes provide you with a tool to help highlight information in the final report. Rectangle Line Graph Selecting “Insert, Graph” allows you to insert a wide variety of graphs into any region of the report.. 37 CLICK, DRAG, AND DRILL The menu options available under the Output selection are: Run… Allows you to run the report from the design window to the screen, a printer, or to a file depending upon the selection made below. Output to Screen Allows you to toggle among these three choices. When “Output to Screen” is turned on, the report will be run to the screen when Run… is selected. When “Output to Printer” is turned on, the printer dialog box will be displayed when Run… is selected. Finally, when “Output to File” is turned on, the Export to File window will be displayed when Run… is selected. Output to Printer Output to File Prompt for Selection Allows you to toggle the Selection Criteria prompt on or off. When turned on, the Criteria Selection Criteria window is displayed when Run… is selected. 38 CLICK, DRAG, AND DRILL The menu options available under the Tools selection are: Catalog Manager… Selecting “Tools, Catalog Manager…” displays the Catalog Manager window. The Catalog Manager is used to customize tables contained as part of an Information Category being used in a given report or multiple reports. For more information about the Catalog Manager, see Appendix A. Catalog View Man- Selecting “Tools, Catalog View Manager…” allows you to create and manage Catalog ager “views” which are composed of SQL statements creating unique tables for database access.. Manage Folders… Selecting “Tools, Manage Folders…” allows you to make changes to the report or category folders stored by CDD. 39 CLICK, DRAG, AND DRILL Load/Unload Load Unload Selecting “Tools, Load/Unload” allows you to save and relocate CDD reports. CDD reports are stored on dynamic databases. Making these reports available to a wide variety of users, sometimes at multiple locations, is often important. The Load/Unload tool creates CDD files which can be “moved” (together with their associated information categories) from database to database and location to location. Validate Categories Selecting “Tools, Validate Categories…” allows you to verify that the category being used by the report is consistent with the report parameters.. The Window selection allows you to arrange the report windows within the main CDD window when more than one report is open at a time. Your options are to Cascade, Tile Horizontally, and Tile Vertically the open windows. All open reports are also listed here. The report currently displayed in the CDD design window is indicated by a check mark. 40 CLICK, DRAG, AND DRILL 41 The Help selection allows you to retrieve help on a variety of CDD topics. The Help menu also provides you with information about the VBScript utilites. 1.7 Customizing Your Workspace Your workspace in Click, Drag, and Drill™ (the various windows, toolbars and dialog boxes) can be adjusted to most effectively manage your tasks. Most windows in Click, Drag, and Drill™ can be moved and resized as needed. Many of the tool sets can be moved and “docked” in different locations in the Click, Drag, and Drill™ window. Moving Windows To move a window or dialog box in CDD, simply click on the title bar of the window and drag it to the desired location. CLICK, DRAG, AND DRILL 42 1.8 Re-sizing Windows To resize a window or dialog box in CDD, simply click on the bottom right corner of the window and drag the window to the desired size. 1.9 Repositioning Tool Sets To reposition a tool set, click anywhere in the background of the toolbar and drag it to the desired location. Toolbars can be relocated (often referred to as “re-docking”) to the right, left, or bottom border of the CDD window, or they can be dragged into the middle of the window and allowed to “float.” Toolbar in normal position: CLICK, DRAG, AND DRILL 43 Toolbar in floating position: Toolbar re-docked on right boarder: 1.10 Setting Preferences As discussed earlier, one of the options in the edit menu is “Preferences.” The preferences window, seen below, contains seven tabs: General, Startup, Design, Macros, Report, Export, and IFAS Specifications. These tabs allow you to make many basic decisions about the way your report is assembled and the way it is presented. CLICK, DRAG, AND DRILL 1.10.1 44 General Tab The general tab simply identifies the name of the current user of CDD as well as the company name. By entering your name and the name of your organization here, you associate these names with every report you create. Later, these entries are available for inclusion in your report as user fields. CLICK, DRAG, AND DRILL 45 1.11 Startup Tab The startup tab allows you to turn on or off two system-level prompts: prompt for system catalog location and prompt for database location. When either of these connection preferences are turned on, you will be prompted for the corresponding information each time you start CDD. CLICK, DRAG, AND DRILL 46 1.12 Design Tab The design tab allows you to make some basic decisions about the way your report will be composed. Here, default settings for point size and number of lines per inch are set. The design tab also enables you to set your insertion point type preference. The insertion point, which is a marker indicating where in a region a field will appear when added to the report, can be set to “arrow” or “dot.” Once these values are set, they will be applied throughout any reports you design later on unless you make adjustments to the specific values within the context of your report. (For information about customizing reports, see Section 9, “Refining the Design”.) CLICK, DRAG, AND DRILL 1.13 Macros Tab The macros tab allows you to enable Syntax Coding, control the Selection Margin, and change the Font Size. Macros will be described in further details in Section 9. 47 CLICK, DRAG, AND DRILL 48 1.14 Report Tab The report tab allows you to identify the pointer style when drilling down to additional reports in CDD. (For more information on using the drill down feature of CDD, see Section 10, “Drill Down”.) Fetches Per Cycle allows you to define the number of rows of details in your report that will be formatted and displayed on screen after each of your computer’s “idle cycles”. Pages in Memory is an option that allows you to “tune” CDD performance. It allows you to specify the number of pages to be held in memory once a report is run. On computers with limited RAM (Random Access Memory), pages in memory can be set to a smaller value. On computers with expanded RAM, or in situations where you want to be able to browse back and forth through a report that is many pages long, pages in memory can be set to a higher value. When toggled on, Printer Warning alerts you when you are attempting to print to a non-compatible printer. CLICK, DRAG, AND DRILL 1.15 IFAS Specifications Tab The IFAS specification tab allows you to identify the ledger from which data will be pulled in your report. 49 CLICK, DRAG, AND DRILL 1.16 Export Tab The Export tab allows you to define the file type to be used when the report is saved to disk. 1.17 Exiting CDD Save the report by selecting “File, Save” from the main menu. Then, exit CDD by selecting “File, Exit” from the main menu. Functional Security in CDD Functional Security determines any given user’s access to various operations in CDD. CDD Functional Security is established in a separate application called “System Administrator.” For more information about security issues in CDD, see the System Administrator Manual. 50 CLICK, DRAG, AND DRILL 1.18 Where To Go From Here Section 2 is primarily designed for use by a database administrator in creating the System Catalog (the set of definitions which establish the way data is retrieved from the database). Once the database administrator has completed the necessary setup defined there, users may start creating reports. For information on designing and running reports, begin with Section 3. Important: To simply run CDD reports, see the section titled, “Running Reports.” 51 CLICK, DRAG, AND DRILL 2 Information Categories: Preparing Data Before creating a new report, certain decisions must be made about the report’s content. These decisions include what information to gather together in the report and where to gather it from. Questions for Report Design: 1. What is the need? 2. Where is the data? 3. How is the data related? Information categories allow you to select tables and define the data for the report you will be creating. By combining data elements and joining those data elements, you create information categories that you will later call upon when creating your report. The first step in this process is to select the tables and columns (data elements) you will use in your information category. 2.1 Create a New Information Category 2.1.1 Step 1 - Selecting the Tables To select and organize data elements from the database for inclusion in a report, you must first enter the information categories. To do this, select “File, New” from the main menu. 52 CLICK, DRAG, AND DRILL Choose “Information Category” and click OK. The table selections window will appear. Select the table you want to add to the new information category. Use the Add and Remove buttons (or double-click the table name) to add and remove tables from the selected table list. In the example above, the GLKEY, GLOBJ, and GLTRNS tables have been added. Important: If there are no tables available in the table selections window, you will need to use the Table Wizard to add tables. For more information about the Table Wizard, see Appendix A. 53 CLICK, DRAG, AND DRILL 54 Once you have selected all the desired tables, click Finish. The Category window will appear (as seen below) and the tables you have selected will be displayed. If more than one table was selected, you will move on to Step 2 “Creating Joins”, if not, move on to Step 3 “Saving the Information Category”. CLICK, DRAG, AND DRILL 55 Macros Tab The macros tab (seen below) allows you to create macros to be associated specifically to the information category you are creating. These macros will remain associated with the information category and will be applied to any report that uses this information category. Important: For more information on creating macros, see the discussion of macros in Section 9, “Refining the Design”. 2.1.2 Step 2: Creating Joins 1. How does the data relate? When multiple tables are used to create a report, each table must be linked to all other tables being used. Linkages tell the system how the data in one table relates to the data in the other table(s). These linkages are referred to as “joins.” CLICK, DRAG, AND DRILL 56 Join relationships between tables are typically made between two related elements (Vendor ID in Table A to Vendor ID in Table B). One must create as many join relationships between two tables as is necessary to guarantee reporting of distinct data records. 2. Which type of join best suits my purposes? Inner Join An inner join links two or more tables and retrieves information from all tables that contain the same link value. Inner joins direct the system to retrieve data from all tables that have matching data. For example, if you want to retrieve names and addresses of vendors only when both a name and an address have been entered into the database, an inner join would be used. In this example, any vendors for whom an address is not found would not be included in the report. CLICK, DRAG, AND DRILL 57 Outer Join An outer join is more inclusive. Outer joins link multiple tables and direct the system to retrieve data regardless of whether exact matches in data are found. In this way, an outer join between our Vendor Name table and our Vendor Address table would direct the system to return all vendors, regardless of whether an address is present or not. To create a join, simply select the data element from one table and drag it onto the matching element on the second table. CDD will draw a line from one table to the other, indicating that the join has been created. In the example below, three tables have been selected for inclusion in the new information category: GLKEY, GLTRNS, and GLOBJ. CLICK, DRAG, AND DRILL 58 Joins have been created from Key to Key and Ledger to Ledger, and from Ledger to Ledger and Object to Object. By default, CDD assumes that all newly created joins are inner joins. inner joins are easily recognizable by the type of line that CDD draws between the two tables. Outer joins are recognizable by the arrow that CDD draws between the two tables. The arrow indicates the relationship of the join; the base of the arrow indicates the table the join is drawn from, and the head of the arrow indicates the table the join is drawn to. You will need to edit your join in order to change it to an outer join. CLICK, DRAG, AND DRILL 59 2.2 Editing Joins Once you have created joins between tables in your new information category, they can be edited. For example, you may want to change an inner join to an outer join, or remove a join. To edit joins while in the category window, select “Edit, Edit Joins” from the main menu. The Join Properties window will be displayed. The Join Properties window is composed of multiple tabs. These tabs include a general information tab, as well as a tab representing each of the joined tables. In the example above, there is a tab for the GLKEY to GLTRNS linkage and another tab for the GLTRNS to GLOBJ linkage. Naturally, the number of tables you have and the number of these tables you have linked will determine the number of tabs available in the Join Properties window. CLICK, DRAG, AND DRILL 60 The general information tab allows you to adjust the way the elements in the tables are identified. The join elements area of the window allows you to chose among Catalog Names, Database Names, Item Names, and Alias Names when viewing the data elements in the category window. The tabs representing the joined tables allow you to edit the joins themselves. In our current example, the GLKEY to GLTRNS tab appears as below. The join tab allows you to change the join from inner to outer, or from outer to inner. Select the outer join radio button at the bottom of the screen to change your join and select the inner button if you would like an inner join. If you need to delete a join, the Remove button allows you to remove the selected joins. Simply choose the join you want to remove from the join details area of the tab and click Remove. The join will be removed from the category. Note:You will not be prompted for confirmation when removing joins. Because joins are easily created, if you mistakenly remove a join you will need to return to the Category window to recreate the join. Once you have edited all joins and are satisfied with their configuration, click Close to return to the category window. CLICK, DRAG, AND DRILL 61 2.3 Adding/Removing Tables 2.3.1 Adding Tables Tables can be easily added to your information category after the initial selection process. To add a table, select “Insert, Catalog Table” from the main menu. The Add Table to Category window will appear. All tables in the database to which you are attached will be displayed in the list of available tables. Choose the table you want to add to the information category and click Add. Repeat this process until all additional tables have been added. Click Done to return to the Category window. 2.4 Removing Tables Occasionally you will select a table to include in your information category and then upon review realize that the table is not necessary to retrieve the data you need for a given report. CLICK, DRAG, AND DRILL Tables can be removed by selecting “Edit, Remove Table…” from the category window menu bar. The Remove Table from Category window will appear. To remove an unwanted table, simply choose the table from the list and click Remove. You will be prompted for confirmation. Confirm that the indicated table is in fact the table you want to remove and click Yes. The table will be removed from the information category. Repeat this process until all unwanted tables are removed. Click Close to return to the Category window. Note: The system will not allow you to remove a table that is joined to other tables in the information category. If this is the case you will receive the following message: 62 CLICK, DRAG, AND DRILL 63 To remove this table you will first need to remove any joins associated with it. 2.4.1 Step 3: Saving the Information Category Once you have selected your tables and joined them together, you will want to save the information category and assign it a recognizable name. To save the category, simply select “File, Save As…” from the main menu. The Save Information Category As… window will appear. Select the folder where the new category should be saved. CLICK, DRAG, AND DRILL NOTE: Make sure the folder name is highlighted as shown below. Enter a name and description for the category. These are not case sensitive. You will be returned to the Category window and the name you have created will appear on the title bar. 2.5 Where To Go From Here After information categories are created, you are ready to create reports. Sections 3 & 4 deal with designing and running reports. 64 CLICK, DRAG, AND DRILL 65 3 Designing Reports with Wizards The Report Wizard is the report designing tool of CDD. The wizard will guide you through the various design elements of report creation. The wizard is composed of a series of windows that guide you through the process of creating a report. Designing a new report involves: • Selecting the information category • Selecting the data elements • Arranging the data elements in the report 3.1 Opening the Report Wizard Begin by starting CDD. To do this, double click the CDD icon on the Windows desktop. To start the Report Wizard, select “File, New” from the menu bar or click on the New File button on the toolbar. You will be prompted to indicate whether you are creating a new report design or a new information category, as seen below. CLICK, DRAG, AND DRILL 66 Select Report Design and click OK. The Report Wizard will open. Note: To exit from the Report Wizard and return to the main CDD window, click Cancel at any time. 3.2 Report Types The first step in designing a report is to select a report type. As you can see in the example above, the Report Wizard gives you five options for report type: Blank, Columnar, Auto, Formatted, and SQL. 3.3 Blank Report The blank report option allows you to start from scratch in designing the content and look of your report. Think of this option as a blank slate where you will make all decisions about the placement of various regions of the final report. 3.4 Columnar Report Use columnar reports when the report’s data most naturally fits into standard columns and rows. This is the most common type of report format. CLICK, DRAG, AND DRILL 67 3.5 Auto Report The auto report option is the easiest way to produce basic reports quickly. This option allows you to choose an information category after which a report design containing all of the fields found in the Information Category is created. 3.6 Formatted report Formatted reports are used when you want the data being included in the report to dictate the layout and design of the final product. Formatted reports automatically include a group header and a group footer for each sort level, as well as totals for numeric fields. 3.7 SQL Report The SQL report option allows you to enter a Standard Query Language (SQL) statement and run a report based on this SQL statement. These five options will be discussed in more detail below. 3.8 Using the Report Wizard When the Report Wizard is first opened (from the main CDD menu select “File, Open”; choose Report Design and click OK), you will need to first choose the type of report you would like to create. Each report type, Blank, Columnar, Auto, Formatted, English, and SQL will be discussed below. 3.9 Blank Reports Blank reports are initially composed of three regions: • Page Heading • Detail • Page Footer CLICK, DRAG, AND DRILL 68 Each of these regions consists of a single line, and there are no fields on the design. This allows for the decisions about the composition and content of the report to be made at the most rudimentary level. Starting your report design with a blank report is most useful when the scope of the report is to be simple and when you want to make all formatting decisions at each step of the design process. To create a blank report, select “File, New” from the main menu. Choose Report Design and click OK. The Report Wizard window will appear. CLICK, DRAG, AND DRILL Choose Blank Report and click Next. The Information Category window will appear. 69 CLICK, DRAG, AND DRILL 70 Choose the desired Information Category and click Finish. The Design window will appear. Press the F4 to switch back and forth between the Design tab and the Macros tab without having to click on the tab. Blank designs, as the name implies, allow you complete control over the content and layout of your report. No aspect of the report is formatted for you by the Report Wizard. Data fields are dragged into the regions of the report until the report contains all the data elements needed. If additional regions are needed, these are created by selecting “Insert, Region” from the main menu. CLICK, DRAG, AND DRILL 71 3.10 Columnar Reports Columnar reports are the most common type used because information is arranged in useful columns and rows. Like blank reports, columnar reports contain three regions: •ᾉPage Heading •ᾉDetail •ᾉPage Footer Unlike blank reports, though, columnar reports include some default design attributes that can greatly simplify your design process. In columnar reports, the size of each region depends on the number of fields selected for inclusion in the report. (By default, the Design Wizard places each field you add to the report as a vertical column.) Also, in columnar reports the page heading will automatically contain: 1 The title of the report which is assigned at the final step of the design process. 2 The heading for each field you select for inclusion in the report. For example, if you name the report “1996 Budget” in the Report Wizard, this name will appear as the title of the report in the report header. If you include a field identified as a “Department Code”, the heading Department Code will automatically be placed in the heading region of the report when it is run. The detail region of a columnar report will contain the values of each field selected for inclusion in the report under their respective headings. Finally, the page footer region of a columnar report will initially be empty, allowing you to supply any system or user-defined values of your choosing. To create a columnar report, select “File, New” from the main menu. CLICK, DRAG, AND DRILL Choose Report Design and click OK. The Report Wizard window will appear. 72 CLICK, DRAG, AND DRILL In the initial Report Wizard window, select Columnar as the report type. Click Next. The Information Category window will be displayed. The Information Category window displays a list of the currently defined information categories together with a brief description of these categories. These categories represent groups of tables drawn from the selected database. Note: For further information on creating information categories, see Section 2. Clicking Back will return you to the initial Report Wizard window. Click Next once you have selected the category definition. 73 CLICK, DRAG, AND DRILL The next step in designing a columnar report is selecting the fields you want to include in your report. This is done in the Field Selection window seen below. 74 CLICK, DRAG, AND DRILL 75 The items in the Available Category Fields list are arranged in an expanding tree structure. To expand this tree to access items at lower levels of the tree, simply click on the symbol. The tree will expand as in the example below. There are several types of items available for selection in the Available Catalog Fields list. Database Items: An upper level branch of the tree, Database Items contains fields available from each of the tables included in the referenced Information Category. Data Lookup: Any data lookup(s) that has been created. Sub Report: Any sub report(s) that have been created. Tables: Specific tables contained in the selected database are identified. Text: Field contains data which will display as text in the report. CLICK, DRAG, AND DRILL 76 Numeric: Field contains data which will display as numerals in the report. Numeric: A variant of the numeric field where the value includes a decimal. Also called floating point numbers. System Fields: An upper level branch of the tree, System Fields are generic fields available regardless of the specific database that has been selected. These fields include textual and numeric values, i.e., page number, user ID, current date, etc. Date: Field contains current or selected date. User Fields: An upper level branch of the tree, User Fields contains special user-defined fields if any have been created. Fields can be added to click Next. or removed from the Field Selections lists. Once you have added all the fields you want to include in your report, CLICK, DRAG, AND DRILL 77 The Report Grouping window will appear. The Report Grouping window is used to define the basic sort order for your report. If no sort order is selected, the selected fields will simply be arranged on the report in the order they were found in the database. To select a field on which to establish a sort order for the report, simply add the item to the selection list in the same manner as the fields were selected in the previous step. + Hint: Logical choices will need to be made when establishing a sort order. These choices will depend on the purpose of the report. Be sure to make your selection based on a field that will enhance the final report. CLICK, DRAG, AND DRILL 78 Once you have made your selections in the Report Grouping window, click Next. The Details window will appear. The Details window allows you to name the report, and to indicate where the report is to be run. The options under the Action heading follow: 3.11 View Design The report design will be displayed on screen without any data in your selected fields. View Design is used to make adjustments in the layout and look of the report before it is actually run. CLICK, DRAG, AND DRILL 79 3.12 Report to Screen The report will be run, meaning that data will be retrieved from the database and displayed in the report, but just to the screen. This option is useful if you want to look at the report itself without printing a hard copy. 3.13 Report to Printer The report is printed. When Report to Printer is selected, the report will not be displayed on the screen prior to printing. Warning: If you select “Run Report to Screen” or “Run Report to Printer” without first viewing the design, the report will be transient and will not be able to be saved. These “transient” reports can be useful to view information quickly. Care should be taken, however, that if the report is to be saved, the design should be viewed before running the report to either the screen or to a printer. The printer button allows you to enter a standard printer setup window where you can select and format the printer on which Note: the report is to be printed. If you decide you want to run the report to the screen and you do not need to save the report (for example, if the report is comprised of a set of names and addresses that you simply want to examine but do not want to print and will not be returning to later) select ‘Run to Screen.’ If you are confident of the format of the report and you want to print a hard copy, select ‘Run to Printer.’ If you want to view the general layout of the report AND have the opportunity to make changes in its format before running the report either to the screen or to the printer, select ‘View Design.’ (Because it is common for report writers to want to make final adjustments to reports before running them, this option, View Design, is the default setting for the Details window.) Once you have made your selections, click the ‘Finish’ button. If you have chosen to run the report (either to the screen or to the printer) the report will run at this time. If, however, you have accepted the default setting of View Design, the Design window will be displayed. The Design window allows you to make many layout and content decisions about your report. The tools available in the Design window are discussed in Section 9, “Refining the Design”. CLICK, DRAG, AND DRILL 80 3.14 Auto Reports The Auto Report feature of Click, Drag, and Drill™ allows you to create a new report with three clicks of the mouse button. After selecting “Auto Report” from the Report Wizard window, auto reports are created simply by choosing an information category, selecting a sort order and titling the report. CDD then assembles the report and displays the report design or runs the report to the screen or to a printer. If a particular information category has been previously created with a commonly used basic set of data fields, the auto report feature is often the easiest and fastest way of creating new reports from this information category. To create an Auto report, select “File, New” from the main menu. Choose Report Design and click OK. The Report Wizard window will appear. CLICK, DRAG, AND DRILL Select Auto Report and click Next. The Information Category window will appear. 81 CLICK, DRAG, AND DRILL Choose the desired Information Category and click Next. The Report Grouping window will appear. 82 CLICK, DRAG, AND DRILL 83 Once all fields desired for your sort order have been selected, click Next. The Details window will be displayed. The Details window allows you to title your report and direct CDD to run the report to the screen or to a printer, or you can view the design to make additional refinements to the report prior to running it. 3.15 Formatted Reports As the name implies, Formatted Reports supply the greatest degree of pre-set design elements of the six report types. Formatted reports contain the same three regions as Blank and Columnar, •ᾉPage Heading CLICK, DRAG, AND DRILL 84 •ᾉDetail •ᾉPage Footer as well as two additional regions: •ᾉGroup Heading(s) (one for each sort item) •ᾉGroup Footer(s) (one for each sort item) The size of each region depends on the number of fields selected for inclusion in the report. The page heading will contain the title of the report, and the heading for each field except for those fields selected as sort items. The Group Heading(s) contains one heading and one field corresponding to the items selected as grouping/sorting levels. Note: If an item is selected to appear on the report and is also selected as a sort item, it will only appear in its group heading. The detail region of a Formatted Report will contain each field selected for inclusion in the report except those fields selected as grouping/sort level items (these fields will each appear in a separate group header region). Finally, both group footer(s) and page footer(s) will initially contain automated totals corresponding to whatever numeric fields selected in the detail. If you know what you want to appear in your grouping regions, you may want to use the Formatted Report option in the Report Wizard. Formatted reports are created in much the same way as columnar and blank reports. Select “File, New” from the main menu. CLICK, DRAG, AND DRILL Choose Report Design and click OK. The Report Wizard window will appear. 85 CLICK, DRAG, AND DRILL Choose Formatted Report and click Next. The Information Category window will appear. 86 CLICK, DRAG, AND DRILL 87 Choose the desired information category and click Next. The Field Selection window will be displayed. The items in the Available Category Fields list are arranged in an expanding tree structure. To expand this tree to access items at lower levels of the tree, simply click on the symbol. Note: In a formatted design, all numeric fields selected for display in the design will appear as totals at each group footer level. CLICK, DRAG, AND DRILL 88 Fields can be added to or removed from the Fields Selected list. Once you have added all the fields you want to include in your report, click Next. The Report Grouping window will appear. The Report Grouping window is used to define the basic sort order for your report. If no sort order is selected, the selected fields will simply be arranged on the report in the order they were picked from the list. To select a field on which to establish a sort order for the report, simply add the item to the selection list. Note: Logical choices will need to be made when establishing a sort order. These choices will depend on the purpose of the report. Be sure to make your selection based on a field that will enhance the final report. CLICK, DRAG, AND DRILL 89 Once you have made your selections in the Report Grouping window, click Next. The Details window will appear. The Details window allows you to name the report, and to indicate where the report is to be run. The options under the Action heading follow: 3.16 View Design The report design will be displayed on screen without any data in your selected fields. View Design is used to make adjustments in the layout and look of the report before it is actually run. CLICK, DRAG, AND DRILL 90 3.17 Report to Screen The report will be run, meaning that data will be retrieved from the database and displayed in the report, but just to the screen. This option is useful if you want to look at the report itself without printing a hard copy. 3.18 Report to Printer The report is printed. When Report to Printer is selected, the report will not be displayed on the screen prior to printing. The Printer button allows you to enter a standard printer setup window where you can select and format the on which the report Note: is to be printed. If you decide you want to run the report to the screen and you do not need to save the report (for example, if the report is comprised of a set of names and addresses that you simply want to examine but do not want to print and will not be returning to later) select Run to Screen. If you are confident of the format of the report and you want to print a hard copy, select Run to Printer. Warning: If you select Run Report to Screen or Run Report to Printer without first viewing the design, the report will be transient and will not be able to be saved. These “transient” reports can be useful to view information quickly. Care should be taken, however, that if the report is to be saved the design should be viewed before running the report to either the screen or to a printer. If you want to view the general layout of the report AND have the opportunity to make changes in its format before running the report either to the screen or to the printer, select View Design. (Because it is common for report writers to want to make final adjustments to reports before running them, this option, View Design, is the default setting for the Details window.) Once you have made your selections, click the Finish button. If you have chosen to run the report (either to the screen or to the printer) the report will run at this time. If, however, you have accepted the default setting of View Design, the Design window will be displayed. The tools available in the Design window are discussed in Section 9, “Refining the Design”. CLICK, DRAG, AND DRILL 91 3.19 SQL Reports SQL statements are used to simulate information categories. Typically, an SQL statement is written directing the system to retrieve specific data from a selected table or tables. For example, if for budgeting purposes you wanted to select the net of revenues minus expenditures from a particular budget table, an SQL statement can be written to retrieve this data from the appropriate tables. Once the SQL statement is written, the report design can be viewed and adjusted to produce the desired report. Standard Query Language (SQL) is used to direct CDD to retrieve particular data from specific tables in the database. Simply put, SQL is the language CDD converts your English statements to. For example, if you are creating a report designed to reflect budget status you might say “I need to see how much each of my departments has left in their budgets for office supplies.” If, however, you are familiar with SQL language and know exactly which tables and columns hold the data you are interested in viewing, you may prefer to create the SQL statement directly. This is where the SQL Report option is used. To create an SQL Report, select “File, New” from the main menu. CLICK, DRAG, AND DRILL Choose Report Design and click OK. The Report Wizard window will appear. Select SQL Report and click Next. The SQL window will be displayed. 92 CLICK, DRAG, AND DRILL 93 The SQL window allows you to write an SQL statement directing the system to retrieve specific data from a selected table or tables. For example, select statements are written in the syntax of SELECT, FROM, WHERE, and GROUP BY. “Select” identifies what fields are to be selected for the report; “From” identifies what tables the fields will come from; “Where” identifies the conditions by which the fields for the report will be selected from the tables; and “Group By” identifies how the fields will be grouped (sorted). If for budgeting purposes you wanted to select the net of credits minus debits from a particular budget table, the SQL statement you would create might appear as follows: select glt_cr - glt_dr net from glt_trns_dtl This statement directs the system to let “net” be the result of the general ledger credit value minus the general ledger debit value and instructs that this data is to be retrieved from the glt_trns_dtl table. The SQL window allows you to enter this information by either typing the entire statement or by using a combination of typing and selecting the SQL statement keys. CLICK, DRAG, AND DRILL After entering the SQL statement… 94 CLICK, DRAG, AND DRILL 95 …click the Check Syntax button. The system will check the statement to be sure that it conforms to SQL syntax requirements. If there are errors in the statement the system will display these in the Database Error message window. If the syntax of your statement is correct, click Next. The Report Grouping window will be displayed. The Report Grouping window is used to define the basic sort order for your report. If no sort order is selected, the selected fields will simply be arranged on the report in the order they were picked from the list. To select a field on which to establish a sort order for the report, simply add the item to the selection list. CLICK, DRAG, AND DRILL Once you have established your sort order, click Next. The Details window will be displayed. By default the SQL statement will be assigned as the title of the report. You can edit this title as needed. Once you have assigned a title to your report and have indicated whether you want to view the report design or whether you wan to run the report to the screen or to a printer, click Finish. 96 CLICK, DRAG, AND DRILL 97 3.20 Saving the Report Once you have created a report using one of the six options, and you have made any refinements to the report design, you will want to save the report. To save the report layout, select “File, Save As…” from the main menu and the Save Report As window will appear. Enter up to thirty characters in the Report Name and Description. Click OK to save the report. 3.21 Where To Go From Here After designing a report, there may be several things you will want to do to it prior to running it. Section 5, “Adding Visual Elements,” Section 6, “Adding Graphs,” Section 7 “Adding Sub Reports,” Section 8 “Data Lookups, and Section 9 “Refining the Design” all outline the many adjustments you can make to the report prior to running it. CLICK, DRAG, AND DRILL 98 4 Running a Report Many people will use Click, Drag, and Drill™ exclusively to run existing reports. These users will not be involved in creating information categories, formatting tables, or designing reports. Whether you are involved in these report setup and creation issues or not, running existing CDD reports is a very easy task. 4.1 How To Run A Report Open an existing report by selecting “File, Open and Run a Report” from the main menu or by clicking on the Run Report main toolbar. The Open & Run Report window will be displayed. button on the The Open & Run Report window allows you indicate whether you would like to run the report to the screen or to a printer. This choice is made in the Output area of the Open & Run Report window. CLICK, DRAG, AND DRILL 99 To run a report, select the report from the list and click OK. The report will be run either to the screen or to a printer, depending on your selection of locations. 4.2 Using Selection Criteria Selection criteria is used to narrow the contents of a report to only entries that fit the specified criteria. For example, you might want to direct the system to report only vendors with addresses located in the state of Washington, rather than all entries in the database. When running a report, selection criteria can be established by selecting “New” from the list of choices in the Selection Criteria area of the Open & Run Report window. Click OK and the Selection Criteria window will be displayed. To add Selection Criteria to the report, click Add. The Report Item window will be displayed. CLICK, DRAG, AND DRILL 100 Note: You will have an option of viewing the selection criteria information in either short or verbose format. Once you have selected a data element on which to base the new selection criteria, you will have many options in regards to relating the chosen data element to either a user-defined value or another data element. For example, if your selection criteria was based on a GL Object Code greater than 0100, you would first select the data element that represented the GL Object, then select “greater than” from the Relational Operators list. Choose a Response Type and then click Next. The Report Item window will be displayed. CLICK, DRAG, AND DRILL 101 Enter the value upon which you want your selection criteria to be based. Click Finish and the report will be run. 4.3 Dynamic Selection Criteria 4.3.1 Introduction The dynamic selection criteria feature works only when running the report from the IFAS 7i menu within Internet ExplorerTM. Currently in IFAS both standard reports and inquiries allow the user to add additional criteria at run-time. To address that need in CDD reports, we added the concept of dynamic selection criteria. The same report and run-time selection criteria still exist for CDD, but now that criteria can be added dynamically by the user at run-time. CLICK, DRAG, AND DRILL 102 4.3.2 Adding Dynamic Prompts Since report designs can typically revolve around a specific purpose, not all of the fields in an information category are automatically available. Instead the report developer decides which fields will be available for dynamic selection criteria by adding changing the report design. CLICK, DRAG, AND DRILL 103 The Dynamic Criteria tab on the Report Properties dialog box allows items from the information category to be added to the criteria list by double-clicking them or using the arrows. Item properties can then be edited by double-clicking on the items in the list on the right side. The value entered in the Item Prompt field will be the one the user sees when selecting this as a prompt. The Initial Value will be the value for the prompt that is entered by default. Once the prompts are added to the report the user can save the report design to keep the changes. CLICK, DRAG, AND DRILL 104 4.3.3 Using Dynamic Prompts When a report is chosen from the IFAS 7i explorer tree, it is checked to see if there are any dynamic prompts on that report. If there are then in addition to the submit button the user will also be shown an “Add Prompt” button. CLICK, DRAG, AND DRILL 105 When this button is selected a new prompt line is added to the tree. The left-side is the list of available prompt items and the right-side is the prompt value. Notice that there is no selection criteria operator. To determine the operator the prompt uses QBE-like rules. Operator Description Example = Equals (default) - Value in database should be equal to the prompt. "=1234" > Greater Than - Value in database should be greater than the prompt. ">0" >= Greater Than or Equal - Value in database should be greater than or equal to the prompt. ">=10.00" < Less Than - Value in the database should be less "<100" the prompt. <= Less Than or Equal - Value in the database should be less than or equal to the prompt. "<=9999" % Like - Value in the database should match the pattern of the prompt. "V%" * Matches (Informix ONLY) - Value in the "V*" database should match the pattern of the prompt. The Dynamic prompts are added to the Report’s final selection criteria with by using an “AND” so that the returned data is the smallest subset of the values chosen. 4.4 Scheduling Reports There will often be times when you will want to run a report at a specific time in the future. There are a variety of reasons you might want to do this, including the need to defer an intensive report to run at night when you are not using your computer for other tasks and when the “host” computer does not have a large demand load. CLICK, DRAG, AND DRILL 106 When you schedule a report to run at a later time, CDD places the report into the “schedule reports” queue. The report scheduler program will then run in the background, poling for reports that need to be run. Once the “appointed time” arrives, the scheduler runs the report automatically. To schedule a report, select “File, Schedule Report” from the main menu, or click the Schedule Report button Report window will be displayed as in the example below. on the toolbar. The Select CLICK, DRAG, AND DRILL 107 Click Next,and the next window you will see is: The Report Selection window displays all the reports in the system. Choose the report you want to schedule. The report will be run with its predefined selection criteria. If you want the report to print to a printer other than the default printer, click the Printer Setup button. Once you have selected the report you want to schedule, click Next. The Task Schedule window will be displayed as in the example below. CLICK, DRAG, AND DRILL The Task Schedule window enables you to select the time and date on which you want the report to run. The Run On: drop-down dialog displays a calendar with the current date highlighted. Once you have chosen the date and time for which you want the report to run, click Next. 108 CLICK, DRAG, AND DRILL The next window you will see id the CDD Schedule Wizard: 109 CLICK, DRAG, AND DRILL After clicking Next, the following window appears with your report information listed: 110 CLICK, DRAG, AND DRILL 111 If there are no prompts associated with the selected report, the process is now complete and the report will be run at the appointed time. If the report includes prompts, you will be asked to fill these out in the Prompts window, shown below. Once you have made the appropriate entries, click OK to complete the scheduling process. The Scheduler Application When reports are scheduled to run at a specific time, CDD launches the “behind-the-scenes” Scheduler Application. This application is designed to do the following: • Show a list of scheduled jobs • Poll the database to see if a job needs to run • Start the task at the appropriate time Typically, you will not need to deal with the scheduler. If you have scheduled a report, the scheduler will launch when you start your computer and it will run in the background without any attention from you. When the time comes to run a report, the scheduler application will do this automatically. CLICK, DRAG, AND DRILL The scheduler application places an icon in the “tray” on the menu bar in the bottom right-hand corner of your computer’s desktop. To view the tasks being handled by the scheduler application, simply double-click on this icon. The Job Administrator window will be displayed as in the example below. The Job Administrator window is comprised of two parts: the “Task Event Log” and “Scheduled Tasks”. 112 CLICK, DRAG, AND DRILL 113 The Task Event Log tracks the “events” handled by the scheduler. Each time a task is started and completed, as well as when other events occur (a failed job, for example), the event will be displayed in this log. All events are arranged by date and time and are identified by a system generated task number. The Scheduled Tasks list displays a list of currently scheduled tasks. Arranged by system generated “Task ID”, the tasks are identified, their status displayed, and the times they were run. The “Status” of the tasks is identified as ‘RS’ (Ran Successfully), ‘RN’ (Running), and ‘RU’ (Ran Unsuccessfully). Note: If a task did not run successfully (a status of ‘RU’), look to the even log to see what happened. 4.5 Task Properties You can view and edit the properties of a task by right-clicking in the task view and selecting Properties. The Task Properties window will be displayed as in the example below. CLICK, DRAG, AND DRILL There are three tabs accessible through the Task Properties window: Task Properties, Task Schedule, and Task Connections. The Task Properties and Task Schedule (seen below) are display-only tabs. These tabs allow you to review the basic information associated with the scheduled report. 114 CLICK, DRAG, AND DRILL 115 The Task Connections tab (shown below) allows you to view the ODBC information as well as to update your user information. This can be particularly useful if your password changes between the time when you schedule the report and when it actually is run. Also, if a job is launched and fails to run due to the database connection, you can use the Task Connections tab to correct the database connection information. 4.6 Pages in Memory Pages in Memory is an option that allows you to “tune” CDD performance. Pages in Memory is set up in the Preferences menu. It allows you to specify the number of pages to be held in memory once a report is run. On computers with limited RAM (Random Access Memory), pages in memory can be set to a smaller value. On computers with expanded RAM, or in situations where you want to be able to browse back and forth through a report that is many pages long, pages in memory can be set to a higher value. CLICK, DRAG, AND DRILL 116 To set up pages in memory, select “Edit, Preferences” from the main menu. The Preferences window will be displayed. Choose the Report tab. The report tab allows you to set several characteristics of the reports you run during a given CDD session. In the example above, pages in memory is set to a relatively high value of 30. This value means that if you run a report that consists of 45 pages, only 30 of these pages will be held in active memory at any given point in time. In this case, if you browse to page 31 of the report, page 1 of the report will be dropped from memory. At this point if you attempt to return to the beginning of the report or if the report is printed, only pages 2 - 31 will be available. To view the first page of the report again, the report would need to be rerun. Setting the pages in memory to a relatively low value, will increase the performance of CDD, but there are obvious associated limitations. CLICK, DRAG, AND DRILL 117 5 Adding Visual Elements When simple visual elements, like lines and borders, are added to basic reports it often makes a great difference in the professional look and readability of the report. By highlighting certain data elements in your report, you can direct attention to key information. Adding these simple visual elements is quite easy in CDD. There are two types of visual elements that can be added to your report, horizontal lines and rectangles. Adding Lines To add simple visual elements to your report design, select “Insert, Design Shape” from the main menu as shown below. CLICK, DRAG, AND DRILL 118 Once you have selected Horizontal Line from the sub menu, the Line Properties window will be displayed as shown below. The Line Properties window allows you to define the way you want the line to look in your report. The color, style and weight of the line is set in this window. You may also chose to draw a double line by selecting this option in the Line Properties window. (Note: if you select ‘Double Line’ you will not have a choice of style of thickness; a double line is a one point solid line by default. You may, however, change the color of a double line just as you would any other line style.) CLICK, DRAG, AND DRILL After making your selection of line properties, for example a black, solid, two-point line… 119 CLICK, DRAG, AND DRILL 120 …click the OK button. You will be returned to the Report Design window. Once you have drawn the line in the desired position, your cursor will change back to the standard arrow be moved, lengthened, or even deleted from the report design. . The newly created line can now To move the line, position your cursor over any portion of the line. The cursor will change from the standard arrow , to a multi-directional arrow , indicating that the object can be moved nearly anywhere within the current region. To move the line, simply click and drag it to a new location. To lengthen or shorten the line, position the cursor over one end of the line. The cursor will change from the standard arrow . To lengthen or shorten the line, simply click and drag the end of the line to the desired length. arrow , to a double CLICK, DRAG, AND DRILL 121 To delete an unwanted line, select the line by clicking anywhere on it, then select “Edit, Delete” from the main menu. (Note: you will know that you have selected the line when the line is highlighted in blue.) 5.1 Adding Rectangles Just like lines, rectangles can be added to CDD reports to call attention to a data element or to emphasize a particular piece of information. For example, you might want to highlight the total spent by a given department in a fiscal year on a year-end budget report. One way to do this is to draw a rectangle around the data element containing this data. Rectangles are added to the report design in the same way lines are added. First, select “Insert, Design Shape” from the main menu, then select Rectangle as the design shape. CLICK, DRAG, AND DRILL 122 The Rectangle Properties window will be displayed as shown below. Just like in the Line Properties window described in the previous section, the Rectangle Properties window allows you to define the color, line style, and line weight for the rectangle you are going to place in your report design. In addition to these characteristics, you have control over how many ‘sides’ the rectangle will have. For example, to highlight a total in a budget report, you might choose to draw a three-sided rectangle (left, right, and bottom) around this field. In this way, the total is highlighted but still appears visually “attached” to the other numeric values in the report. To determine the number of ‘sides’ of the rectangle, simply turn on or off the left, right, top, and bottom options in the Rectangle Properties window. Once you have made your selections, click the OK button. You will be returned to the report design window as shown below. CLICK, DRAG, AND DRILL Just as with lines, once you have drawn the rectangle in the desired position, your cursor will change back to the standard arrow created rectangle can now be moved, re-sized, or even deleted from the report design. To move the rectangle, position your cursor over any portion of the rectangle. The cursor will change from the standard arrow 123 . The newly , to a multi- directional arrow , indicating that the object can be moved anywhere within the current region. To move the rectangle, simply click and drag it to a new location. To re-size the rectangle, position the cursor over one corner of the rectangle. The cursor will change from the standard arrow . To re-size the rectangle, simply click and drag the corner of the rectangle to the desired position. arrow , to a double CLICK, DRAG, AND DRILL 124 To delete an unwanted rectangle, select the rectangle by clicking anywhere on it, then select “Edit, Delete” from the main menu. You will know that you have selected the rectangle when it is highlighted by in blue. Customizing Existing Lines and Rectangles After you have added lines or rectangles to your report, you may want to return to these visual elements to change the way they appear. To do this, simply double-click on the element you want to adjust. The Report Object Properties window will be displayed as in the example below. The Report Object Properties window contains three tabs: General, Line Properties, and HTML. The line or rectangle can be adjusted, made lighter or heavier, for example, through the Line Properties tab. The choices available through the Line Properties tab are exactly the same as in the properties windows you used when you first created the line or rectangle. To make changes to the line or rectangle, simply make your new selections in the Line Properties tab and click the OK button. Note: The HTML tab is used when your report is to be made available through a special feature of Click, Drag, and Drill™ called cdd.online. You may or may not have this feature available in your version of CDD. If you are uncertain whether this feature is available to you, see your CLICK, DRAG, AND DRILL system administrator. The cdd.online feature of CDD is described in Appendix D of this manual. Where To Go From Here Lines and rectangles are just two types of visual elements that can be added to a report to call attention to important information. An even more powerful way to add visual elements to a report is through the use of graphs. The wide variety of graphs available through CDD are discussed in Section 6, “Adding Graphs”. 125 CLICK, DRAG, AND DRILL 126 6 Adding Graphs To create professional and visually robust reports, CDD provides the ability to add a wide variety of customizable graphs to your report. Graphs can be added to a new report during the design process, or can be added to an existing report later on. Graphs can be placed in any region of the report. For example, in a year-end report, you may choose to include a graph that compares the changes in budget allowances for four departments over the past three years. Presenting this information graphically will add to the impact and readability of your report. Graphs draw upon information stored in the database in the same way that data is displayed in a textual region of the report. Graphs will pull information from the database based on the same decisions you have made about the Information Categories you are using for the report as a whole. Because graphs draw information from the database in this manner, typically you will make graphic design decisions about the way you want the graph to look on your report and then in the last step of adding a graph you will adjust the graph based on the way the actual data is displayed. This often involves a process of trial and error as you create the graph and run the report, each time checking to see that the data is being displayed in the manner you intended. While there are many styles of graphs, each displaying data in uniquely graphical ways, some of the basic elements are common to nearly all graphs. Specifically, nearly all graphs will include labels identifying the ways increments of time, quantity or value are displayed. In a typical bar graph, for example, a label will be attached identifying the values graphed by both the vertical and the horizontal axis. 6.1 Defining Graphic Terminology While adding graphs is an easy process in CDD, there are a number of important decisions you will need to make in terms of what data to include, where to draw this data from and how to construct a meaningful graph that will add to, rather than detract from, the understanding of the final report. There are some basic terms and concepts that will be helpful to understand before you begin the process of adding graphs to your report design. 6.2 Groups A set of one or more data points that share a common attribute. For example, a budgeted amount and an actual amount may be grouped by fiscal year. In a bar graph a group consists of one or more bars. A group is comprised of one or more series. CLICK, DRAG, AND DRILL 127 In a bar graph, the groups consist of one or more bars each representing the value associated with a series. For each group in a bar graph, the bars of each series will touch sides. There will be a gap between the last series (bar) of a group and the first series (bar) of the next group. A bar graph may have any number of groups, limited only by the size of the computer screen or printed page. 6.3 Series A set of one or more data points that share a common attribute, but that are NOT grouped by that common attribute. For example, a graph may show budgeted amounts and actual amounts grouped by fiscal year. However, even though the budgeted amount for fiscal year 1994 is the same kind of data as the budgeted amount for the fiscal year 1995 (they share the attribute of being budgeted amounts), they are not grouped together by that commonality. Instead, they are said to belong to the same series. The series they belong to is the series of budgeted amounts, regardless of the group to which they belong. A series spans one or more groups. In a bar graph, the series are represented by the bars of a group. Starting on the left side of a group, the series are counted starting at one. A bar graph must have at least one series (or it will display as an empty chart). The first bar in the first group is in the same series as the first bar in the second group. A bar graph may have an any number of series, limited only by the size of the computer screen or the printed page. 6.4 Legend Most graphs include a legend, or guide to the information presented in the graph. Much like a legend on a map, the legend on a graph is designed to help you read the graph accurately. On a bar graph, for example, the legend might define the color scheme, indicating that blue corresponds to FY96, green to FY97, and red to FY98. In CDD, the legend is defined as part of the graph creation process and therefore it is important to make thoughtful decisions about which data sets to use in the legend of a given report. 6.5 Axis On most typical graphs, particularly bar graphs, there are two axes, an ‘x’ axis and a ‘y’ axis. Each axis is assigned a value to measure. For example, on a budget graph the ‘x’ or horizontal axis might measure time in years and the ‘y’ or vertical axis might measure amount in millions of dollars. CDD allows you to define the values of these axes through the selection of appropriate data elements for inclusion in your graph. CLICK, DRAG, AND DRILL 128 6.6 Graph Types 6.6.1 Area Area graphs display the relative importance of values tracked over time. 6.6.2 Column (Bar) Column graphs, otherwise known as “bar” graphs, typically display the variation of a value over time. Column graphs display the values vertically, horizontal bar graphs display the values horizontally. 6.6.3 Cube A cube graph is simply a variation on the mark graph style described below. 6.6.4 Fit-To-Curve Like line graphs (described below), fit-to-curve graphs show trend over time. fit-to-curve graphs estimate the change in data between the identified points in time, giving a visually clearer representation of the trend. 6.6.5 Line Typically, line graphs display changes in data over time in order to identify trends. Points in time are marked on the graph and lines are drawn connecting these points. 6.6.6 Mark A mark graph consists of the points, or markers, plotting values over time. Essentially, a mark graph is the same as a line graph (described above) without the connecting lines. CLICK, DRAG, AND DRILL 129 6.7 Before You Begin Adding graphs to a CDD report requires some careful thought and planning. Visualizing the way you want the graph to appear and carefully considering the data you will need for all the elements of the graph will help you create a graph that meets the needs of your report and displays the required information clearly and accurately. Just as with the report itself, most report writers will even choose to sketch out their graph to help clearly identify the items that will be included in the graph you will create in CDD. 6.8 Questions to Ask There are several questions that you may need to consider prior to adding a graph to your report. • What data elements do you want to include in your graph? • What data elements do you want to use for the labels that will be part of your graph? • Where do these various data elements reside in the database? • Where on the report do you want the graph to appear? (An important consideration here is: Are there any totaling, sub-totaling or macro calculations that need to occur prior to the graph being generated by CDD? If, for example, you intend for your graph to display the relationship of your funds after your actual expenditures are subtracted from your budget, this calculation (budget-actual=fund balance) must occur before the graph is generated. This means that the graph should appear in a footer region below the report region where the calculation is performed. The issue of ordering regions to get the desired results is discussed in greater detail later in this chapter.) • What do you want the graph to look like? What type of graph will best display the data you are reporting? 6.9 Sketching Your Graph One of the first steps most experienced report writers will take when preparing to add a graph to their report design is sketching the graph. Many of the decisions about what elements you want to include and where you want to include them can best be made after visualizing the graph on paper. Some of the pitfalls of graph design can be anticipated and avoided in this manner. CLICK, DRAG, AND DRILL 130 Even the simplest graph can be most efficiently designed if it is clearly visualized and sketched on paper first. Once you have sketched out your graph, you should be better prepared to identify the appropriate sources for the data needed to make the graph a reality. Once you have done this, you are ready to add the graph to your report. CLICK, DRAG, AND DRILL 6.10 Adding Graphs To add a graph to your report, from within the Report Design window, select “Insert, Graph” from the main menu. The Chart Data Set window will be displayed as shown below. 131 CLICK, DRAG, AND DRILL 132 The Chart Data Set window has two major parts. The first part is the source for the group label. The source for the group label is the field from which the labels for the graph groups are drawn. This item is generally a sort-item from the report, but does not need to be. To choose the item that will be used as the source for the group label, click the Edit Label button. This will take you to the Select Group Label window displayed below. CLICK, DRAG, AND DRILL 133 The Select Group Label window contains the database items arranged in the now familiar tree control. This tree control contains all of the items available in the information category. You must choose one item to be the source item for the group labels. When you have chosen the correct field, click OK. This will return you to the Chart Data Set window. The second part of the Chart Data Set window is the graph data list. These are the items from the report that will provide the data in the graph. These items define each series in the graph. There can be either a one-to-one or one-to-many relationship between the group label values and the graph data values, respectively. Chart data items consist of three parts: a chart data element, a chart series label, and a chart level. To add a graph data item, click on the Add button. This will take you to the Chart Data Element window shown below. CLICK, DRAG, AND DRILL 134 The Chart Data Element window contains the database items tree control. This tree control contains all of the items available in the information category. You must choose an item to be the data element whose values are plotted in the graph. When you have chosen the correct element form the tree, click Next. This will take you to the Chart Series Label window as shown below. The Chart Series Label window contains the database items tree control. This tree control contains all of the items available in the information category. You must choose an item to be the data element whose values are used as labels for the series. When you have chosen the correct item form the tree, click Next. This will take you to the Chart Level window. CLICK, DRAG, AND DRILL 135 The Chart Level window also contains the report level tree control. This tree control contains all of the levels defined in the current report design. You must choose the level that corresponds to the report level where the graph data values will be extracted. Important: By default, the data for a graph is gathered before any other regions at a given level are processed. Therefore, if you want to gather data for a graph after another specific region is processed, you must reorder the design regions in the Report Properties window. CLICK, DRAG, AND DRILL 136 When you have chosen the correct level, click Finish. You will be taken back to the Chart Data Set window. When you finish setting the graph elements, click OK. The cursor will turn into a bar graph insertion marker: . This insertion marker indicates that you will now be able to place the graph you just defined into the report design. The cursor will either have an arrow, indicating that you can place the graph, or a circle with slash, , indicating that you cannot place the graph in the current location. When you have found the correct location for the graph, click and drag the cursor to indicate the size of the graph in the report. While you drag, a dotted rectangle will be drawn to provide a visual representation of the size and location of the graph. When you are happy with the size and location of the graph, release the let mouse button. The graph will appear in the design with default values for each Chart Data Element (the default value for ALL Chart Data Elements in the report design is 1). Note that when a graph is first placed into a report design it is displayed at the default size of 150 x 150 pixels. You will often need to resize the graph in the report design to properly display the graph. CLICK, DRAG, AND DRILL 137 6.11 Selecting Graph Style Settings There are a number of graph style settings available in CDD. These style settings are made in the General Options window displayed below. To access the General Options window, right-click on your newly created graph. The style and appearance of the graph are determined using the options available in the “Gallery” and “Appearance” portions of the General Options window. CLICK, DRAG, AND DRILL 138 6.12 Style Gallery The Gallery Type drop down list allows you to select the style of graph you want to appear in your report. By now you have seen the available options; look back at the small graphic next to the sub-heading for each of the styles described above. 6.13 Appearance Selections Many of the options within each graph style are selections you will make in the Appearance portion of the General Options window. 6.13.1 Stacked Style Selections CLICK, DRAG, AND DRILL 139 “Stacking” refers to the way the bars in a horizontal bar or column graph are displayed. The stack styles available are “none,” “Stack” and “Stack 100%.” Choosing the “Stack” setting means that the bars representing multiple sets of data will be placed one on top of the other. “Stack 100%” means that the bars representing the data sets will be displayed as portions of a total of 100%. 6.13.2 Grid Line Selections The Grid Line selections determine what type (if any) of grid lines will be displayed in the graph. Grid lines, displayed as a background to the graph, can be useful, particularly in comparing small increments of data to one another. CLICK, DRAG, AND DRILL 6.13.3 140 Color Scheme Selections Color Scheme selections determine the way the bars, lines or areas of various graphs will be displayed. Typically, solid colors are used to differentiate between the columns in a bar graph or the points in a line graph. Occasionally, you may chose to set these values to black and white or color patterns to provide a different method of differentiation. Note: The colors used by CDD in creating graphs are defined so that they appear as well-differentiated shades of gray when printed on a black and white laser printer. The results you get in color or grayscale when printing graphs will vary somewhat depending on the type of printer you are using. CLICK, DRAG, AND DRILL 6.13.4 Point Type Selections When adding line, fit-to-curve, and mark type graphs, you will be able to make Point Type selections. A variety of geometric shapes are available. Point Size The Point Size selections only apply when you are creating a line, fit-to-curve or mark type graph. Marker Volume The Marker Volume control determines the size of your markers when creating all types of graphs. This control will affect the “volume” of most graph elements when the graph is being created in 3D. 141 CLICK, DRAG, AND DRILL 6.14 Editing Existing Graphs To edit the properties of an existing graph, right-click on the graph to reveal the Chart Properties menu as shown below. 142 CLICK, DRAG, AND DRILL 143 The Chart Properties menu consists of five major options. The first option is to “Edit the Chart Data”. This will take you to the now familiar Chart Data Set dialog shown below. By returning to the Chart Data Set window you can redefine all aspects of the graph by repeating the steps outlined in the “Adding Graphs” section of this chapter. 6.15 General Options The next option in the menu is the “General Properties” option. This will take you to the General Options window as shown below. CLICK, DRAG, AND DRILL 144 The General Options window allows you to edit all the options that change the graph styles. The primary option here is the Gallery Type. This is where you will select the type of graph you wish to display, whether it be a bar graph, a pie graph etc. Note: The choices you make in the Gallery Type dialog will affect the available options in the Appearance portion of the window. The Stacked Style control is only applicable to bar graphs. Stacking refers to the layout of the bars of a graph group. There are three options here: side-by-side (not stacked), stacked by value, and stacked as a percentage of the group total. The Grid Lines control allows you to specify whether you see no grid lines, horizontal grid lines, vertical grid lines or both horizontal and vertical grid lines. The Color Scheme control allows you to specify how the colors are represented. The options here are: solid colors, black and white patterns and color patterns. The 3D cluster check box applies to bar graphs. The 3D cluster check box allows you to specify that the group in a bar graph should be represented in 3D mode and as separate bars (not touching). The Color Lines check box applies to line graphs only. It lets you specify whether the lines in a line graph are in color or black and white (the default). The Point Type control lets you specify what shape the marker in the graph will have: none, triangle, variable shapes, square, marble (sphere), circle or cube. The Point size control lets you set the size of the markers in the graph. The Marker Volume control lets you specify the area that each marker occupies (the percentage of the available space for the markers). CLICK, DRAG, AND DRILL 145 6.16 3D Properties The next menu option is 3D Properties. This will take you to the 3D View Properties window. The 3D View Properties window lets you set all of the properties associated with a 3D graph. To enable 3D mode, the 3D checkbox be checked. Any graph created in 3D will be displayed a 3D graph with the default orientation. The diagram in the upper right corner of the 3D View Properties window gives a preview of the resulting graph. The slider bar along the bottom of this diagram sets the depth of the 3D graph (from 0 to 100%). The Full 3D View control checkbox allows you set your own orientation (perspective). By putting a check in the Full 3D View check box, the Rotation Control in the upper left corner is activated. Also note that the X and Y angle edit boxes are activated (default values are zero for both). Finally, note that the preview diagram changes to represent any new settings. The rotation control in the upper left corner lets you change the X and Y angles of rotation visually, or you can type in the desired value in the edit controls. To change the values visually, grab either the red (vertical rotation) or blue (horizontal rotation) “marble” and drag it to the desired location on the rotation disc. Finally, the Shadows check box controls whether or not the graph is drawn with shadows. CLICK, DRAG, AND DRILL 146 6.17 Title Properties The next option is the Title Properties option. This will take you to the Titles window. The Titles window lets you enter text to be displayed next to the graph. There are four edit controls: one each for Top, Bottom, Left and Right titles. CLICK, DRAG, AND DRILL 147 6.18 Chart Legends The last option takes you to the Chart Legends window. The Chart Legends dialog allows you to specify which legends are displayed on the graph. The available legends are the series and group legend. Once you have selected a series and/or a group legend, you may determine the position of the legend (top, bottom, left, and right) using the radio buttons. Finally, you can specify whether or not to display the data value at each marker in the graph. 6.19 Graph Styles Click, Drag, and Drill™ allows you to create many different styles of graphs. While initially you may only create basic bar or pie graphs, as you become more familiar with the graphing tool you may wish to create a wider variety of graphs, like line or point graphs, that best display the data of a given report. The wide variety of graphs available to you are described below. Examples of each type of graph will be shown, but most likely you will want to experiment with the different graph styles to become familiar with the advantages of each. You will remember that you make your selection of graph style from the Style Gallery within the General Options window shown below. CLICK, DRAG, AND DRILL 6.20 Column Graphs Column graphs are the most commonly used graph style. Typically, column graphs will show the variation of a value over time. Within the column graph style there are several variations. Simple Column Chart Shows the data markers with a space between categories (groups). Color Each Bar Each bar shows the data markers in different colors (or patterns) with a space between categories (groups). 148 CLICK, DRAG, AND DRILL Stacked Each series is positioned above the previous one, adding its value to the stacked bar. 149 CLICK, DRAG, AND DRILL 100% Stacked Each series is positioned above the previous one, adding its value to the stacked bar and calculating the percentage that each series represents of the whole part (or category). 150 CLICK, DRAG, AND DRILL Joined Bars Although similar to the simple column chart, joined bars has no gap between series (or bars). This option can be accessed from the "Tabbed Dialog". Please refer to this topic later in this section. 3D Bars Bars are drawn three-dimensionally.. 151 CLICK, DRAG, AND DRILL 3D Stacked The stacked bars are drawn three-dimensionally. 3D 100% Stacked The 100% stacked bars are drawn three-dimensionally. 152 CLICK, DRAG, AND DRILL 3D Joined Bars Joined Bars drawn three-dimensionally. 3D Clustered Bars Every series has its own row in the chart. This option can be accessed from the toolbar. 153 CLICK, DRAG, AND DRILL 3D Clustered/Joined Bars The bars are drawn together, with no space between categories (groups). 3D Show-Zero Use this chart when you have negative (less than zero) values in the chart. The starting point of all bars is zero. Therefore, you will have bars that go up and down (depending on their value). This option can be accessed from the "Options Dialog". Note: This chart is also available in 2D. 154 CLICK, DRAG, AND DRILL 155 6.21 Horizontal Bar Graphs Horizontal Bar graphs are essentially the same as column graphs; in horizontal bar graphs the information is presented in horizontal bars rather than vertical bars. Examples of each type of horizontal bar graph is shown below. CLICK, DRAG, AND DRILL 156 6.22 Line Graphs Line graphs typically display trends or changes in data over a period of time. Usually line graphs include markers at each time increment, but these graphs can also consist only of the line(s) themselves. Examples of the available line graph styles are shown below. Lines and Data Markers Points or data markers are shown in the chart. These points can be displayed in several form: rectangles, circles, triangles, marbles and cubes (3D-only). Show Values At each vertex or data marker, the corresponding value of the point will be shown above the data marker. CLICK, DRAG, AND DRILL Lines Only Points or data markers are not shown in the chart. 3D Lines Each line will be drawn as a three-dimensional figure. 157 CLICK, DRAG, AND DRILL 3D Clustered Lines Each line is drawn as a three-dimensional figure, and each series has a row. Step Lines Lines are painted as steps at every point. Also supported in 2D mode. Also applicable to scatter charts. 6.23 Fit-To-Curve Graphs Similar to line graphs, fit-to-curve graphs display trends or changes in data over a period of time. The lines in fit-to-curve graphs, however, curve to pass through each point or data marker. Examples of fit-to-curve graphs are shown below. 158 CLICK, DRAG, AND DRILL Curve and Data Markers Points or data markers are going to be shown in the chart. These points can be displayed in several forms. These forms are: Rectangles, circles, triangles, marbles and cubes (3Donly). Curve Only Points or data markers are not shown in the chart. 159 CLICK, DRAG, AND DRILL 160 Show Values Each vertex or data marker, the corresponding value of the point will be shown above the data marker. 3D Curve Each curve will be drawn as a three-dimensional figure. 6.24 Mark Graphs Mark graphs, like the line and fit-to-curve graphs before them, plot change in data over time. Mark graphs, however, do away with the line or curve linking each data marker. Each point, therefore, marks the status of the data at a given point in time. Examples of these mark graphs are shown below. CLICK, DRAG, AND DRILL Points Only points or data markers are going to be shown in the chart. These points can be displayed in several forms. These forms are: Rectangles, circles, triangles, marbles and cubes (3D-only). 3D Points Each point will be drawn as a three-dimensional figure (cube). 161 CLICK, DRAG, AND DRILL 3D Clustered Points Each series will have its row. 6.25 Area Graphs Area graphs display the relative importance of values over a period of time. For example, the proportion of one department’s expenditures compared to a second department’s expenditures over a three year period might best be presented in this “area” format. Examples of these graphs are shown below. Simple Area With drop down lines in each vertex, each series is viewed "as is". 162 CLICK, DRAG, AND DRILL Stacked Area With drop down lines at each vertex, each series is plotted in top of the previous one. 100% Stacked Area With drop down lines at each vertex, each series is plotted on top of the previous one calculating that all series will add to 100%. 163 CLICK, DRAG, AND DRILL 3D Area Same as simple area, only that the drawing is three-dimensional 3D Stacked Area Same as stacked area, only that the drawing is three-dimensional. 164 CLICK, DRAG, AND DRILL 3D 100% Stacked Area Same as 100% stacked area, only that the drawing is three-dimensional. 6.26 Cube Graphs A cube graph is a variation on the mark style of graph described earlier. 2D Cube This type of chart is very similar to a bar chart, but instead of a bar a cube is displayed. 165 CLICK, DRAG, AND DRILL 3D Cube Same as 2D but in 3D mode. Please refer to bar charts for the different variations supported in Cube charts. 166 CLICK, DRAG, AND DRILL 167 7 Sub Reports 7.1 What are Sub Reports? Sub reports are used to query and retrieve alternate data from the database. Alternate data is best thought of as any data unavailable in the Main Report Information Category, or as data that is available in the Main Report Category but there is a need to sort or select the data differently than it appears in the main report. Sub reports can be inserted into one or more existing regions of your main report. Sub report queries, of which there can be several within a single sub report, and also multiple sub reports defined within a sub report, are each based on their own independent Information Category, or alternatively based on written SQL, and may be sorted and selected independently of each other, sub reports and independent of the main report itself. Some examples of the uses of sub reports are as follows: 1) You are creating a purchasing report based on the purchase order number and the items within the PO. The data relationship of the PO to the item is one to many, that is one PO and many items. This relationship is technically referred to as Master (PO) to Detail (Items). However, for each PO item you wish to display the actual descriptive text. Upon examination you discover that each line of description has a detail relationship to the unique PO item. To include both item details and description details in a single information category is to create a double master to detail relationship (PO to Item(s) and Item to Description(s)) and that can create a phenomenon know as data duplication. The effect of data duplication is to cause the appearance in the report of one PO item for each line of descriptive text. Therefore, it would be prudent to create a sub report based on item description information and nest that sub report so that it executes after each occurrence of a PO item. In this way you are able to uniquely manage multiple occurrences of detail with relative ease. 2) You are creating a basic Budget to Actual report which displays in summary fashion the year-to-date values of budget, expenses, encumbrances and balance remaining for a particular Org. Key (accounting) and a series of objects (salaries, office supplies and hardware). However, you decide that directly after you list the year-to-date summary information for each object you would also like to list the transactions which comprise the summary totals. You would simply create a transaction based sub report and nest it after the occurrence of each object summary. CLICK, DRAG, AND DRILL To add a sub report, select “Insert, Sub Report” from the main menu. The Sub Report Level window will appear. 168 CLICK, DRAG, AND DRILL New sub reports can be attached to any region of the main report or to any existing sub report(s). Select the region where you would like the sub report to appear and click Next. The Sub Report Definition window will be displayed. The Sub Report Definition window allows you to: Add information categories to the sub report Add SQL statements to the sub report you are creating Edit existing SQL statements in sub reports Delete data elements from the sub report 169 CLICK, DRAG, AND DRILL 7.1.1 Adding Information Categories to the Sub Report To add an Information Category, you must first assign the report a name and description, then click the Add button in the Sub Report Definition window. The Properties Page window will be displayed. 170 CLICK, DRAG, AND DRILL 171 The Properties Page allows you to select the Information Category you want to use for the sub report. Once you have made you category selection, click Next. The Sort window will be displayed. Sort order for a sub report is defined in the same manner as sort order is defined for the main report. Available data elements are displayed in a tree structure in the fields window. Using the Add and Remove arrow keys, choose the fields on which you want to base sorting of data in the report. Once you have selected the data elements you want, the order of these elements is determined using the sort order buttons. Elements can be raised in the sort order , lowered in the sort order , or removed from the list of items . CLICK, DRAG, AND DRILL Once you are done making these sort order refinements, click Next. The Selection Criteria window will be displayed. Sub report selection criteria ties the sub report to the main report in the same manner as in a drill down. (For more information on the use of selection criteria in drill down creation, see Section 10, “Drill Down”.) Note: You will have an option of viewing the selection criteria information in either short or verbose format. 172 CLICK, DRAG, AND DRILL 173 To add selection criteria to the sub report, click Add. The Report Item window will be displayed. Once you have selected a data element on which to base the new selection criteria, you will have many options in regards to relating the chosen data element to either a user-defined value or another data element. For example, if your selection criteria was based on a GL Object Code greater than 0100, you would first select the data element that represented the GL Object, then select “greater than” from the equivalency list . Choose a “Response Type” and then click Next. The Report Item window will be displayed. CLICK, DRAG, AND DRILL 174 Enter the value upon which you want your selection criteria to be based. Click Finish to be returned to the Selection Criteria window. Click Finish again and you will be returned to the Sub Report Definition window. If you are done defining the sub report, click Finish once more and you will be returned to the main report and the sub report region will appear in the Design window as seen in the example below. Note: Once a sub report has been added to a main report, the options available in the data element list on the right side of the CDD window includes an entry for Sub Report Items. CLICK, DRAG, AND DRILL 175 Once a sub report has been created, regions can be added to it in the same manner as regions are added to the main report. For more information on adding regions to reports, see Section 9, “Refining the Design”. 7.2 Adding SQL Statements The Sub Report Definition window also allows you to add SQL statements to your report. SQL statements are used to simulate information categories. Any valid SQL select statement can be used in sub reports, except “order by” statements (CDD will prompt for sort order). To add an SQL statement to your report, click Add SQL. The General SQL window will be displayed. In the General window, assign a name and description to the View you are creating. Once you have entered this information, click Next. The SQL window will be displayed. CLICK, DRAG, AND DRILL The SQL window allows you to write an SQL statement directing the system to retrieve specific data from a selected table or tables. For example, if for expenditure transaction purposes you wanted to select the net of credits minus debits from a particular budget table, the SQL statement you would create might appear as follows: select glt_cr - glt_dr net from glt_trns_dtl This statement directs the system to let “net” be the result of the general ledger credit value (glt_cr) minus the general ledger debit value (glt_dr) and instructs that this data is to be retrieved from the glt_trns_dtl table. 176 CLICK, DRAG, AND DRILL 177 The SQL window allows you to enter this information by either typing the entire statement or by using a combination of typing and selecting the SQL statement keys. After entering the SQL statement… Click the Check Syntax button. The system will check the statement to be sure that it conforms to SQL syntax requirements. If there are errors in the statement, the system will display these in the Database Error message window. Note: If the syntax is correct, nothing will happen. An error message will only appear if there is a problem with your SQL syntax. CLICK, DRAG, AND DRILL 178 If the syntax of your statement is correct, click Next. The Items window will be displayed. The Items window allows you to check the columns which will be returned based on the view you are creating. To edit the column, click Edit. The Items Properties window will be displayed and the item properties such as font, color and point size can be altered. Once the SQL statement has been created, click Finish and you will be returned to the Sub Report Definition window. CLICK, DRAG, AND DRILL 7.3 Editing SQL Statements SQL statements which are being used for a sub report, can be edited from within the Sub Report definition. To edit an SQL statement, click Edit in the Sub Report Definition window. The Edit Sub Report SQL window which contains four tabs, General , SQL, Items, and Sort will be displayed. 179 CLICK, DRAG, AND DRILL 7.4 General Tab The General tab allows you to make changes to the name and description of the SQL. 180 CLICK, DRAG, AND DRILL 7.5 SQL Tab The SQL tab allows you to make changes to the SQL statement. 181 CLICK, DRAG, AND DRILL 7.6 Items Tab 182 CLICK, DRAG, AND DRILL The Items tab allows you to make changes to the properties of the selected item. Click the Edit button on the Item Tab to view the three tabs available in the Item Properties window: General, Details, and Display as seen below. 183 CLICK, DRAG, AND DRILL Once you are finished editing the Item Properties, click OK and you will be returned to the Edit Sub Report SQL window. 184 CLICK, DRAG, AND DRILL 7.7 Sort Tab The Sort tab allows you to make changes in the sort order to be applied to the SQL statement. Once you are finished editing the SQL statement, click OK. You will be returned to the Sub Report Definition window. 7.8 Deleting Sub Report Data Sub report data can be deleted by simply selecting the data you want to remove from the sub report and clicking the Delete button. The selected item will be removed from the sub report. 185 CLICK, DRAG, AND DRILL 7.9 Removing Sub Reports Because sub reports reside as a region of the main report, they can be removed from the main report by double-clicking on the sub report heading bar to display the Region Properties window and clicking the Remove button. 186 CLICK, DRAG, AND DRILL 187 8 Data Lookups One of the powerful features of CDD is the ability to create Data Lookups to access data that is not included in the report category. Data Lookups allow users to execute database queries on conditional values based on either existing categories or an SQL statement. This feature is very similar to the Declaration Macro described in the macro section , “Refining the Design”. Some of the reasons to use Data Lookups include the following: To retrieve the actual totals from any previous fiscal year to compare to the current fiscal year. To retrieve organizational code descriptions from a corresponding code table that has not been included in the Information Category. To retrieve the sum of all n (e.g., budgets, actuals, encumbrances) amounts within a specific Organization Key where certain conditional logic must be met (e.g., not all the encumbrances for a certain Key, but all encumbrances for a certain Key where the Fund equals 101.) While all of the above functions can be handled by either a Data Lookup or a Declaration macro, there are reasons to use one or the other. Users with experience with SQL will find that the Data Lookup tool allows them to create and test scripts in the UNIX environment and then implement them in a report as easily as cutting and pasting. As you may remember, Declarations require a minimum of six statements located throughout the Macro regions to function. Placement and typos are a common issue. However, if you need to execute the procedure in a controlled or conditional basis then the best option would to use a Declaration macro. Another difference between Declarations and Data Lookups is the number of times you can execute the procedure per pass. Declarations can be executed in a loop to exhaustively read a set of rows from the database. This is useful in determining a variety of ranges within data sets. A data lookup only does one execution per pass and returns only one set of data. This can be a line of summary data or a line of detailed information but it cannot be both. The biggest difference between data lookups and sub reports is that lookups retrieve a single row of data while sub reports return multiple rows of data. Therefore, you should use lookups when one row is sufficient, like when you want a Key Description in an encumbrance report, or when you want budget to actual comparisons for multiple fiscal years listed column-by-column rather than row-by-row. The second biggest difference between lookups and sub reports is that lookups are utterly dependent on the regions to which they are attached, while sub reports can have their own regions. In this section of the CDD manual, we will demonstrate how to use the CDD Data Lookup tool. CLICK, DRAG, AND DRILL 188 First, you must have a report written to add a Data Lookup. In the example below the report consists of a basic list of vendors. The table used to supply this information does not include the address information. In this example we will be using a Data Lookup to add the city and state to the vendor list. Our first Data Lookup will be written using an existing category. You’ll see that it uses many of the same steps involved in creating a regular report. You will start from the main design window as in the example below. CLICK, DRAG, AND DRILL To insert a Data Lookup you can either use the mouse and right click anywhere within the report design and select Add Data Lookup, or you can select “Insert, Data Lookup” from the main menu. 189 CLICK, DRAG, AND DRILL 190 Because the Data Lookup requires many of the same attributes as a sub report, the wizard windows remain much the same throughout the creation process of both. In our example, we will be adding the Data Lookup to the Detail region of the report to provide city and state information for each of the vendors listed. Select the report region where you want the data lookup to appear and click Next. After determining the placement of the Data Lookup, you are prompted for a name and description. This name and description is used to group multiple Data Lookups together. In the example below, we have given the data lookup a name and description that reflects the reason behind adding it. CLICK, DRAG, AND DRILL 191 At this point you have the option of basing the Data Lookup on either an existing report category or on a SQL statement. To use a category you would click the Add button; to select the SQL option you would click the Add SQL button. For this first example we will start with a Data Lookup based on an existing category. CLICK, DRAG, AND DRILL 192 The next window prompts you to select from the list of existing categories. In this case we had already created a category with the PE Address Table. Looking under All Categories we find a PEADDR category. Select the category, then click the Next button. This next window allows you to set a sort order for the data retrieved from the Data Lookup. It is important to note that because a Data Lookup will only return one row of data per pass, your sort can affect the row selected. In our example, the vendor may have one or more addresses, each differentiated by a unique address code. If you do not select a sort order you will be defaulting to the first record retrieved by the query, which may be address code ‘A1’ or address code ‘A2’. This can cause somewhat random results. There are two ways to control the result: order the data so that the desired result comes first; that is sort by address code so that ‘A1’ is returned first. Or, select the data in such a way that only one distinct row is returned. This is useful when the specific row you wish to return is not the first or last in a series, but somewhere in between. In our example, we will not select a sort item and will accept the default data selection because we will address the variability through the selection process. CLICK, DRAG, AND DRILL 193 Note: The sort option could be used to find specific information regarding the linked item. For example, if you were reporting on a check run for a specific account number you could select Transaction Date Descending for your sort order and it would return the most recent date value for your data. If you had selected Transaction Date Ascending it would retrieve the earliest date value. Now it is time to determine the selection criteria for the query. This wizard window is used extensively throughout CDD and instructions regarding its use can be found in the section covering “Running a Report”. CLICK, DRAG, AND DRILL For our example, we know that we will need to link the city and state data to the vendor’s ID. In this case we are linking the two queries on PEID. 194 CLICK, DRAG, AND DRILL 195 Once finished making the criteria selection (in the example we have two comparisons), click the Finish button. The Sub Report Definition window will appear again showing our new Data Lookup name and description. You can add additional data lookups to the same executable at any time. Each will perform in sequence every time the region that they are attached to is active. Now that the Data Lookup has been added to the report, we have to determine its exact relationship to the region to which it is linked. When a region is selected for inserting a Data Lookup, the Data Lookup is placed immediately after that region. The report will execute the Data Lookup in the order that it is displayed on the report. In the case of this default placement, the query will occur after the region. In several cases this is necessary as the query might rely on data produced within the region. In cases where the Data Lookup is providing data for displaying in the region with which it is associated (as in the example we are using) we need the query to be executed before the region. CLICK, DRAG, AND DRILL 196 Changing this is very simple. First, insert a new region of the same type that the Data Lookup is associated with. If you have added macros or fields to the original region they will have to be copied or duplicated in this new region. Then you will select the first region (the one occurring prior to the Data Lookup) and remove it. Be sure that you copy any information from the region before removing it. CLICK, DRAG, AND DRILL 197 After removing the original region, the Data Lookup should be above the region it is associated with. Now that we have created the Data Lookup and positioned it correctly, we can add the necessary fields to the report. In the Report Items Toolbar you will now be able to expand the Data Lookup Elements and access the elements retrieved by the query. As Data Lookups are added to a report, they will be displayed here (ex., CITY_STATE - Retrieve City and State for Vendor). As you expand to the next level you will find the list includes all the associated query names (ex., PEADDR - PE Address Table). When we add an SQL query within this same Data Lookup it will appear after any existing ones. Expanding one more level brings you to the table level which mimics the Category Database Items in both symbols and usage. CLICK, DRAG, AND DRILL For this next step we will be expanding the data lookup elements until we have reached the city and state fields we need. 198 CLICK, DRAG, AND DRILL Once the data elements are displayed, we can add them to the report. Add the appropriate text and run the report. The other method of Data Lookup creation involves using an SQL statement. With an SQL statement you can target specific information, perform calculations, and retrieve summary data. Remember, a Data Lookup will only return one row of data regardless of the format you require. For our example of an SQL based Data Lookup we will use the existing Data Lookup and just add another query to it. 199 CLICK, DRAG, AND DRILL First you need to select the “View, Data Lookup Properties” from the main menu. 200 CLICK, DRAG, AND DRILL This will display the Sub Report Properties window. Now click the Add SQL button. 201 CLICK, DRAG, AND DRILL Enter a unique name and description for the query. Then click the Next button. 202 CLICK, DRAG, AND DRILL 203 This window allows you to enter the SQL statement for the query you need. The element list is contained in the top left area of the window. Within this window you can view a list of the actual tables in your system and the database names for both tables and columns. In SQL the actual database names must be used for querying data. In the above SQL, we are requesting the city and state fields from the PE Address table. The ‘@’ symbol is used to reference data included in the main report. When using the ‘@’ symbol the data following it uses the CDD code for the table and column names. (To drop down a line hold the Control key down as you press ENTER.) Clicking the Check Syntax button will validate the SQL statement. (When you click the Next button it will automatically validate the syntax for you also.) If the SQL is correct nothing will happen; if the SQL is wrong it will display a brief error message regarding the error. After the SQL passes the syntax check, click the Next button. CLICK, DRAG, AND DRILL That will bring up the list of items that will be returned by the query. If all the items you need are present, click the Next button; otherwise click the Back button and edit the SQL to include the additional columns you need. 204 CLICK, DRAG, AND DRILL 205 As with the last method, the sort order is critical for the specific row of data that is returned. As with our prior Data Lookup we will accept the default row of data and not select a sort item. CLICK, DRAG, AND DRILL 206 Clicking the Finish button will complete the process and return you to the Sub Reports Properties window. We now show two different queries in the Sub Report Data area. Both will be executed when the region associated with this Data Lookup is active. Click OK to return to the Report Design window. CLICK, DRAG, AND DRILL 207 In the Report Items area you will now be able to expand the Data Lookup Elements item and access both of the queries that have been created. Since the SQL query was written to fetch only the data that we required, it displays only two items. The broadly defined category based query returns every item in the table. As with the first method the items can be added to the report as necessary. 8.1 System Field Names This is a list of the standard Systems Fields found in CDD. When using the SQL you will need to use the field name as shown below for comparisons. Element Description SQL Code Category CATEGORY Company Name INSTNAME CLICK, DRAG, AND DRILL Current Date DATE Current Time TIME Default Budget Version SYSBUDGETVERSION Default Ledger SYSDEFAULTLEDGER Fiscal Period SYSPERIOD Fiscal Year SYSFISCALYEAR Page Number PAGENO Report Date REPORTDATE Report Description REPORTDESC Report ID REPORTID Security Information SECURITY Selection ID SELECTIONID Selection String SELECTION Sort Description SORT Start Date SYSSTARTDATE System Message SYSMESSAGE User ID USERID User Name USERNAME 208 CLICK, DRAG, AND DRILL 209 9 Refining the Design Click, Drag, and Drill™ reports can be refined in a number of ways. Principle among these are refining reports in the View Design window as well as adjusting Report Properties and creating Macros. Refine Using View Design When working with most report types, the Design window is often entered as the last step in the design process. As you will recall, the Report Wizard includes a Details window (seen below). CLICK, DRAG, AND DRILL 210 Choose View Design and click Finish, to display the Design window. The Design window allows you to make adjustments to your report. The Design window is comprised of three parts: menu and tool bars, the Design display window, and a “pick list” from which additional Data Elements can be added to the report. The process for adding data elements is described below. CLICK, DRAG, AND DRILL 211 9.1 Working with Data Elements 9.1.1 Adding Data Elements in View Design Data Elements (fields) can be easily added to your report by simply dragging the desired field from the pick-list and dropping it into a region of the report. To view the available fields, simply expand the tree as in the example below. There are several types of items available for selection from the data fields pick-list. CLICK, DRAG, AND DRILL 212 Database Items: An upper level branch of the tree, Database Items contains fields available from each of the tables included in the referenced Information Category. Data Lookup: Any data lookup(s) that has been created. Sub Report: Any sub report(s) that have been created. Tables: Specific tables contained in the selected database are identified. Text: Field contains data which will display as text in the report. Numeric: Field contains data which will display as numerals in the report. Numeric: A variant of the numeric field where the value includes a decimal. Also called floating point numbers. System Fields: An upper level branch of the tree, System Fields are generic fields available regardless of the specific database that has been selected. These fields include textual and numeric values (i.e., page number, user ID, current date, etc.) Date Fields: An upper level branch of the tree, User Fields contains special user-defined fields if any have been created. 9.2 Adding Data Elements Using “Insert” Dragging data elements onto a region of your report is only one of the ways data fields are added to a report. Data fields can also be added through the main menu, by selecting the Insert option. Both Text fields and User fields can be added in this manner. Adding fields using the Insert option of the main menu is described below. 9.2.1 “Insert, Text Field” Text Fields are the most basic and simply added fields you can add to your report. Text fields are “static” fields, meaning that the text you add to the report does not draw data from any database and therefore remains changeless each time the report is run. CLICK, DRAG, AND DRILL 213 To add a static heading field to an existing report, first open the report, then select “Insert, Text Field…” from the main menu. The Text Field window will appear. At this point, simply enter the text you wish the new field to contain (for example, “1st Quarter Encumbrance”) and click OK. You will be returned to the report design window. Your mouse pointer will hold the new field. Place the pointer over the region where you want the new field to appear, and click once. The new field will be dropped into that location of the report. 9.2.2 “Insert, User Field” User-defined fields typically contain more refined information than simple static text fields. A user-defined field, for example, might contain a subtotal, or data that is conditional based on other information contained in the report. CLICK, DRAG, AND DRILL 214 To add a user-defined field, select “Insert, User Field” from the main menu. There are three steps in adding a user-defined field. First, basic information about the new field is defined in the General window. This window is displayed below. The General window allows you to assign basic descriptive information about the new field. The Item Name, Description, and Heading fields are all required and all help to identify the new field. The Type field is used to differentiate between a character and a numeric-based fields. Picklists can also be created at this time. (For more information on Picklists, see the section titled “Creating Picklists” later in this chapter.) CLICK, DRAG, AND DRILL After completing this basic descriptive information, click Next. The Display window will appear as in the example below. The Display window is used to customize the text in the new field. Point size, font and color are all set here. Note: For information about selecting “Mask” properties, see the Edit Mask Appendix. 215 CLICK, DRAG, AND DRILL After make your display selections, click Next. The Calculation window will be displayed as in the example below. The calculation window is used to assign a calculated value to a specific field. After all customization has been applied to the user-defined field, click OK and you will be returned to the Design window. 216 CLICK, DRAG, AND DRILL 217 9.3 Changing the Width of a Data Element To manipulate the width of a data element, move the mouse to the border of the data element. When the cursor changes to a two-headed arrow, click and drag to resize the data element. 9.4 Moving Data Elements Data elements are easily arranged in the detail region of the report layout. 1. Select the data element to be moved by clicking on it. The outline color of the data element will change colors to indicate that it has been selected. There are two methods to select multiple data elements at once. One way to do this is to “draw” a rectangle around the elements you want to move. To do this, simply click and drag from within any region in the report design. The outline of the selected area will appear. This selection rectangle can be drawn around as many data elements and across as many report regions as necessary. CLICK, DRAG, AND DRILL 218 The second method for selecting multiple elements is to hold down the CONTROL key and click on each data element to be selected. 2. Place the cursor inside the data element’s box (the cursor changes to a directional cursor with four arrows), then click and drag the data element to the desired location. Elements may also be moved by pressing any of the directional arrows on the keyboard. In this way, one or more Data Element can be moved precisely and incrementally. 9.5 Aligning Data Elements Data elements can be easily aligned within a region of a report. 1. Select the data elements to be aligned. The outline color of the data elements will change colors to indicate that the have been selected. 2. Click on any one of the align buttons or select “Edit, Align” from the menu bar. Four options, Left, Right, Top, and Bottom, are available. By clicking on the desired option, the data elements you have selected are aligned accordingly. 9.6 Formatting Data Elements Data elements are easily formatted in the detail region of the report layout. 1. Double-click on the data element you wish to format. 2. In the Report Object Properties window, there are four tabs: General, Format, Border, and Total. CLICK, DRAG, AND DRILL The General tab identifies the name, description and type of the data element. 219 CLICK, DRAG, AND DRILL 220 The Format tab is used to specify how the data element is to appear on the report in terms of font, size, and style. The system defaults to Times New Roman, 12 point, normal type. Note: For a detailed description of the Mask field, see Appendix B, “Edit Masks” for Numeric Data Elements. CLICK, DRAG, AND DRILL The Font… button allows you to make changes in font, font style, point size, etc. The Border tab allows you to add a border to the selected region. Click “Show Border” to turn this feature on. You can define the color and thickness of the border as well as determine which sides of the region (left, right, top, bottom) the border will appear. 221 CLICK, DRAG, AND DRILL 222 The Total tab allows you to add totals to your report based on a range of selection criteria. The Total Type choices allow you to choose whether or not to add totals to the report and whether these totals are to be based on Average, Standard Deviation, Count, Variance, Minimum or Maximum values. Note: When dealing with character, time and date fields, only “None” and “Count” are available as Total Types. Once you are done formatting the data element(s), click OK to return to the Design window. 9.7 Working with Regions 9.7.1 Adding Regions to the Report Often you will want to add regions to the report where various types of totaling can be carried out. For example, in a budget report, you may want to add regions where subtotals are calculated for each department. Note: CDD, as a report writing tool is “regionally driven”, meaning that things happen because regions happen. Simply put, data prints in CLICK, DRAG, AND DRILL 223 your report because a region exists to provide space for that data to print. Likewise, Macros, sub reports and Data Lookups are all triggered to execute when and if a Region executes. Regions occur in a report based on instances of time in relation to data. A Detail region. for instance occurs once per data row returned to the report, whereas the Page Header occurs once per page at the top of the page. Consequently, timing of events through the organization of regions is as vitally important to a CDD report as the way that is ordered or how it is selected Open a previously-defined report by selecting “File, Open” from the main menu or clicking on the Open Report button on the main toolbar. Select “Insert, Region” from the menu bar. The Region Level window will appear. CLICK, DRAG, AND DRILL 224 Select the Region Level. Click Next. Select the data element upon which to base the sort. Click Next. The Details window will be displayed. The Details window allows you to make several choices about the layout of your report based on the region you are adding. These layout options include: Inserts a page-break before the new region Inserts a page-break after the new region Inserts a line-space after the new region Inserts a line-space before the new region CLICK, DRAG, AND DRILL 225 Once you have made your selection(s), click Finish. You will be returned to the Design window and the new region(s) will appear as in the example below. To REMOVE a region from the report, highlight the region to be removed (click anywhere in the body of the region) and select “Edit, Remove Region.” You will be asked to confirm that you want to remove the region. Click OK and the region will be removed from the report. 9.8 Formatting Regions Regions are easily formatted in the report layout. 1 Double-click on the region you wish to format. CLICK, DRAG, AND DRILL 226 2 In the Region Properties window, there are three tabs: Details, Print Conditions, and Border. In addition to adjusting the description of the region, the Details tab allows you to make several choices about the layout of your report based on the region you are formatting. These layout options include: Inserts a page-break before the new region Inserts a page-break after the new region Inserts a line-space after the new region CLICK, DRAG, AND DRILL Inserts a line-space before the new region 227 CLICK, DRAG, AND DRILL 228 The Print Conditions tab allows you to specify certain parameters wherein information will appear in this region of your report. The Border tab allows you to add a border to the selected region. Click “Show Border” to turn this feature on. You can define the color and thickness of the border as well as determine which sides of the region (left, right, top, bottom) the border will appear. 9.9 Re-sizing Region View To manipulate the size of a region, use the mouse to move the cursor to the lower border of the detail area. When the cursor changes to a twoheaded arrow, click and drag to resize the detail area. This example shows the detail area expanded to accommodate a multi-line report. CLICK, DRAG, AND DRILL 229 Note: Since CDD is a WYSIWYG report designer, the actual size of a region in a CDD report directly reflects the number of lines on the page. So if you want your Detail double-spaced, then just re-size the Detail region to be two lines long. 9.10 Refine Using “Report Properties” When a new report is created, decisions are made as to the ways in which the information contained in the report is sorted. During the report creation process these decisions are made through the Report Wizard. Sorting Options can also be added to an existing report. To add new sort options to an existing report, first open the report by selecting “File, Open” from the main menu, or click the Open Report button. CLICK, DRAG, AND DRILL 230 Choose the report you want to work on and click Open. The report will be displayed in the Design window. To refine the sort options and selection criteria, select “View, Report Properties” from the main menu. The Report Properties window will be displayed. CLICK, DRAG, AND DRILL 231 Note: If there are any sub reports located anywhere in the main report, a “Reports” window will be displayed when you select “View, Report Properties”. In this window you would identify whether the report properties you wish to adjust are those of the Main Report or those of the Sub Report. Sub reports are discussed in greater detail in Chapter 7. There are seven tabs available in the Report Properties window: General, Sort, Design Layout, Selection Criteria, Drill, Report Prompts, and Prompt Order. 9.11 General Tab The General tab in the Report Properties window (as seen above) allows you to review basic information about the report including the report title, the Information Category from which the data contained in the report is drawn, and the report description. You are able to change the information category used by this report by selecting a new category from the Information Category drop-down menu. CLICK, DRAG, AND DRILL 232 The General tab also allows you define the number of grid lines per inch. This setting allows you greater control over the design and layout of your final report. If you want to be able to drill down to stored images in any drill downs, enable this feature by placing a check mark in the “Enable drill down to images” box. Finally, you can select the type of macro language used in this report by checking off either VBScript or Standard CDD Language. Once you are done making these general report refinements, click OK to return to the Design window, or click either the Sort or the Selection Criteria tabs. CLICK, DRAG, AND DRILL 233 9.12 Sort Tab The Sort tab (as seen below) allows you to select data elements on which you want data in the report to be sorted. and Remove arrow keys, choose the Available data elements are displayed in a tree structure in the Fields window. Using the Add fields on which you want to base sorting of data in the report. Once you have selected the data elements you want, the order of these elements is determined using the sort order buttons. Elements can be raised in the sort order , lowered in the sort order , or removed from the list of items . Once you are done making these sort order refinements, click OK to return to the Design window, or click either the General, Selection Criteria, Drill, or Report Prompts tabs. CLICK, DRAG, AND DRILL 234 9.13 Design Layout Tab The Design Layout tab (Seen below) allows you to rearrange the design areas that compose the report. You may change the order in which regions appear and print. Regions have a level property (such as Detail or Group Footer) and they may not be moved out of the level to which they were added. You can arrange areas within their level. For example, if you have two detail regions in a report and you would like to add a third and have it appear first, you would follow these steps: 1) Create the region 2) Open report properties and choose the Design Layout tab 3) Open the Detail branch on the Begin Main Report 4) Select the newly added region and use the up arrow button to move the new region to the top of the Detail list. 5) Click the OK button. CLICK, DRAG, AND DRILL 235 The newly added region will now be moved to the top of the group of Detail regions shown below. 9.14 Selection Criteria Tab The Selection Criteria tab (seen below) allows you to make selection criteria selections for your report. There are two ways to enter selection criteria for the main report: in Report Properties and also in Run Time Selection Criteria, found by pressing the check box next to the go button. Two areas exist because they each have distinct purposes. This screen is used to add “intrinsic” selection criteria. Intrinsic criteria, as opposed to preferential criteria, means the report is not correct unless this criteria is in effect. For example, a budget to actual report is not correct unless it only selects revenue and expenditure accounts and otherwise excludes asset, liability and fund balance accounts. When something must be in order for the report to function correctly, we call that a property of the report and enter the values here. Otherwise, we call it a preference and we enter those selections elsewhere, all though one should note that the mechanism for adding the criteria is the same. CLICK, DRAG, AND DRILL 236 For example, you may want to prompt the user for the Person's ID number when they run the report, but that is by no means crucial for the report to run correctly. It will run for one ID or one thousand. Therefore, a prompt for ID is a preference. Hint: Selection Criteria is perhaps the single most important factor in using CDD effectively. Advanced use of Selection Criteria will empower the user with the advantages of drill downs, sub reports, data lookups, Selection Pop-up dialogs and more. Selection criteria, defined quite simply, creates the focus of your report by assigning a Data Attribute a Comparison Value. We say that the Object Type is equal to ‘RV’ for Revenue. What we actually do is identify the Data Attribute we intend to assign (Object Type) then we assign a comparison which identifies how the value will be interpreted (is equal to). This comparison can be one of a number of different possibilities, each with its own effect (eg. greater than or equal to, less than or equal to, like, not like, etc.) Finally we assign the Data Attribute a value ('RV'). Values are expressed in the form of one of the following four ‘Response Type(s)’: Literal Value, Prompt, Data Item, and Drill Field. A Literal Value assigns the Data Attribute the value of an alpha-numeric string, that is, literally, the value of the letter ‘R’ and the letter ‘V’ together. Literal Values can be expressed as a single value or as multiple values separated by commas (CDD will then parse the values into appropriate syntax for you). Prompt values are also expressed literally, however the main difference is that Prompt Values come to the user at report run-time and consequently can be changed or revised at will. Thus, the initial value of the Prompt for Object Type may be ‘RV’ but nothing prevents the user from changing the value to ‘XP’ (expenditure) or ‘RV,XP’ (Revenue or Expenditure) if they so desire. Another nice feature of Report Prompts is that they support Pop-up Pick Lists. A Pick List is simply a list of useful data that appears at report run-time with the prompt. To diverge for a moment, let us say that we desired a prompt for Person ID in our report. We could define a Pick List to display to us all the Active IDs who were also 1099 Recipients. We could then pick from the available list and the series of IDs would be written into our selection prompt automatically. When you use the Data Item value, you intend to assign the value of Object Type the value of some other Data Attribute from the report. This is most useful when doing Date prompting and you elect to use the internal System Fields Report Date and/or Start Date. In this case, you might state that the Posting Date is greater than or equal to the Start Date and the Posting Date is less than or equal to the Report Date. The reasons for doing this are quite clear, Report Date and Start Date offer all sorts of useful data values, such as Fiscal Year/Quarter/Month Begin or End. CLICK, DRAG, AND DRILL 237 Finally, the use of the Drill Field Response Type assigns the Data Attribute the value of another Data Attribute, however the Attribute in question happens to be from another report. This so-called “other report” can be a Drill Report, Data Lookup, sub report, Pick List or other such thing, it just happens to come from somewhere else other than the Main Report Category. Drill Fields are used all over in CDD to link to related report mechanisms together. To add Selection Criteria to the report, click Add. The Report Item window will be displayed. CLICK, DRAG, AND DRILL 238 Note: You will have an option of viewing the selection criteria information in either short or verbose format. Once you have selected a data element on which to base the new selection criteria, you will have many options in regards to relating the chosen data element to either a user-defined value or another data element. CLICK, DRAG, AND DRILL 239 For example, if your selection criteria was based on a GL Object Code greater than 0100, you would first select the data element that represented the GL Object, then select “greater than” from the equivalency list and then click Next. The Report Item window will be displayed. . Choose a “Response Type” Enter the value upon which you want your selection criteria to be based. Click Finish to be returned to the Region Properties window. 9.15 Creating Picklists Another feature of selection criteria is the Picklist. Picklists can be defined on selection criteria prompts and provide the person running the report with a list of valid items from the database. For example, if you were going to prompt the user for PE ID, but you know your users are more familiar with the employee's name (PENAME) you can use a Picklist to display the PENAME option. CLICK, DRAG, AND DRILL 240 To add a picklist to a report region, you must select Prompt from the list of Response Types in the Report Item window as shown below. Click Next to open the second Report Item window shown below. Picklists are added through the Report Item window seen above. The Add Picklist Definition button allows you to define the parameters of the new picklist. CLICK, DRAG, AND DRILL There are three steps involved in adding a picklist to a report. First, an Information Category is selected… …next a Key and Description are selected… 241 CLICK, DRAG, AND DRILL …and finally, Selection Criteria, if any, is assigned. 242 CLICK, DRAG, AND DRILL 9.16 Drill Tab The Drill tab (seen below) allows you to force items from the elected database to be included in any Drill Downs you create for a particular region of the report. (For a more detailed discussion of Drilling Down in CDD reports, see Section 10.) The Drill tab allows you to specify that a given item should be made available for drill down criteria even if this item is not shown on the report. items not marked for inclusion in this manor are disregarded when drill downs are performed. 243 CLICK, DRAG, AND DRILL 9.17 Report Prompts Tab The Report Prompts tab allows you to specify which system fields require prompts at the time the report is run. One or more of the system fields can be selected for prompting. Date Prompts and Prompt messages can be entered. 244 CLICK, DRAG, AND DRILL 245 9.18 Prompt Order Tab The prompts you have defined in the Report Prompts tab can be arranged in the desired order in the Prompt Order tab shown below. Select the prompt and, using the arrow keys in the upper right corner of the tab, establish the order of the prompts as desired. 9.19 Refine Using Macros A macro is a specific instruction (or sequence of instructions) executedwithin a specific region of a report. Macros within a region are executed each time a row of data is returned to that region. In the detail region, macros are executed for every new row of data returned. Within a sorted region, macros are executed once each time the sort changes. Within a paginated region, macros are executed once each time the page changes. For example: A macro used in the Detail Region of a Purchase Order Item Listing to return the Item Description is executed for each Purchase CLICK, DRAG, AND DRILL 246 Order Item. In the same report, a macro in the Group Footer Region (based on Purchase Order Number) to calculate the Purchase Order Total is executed each time the Purchase Order Number changes. In another situation, a macro might be used to direct that the amount indicating total revenue appear in one region of the report and the amount indicating total expense appear in another region and that both of these amounts be reset to zero at every new group heading.There are four different types of statements used within the macro area of Click, Drag, and Drill™: Calculations, Conditions, Declarations and Functions. Macros are comprised of statements and may be defined either conditionally or unconditionally. 9.20 The Macros Tab From within the Report Wizard, macros can be created by selecting the Macros tab in the design window. The Design window will appear as below. CLICK, DRAG, AND DRILL 247 9.21 Macro Languages CDD uses VBScript (Active Macro) language. There is documentation for VBScript accessible through the HELP menu in CDD. You can also make your selection of macro language while refining an existing report. Note, though, that if you change your macro language selection in a report with a macro already written in the other language, that pre-existing macro will need to be rewritten in the new language. CLICK, DRAG, AND DRILL 248 To specify which language CDD uses for creating and editing macros, select “Edit, Preferences” from the main menu. Choose the Macros tab. Specifying the macro language to use for your report is simply a matter of selecting VBScript, or Standard CDD Language from the list of Default Languages displayed in this Preferences window. These two macro languages, Classic CDD language and VBScript Active Macro language are described in greater detail below. Let’s look first at Classic CDD language and we’ll turn our attention to VBScript language later in this chapter. CLICK, DRAG, AND DRILL 249 9.22 Writing Macros using Classic CDD Macro Language 9.22.1 Statements A statement consists of a field (Revenue, for example) or a sub-string within a field (Revenue 1992 through 1994) that is assigned a value. The value can be a constant, a string, another field, a value derived from another field, a sub-string of another field, or a calculation. All four of the different macro types are built on statements. 9.22.2 Calculation Macro Calculation statements allow users to derive values in a report where thereare no other options for totaling. Click, Drag, and Drill™ contains features for automatically totaling a column of data, however these totals may not always be appropriate to one's needs. Often one will need a complex total that is more than just the sum of a column. Calculation macros use the following syntax: field = field ... field = n ... field = (field + field) / 12 ... field = function(field,field) A field may be a CLUSTER.ATTRIBUTE, a User Defined field, or a System field; in the case of a computation, the field may be a literal value ( field = 7). Functions are documented below. "=" operator - The operators in a calculation may be any of the following: CLICK, DRAG, AND DRILL 250 Symbol Meaning = Equal to <> Not equal to + Add - Subtract * Multiply / Divide > Greater than < Less than >= Greater than or equal to <= Less than or equal to matches Used for finding matched patterns not matches Used for finding unmatched patterns * Used in pattern matching to represent zero or more characters (e.g. *inc, Inc*, *inc*) ? Represents a single character (e.g. GL?,B?D,?KEY) [] Used to enclose a set (e.g. [cC]) () Used to enclose an expression meant to be performed as one action. When a set of parentheses exists within another set of parentheses, it means derive the value in the inner set first and use that result to determine the value defined by the expression in the outer set. Calculation macros follow the order below: CLICK, DRAG, AND DRILL 251 Parentheses Exponents Multiplication and Division, left to right Addition and Subtraction, left to right Example: NET_AMOUNT = ((PO_ITEM.QTY * PO_ITEM.UNT_PRC) + PO_ITEM.TAX + _ PO_ITEM.CHRGS) Result: User Defined field NET_AMOUNT is determined first by multiplying PO_ITEM.QTY by PO_ITEM.UNT_PRC and then adding that product to remaining items in the calculation. TypeTitle = "Revenue Section" Result: User Defined field TypeTitle is populated with the character string within the quotation marks. NetAmount = GLBUDG.BUDGET01 - Actual - Encumbrance Result: User Defined Field NetAmount is populated with a calculation based on values from a Database Item and from User Defined fields, whose values were derived from other macro calculations earlier in the macro section of the report. Conditional Macro Conditional statements allow you to execute macro activity based on the value of a condition. If the condition is met, the statements following the condition are executed. If the condition is not met, the statements following the condition are not executed. Conditional macros are written using the following syntax: IF condition = condition (AND/OR)… THEN CLICK, DRAG, AND DRILL statement 1 calculation ELSE (The ELSE section is optional) statement 2 calculation END IF Note: There is no "_" needed at the end of the macro line to wrap the text if using the functions "THEN", "ELSE", or at the end of a calculation or statement. Click, Drag, and Drill Example: IF GLOBJ.TYPE = "RV" THEN TypeTitle = "Revenue" RevenueBudget = RevenueBudget + GLBUDG.BUDGET01 ELSE TypeTitle = "Expense" ExpenseBudget = ExpenseBudget + GLBUDG.BUDGET01 END IF 252 CLICK, DRAG, AND DRILL 253 9.23 Conditional Macro Conditional statements allow you to execute macro activity based on the value of a condition. If the condition is met, the statements following the condition are executed. If the condition is not met, the statements following the condition are not executed. Conditional macros are written using the following syntax: IF condition = condition (AND/OR)… THEN statement 1; calculation; ELSE(The ELSE section is optional) statement 2; calculation; ENDIF Example: IF GLOBJ.TYPE = ‘RV’ THEN TypeTitle = ‘Revenue’; RevenueBudget = RevenueBudget + GLBUDG.BUDGET01; ELSE TypeTitle = ‘Expense’; ExpenseBudget = ExpenseBudget + GLBUDG.BUDGET01; CLICK, DRAG, AND DRILL 254 ENDIF Note: In both Conditional and Unconditional macros, if more than one statement is written, each statement must be concluded with a semicolon. 9.24 Declaration Macro Declaration statements allow users to execute Database Queries based on conditional values. Database statements are used to retrieve one or more attributes (column) from a cluster (table) where that cluster has not beenplaced in the information category, or where the attributes of a cluster do not readily correspond to how the report is designed to function. Examples of the uses of Declarations are: 1. Use a declaration to retrieve Organizational Key Part descriptions where the Group Part Master (table) has not been included in the Information Category. 2. Use a Declaration to retrieve the sum of all n (e.g. Budgets, Actuals, Encumbrances) amounts within a specific Organization Key where certainconditional logic must be met (e.g., not all the encumbrances for a certain Key, but all encumbrances for a certain Key where the Fund equals 101.) 9.25 Six Basic Statements There are six basic statements contained within a single declaration. Theremay be multiples of each statement type. The syntax of the six statements is as follows: declare anyname as dbstmnt Meaning: 'declare' is the term used to identify what user-defined variable 'anyname' will serve 'as' the operative database statement 'dbstmt'. This statement must be executed in the 'declarations' section of the Macros tab. anyname.cluster(CLUSTER); Meaning: 'anyname' is linked to a '.cluster' (note the period before 'cluster'whose actual name (CLUSTER) is contained in parentheses. This name can be the actual TRIAD cluster name, or it can be the name of atable imported into Click, Drag, & Drill using the Table Wizard (for more information about the Table Wizard, see Appendix A). Cluster names must be expressed in the exact syntax as they were imported (e.g. glkey must be expressed as (glkey), while GLKEY must be (GLKEY) and GLKey must be (GLKey).) This statement should be executed in the 'init' section of the Macros tab. anyname.attribute(CLUSTER.ATTRIBUTE,field); OR anyname.attribfunction([sum,min,max,avg],CLUSTER.ATTRIBUTE,field); CLICK, DRAG, AND DRILL 255 Meaning: 'anyname' is linked to a '.attribute' (note the period) whose actual name (CLUSTER.ATTRIBUTE) is expressed in the cluster.attribute format (note the period) and whose value is intended to be placed in a User Defined field ',field'. Note that the means of identification and restrictions on .cluster, above, also apply to .attribute. The statement 'anyname' can also be linked to an Attribute Function 'attribfunction' wherein it is possible to perform one of four SQL functions: 'sum,' (retrieves the sum of all the rows returned by the query) 'min,' (returns the smallest value) 'max,' (returns the largest value) 'avg,' (returns the average value of all rows returned by the query) on the retrieved attribute (CLUSTER.ATTRIBUTE) and to place the derived value into a User Defined field ',field'. This statement should be executed in the 'init' section of the Macros tab. anyname.where("CLUSTER.ATTRIBUTE = CLUSTER.ATTRIBUTE and (CLUSTER.ATTRIBUTE >= 'A7' or CLUSTER.ATTRIBUTE <= 'B1') and CLUSTER.ATTRIBUTE = ?"); Meaning: 'anyname' is linked to a '.where' (note the period) clause thatstates the conditions of the query. The double quotations within the parentheses are required. Within the double quotes, single quotes are used to express literal values. The number of 'and' conditions that can be used are unlimited, however each series of 'or' conditions must be enclosed by its own set of parentheses, as shown above. Database statements run independently of the report itself, variable results will be experienced if the query is not linked back to the report with binding elements. A bind is represented in the '.where' clause syntax as a question mark '?'. It serves to communicate between the macro and the report, "pass me a valid CLUSTER. ATTRIBUTE to use in my query, each time I pass you a '?'. This statement should be executed in the 'init' section of the Macros tab. anyname.bind(1,field); anyname.bind(2,field); Meaning: 'anyname' is bound back to the report '.bind' by a certain key element ',field'. That field can be a CLUSTER.ATTRIBUTE, a System field or a User Defined field. For every question mark '?' used in the '.where' clause, there will be a '.bind' statement and they will be numbered sequentially, as above. This statement should be executed in the 'init' section of the Macros tab. anyname.fetch(); Meaning: 'anyname' is linked to the '.fetch()' statement and becomes an executable query. To summarize the effects of the Declaration macro: a query will go into the database to a certain table and retreive data rows based on certain conditions. Those rows, once retrieved, will populate one or more User Defined fields and can then be manipulated on the report. None of this will occur, or occur correctly, if the '.fetch()' statement is not executed in the correct region of the report. Thus, if you wish the Declaration to execute the query 'anyname' in the Detail region of the report, you must place the 'anyname.fetch();' statement in the Detail section of the Macros tab. CLICK, DRAG, AND DRILL Example 1: Declaration Section declare getkey as dbstmt; CDD Init Macro getkey.cluster("GLKEY"); getkey.attribute("GLKEY.TITLE",KeyTitle); getkey.where("GLKEY.LEDGER=? and GLKEY.KEY=?"); getkey.bind(1,GLBUDACT.LEDGER); getkey.bind(2,GLBUDACT.KEY); Detail Section getkey.fetch(); Example 2: Declaration Section declare GetPartDesc as dbstmt; CDD Init Macro GetPartDesc.cluster(GLKGRP); GetPartDesc.attribute(GLKGRP.DESCL,Desc); GetPartDesc.where("GLKGRP.LEDGER=? and GLKGRP.PART=? and GLKGRP.VALUE=?"); 256 CLICK, DRAG, AND DRILL 257 GetPartDesc.bind(1,GLBUDACT.LEDGER); GetPartDesc.bind(2,PartCode); GetPartDesc.bind(3,PartValue); Group Header For Fund Code PartCode="FUND"; PartValue=GLKEY.PART02; GetPartDesc.fetch(); Example 3: Declare Section GETBUDG.cluster(GLKEY); CDD Init Macro GETBUDG.cluster(GLBUDG); GETBUDG.attribfunction(sum,GLBUDG.BUDGET02,bud1); GETBUDG.attribfunction(sum,GLBUDG.BUDGET03,bud2); 9.26 Function Macro There are four kinds of functions that can be performed by Click, Drag, and Drill™: Compute Functions, Date Functions, IFAS Functions and Procedures. Functions are a short syntactical representation of a useful but complex activity. GETBUDG.attribfunction(sum,GLBUDG.BUDGET04,bud3); GETBUDG.where("GLKEY.LEDGER=GLBUDG.LEDGER and CLICK, DRAG, AND DRILL 258 GLKEY.KEY=GLBUDG.KEY and GLKEY.PART2=? and GLKEY.PART3=? and (GLKEY.PART5 >= '73' or GLKEY.PART5 <= '739')"); GETBUDG.bind(1,GLKEY.PART2); GETBUDG.bind(2,GLKEY.PART3); Group Footer For GLKEY.PART3 GETBUDG.fetch(); Compute Functions NumField = getamount(#,amt1,amt2,...,amt12) The getamount function is used primarily to get encumbrance figures. There are 12 encumbrance accumulators. Each of these contains the outstanding encumbrance as of the end of that fiscal period. The # value passed is a numeric value, i.e. SYSPERIOD, or a numeric user defined field that contains a period from 1 through 12. The amounts are typically GLACT.EN01,...GLACT.EN12. The function returns the #'th amount. This simply eliminates a large IF statement. NumField = computeamount(#,amt1,amt2,...,amt12); The computeamount function is used primarily to compute actual balances. There are 12 actual accumulators. Each one contains the net of the GL transactions posted in that fiscal period. The # value passed is a numeric value, i.e. SYSPERIOD, or a numeric user defined field that contains a period from 1 through 12. The amounts are typically GLACT.ACTUAL01, ...GLACT.ACTUAL12. The function returns the sum of the first #' amounts. This simply eliminates a large IF statement. NumField = SetbudgetsLedgerCode,"GLBUDG.BUDGET01", "GLBUDG.BUDGET02"… "GLBUDG.BUDGET10" CLICK, DRAG, AND DRILL 259 The Setbudgets function is used to initialize the budget value for a computed budget version. There are 10 possible budget versions, any one of which may be the calculated sum of two or more budget versions. Because totals are not stored in the data base, a computed budget version in IFAS is calculated by the system at the moment of display; this feature has merely been replicated for CDD by the Setbudgets Function. Each budget version contains amounts for each budgeted item at all budget levels and across all fiscal periods, thus selection criteria must be used if you wish to see, for instance, only FY97 budgets at the Object Code level. The Ledger Code value passed is the two-character ledger code ID; this may also be the Database Item "LEDGER", or a pre-defined user field. The SYSBUDGETVERSION is a System Field which one may prompt for at run-time; SYSBUDGETVERSION may also be substituted with a two letter Budget Version, or a user-defined field. The amounts are typically GLBUDG.BUDGET01 through GLBUDG.BUDGET10. The function temporarily initializes calculated budgets so that they may be used on the report in the same manner as a hard-coded budget version. This eliminates the need for the user to manually compute budgets. NumField = getifasbudget (LedgerCode, SYSBUDGET VERSION, GLBUDG.BUDGET01 ,GLBUDG.BUDGET02, …GLBUDG.BUDGET10) The getifasbudget function is used to derive the budget value for a prompted budget version. There are 10 possible budget versions. Each version contains amounts for each budgeted item at all budget levels and across all fiscal periods, thus selection criteria must be used if you wish to see only FY97 budgets at the Object Code level. The Ledger Code valuepassed is the two character ledger code ID, this may also be a database item representing ledger, or a pre-defined user field. The SYSBUDGETVERSION is a System Field which one may prompt for at run-time; SYSBUDGETVERSION may also be substituted with a two letter Budget Version, or a user defined field. The amounts are typically GLBUDG.BUDGET01 thru GLBUDG.BUDGET10. The function returns the correct amount for a prompted budget version, within a specific level and budgeted 'object' . This eliminates the need for having separate reports for each budget version. Date Functions Date functions allow one the flexibility to derive useful date values from a single date supplied by the report, for instance the Report Date (expressed as REPORTDATE) or the Current Date (expressed as CURRENTDATE) and to tie those values back to the report in the form of data rows, or selection criteria, or for use in the macro section. In the syntax examples below note that the User Defined field utilized for a particular date function will vary in type between Date and Numeric, depending on the nature of each function. datefield = datefyb(refdate) Get the fiscal year begin date datefield = datefye(refdate) Get the fiscal year end date datefield = datefqtb(refdate) Get the fiscal quarter begin date CLICK, DRAG, AND DRILL datefield = datefqte(refdate) Get the fiscal quarter end date numfield = datefmo(refdate) Get the fiscal month numfield = datefqt(refdate) Get the fiscal quarter numfield = datecyb(refdate) Get the calendar year begin date datefield = datecye(refdate) Get the calendar year end date datefield = datecqtb(refdate) Get the calendar quarter begin date datefield = datecqte(refdate) Get the calendar quarter end date datefield = datemob(refdate) Get the month begin date datefield = datemoe(refdate) Get the month end date numfield = datecom(refdate) Get the calendar month numfield = datecyr(refdate) Get the calendar year numfield = datecqt(refdate) Get the calendar quarter numfield = dateday(refdate) Get day of date numfield = datemonth(refdate) Get month of date numfield = dateyear(refdate) Get year of date numfield = datdaysdiff(date1,date2) Get the number of days between two dates numfield = datemonthsdiff(date1,date2) Get the number of months between two dates numfield = dateyearsdiff(date1,date2) Get the number of years between two dates datefield = dateadddays(date,x) Add x days to date datefield = dateaddweeks(date,x) Add x weeks to date 260 CLICK, DRAG, AND DRILL 261 datefield = dateaddmonths(date,x) Add x months to date datefield = dateaddyears(date,x) Add x years to date 9.27 Misc IFAS Functions field = ifasgetglgen("KEY","S","GL") For the GL ledger, get the Org Key Short description. The ledger code portion is optional, and in most cases would be left off of the statement. The first parameter can be KEY or OBJ, and the second parameter can be 'S' for Short, 'M' for medium or 'L' for long. The value returned is the short, medium or long description of the Org Key or Object Code for the active ledger. field = ifasgetglgenindexed("OBJ",1,"L","GL") For the GL ledger, get the Object Code Part 1 long description. The ledger code portion is optional, and in most cases would be left off of the statement. The first parameter can be KEY or OBJ. The second parameter can be any numeric value from 1 through 8 corresponding to the Org Key or Object part whose description is desired. The third parameter can be 'S' for Short, 'M' of medium or 'L' for long, indicating which description is desired. The value returned is the short, medium or long description of the Org Key or Object code Part. CharField = getkeypart(GLKEY.LEDGER,3,GLKEY.PART03,"1") For the specific Ledger from the report, get the description of Org Key Part 3 with the specified value of 'x' from the report. The first parameter can adatabase item, a user defined field, or a hard coded two-letter Ledger Code value. The second parameter can be any number from 1-10, corresponding to the Key Part desired (if ENTITY is PART03, then the appropriate value would be 3.) The value returned is the description of the Org Key Part Code specified in the third parameter. CharField = getobjpart(GLOBJ.LEDGER,1,GLOBJ.PART01,"1") For the specific Ledger from the report, get the description of Org Key Part 1 with the specified value of 'x' from the report. The first parameter can a database item, a user defined field, or a hard coded two-letter Ledger Code value. The second parameter can be any number from 1-10, corresponding to the Key Part desired (if BAL SHEET is PART01, then the appropriate value would be 1.) The value returned is the description of the Org Key Part Code specified in the third parameter. Writing Macros using VBScript Active Macro Language CLICK, DRAG, AND DRILL 262 CDD now includes the ability for you to use VBScript™ as the macro language for a particular report. CDD lets you decide, on a report-byreport basis, whether to use the traditional CDD macro language or VBScript (ActiveMacro). All macro functions that were previously available in the CDD macro language have been implemented in the ActiveMacro language to better help users make the transition to ActiveMacros. Most of the macros work identically using ActiveMacro as they did using traditional CDD macro language. However, some macros were changed due to differences between the two languages. An ActiveMacro script contains functions, also called procedures or subs. An ActiveMacro function has the following form: Sub MyFunction ' Zero or more function statements MsgBox("Hello form MyFunction") End sub Note that a line preceded by a single quote is a comment line. In the simple example above, the sub called "MyFunction" has a single comment line and a single statement. The statement calls a VBScript function that will display a message box on the screen. In this case, the message will be "Hello From MyFunction" as shown below. CLICK, DRAG, AND DRILL 263 9.28 The Active Macro Language Below you will find and example of a columnar type report that has just been created by the report wizard. The Macros tab has been selected to display the ActiveMacro format. See below: Note that the script is divided into sections. The first section is used to place all global variables. Global variables, like User Defined Variables in a report, can be accessed form any other function. The Global variables section corresponds to the Declarations macro in the standard macro language. The next section is the sub for the pseudo-region called Initialize. This function is called first before any other work is done in the report. The function is only called once and corresponds to the Init Macro in the standard CD macro language. Notice the comment in this section reminding the user where to put their statements that belong to this function. CLICK, DRAG, AND DRILL 264 Each of the other sections in the script correspond to regions of the report. As new regions are added to the report, the sub (Active Macro function) for that region is added at the end of the script. When you select a region from the list of regions at the top of the macro editor, the sub is found, highlighted, and scrolled into view (as shown in the image above by the two highlighted pieces of text on the screen). In our next example, a global variable (declared in the variable declarations section, though you may declare variable anywhere in the script) is created called nCalcBudget. The keyword “dim” indicates to VBScript to allocate a variable. If you have not specified “Option Explicit” in the macros, you may declare variables without using the Dim keyword. CDD inserts the option explicit statement in all new reports because it is slightly more efficient for the VB runtime. In this example, the script also has a sub defined by the user called DoubleBudget. In the sub for the Detail region, the value from GLBUDACT.BUDGET01 is assigned to the global variable nCalcBudget. The script then calls the DoubleBudget function which multiplies nCalcBudget by 2. Note: Since there is one global variable called nCalcBudget the value in nCalcBudget, AFTER the call to Double budget, will be twice the value of GLBUDACT.BUDGET01. CLICK, DRAG, AND DRILL The sub for the Detail region is called automatically by CDD every time the Detail region is processed. Note that the name of the sub is the name of the region as seen in the Region Properties dialog. 265 CLICK, DRAG, AND DRILL As mentioned earlier, when a new region is inserted in a report, CDD will automatically create a sub for us in the ActiveScript. In this example, a new region called MyNewRegion is being inserted into a report. Once this region is inserted, if we were to look at the macro language associated with the report, we would that the ActiveMacro script includes this new region. Note that now when we look at our script, the new sub appears. By clicking the region name in the region list, CDD will automatically find and scroll to the sub in the script editor. 266 CLICK, DRAG, AND DRILL 267 9.29 Macro Language Preferences To specify which language CDD uses for creating and editing macros, select “Edit, Preferences” from the main menu. Choose the Macros tab. The window will appear as in the example below. Specifying the macro language to use for your report is simply a matter of selecting VBScript or Standard CDD Language from the list of Default Languages displayed in this Preferences window. This preference page also allows you to specify whether or not you would like syntax coloring enabled by default and whether a selection margin with (or without) line numbers should be shown. The selection margin provides a simple method to select blocks of text for copying or moving. 9.30 Macro Editor Features The macro editor has been fully redesigned to simplify the writing macros. Features of the macro editor include: CLICK, DRAG, AND DRILL 268 • Enhances multi-language syntax coloring • Selection margin • Line Numbers • Find and Find and Replace • Block indentation • Bookmarks for easily navigating through large macros To enable or disable syntax coloring, the selection margin or line numbers, choose Preferences from the Edit menu and select the Macros page. 9.31 Finding Text To find an occurrence of a string in the text editor, press Ctrl-F while within the editor. The following dialog box will be presented: By default the search is case-insensitive and the search direction is toward the end of the file from the current location of the cursor. If the pattern is not found, the search will wrap around and begin from the top. CLICK, DRAG, AND DRILL 269 9.32 Replacing Text To replace one or more occurrences of a text string, press Ctrl-H while within the editor. The find and replace dialog will be displayed: In this case the text “2” will be replaced with “rowIndex.” You can replace all without prompting by pressing the Replace All. By pressing the Find Next button you can skip one or more occurrence of the find string. CLICK, DRAG, AND DRILL 9.33 Using Bookmarks When editing large macros it is helpful to be able to jump from one location to another with the press of the button; bookmarks provide this capability. In order to set a bookmark you press Ctrl-F2 and a small blue rectangle will appear in the selection margin. Move to the next location that you would like to place a bookmark and press Ctrl-F2 again. You may now jump between the two bookmarks by pressing F2. The picture below shows two bookmarks set in the selection margin and by pressing F2 the user can move from the Dim statements to the PageHeading sub with the press of a button. To clear a bookmark you can press Ctrl-F2 when the cursor is on the same line as the bookmark, or press Ctrl+Shift+F2 to remove all bookmarks. 270 CLICK, DRAG, AND DRILL 271 9.34 Using Scriptlets Scriptlets are snippets of code that are stored in the database for use in one or more reports. One of the primary motivations for using scriptlets is to reduce the need to rewrite the same macro code in multiple reports. Having the macros in one location simplifies the process of making fixes to the code or adding functionality. In addition, a scriptlet can hide the details of the script from the report writer making the report writing process easier. Scriptlets are created using the ActiveX Script Editor program that ships with CDD. The ActiveX Script Editor really only provides a mechanism to edit the scripts and it is necessary to perform most testing while running the reports. The picture below is of the ActiveX Script Editor: CLICK, DRAG, AND DRILL 272 Once a scriptlet has been entered into the editor, you may check the syntax by choosing Compile from the Script menu. When the scriptlet is complete, choose Save from the File menu to insert it into the database. To access a scriptlet from the macros of a report, choose Report Properties from the View menu. Select the Script Reference page from the available pages. (Note the script reference page will only be shown if the report is using Active Macros.) The page below shows the Script Reference page: CLICK, DRAG, AND DRILL 273 In this case we have placed a check alongside MailMergeHelper indicating that this report uses this Scriptlet. This will ensure that the Scriptlet is unloaded with the report and it allows us to see the contents of the Scriptlet in the macro editor using the References combo-box, as shown below. Here we see that MailMergeHelper has been selected and is now shown in the macro editor. The Scriptlet cannot be edited from CDD it can only be viewed. To call the methods in a Scriptlet it is necessary to first create an instance of the Scriptlet using the CreateScriptObject function. CreateScriptObject is used in the following manner: Dim myScriptlet Set myScriptlet = CreateScriptObject(“MyScriptlet”) Note: It is necessary to first declare the variable that will hold the reference to the Scriptlet as done above. In addition be sure to note the use of “Set” to assign the object reference to the variable myScriptet. CLICK, DRAG, AND DRILL Assume that MyScriptlet is defined as follows: Option Explicit Dim g_nErrorCode Function CalcUserPay(nHours, nRate) ‘Do something interesting here CalcUserPay = 2300.00 End Function Once the Scriptlet reference is returned by the call to CreateScriptObject, you could access the member functions and variables as shown below: Dim nPay nPay = myScriptlet.CalcUserPay(HOURS, RATE) if nPay < 0 then MsgBox “Error value “ & myScriptlet.g_nErrorCode endif Scriptlet references are destroyed when one of three events occur: 1 The report ends 2 The variable holding the reference goes out of scope 3 The variable holding the reference is set to Nothing 9.35 ActiveMacro Functions in CDD Known differences between ActiveMacro functions and the traditional macro language functions 274 CLICK, DRAG, AND DRILL 275 1 Due to a VBScript requirement, all underscores have been removed form the ActiveMacro function name. For example, the date function "date_fyb" has been renamed to "datefyb" in the ActiveMacro language. 2 A new function has been added in ActiveMacros called getifasbudgetex. This funciton combines the setbudget and getifasbudget. In the past, a user had to call both of these funcitons, in succession, to get the correct amount for a given budget version. Now that user can simply cal the getifasbudgetex function. 9.36 Function Macros There are four kinds of functions that can be performed by Click, Drag, and Drill™: Compute Functions, Date Functions, IFAS Functions and Procedures. Functions are a short syntactical representation of a useful but complex activity. 9.36.1 Compute Functions NumField = getamount(#,amt1,amt2,...,amt12) The getamount function is used primarily to get encumbrance figures. There are 12 encumbrance accumulators. Each one contains the outstanding encumbrance as of the end of that fiscal period. The # value passed is a numeric value, or a numeric user defined field that contains a period from 1 through 12. The amounts are typically GLACT.EN01,.GLACT.EN12. The function returns the #’th amount. This simply eliminates a large IF statement. NOTE: This function works the same in both ActiveMacro and the traditional macro language. NumField = computeamount(#,amt1,amt2,...,amt12) The computeamount function is used primarily to compute actual balances. There are 12 actual accumulators. Each one contains the total GL transaction amount posted in that fiscal period. The # value passed is a numeric value, or a numeric user defined field that contains a period from 1 through 12. The amounts are typically GLACT.ACTUAL01,.GLACT.ACTUAL12. The function returns the sum of the first #’ amounts. This simply eliminates a large IF statement. NOTE: This function works the same in both ActiveMacro and the traditional macro language. setbudgets LedgerCode , “GLBUDG.BUDGET01” , “GLBUDG.BUDGET02”, “GLBUDG.BUDGET03”, “GLBUDG.BUDGET04”, “GLBUDG.BUDGET05”, “GLBUDG.BUDGET06”, “GLBUDG.BUDGET07”, “GLBUDG.BUDGET08”, “GLBUDG.BUDGET09”, “GLBUDG.BUDGET10” The setbudgets function is used to initialize the budget value for a computed budget version. There are 10 possible budget versions, any one of which may be the calculated sum of two or more budget versions. A computed budget version in IFAS is calculated by the system at the moment of display; this feature has merely been replicated for CDD by the Setbudgets Function. Each budget version contains amounts for each budgeted item at all budget levels and across all fiscal periods, thus selection criteria must be used if you wish to see, for instance, only CLICK, DRAG, AND DRILL 276 FY97 budgets at the Object Code level. The Ledger Code value passed is the two-character ledger code ID; this may also be the Database Item “LEDGER”, or a pre-defined user field. The SYSBUDGETVERSION is a System Field which one may prompt for at run-time; SYSBUDGETVERSION may also be substituted with a two letter Budget Version, or a user-defined field. The amounts are typically GLBUDG.BUDGET01 through GLBUDG.BUDGET10. The function temporarily initializes calculated budgets so that they may be used on the report in the same manner as a hard-coded budget version. This eliminates the need for the user to manually compute budgets. NOTE: This function does not work the same in ActiveMacros as it does in traditional macros. The names of the fields that contain the budget amounts must be passed in to the function. This means you must put quotes around the field name as shown in the function description above. Also note that since this function does not return a value, it is improper to use parentheses around the parameter list (for more information on this refer to a VBScript reference looking under procedure types and the Call statement). NumField = getifasbudget (LedgerCode, SYSBUDGET VERSION, _ GLBUDG.BUDGET01, GLBUDG.BUDGET02, _ GLBUDG.BUDGET03, GLBUDG.BUDGET04, _ GLBUDG.BUDGET05, GLBUDG.BUDGET06, _ GLBUDG.BUDGET07, GLBUDG.BUDGET08, _ GLBUDG.BUDGET09, GLBUDG.BUDGET10) The getifasbudget function is used to derive the budget value for a prompted budget version. There are 10 possible budget versions. Each version contains amounts for each budgeted item at all budget levels and across all fiscal periods, thus selection criteria must be used if you wish to see only FY97 budgets at the Object Code level. The Ledger Code value passed is the two character ledger code ID, this may also be a database item representing ledger, or a pre-defined user field. The SYSBUDGETVERSION is a System Field which one may prompt for at run-time; SYSBUDGETVERSION may also be substituted with a two letter Budget Version, or a user defined field. The amounts are typically GLBUDG.BUDGET01 thru GLBUDG.BUDGET10. The function returns the correct amount for a prompted budget version, within a specific level and budgeted ‘object’ . This eliminates the need for having separate reports for each budget version. NumField = getifasbudgetex (LedgerCode, SYSBUDGETVERSION, "GLBUDG.BUDGET01", , "GLBUDG.BUDGET02", "GLBUDG.BUDGET03", "GLBUDG.BUDGET04", "GLBUDG.BUDGET05", "GLBUDG.BUDGET06", "GLBUDG.BUDGET07", "GLBUDG.BUDGET08", "GLBUDG.BUDGET09", "GLBUDG.BUDGET10") The getifasbudgetex function combines the functionality of "setbudgets" with the functionality of "getifasbudget". Now instead of performing a two step process of calling "setbudgets" followed by "getifasbudget", the user can simply make a single call to "getifasbudgetex". Note that the "ex" at the end of the function name indicates that this function has extended functionality. NOTE: As with the other two budget functions, the names of the fields that contain the budget amounts must be passed in to the function. This means you must put quotes around the field name as shown in the function description above. 9.37 Date Functions Date functions allow one the flexibility to derive useful date values from a single date supplied by the report, for instance the Report Date (expressed as REPORTDATE) or the Current Date (expressed as CURRENTDATE) and to tie those values back to the report in the form of CLICK, DRAG, AND DRILL 277 data rows, or selection criteria, or for use in the macro section.. In the syntax examples below note that the User Defined field utilized for a particular date function will vary in type between Date and Numeric, depending on the nature of each function. NOTE: All date functions work the same in both ActiveMacro and the traditional macro language. NOTE: These functions work the same in both ActiveMacro and the traditional macro language. datefield = datefyb(refdate); Get the fiscal year begin date datefield = datefye(refdate); Get the fiscal year end date datefield = datefqtb(refdate); Get the fiscal quarter begin date datefield = datefqte(refdate); Get the fiscal quarter end date numfield = datefmo(refdate); Get the fiscal month numfield = datefqt(refdate); Get the fiscal quarter numfield = datefy(refdate); Get the fiscal year datefield = datecyb(refdate); Get the calendar year begin date datefield = datecye(refdate); Get the calendar year end date datefield = datecqtb(refdate); Get the calendar quarter begin date datefield = datecqte(refdate); Get the calendar quarter end date datefield = datemob(refdate); Get the month begin date datefield = datemoe(refdate); Get the month end date numfield = datecom(refdate); Get the calendar month numfield = datecyr(refdate); Get the calendar year numfield = datecqt(refdate); Get the calendar quarter numfield = dateday(refdate); Get day of date CLICK, DRAG, AND DRILL 278 numfield = datemonth(refdate); Get month of date numfield = dateyear(refdate); Get year of date numfield = datedaysdiff(date1,date2); Get the number of days between two dates numfield = datemonthsdiff(date1,date2); Get the number of months between two dates numfield = dateyearsdiff(date1,date2); Get the number of years between two dates datefield = dateadddays(date,x); Add x days to date datefield = dateaddweeks(date,x); Add x weeks to date datefield = dateaddmonths(date,x); Add x months to date datefield = dateaddyears(date,x); Add x years to date Misc IFAS Functions field = getglgen(“KEY”,”S”,”GL”); For the GL ledger, get the Org Key Short description. The ledger code portion is optional, and in most cases would be left off of the statement. The first parameter can be KEY or OBJ, and the second parameter can be ‘S’ for Short, ‘M’ for medium or ‘L’ for long. The value returned is the short, medium or long description of the Org Key or Object Code for the active ledger. NOTE: This function works the same in both ActiveMacro and the traditional macro language. field = ifasgetglgenindexed(“OBJ”,1,”L”,”GL”); For the GL ledger, get the Object Code Part 1 long description. The ledger code portion is optional, and in most cases would be left off of the statement. The first parameter can be KEY or OBJ. The second parameter can be any numeric value from 1 through 8 corresponding to the Org Key or Object part who’s description is desired. The third parameter can be ‘S’ for Short, ‘M’ of medium or ‘L’ for long, indicating which description is desired. The value returned is the short, medium or long description of the Org Key or Object code Part. NOTE: This function works the same in both ActiveMacro and the traditional macro language. CharField = getkeypart(GLKEY.LEDGER,3,GLKEY.PART03,'1'); CLICK, DRAG, AND DRILL 279 For the specific Ledger from the report, get the description of Org Key Part 3 with the specified value of ‘x’ from the report. The first parameter can a database item, a user defined field, or a hard coded two-letter Ledger Code value. The second parameter can be any number from 1-10, corresponding to the Key Part desired (if ENTITY is PART03, then the appropriate value would be 3.) The value returned is the description of the Org Key Part Code specified in the third parameter. NOTE: This function works the same in both ActiveMacro and the traditional macro language. CharField = getobjpart(GLOBJ.LEDGER,1,GLOBJ.PART01,'1'); For the specific Ledger from the report, get the description of Org Key Part 1 with the specified value of ‘x’ from the report. The first parameter can a database item, a user defined field, or a hard coded two-letter Ledger Code value. The second parameter can be any number from 1-10, corresponding to the Key Part desired (if BAL SHEET is PART01, then the appropriate value would be 1.) The value returned is the description of the Org Key Part Code specified in the third parameter. NOTE: This function works the same in both ActiveMacro and the traditional macro language. 9.38 Other Active Macro Features 9.38.1 Active Print Conditions Active Macros offer a method of performing print conditions that require more complex calculations. It is possible to add a function to the Active Macros that will be called prior to each formatting on the region. The function name is composed of the region name + “_CanPrint()”. Note that the standard print condition can still be used and if it fails then the Active print condition will not be executed. For example, assume you wanted to perform a database query to determine if the Detail region should print. You could add the following function to the macros to serve as the print condition: Function Detail_CanPrint() Dim myCursor Set myCursor = CreateSQLCursor myCursor.sql = “select count(*) nRecords from si_obj_dtl _ where si_id = ‘” & OJB_ID & “’” myCursor.MoveNext if myCursor.nRecords > 0 then CLICK, DRAG, AND DRILL 280 Detail_CanPrint = vbTrue else Detail_CanPrint = vbFalse end if End Function This function declares an SQLCursor that then fetches the number of records from the imaginary table si_obj_dtl where the si_id is equal to the value in OBJ_ID (a report field). If the number of records is greater than 0 then the function returns vbTrue to indicate that the region should be printed. Another use of the _CanPrint print condition is to execute macros that you would like to execute regardless of whether you want the region to format. CDD by default does not execute the macros of a region that is not going to be formatted. By performing the macros in the print condition rather than the regions sub routine and then returning true or false, you ensure that the code is executed and the print condition enforced. 9.38.2 Active Script Drills By defining a sub routine is the reports script that is composed of the item name + “_DoubleClick” you can perform operations when the field is double-clicked. A possible use of this would be to send e-mail to a person when their e-mail address is double-clicked in a report. The following example will send mail using Microsoft Outlook 98: Sub ID_DoubleClick sMsg = "Would you like to send e-mail to " & EMPMSTR.NAME If MsgBox(sMsg, vbYesNo, "Send E-Mail?") = vbYes Then Call SendMail() End If CLICK, DRAG, AND DRILL End Sub Function SendMail() If Len(EMPMSTR.E_MAIL) <= 0 Then MsgBox "No e-mail address for " & EMPMSTR.NAME Exit Function End If Set oOutlook = CreateObject("Outlook.Application") Set myItem = oOutlook.CreateItem(0) myItem.Subject = "Meeting Request" Set recips = myItem.Recipients recips.Add(EMPMSTR.E_MAIL) If Not recips.ResolveAll Then For Each recip In recips If Not recip.Resolved Then MsgBox recip.Name End If Next End If 281 CLICK, DRAG, AND DRILL 282 ‘This is where the content of the message should be placed myItem.Body = "Testing" Set ins = myItem.GetInspector() ins.Display (False) End Function 9.38.3 Passing Parameters to a Drill Down Report To facilitate passing the state of a drill-from report, an object called “ParentReport” is initialized in drill-to reports. This allows a report that has been drilled-to to query the parent report’s data row for information regarding the state of the report at the time of the drill. Example: A report has the user-defined fields SAL_AVERAGE, DEDUCTIONS, FICA_AMT and a user performs a drill down to a report that is using Active Macros. The report that has been drilled to can get the value of SAL_AVERAGE by using the following statement: localAverage = ParentReport.SAL_AVERAGE It is important to note that the value of SAL_AVERAGE is the value that the user defined field had when the row that contained the drill field was formatted. Accessing the Active Macros of a Report’s Query Methods and data members declared in the macros of a reports information category can be accessed at runtime by prefixing the function or member with reserved word “Query”. This is useful for writing functions that reside at the category level and can be used across multiple reports. It allows the category designer to write macros that make sense for the information category. Example: CLICK, DRAG, AND DRILL 283 Suppose an information category has the following macros: Sub OnEachRow ‘This sub is called each time a new data row is fetched End Sub Function GetCSZ() GetCSZ = EMPMSTR.CITY & “, “ & EMPMSTR.STATE_CD & “ “ & EMPMSTR.POSTAL_CODE End Function A report based upon this information category could call the function GetCSZ by using the following syntax: localCSZ = Query.GetCSZ 9.38.4 Automating Other Applications Many applications support what is known as an Automation interface, which allows other applications to control the behavior of the application to accomplish some task. We saw an example of this above when CDD used Microsoft Outlook to send e-mail. In addition to Outlook, Microsoft Excel supports automation and can be automated using Active Macros to export data directly to an Excel spreadsheet. The following brief example will show how CDD can export directly to Excel. The macro code below will create an instance of Microsoft Excel when the report is initialized. When each detail row is formatted the fixed asset id, description and purchase amount will be written out to the active Excel worksheet. Dim excelApp Dim rowIndex rowIndex = 1 Sub Initialize CLICK, DRAG, AND DRILL Set excelApp = CreateObject("Excel.Application") If IsObject(excelApp) Then excelApp.Workbooks.Add excelApp.visible = vbTrue End If End Sub Sub Detail If IsObject(excelApp) Then excelApp.Cells(rowIndex, "A") = FAIDNT.FAID excelApp.Cells(rowIndex, "B") = FAIDNT.F_DESC excelApp.Cells(rowIndex, "C") = FAIDNT.PURCHAMT rowIndex = rowIndex + 1 End If End Sub Note: ExcelApp is checked to ensure that it is a valid object prior to writing values to the cells. Most popular applications support automation and the documentation for the application is question should be consulted for information on how to manipulate the objects that are exposed. 284 CLICK, DRAG, AND DRILL 285 10 Drill Down Drill downs in CDD are used to connect information in one report to information in another report. This information might be based on retrieving more detailed or more refined data, or simply as a tool to relate one report to another. 10.1 What is a Drill Down? When a report is run to the screen, a drill down allows you to instantly view underlying information by “drilling down” to it. “Pop-up” prompts may be designated to occur prior to the drill down so that the path of the drill down is viewed as you go. For example, if Report A presents information about employees sorted by hire date but does not display salary information and Report B presents the same list of employees with salary information, a drill down might be created based on the employees’ Social Security Number to take you from Report A to Report B so that salary information can be reviewed. 10.2 Creating a Drill Down Creating a drill down involves: • Defining the layout of the drill down report • Establishing the drill down path by linking the two reports The following procedure describes how to define a drill down. In the examples, we will be defining a drill down from a name and address to a phone number report. This drill down will allow a user to double-click on a name and instantly view the associated phone number. CLICK, DRAG, AND DRILL In the following example, the PE Addresses Report has been run to the screen. To create a drill down, right-click on the data element for which the drill down is being defined. The drill options pop-up will appear. To access the Drill To Report window, select Add Drill Down. 286 CLICK, DRAG, AND DRILL 287 The Drill To Report window allows you to choose the report to which you want the drill down to lead. After you have chosen the report, click OK to access the Drill Down window. The next decision to be made in establishing a drill down is selection criteria. To add selection criteria, click Add. The Report Item window will be displayed. CLICK, DRAG, AND DRILL Choose a table and field upon which to base the selection criteria. The Report Item window also allows you to make decisions about the Relational Operator and the Response Type. For example, the selection criteria can be based on the PEID being equal to the “drill field” on both reports. Once selection criteria has been defined, click Next. The Report Item window will next direct you to select the field to which you are establishing the relationship. 288 CLICK, DRAG, AND DRILL 289 Choose the field to relate (i.e., “Select PE_ID where PE_ID is equal to PE_ID”). After making this selection, click Finish. The Drill Down window will be displayed showing the newly defined selection criteria. Once you are finished creating selection criteria for your drill down, click OK. You will be returned to the main CDD window where the report for which you defined the new drill down will be displayed. Click Save to finish creating the new drill down. The Save Drill Definition window will appear. CLICK, DRAG, AND DRILL 290 Note: From the Drill Down window you can choose to load existing drill downs. In this way you can apply previously defined drill downs to the report you are currently working on. (Naturally, multiple drill downs can be defined for a single report.) To load existing drill downs, click Load. The Load Drill Down window will be displayed as in the example below. Any existing drill downs will be displayed in the Load Drill Down window. Assign the new drill down a name and click OK. You will be returned to the Drill Down window where you can establish additional selection criteria if desired. 10.3 Using Drill Down The first step in making use of an existing drill down is to run the report from which the drill down is to occur. Direct the system to display the report to the screen. For more information on how to run a report, refer to Section 4, “Running Reports”. CLICK, DRAG, AND DRILL 291 In the following example, the PEAddresses Report is being run. Use the mouse to position the cursor on the data element for which the drill down is to be performed. The cursor may appear as a magnifying glass, a drill, a camera, a magnifying glass and camera, or a drill and camera, depending on what type of drills lay behind the item on the screen. Any cursor with a magnifying glass or drill indicates that a report can be drilled to by double clicking on the item. Note: You have two choices in the look of the pointer when accessing a drill down. By default the pointer becomes a magnifying glass, as described above. To change the magnifying glass to a drill, select “Edit, Preferences” from the main menu. Choose the Report tab and select Drill. You will need to restart CDD for this change to take effect. The magnifying glass (or drill) pointer indicates that a drill down report is defined for that data element. Double-click on the data element and the drill down report will be displayed as in the example below. Note: Multiple drill downs may have been defined for a single data element. When more than one drill down has been defined for a particular data element, a list of drill names is displayed. Select the particular drill down desired. If only one drill down has been defined, right-click on the data element to view the drill options pop-up menu which provides you with three choices: Add Drill Down..., View Drill Downs... and Drill Down.... CLICK, DRAG, AND DRILL After reviewing the drill down information presented, you may drill down to another level, or return to the original report. 292 CLICK, DRAG, AND DRILL 293 11 Load/Unload Reports 11.1 Introduction The Load/Unload feature of CDD allows you to move reports from database to database. This means that a report created by one user can be "ported" to another location, applied to the same database in that location and executed by a second user. First, CDD reports are unloaded, meaning that the report along with its Information Category are stored in a data file, either on a network drive or on a floppy diskette. Unloaded reports can then be loaded in the new location. Typically, this new location will either be a different database connection at the same site, or a different database connection at a different site. The Load/Unload feature is useful when one report is to be run from more than one location. For example, many clients have opted to have custom reports developed by SunGard Bi-Tech. CDD Developers will typically create these reports using a database internally accessible until the report is ready to be tested by the Client. When "unloaded," these reports can be sent to the end user who can in turn "load" them onto the database at their site. To access the Load/Unload feature, select "Tools, Load/Unload" from the main CDD menu. You will be given the option to either Load or Unload a report. Also, its important to remember that access to the Load/Unload feature can be granted or denied based on the user's Security Roles. (see the System Administrator Guide for more information on Security Roles) 11.2 Unloading CDD Reports Once the "Unload" menu option is selected the "Unload Wizard" is activated. This process will help the user make all the decisions necessary to create a CDD Load File. By clicking "Next" on any given page will advance to the next required decision. Using the "Back" button will allow prior decisions to be reevaluated. Once all required decisions are entered the user will be shown the "Finish" button and can begin creating the file at that point. The "Cancel" button can be used to abort this process at any time without any adverse effects. CLICK, DRAG, AND DRILL 11.2.1 294 Step 1: Select Reports to Unload The first step in the process allows the user to select the CDD Report Designs desired. By clicking the checkbox to the left of any Report ID will add that report to the list of reports to be unloaded. A range of reports can be checked at once by left-clicking on the first report in a desired group, holding down the shift key, selecting the last report in the group and clicking the checkbox of any item in the selected group. Similar steps can be used with the control key to select different reports throughout the list or to un-select reports in the group prior to using the checkbox. Once all of the desired reports are selected the "Next" button can be used to advance to the next page. Note: the user is not required to select any reports at all. If the intent is to create an unload file with data other than Report designs the "Next" button can be selected to move on to the next step of the process. CLICK, DRAG, AND DRILL 11.2.2 295 Step 2: Select Scriptlets to Unload This page allows the user to select the Scriptlets to be included in the Unload file. By default the Unload Wizard will select Scriptlets associated with reports selected in the previous page. Any additional Scriptlets desired can be checked and included in the process as well. If the user does not wish to unload the selected Scriptlets, they can either be un-selected individually or grouped and unselected by holding down the control key, selecting the Scriptlets and un-checking any one in the group. CLICK, DRAG, AND DRILL 11.2.3 296 Step 3: Select Categories to Unload This page allows the user to select the Categories to be included in the Unload file. By default the Unload Wizard will select Categories associated with reports selected in the Report page. Any additional Categories desired can be checked and included in the process as well. If the user does not wish to unload the selected Categories, they can either be un-selected individually or grouped and unselected by holding down the control key, selecting the Categories and un-checking any one in the group. CLICK, DRAG, AND DRILL 11.2.4 297 Step 4: Select Tables to Unload This page allows the user to select the Table Definitions to be included in the Unload file. By default the Unload Wizard will select Tables associated with categories selected in the previous page. Any additional Tables desired can be checked and included in the process as well. If the user does not wish to unload the selected Tables, they can either be un-selected individually or grouped and unselected by holding down the control key, selecting the Tables and un-checking any one in the group. CLICK, DRAG, AND DRILL 11.2.5 298 Step 5: Select Unload File This page allows the user to select the destination of the Load File. The button to the right of the "Load File" edit box will open the File Dialog and allow the user to select the directory and file name of their choice. If a file name is entered that does not already exist in that directory the file will be created by the process and the desired items loaded into it. If an existing load file is selected the contents of that file are increased to include the items selected by this process. Its important to remember that items unloaded with the same name (Report ID, etc.) will replace the version already in the file. When the desired filename is selected the user can click the "Finish Button" to begin the process. The following page will give a graphical representation of the progress of this unload. Once the process is complete the Unload Wizard will close and return control of CDD to the User. 11.3 Loading CDD Reports Once the "Load" menu option is selected the "Load Wizard" is activated. This process will help the user make all the decisions necessary to Load items from the desired source into the currently selected database connection. By clicking "Next" on any given page will advance to the next required decision. Using the "Back" button will allow prior decisions to be reevaluated. Once all required decisions are entered the user CLICK, DRAG, AND DRILL 299 will be shown the "Finish" button and can begin loading the desired file contents at that point. The "Cancel" button can be used to abort this process at any time without any adverse effects. 11.3.1 Step 1: Select Load File This page allows the user to select the desired Load File. The button to the right of the "Load File" edit box will open the File Dialog and allow the user to select the directory and file name the desired Load File. The Native file format for the Load Wizard are files with the ".czf" (CDD Zip Format) file extension. In order to support the previous Load File versions the user selects a file with the ".cdd" file extension the Load Wizard will switch to the Legacy Load option and the following steps will not apply. Also, the Load Wizard will only prompt for items that are actually found in the file. Example: if there are no reports in the file that step is automatically skipped. CLICK, DRAG, AND DRILL 11.3.2 300 Step 2: Select Reports to Load If the Load File contains report designs the next step in the process allows the user to select the CDD Report Designs desired. By clicking the checkbox to the left of any Report ID will add that report to the list of reports to be loaded. A range of reports can be checked at once by leftclicking on the first report in a desired group, holding down the shift key, selecting the last report in the group and clicking the checkbox of any item in the selected group. Similar steps can be used with the control key to select different reports throughout the list or to un-select reports in the group prior to using the checkbox. Once all of the desired reports are selected the "Next" button can be used to advance to the next page. Note: the user is not required to select any reports at all. If the intent is to not load any of the reports in the Load File the "Next" button can be selected to move on to the next step of the process. CLICK, DRAG, AND DRILL 11.3.3 301 Step 3: Select Destination Folder for Reports If the user selects one or more reports from the previous step they will be prompted for the desired location of the reports. This will assign all selected reports in the file to the selected folder. CLICK, DRAG, AND DRILL 11.3.4 302 Step 4: Select Scriptlets to Load This page allows the user to select the Scriptlets to be loaded. By default the Load Wizard will select Scriptlets associated with reports selected in the report page. Any additional Scriptlets desired can be checked and included in the process as well. If the user does not wish to load the selected Scriptlets, they can either be un-selected individually or grouped and unselected by holding down the control key, selecting the Scriptlets and un-checking any one in the group. CLICK, DRAG, AND DRILL 11.3.5 303 Step 5: Select Categories to Load This page allows the user to select the Categories to be loaded. By default the Load Wizard will select Categories associated with reports selected in the Report page. Any additional Categories desired can be checked and included in the process as well. If the user does not wish to load the selected Categories, they can either be un-selected individually or grouped and unselected by holding down the control key, selecting the Categories and un-checking any one in the group. CLICK, DRAG, AND DRILL 11.3.6 Step 6: Select Destination Folder for Categories If the user selects one or more categories from the previous step they will be prompted for the desired location of the categories. This will assign all selected reports in the file to the selected folder. 304 CLICK, DRAG, AND DRILL 11.3.7 305 Step 7: Select Tables to Load This page allows the user to select the Table Definitions to be loaded. By default the Load Wizard will select Tables associated with categories selected in the category page. Any additional Tables desired can be checked and included in the process as well. If the user does not wish to load the selected Tables, they can either be un-selected individually or grouped and unselected by holding down the control key, selecting the Tables and un-checking any one in the group. When the last decision is made the user can click the "Finish Button" to begin the process. The following page will give a graphical representation of the progress of this load. Once the process is complete the Load Wizard will close and return control of CDD to the User. 11.4 Load Conflicts When the Load Wizard attempts to load a Report, Scriptlet, Category or Table from the file into the Database it first checks to see if that item already exists. If it does then the user must make a decision on how to resolve the conflict. The Following describes the different actions available to the user. CLICK, DRAG, AND DRILL 306 11.5 Apply vs. Apply to All For each conflict the user has the option to either apply the decision to just that Item or apply that decision to all items of the same type. Once the "Apply to All" is selected the decision selected will be used for all other conflicts for that type of item without prompting the user. Example: Choosing "Replace" and "Apply to All" on the Report conflict will replace the one in the system catalog with the version in the Load file and will replace any other conflicts with the Load File version as well. 11.5.1 Report Conflict If the report being loaded has the same Report ID as one already in the database the user will be prompted with one of three options. Keep - This option will skip that Report from the Load File and continue on to the next item in the list. Replace - This option will replace the version in the system catalog with the one in the Load File. Note: requires Delete and Write permission on "CDD Reports" in Functional Security. (see System Administrator for more information on Security Roles) Rename - This option allows the user to select a Report ID not already in use in the system catalog and change the Load File's version to use a new Report ID. After the load process the new Report ID can be opened and saved. The user will also be informed that they have opened a renamed report the next time the report designed is opened. Note: requires Write permission on "CDD Reports" in Functional Security. (see System Administrator for more information on Security Roles) CLICK, DRAG, AND DRILL 307 11.6 Scriptlet Conflict If the Scriptlet being loaded has the same ID as one in the system catalog the user will be prompted for one of two options. Keep - This will skip the Scriptlet from the Load File and continue on to the next item in the list. Replace - This option will replace the version in the system catalog with the one in the Load File. 11.7 Category Conflict If the Category being loaded has the same ID as one in the system catalog the user will be prompted for one of two options. Keep - This will skip the Category from the Load File and continue on to the next item in the list. Replace - This option will replace the version in the system catalog with the one in the Load File. Note: requires Delete and Write permission on "Information Categories" in Functional Security (see System Administrator for more information on Security Roles). CLICK, DRAG, AND DRILL 308 11.8 Table Conflict If the Table Definition being loaded has the same Name as one in the catalog and differs significantly the user will be prompted for one of three options. Keep - This will skip the Table in the Load File and continue on to the next item in the list. Replace - This option will replace the version in the system catalog with the one in the Load File. Note: requires Delete and Write permission on "Table Definitions" in Functional Security. (see System Administrator for more information on Security Roles) Merge - This option will compare the version in the system catalog and the one in the Load File and add any columns found in the new version that are not already in the system catalog. The "Details" button can be clicked to view the difference between the two versions. Note: requires Update permission on "Table Definitions" in Functional Security. (See System Administrator for more information on Security Roles.) CLICK, DRAG, AND DRILL 309 12 FAQs 12.1 FAQ: HOW DO I MANAGE CDD REPORT FILE STORAGE ON THE 7I SERVER? Details: KB ID 6544 CDD Reports run in 7i are created as XML files. One file is created for the report request and one file is created for each page in the report. Extended Text: Details: CDD reports in 7i are created as XML files that are stored on the 7i server. The files are placed in a directory designated in the registry on 7i server. Specifically, the registry key that holds the storage location information is: HKEY_LOCAL_MACHINE\SOFTWARE\BiTech\Report Processing Service\FileStoragePath The value in this registry key is the directory on the 7i server where the CDD report files are stored. If you look in that directory you will see a set of folders with names like "{FA616E8A-1A5C-4673-BAE9-39D407F616CB}". These directories correspond directly to the report that is executed in 7i. If you look at the URL in the report output window in 7i (see screen shots in attached document) you will notice that the URL includes both a Storage and Report tag. The Report tag is shown as being equal to the Folder name where the report files are stored. For example, for this report output URL: http:||ifasfarm/ifas7/CDD/ReportFrame.aspx?Report={C097DC7D-AF32-4A06-B293-CF9D9CF24E0A}&Storage=FARM1&Page=1 You can see the the 7i server is "ifasfarm" and the report GUID is "{C097DC7D-AF32-4A06-B293-CF9D9CF24E0A}". Given that information, plus the value of FileStoragePath on the 7i server, you can then open the directory the corresponds to this specific report and view the associated data files. For each report folder, you will see two distinct file classes. One class, called "request.xml" consists of the report request that was received by 7i. CLICK, DRAG, AND DRILL 310 This includes information such as the user's IFAS ID, Ledger preference, Connection name, as well as the report specific information such as report ID and selection criteria prompt name and values (if any). In addition to the request.xml file you will see one or more .xml files called "report_n.xml", where the "_n" is the number that corresponds to the page in the CDD report. For example, report99.xml is the data file that corresponds to page 99 of the CDD report. These report page files contain all the data and layout information required for 7i to display a page in a CDD report. Additional Information: Often times CDD report troubleshooting can be aided by looking at the folders and files in the FileStoragePath on the 7i server. You can confirm that the directory is being created. You can confirm that the report request is being created and you can confirm the values in the request file. You can also look at individual pages for content, including fields that have report or images drills attached. See other related KB articles for more information about troubleshooting CDD reports, both thick client and 7i server (thin client). 12.2 FAQ: WHAT REGISTRY SETTINGS ARE AVAILABLE FOR CDD? Details: KB ID 3472 Where can I get a list of obscure CDD Registry values? ( FooterOnEof , DefaultFaceName , DefaultPoint , FaceName , MaxDisplayLen , MaxReports , MaxDesigns , MaxCategories , Optimize , Explain ) Extended Text: Obscure CDD Registry Values There are some (not many) CDD settings that can be affected by registry entries that don't necessarily appear in the Preferences information. Please remember that it can be very dangerous to make changes to the Windows registry. If you are unsure about making these changes please contact the IS department at your site. The following are all found in the HKCU\Software\BiTech\CDD section of the registry. Report Execution Config\FooterOnEof - DWORD Value CLICK, DRAG, AND DRILL 311 Description: Forces Page footer at the end of report. Theoretically this should be the default, but this setting can be used to force that behavior. values: 0 (default) = Don't force 1 = Force Footer NOTE: To force it in 7i, the same path applies but use HKEY_LOCAL_MACHINE instead of HKCU Report Design Font\DefaultFaceName - String Value Description: Changes the default font name to use when creating new CDD reports. Must be a valid windows font name. values: "Times New Roman" (Default) Font\DefaultPoint - DWORD Value Description: Chagnes the defult font size to use when creating new CDD reports. Values: 10 (Default) Macro Editor Editor\FaceName - String Value CLICK, DRAG, AND DRILL Description: The font name to be used in the Macro Edtor. Must be a valid windows font name. values: "Courier New" (default) *Note: Font size is controllable in the preferences Field Size Settings\MaxDisplayLen - DWORD Description: Changes the size limit for Report Fields (User Defined-Fields, etc.) that can be set in the property page. Note: this is merely controls the validation done by the property page. Recent Files RecentFiles\MaxReports - DWORD Description: Changes the number of items that will be recorded in the "Recent Reports" menu. values: Default value is based on the Windows "Most Recent File" setting. (probably 4) RecentFiles\MaxDesigns - DWORD Description: Changes the number of items that will be recorded in the "Recent Designs" menu. values: Default value is based on the Windows "Most Recent File" setting. (probably 4) RecentFiles\MaxCategories - DWORD Description: Changes the number of items that will be recorded in the "Recent Categories" menu. values: 312 CLICK, DRAG, AND DRILL Default value is based on the Windows "Most Recent File" setting. (probably 4) Database Config\Optimize - String Value Description: Sets the optimizer statement for Informix sessions. Please consult your site's DBA before using these settings. Values: "NOT_SET" (Default) = No optimizer value to be used "HIGH" = Send "set optimization high" to informix "LOW" = Send "set optimizer low" to informix Config\Explain - DWORD Value Description: Turns on tracing for the CDD connection. For Oracle it uses "ALTER SESSION SET SQL_TRACE TRUE" and for Informix it uses "set explain on". This has no effect on SQL Server. Note: Informix setexplain.out file will probably be build in the \openlink\bin directory on the server. values: 0 (Default) = No tracing 1 = Start tracing when report runs 12.3 FAQ: HOW DO I ENABLE SQL TRACING IN CDD? Extended Text: KB ID 3615 313 CLICK, DRAG, AND DRILL 314 The following document applies to CDD versions 7.2.3.145 and 7.3.1.231 and later. This feature requires that you not only be able to modify the registry but that you also have access to telnet to the UNIX host in order to retrieve the information. SQL tracing is only recommended as a trouble-shooting mechanism and should not be left on long term due to performance and UNIX file system implications. Over the years there have been a number of creative methods of enabling tracing for CDD reports. The following is the recommended method of enabling SQL tracing of the Report Query in CDD. Enabling Tracing In the registry locate the following registry keys: On the 7i Server: HKLM\Software\Bitech\CDD\Config On the Client PC: HKCU\Software\Bitech\CDD\Config Add a DWORD named "Explain" and set it to 1. (1 = enabled, 0 = disabled) Once that registry key is tracing will be enabled the next time you run a report. To disable tracing you will need to change that registry key back to zero (0) and shutdown any active instances of CDD. Locating the Resulting Trace Information ORACLE If CDD is running against ORACLE essentially this registry entry causes CDD to send a "ALTER SESSION SET SQL_TRACE TRUE" to the database to enable tracing. Log into the UNIX host and use SQLPlus to connect to the database. Run "show parameters" and locate the USER_DUMP_DEST parameter. Exit SQLPlus and change directories to the parameter found in the above step. There should be a file in that directory that is named ora_<your session id>.trc. You can probably use the time-stamp on the file to determine which one is the trace file from your report. The .trc files created are cryptic, and require that the tkprof utility be run against them to produce readable output. To do this, change to the USER_DUMP_DEST directory where the .trc files have been created. Find the .trc file and run tkprof: "tkprof <trace file> sys=no explain=/". CLICK, DRAG, AND DRILL 315 You will then be prompted for the output destination and output file name. Typically one would choose the /tmp directory with a filename of one’s choosing. INFORMIX If CDD is running against INFORMIX essentially this registry setting causes CDD to send a "set explain on" to the database to enable tracing. Log into the UNIX host and change directories to the OpenLink bin directory. Locate the SQEXPLAIN.OUT file. This file should contain the tracing for your report. Note: because the INFORMIX method puts all of the trace from any enabled session into the same SQEXPLAIN.OUT method it is advised that the file be copied to another location each time a trace is run. This will prevent the file from growing too large and should simplify the process of determining which trace applies to your session. 12.4 FAQ: HOW DO I ELIMINATE DOMAIN SWITCHING FOR SINGLE 7I SERVER Extended Text: KB ID 5289 For clients who are using a multiple server web farm we suggest they add the servers to the Trusted Sites list. (see KB 4348) This is a result of pinning the user to the web server actually running the cdd report once it has been launched. However, if a site only has one web server the server running the report is always the same one they launched it from so the site can use the HostName registry entry to override the responding hostname to be the same one the site uses for that server in the 7i URL. Registry Entry: HKLM\Software\Bi-Tech\Data Processing Service String Value name "HostName" This value needs to be the same server name that the client uses to browse to that 7i server. This name also needs to be accessible from the server itself since there are server-side references to the name. Once this value is set the server should respond with a hostname that is the same as the one in the browser's URL and will no longer cause Internet Explorer to regard that as a Domain Switch. CLICK, DRAG, AND DRILL 316 Note: another reason the Trusted Sites list is suggested is that the default security for Internet Explorer in the other Security Zones may not allow for the installation and activation of the ActiveX Print Control CDD 7i uses. This change does not eliminate that issue. Therefore, to get the ActiveX control to load properly other security changes may still be required on the client machine. 12.5 FAQ: WHY ARE CDD VIEWS NOT WORKING IN 7I USING TABLE.COLUMN SYNTAX IN Details: KB ID 6156 CDD Views are not currently working within 7i when the SQL used to create the view uses table.column syntax. Change the view to use column only syntax to allow the view to work properly in 7i. Example: Bad SQL: select PE_NAME_MSTR.pe_id, PE_NAME_MSTR.pe_name from pe_name_mstr Good SQL: select pe_id, pe_name from pe_name_mstr 12.6 FAQ: HOW CAN I DO NUMBER TO ENGLISH CONVERSION IN CDD? Extended Text: KB ID 6171 The following macro code and scriptlet work in conjunction to allow a CDD report to display numeric values and english words. Specifically this scriplet will convert decimal amounts to English word dollar amount. For example: The numeric value 1324.75 will output as One Thousand Three Hundred Twenty Four and Seventy Five/100 Dollars The scriplet text at the end of this article can be used to create a scriplet which can be referenced in any report where the functionality is needed. Using The Scriplet in a CDD Macro: Dim Numbers2Words ' create script variables CLICK, DRAG, AND DRILL Set Numbers2Words= CreateScriptObject("NumberToWords") ' 317 NumberToWords is the name of the conversion scriplet If Amount > 0 Then CheckWords = Numbers2Words.NumToWords(Amount ) ' If the amount is not zero perform the conversion into CDD UDF fields End If BEGIN SCRIPTLET TEXT: Option Explicit 'Place Holders for Display Dim Ones, Tens, Hundreds, Thous, TenT, HundThou, Million 'Amount and Amount Parts - WholeAmt = $ CentAmt = Cents Dim WholeAmt, CentAmt, Amt 'Length and Positions of String Dim Length, DollarLen, NumLen, TeenPos, CentPos, DecPos 'Value of each position in string, aAmount being position 1. Dim aAmount, bAmount, cAmount, dAmount, eAmount, fAmount, gAmount, hAmount, iAmount 'Values of Position in string for use in macros. Dim Pos_1, Pos_2, Pos_3, Pos_4, Pos_5, Pos_6, Pos_7, Pos_8, Pos_9 Dim LenNumToWord, Words Function NumToWords(Amt) CLICK, DRAG, AND DRILL Ones = "" : Tens = "" : Hundreds = "" TenT = "" : HundThou = "" : Million = "" CentAmt = 0 NumLen = 0 : Length = 0 : Thous = "" : WholeAmt = 0 : DollarLen = 0 : TeenPos = 0 : CentPos = 0 : DecPos = 0 aAmount = 0 : bAmount = 0 : cAmount = 0 : dAmount = 0 eAmount = 0 : fAmount = 0 : gAmount = 0 : hAmount = 0 iAmount = 0 Pos_1 = 0 : Pos_2 = 0 : Pos_3 = 0 Pos_4 = 0 : Pos_5 = 0 : Pos_6 = 0 Pos_8 = 0 : Pos_9 = 0 : LenNumToWord = 0 : Pos_7 = 0 : Words = "" ' "Amt" will Equal Amount of Check being passed to Function 'Positions start at the decimal with position 'a' and work there way to 'the Left. ' 123,456,789.00 ihg,fed,cba.xx 'MsgBox Amt DecPos = InStr(1, Amt, ".") NumLen = Len(Amt) 'MsgBox NumLen WholeAmt = Left(Amt, (DecPos - 1)) 318 CLICK, DRAG, AND DRILL CentPos = NumLen - DecPos CentAmt = Right(Amt, CentPos) DollarLen = Len(WholeAmt) 'Finds And Sets the value of Each position of the String If DollarLen >= "9" Then iAmount = Mid(WholeAmt, (DollarLen -8), 1) End If If DollarLen >= "8" Then hAmount = Mid(WholeAmt, (DollarLen -7), 1) End If If DollarLen >= "7" Then gAmount = Mid(WholeAmt, (DollarLen -6), 1) End If If DollarLen >= "6" Then fAmount = Mid(WholeAmt, (DollarLen -5), 1) End If If DollarLen >= "5" Then eAmount = Mid(WholeAmt, (DollarLen -4), 1) End If If DollarLen >= "4" Then dAmount = Mid(WholeAmt, (DollarLen -3), 1) End If 319 CLICK, DRAG, AND DRILL If DollarLen >= "3" Then cAmount = Mid(WholeAmt, (DollarLen -2), 1) End If If DollarLen >= "2" Then bAmount = Mid(WholeAmt, (DollarLen - 1), 1) End If If DollarLen >= "1" Then aAmount = Mid(WholeAmt, DollarLen, 1) End If 'Sets Positon values equal to their position Pos_9 = iAmount Pos_8 = hAmount Pos_7 = gAmount Pos_6 = fAmount Pos_5 = eAmount Pos_4 = dAmount Pos_3 = cAmount Pos_2 = bAmount Pos_1 = aAmount If Pos_2 <> 1 Then 'Position 1 for Tens Select Case Pos_1 Case "1" Ones = "One " 320 CLICK, DRAG, AND DRILL Case "2" Ones = "Two " Case "3" Ones = "Three " Case "4" Ones = "Four " Case "5" Ones = "Five " Case "6" Ones = "Six " Case "7" Ones = "Seven " Case "8" Ones = "Eight " Case "9" Ones = "Nine " End Select End If If Pos_2 = 1 Then 'Position 1 and 2 combined for Teens TeenPos = Pos_2 & Pos_1 Ones = " " Select Case TeenPos Case "10" Tens = "Ten " Case "11" Tens = "Eleven " Case "12" Tens = "Twelve " Case "13" Tens = "Thirteen " Case "14" Tens = "Fourteen " Case "15" Tens = "Fifteen " Case "16" Tens = "Sixteen " Case "17" Tens = "Seventeen " 321 CLICK, DRAG, AND DRILL Case "18" Tens = "Eighteen " Case "19" Tens = "Nineteen " End Select End If If Pos_2 > 1 Then 'Position 2 Tens Select Case Pos_2 Case "2" Tens = "Twenty " Case "3" Tens = "Thirty " Case "4" Tens = "Forty " Case "5" Tens = "Fifty " Case "6" Tens = "Sixty " Case "7" Tens = "Seventy " Case "8" Tens = "Eighty " Case "9" Tens = "Ninety " End Select End If If Pos_3 >= 1 Then 'Position 3 Hundreds Select Case Pos_3 Case "1" Hundreds = "One Hundred " Case "2" Hundreds = "Two Hundred " Case "3" Hundreds = "Three Hundred " Case "4" Hundreds = "Four Hundred " 322 CLICK, DRAG, AND DRILL Case "5" Hundreds = "Five Hundred " Case "6" Hundreds = "Six Hundred " Case "7" Hundreds = "Seven Hundred " Case "8" Hundreds = "Eight Hundred " Case "9" Hundreds = "Nine Hundred " End Select End If If Pos_5 <> 1 Then 'Position 4 Thousands Select Case Pos_4 ' Case "0" Thous = "Thousand " Case "1" Thous = "One Thousand " Case "2" Thous = "Two Thousand " Case "3" Thous = "Three Thousand " Case "4" Thous = "Four Thousand " Case "5" Thous = "Five Thousand " Case "6" Thous = "Six Thousand " Case "7" Thous = "Seven Thousand " Case "8" Thous = "Eight Thousand " Case "9" Thous = "Nine Thousand " End Select End If If Pos_5 = 1 Then 'Position 4 and 5 combined for Thousands Teens 323 CLICK, DRAG, AND DRILL TeenPos = Pos_5 & Pos_4 Thous = " " Select Case TeenPos Case "10" Thous = "Ten Thousand " Case "11" Thous = "Eleven Thousand " Case "12" Thous = "Twelve Thousand " Case "13" Thous = "Thirteen Thousand " Case "14" Thous = "Fourteen Thousand " Case "15" Thous = "Fifteen Thousand " Case "16" Thous = "Sixteen Thousand " Case "17" Thous = "Seventeen Thousand " Case "18" Thous = "Eighteen Thousand " Case "19" Thous = "Nineteen Thousand " End Select End If If Pos_5 > 1 Then 'Position 5, Tens of Thousands Select Case Pos_5 Case "2" TenT = "Twenty " Case "3" TenT = "Thirty " Case "4" TenT = "Forty " Case "5" TenT = "Fifty " Case "6" TenT = "Sixty " 324 CLICK, DRAG, AND DRILL Case "7" TenT = "Seventy " Case "8" TenT = "Eighty " Case "9" TenT = "Ninety " End Select End If If Pos_6 >= 1 Then 'Position 3 Hundreds Select Case Pos_6 Case "1" HundThou = "One Hundred " Case "2" HundThou = "Two Hundred " Case "3" HundThou = "Three Hundred " Case "4" HundThou = "Four Hundred " Case "5" HundThou = "Five Hundred " Case "6" HundThou = "Six Hundred " Case "7" HundThou = "Seven Hundred " Case "8" HundThou = "Eight Hundred " Case "9" HundThou = "Nine Hundred " End Select End If If Pos_7 > 1 Then 'Position 3 Hundreds Select Case Pos_7 Case "1" Million = "One Million " Case "2" Million = "Two Million " 325 CLICK, DRAG, AND DRILL Case "3" Million = "Three Million " Case "4" Million = "Four Million " Case "5" Million = "Five Million " Case "6" Million = "Six Million " Case "7" Million = "Seven Million " Case "8" Million = "Eight Million " Case "9" Million = "Nine Million " End Select End If If Amt > 0.99 Then Words = Million & HundThou & TenT & Thous & Hundreds & Tens & _ Ones & "and " & CentAmt & "/100 Dollars" Else Words = "Zero and " & CentAmt & "/100 Dollars" End If ' 'LenNumToWord = Len(Words) 'MsgBox LenNumToWord NumToWords = Words End Function 326 CLICK, DRAG, AND DRILL 327 12.7 FAQ: HOW DO I USE THE UCX TABLES IN CDD REPORTS? Details: KB ID 6192 In order to create a meaningful report on the data in the UCX tables CDD must rely on views into the data. These views are not standardized due to the customizable storage format accommodated by the software. There are some "typical" formats that are used, but each client site can have one or more unique definitions. In the case of a standard installation, the following SQL should create a useful view in CDD: SELECT ucx.ucx_key[1,6] ucx_table, ucx.ucx_key[7,30] ucx_code, ucx.ucx_value[1,30] ucx_desc, ucx.ucx_value[1,169] ucx_value, ucx.ucx_value[170,170] ucx_active, ucx.ucx_value[171,200] ucx_custom, ucx.ucx_value[201,206] ucx_revision, ucx.ucx_value[207,214] ucx_who, ucx.ucx_value[215,220] ucx_timestamp FROM ucx Other definitions of this view must be created as needed for client specific reporting needs. 12.8 FAQ: WHAT DOES THE "MULTIPLE CONTROLS WITH SAME ID" ERROR MESSAGE MEAN Text: KB ID 6202 Multiple controls with the same ID 'TABLE_NAME.COLUMN_NAME' were found. FindControl requires that controls have unique IDs. Details: When creating a web page for 7i prompts, CDD creates control IDs using the TABLE.COLUMN information from the data item being prompted. Thus, When creating multiple drill down prompts for the same data item (to create a range, for example) CDD will create redundant control IDs. Find the Report CLICK, DRAG, AND DRILL 328 --------------------------------------The error is presented in 7i, so first use 7i to isolate the Parent Report where the drill down is defined. Find the Drill Definition: --------------------------------------Next, in Stand-Alone CDD, open and run the report identified in the previous step. This will allow you to right click on the data value where the drill down is defined and choose "View Drill Downs". Select the Drill Down in question (the default drill down will be differentiated in a list by the red check mark in the icon) and Click the Edit button. This will bring up the Drill Down Selection Criteria dialog. Click "Short Format" so you can see the item names of the selection criteria elements. Identify the column that is used multiple times (see attached Document). In the information category for the main report, identify the table that is being referenced by Drill Down definition. Modify The Catalog Table: --------------------------------------In Stand-Alone CDD, choose Catalog Manager from the Tools menu. In the list of tables on the right side (System Catalog Items under Catalog Tables) find the table identified from above. In the list of columns, find the column identified from before and identify the name of the column in the database. Right click on the CDD table and choose "Add Column". Choose the database column you need to add - be sure to give the new column a unique name. Update the CDD Category --------------------------------------Choose Validate Categories from the Tools menu and find the category in question and Click Validate. Close CDD. CLICK, DRAG, AND DRILL 329 Reopen CDD. Run the original report again. Fix The Drill Definition: --------------------------------------Right click on the field where the drill down is defined and select View Drill Downs. Click on the Drill definition as above and click Edit. Change the duplicate line in the Drill Down Selection Criteria to use the newly created column. Save the Drill Down. For Drills with more than two duplicated prompts --------------------------------------Repeat this entire process as needed for more than two duplicate control IDs. Additional Info: For current status see ISC Ticket 333715 and related tickets. 12.9 FAQ: WHY DOES THE CDD DRILL DOWN IN A GROUP FOOTER RETURNS WRONG DATA Extended Text: KB ID6209 CDD Drill Downs defined on footer regions return the wrong data. This is a known bug. CDD will drill down on the wrong record when the drill down is defined in a Group Footer region. Typically, this is not seen on the first page, but rather on subsequent pages. Task #295438 should be referenced to determine current status. There is no specific work around, so a client should be encouraged to rewrite the report so that the drill down occurs from a detail region. CLICK, DRAG, AND DRILL 12.10 FAQ: WHY IS NUUPUS SECURITY NOT ENFORCED IN CDD? Extended Text: KB ID 6231 Occasionally, CDD Information Categories may contain the ORACLE specific syntax for the table name. INFORMIX: Error Message The specified table (ops$bsidba.glk_key_mstr) is not in the database. (-206) SAMPLE SQL: SELECT GLKEY.glk_key, GLKEY.glk_title_dl, GLOBJ.glo_bal_type, GLOBJ.glo_obj_dl,GLTRNS.glt_desc, GLTRNS.glt_gl_key, GLTRNS.glt_gl_fy, GLTRNS.glt_dr, GLTRNS.glt_gl_obj, GLTRNS.glt_gl_pr, GLTRNS.glt_ref, GLTRNS.glt_misc, GLTRNS.glt_subs_id, GLTRNS.glt_gl_gr, GLTRNS.glt_cr, GLTRNS.glt_date FROM OPS$BSIDBA.glk_key_mstr GLKEY, OPS$BSIDBA.glo_obj_mstr GLOBJ, OPS$BSIDBA.glt_trns_dtl GLTRNS WHERE (GLTRNS.glt_gl_gr = 'GL' AND (GLTRNS.glt_date >= '07/01/2005' AND GLTRNS.glt_date <= '06/30/2006' ) AND GLKEY.glk_key matches '8' AND 1 = 1) 330 CLICK, DRAG, AND DRILL 331 AND ((GLOBJ.glo_obj = GLTRNS.glt_gl_obj AND GLOBJ.glo_gr = GLTRNS.glt_gl_gr AND GLKEY.glk_key = GLTRNS.glt_gl_key AND GLKEY.glk_gr = GLTRNS.glt_gl_gr)) ORDER BY 14, 6, 9, 10, 16 Internal State: State:42S02,Native:-206,Origin:[OpenLink][ODBC][Informix Server] RESOLUTION: This problem can be resolved by running Validate Categories from the Tools menu in CDD developer. 12.11 FAQ: HOW DO I VIEW THE REPORT SQL IN CDD? Extended Text: KB ID 6233 There are several ways to see what SQL statement was used by CDD to create the report. First, run the report to the screen in Stand Alone CDD (this will not work in Insight or 7i). With the report output open, select Report SQL from the View menu. This will show you the main report SQL only (any sub-report SQL or data lookup SQL will not be shown in this screen). You can turn on File Tracing to get a more complete list of the SQL statements that CDD issues to the database. To turn on File Tracing look here: http://isc1/isc/kb/external/2903.htm You can also turn on "real-time" tracing when you run CDD. At any time CDD is running, press CTRL+SHIFT+D. This will open an output window called BTTrace that will run behind CDD. You will also see a dialog informing you that "Debugging is Enabled". From that point on CLICK, DRAG, AND DRILL 332 all debugging output from CDD will be output to the BTTrace window. This output will include the SQL statements that CDD uses in the main report as well as sub-reports and data lookups. This is VERY useful. To turn tracing back off, press CTRL+SHIFT+D again. You will confirmed with a dialog that says "Debugging Disabled". For almost every CDD report these various SQL statements will reference a security view in the form of "BTV_x1_x2". To understand these views (if there are any) look here: http://isc1/isc/kb/external/1736.htm. FYI: If your report SQL does not reference a "BTV_x1_x2" view, then one of two things is true: No security is being enforced (because IFAS says it isn't needed for this user for this table) OR you are running the report in Consolidated Query Mode. 12.12 FAQ: HOW DO I HANDLE INVALID CHARACTERS IN 7I AND CDD? Extended Text: KB ID 6258 Possible Error Messages: Failed to Load Report Page There is an invalid character in the given encoding. Line x, position y. Both of these error message can be generated by CDD when attempting to process an invalid, or unprintable character. Invalid characters are almost anything that isn't on your keyboard by default. For example, the accented 'e' in Café and Fiancée. There are many other examples, but remember the rule of thumb: if it isn't on your keyboard, you don't want it in your database. In 7i you may get an error handling screen titled "Unreadable Data Found". The screen will say "Unprintable data has been detected; correcting. Replaced data will appear in red". If you come across this condition you must isolate the table and row and column where the data is bogus (the 7i error screen can be very helpful for this as it shows the column names from BT20). Once you now where the invalid data is, you must use a manual update process (dbaccess, SQLPLUS, etc) to fix the offending data. 12.13 FAQ: WHY DO MY DATES NOW DISPLAY AS "11/30/1999" OR "1/1/1000" IN CDD? Extended Text: KB ID 6331 CLICK, DRAG, AND DRILL 333 DETAILS: As of the release of 7i version 7.6 Bi-Tech has switched to the newest release of the Microsoft compiler. This compiler changes the way that date values are created. Previously, a blank or NULL date value was created as a date with all zeros. This date would act and display as a blank value. Now, with the latest compiler version, these dates are assigned a date value of "11/30/1999". Bi-Tech has identified this "default" date value as inadequate to the needs of it's IFAS customers. As such, we have modified our code to use a more innocuous default date value of "01/01/1000" (often displayed as "1/1/100"). This date is considered "safe" because it is obviously outside the date range for IFAS data sets. This work was done on task 334772 (and related tasks for other specific versions). This will be available in 7.6.2.109 and later. OTHER DETAILS: For those clients who wish to display a blank on a report where there is a blank or NULL in the database they will have to modify their reports as follows: Create a user defined field of type character. Replace the database field on the report with the user defined field. Put this macro code in the appropriate region of the report macros: ' In this example, the user defined field is called myCharacterString ' This example uses PENAME.CREATE_DT for my blank date test myCharacterString = PENAME.CREATE_DT If myCharacterString = "1/1/1000" Then myCharacterString = "" End If SPECIAL NOTE: This KB must be used in cases where you are trying to isolate NULL dates in the database as follows: MyCharacterString = "" If Isdbnull("HR_EMPMSTR.ENDDT") Then CLICK, DRAG, AND DRILL 334 MyCharacterString = "" Else If HR_EMPMSTR.ENDDT = "1/1/1000" Or HR_EMPMSTR.ENDDT = "01/01/1000" Then MyCharacterString = "" Else MyCharacterString = HR_EMPMSTR.ENDDT End If End If See KB 7026 for more details on IsDBNull() 12.14 FAQ: HOW DO I EXPORT TO EXCEL USING A SCRIPTLET IN CDD? Details: KB ID 6362 This sample report shows a simple Export to Excel example. The report will not run in the 7i environment and should only be used in CDD. Extended Text: Report Name: SampleExcelExport (SampleExportToExcel.czf) Additional Info: The report uses the xlexport scriplet to provide mundane functionality of exporting CDD data to MS Excel. The report consists of a very simplistic PE listing with address info. The user is prompted for export (Y/N). The report macro shows the way to put data in an Excel data row and add the row to the Excel spreadsheet. CLICK, DRAG, AND DRILL 12.15 FAQ: WHAT SETTINGS ARE AVAILABLE FOR CDD REPORT FILE MANAGEMENT SETTINGS ON THE 7I SERVER? Details: KB ID 6363 7i Registry settings that control the lifetime of the CDD report files, as well as the interval between cleanup attempts. Extended Text: Registry Key: HKEY_LOCAL_MACHINE\SOFTWARE\bitech\Report Processing Service Name: FileStorageCleanup Type: DWORD Value: The value represents the number of minutes between file cleanup cycles. The clean up cycles remove CDD report files that have "expired" (see below). Default: 720 minutes (12 hours) Name: ReportExpiration Type: DWORD Value: The value here represent the number of days that a CDD report file (xml) can be allowed to reside on the server. When a file has resided on the server for more than "x" days, it is considered to be expired and can be removed the next time the cleanup process runs. Default: 7 days IMPORTANT: You must restart Data Processing Services for changes in these settings to be recognized by the 7i server. NOTES: These two values work in conjunction with each other. 335 CLICK, DRAG, AND DRILL 336 FileStorageCleanup should not exceed the expected life of the Data Processing Services. Since some clients choose to restart Data Processing on a daily basis, this interval should not exceed 1440 (24 hours). Once a day should be sufficient, since that equals the granularity of the ReportExpiration interval. An appropriate interval for FileStorageCleanup is between 8 and 12 hours. ReportExpiration should be monitored so that the size of the FileStoragePath directory does not become bloated. Also, clients may not wish to leave sensitive data on their server for extended periods, so a shorter period (1 day) may be a reasonable setting. 12.16 FAQ: HOW DO I HANDLE DATABASE SCHEMA CHANGES IN CDD REPORTS? Details: KB ID 6370 Occasionally database schema changes in IFAS impact CDD reports, categories and/or table definitions. Specifically, database changes that include altering data types in the database are addressed in this article. Extended Text: There are several places in CDD where you may need to update the table/column definitions after a database schema change in IFAS. This is most often true after and HFS or other software upgrade is applied. This KB deals specifically with database tables that have had one more column data types modified in the upgrade. Always refer to release notes for the version in question when deciding if you need to follow the procedures outlined below. Added/Dropped Columns: If a column is added or removed from a table during an HFS or other upgrade you must use the Catalog Manager to update the affected Catalog Tables. Specifically, chose Tools->Catalog Manager. This will open the Catalog Manager dialog. In the Catalog Tables pane, find the affected table and right click. Choose Validate to bring up the Table Validation dialog. This will allow you to add or remove columns as needed. Table Validation will ONLY allow you to add or remove columns listed in the dialog box. This applies to concatenated columns that are broken out into individual columns during an HFS or other update. Altered Data Types: When the data type of a column in the database is changed Table Validation will not resolve the issue. Instead, you must re-import the table definition from the database. It is recommended that you rename the existing table so that you will not lose the current definition in case of CLICK, DRAG, AND DRILL 337 problems. To rename an existing table, launch Catalog Manager. In the Catalog Tables pane, find the affected table and right click. Choose Proprieties and then select the Details tab. Modify the Table Name value to a new name and click OK. Next, find the database table in the pane on the right. Click to select the table then click the Import button. If your original Catalog Table name was not the same as the default name used by the Import function, modify the new table name to be the same name used for the original table. Validate Categories: Once you have updated the affected tables, you must validate the every Information Category that uses those tables. This process is discussed in the CDD documentation and is very simple. It is recommended that you validate all of your categories after every software version upgrade to be sure that all updates are applied to all categories. Additional Notes: In general, it is recommended that you use the default name given during the Import process for all or your CDD Catalog Tables. This eliminates the number of redundant table definitions, as well as simplifying both the Catalog update process and the Report design process. If you do use unique names for the imported tables, you should only do so when you have specific needs, such as adding derived columns such as substring, etc. Special Note: In some rare cases the Table Validation/Category Validation combination does not properly update the Information Category. Often these categories are usable for CDD and Insight, but not for 7i reports. In this case you will receive an error in 7i indicating that "The server encountered an error attempting to open the report design." When you receive this error you must manually reproduce the category from scratch. NOTE: Opening and saving the existing category does not resolve this issue - you must reproduce the category. You can verify this condition by Tracing the report using registry tracing. The Trace output will indicate that there was an "Error un-serializing report from database." 12.17 FAQ: WHY DO I GET THE "OBJECT REFERENCE NOT SET TO AN INSTANCE OF AN Details: KB ID 6386 When the user attempts to run a CDD report from a dashboard favorite they receive the following error: OBJECT REFERENCE NOT SET TO AN INSTANCE OF AN OBJECT CLICK, DRAG, AND DRILL 338 Extended Text: Possible Cause: One possible cause of this problem is that a user may not have the correct functional security required to run CDD reports. Specifically, the user may not have the ability to "Run Report with No Criteria". You can confirm this by reviewing the users functional security setup in System administrator. The user must at least have "Run Report with No Criteria" set to Read and Execute (see attached file for screen shot). When changing user security roles you must always choose "Reset Security". Furthermore, you may need to flush the 7i cache here: http:/<server>/ifas7/admin/config/admin.asp -> Cache Management -> Update Server. Keywords: dashboard favorites object reference not set to instance of object CDD report reports 7i security error 12.18 FAQ: WHY DOESN'T THE CDD/7I DRILL DOWN DOES NOT DRILL ON DOUBLE CLICK? Details: KB ID 6415 Non-default drill downs in CDD/7i do not automatically execute when the drill field is double-clicked. Instead you must select the Drill name from the pop-up list. If you wish to use the double-click option in 7i, you must set at least one drill definition as "default". To set one of the Drill Definitions as "default", follow these steps: 1. In standard CDD, open and run the report in questions. 2. Right click on the drill field and choose View Drill Downs. 3.Select the appropriate Drill Definition from the and put a check in the Set As Default check box. 4. Click Cancel (The changes are automatically saved when you click the check box). CLICK, DRAG, AND DRILL 339 The drill you selected in step 3 will now execute immediately when the drill field is double clicked in 7i. NOTE: You may need to shut down and restart your 7i session (and all open Internet Explorer windows) for the change to be recognized in 7i. Additionally, some clients may need to flush the 7i caches. 12.19 FAQ: WHY DOESN'T MY CDD REPORT RUN? Details: KB ID 6428 CDD report design will not run. After prompts, if any, the cursor returns immediately and the report does not run. Extended Text: Possible Causes: Check to confirm that there is at least one item from the main Information Category on the report design. If the report design does not use any of the fields from the main Information Category the main Report SQL will be empty and the report will not run. Sample Trace Output: 10:46:26 1 Start Debugger 10:46:28 2 CReportDoc::Initialize 10:46:28 3 ReportDoc::Initialize Handle Prompts 10:46:28 4 ReportDoc::Initialize Building Query List 10:46:28 5 ReportDoc::Initialize Done Building Query List 10:46:28 6 ReportDoc::Initialize Done Handling Prompts 10:46:28 7 CReportDoc::Initialize Setting Report Printer 10:46:28 8 CDD Prompts - if any 10:46:30 9 Calling BuildSQL. 10:46:30 10 Failed to BuildSQL. CLICK, DRAG, AND DRILL 340 10:46:30 11 RunReport caught a CUserException! 10:46:30 12 CBTActiveMacroFunctions::OnFinalRelease() 10:46:30 13 CBTActiveMacroFunctions::~CBTActiveMacroFunctions() Solution: If you find that there are not any fields from the main Information Category in your report design, you have 2 options: You can place at least one item from the main Information Category onto the report design. You can edit the report properties. Click on the "Drill" tab and select at least one field to be retained for drill down. This issue is addressed in ISC ticket number 349617. 12.20 FAQ: HOW DO I CREATE CDD SELECTION CRITERIA AGAINST DATETIME (TIMESTAMP) Details: KB ID 6471 Writing selection criteria against a datetime (timestamp) results in the error: Non-numeric character in datetime or interval. (-1262) Extended Text: In INFORMIX you cannot properly create selection criteria against a datetime (timestamp) data type. Putting in a valid date, such as "12/31/2005" will result in an INFORMIX error: Non-numeric character in datetime or interval. (-1262) Resolution: You must create a new column in your database table that is based on the datetime field that you are attempting to select against. Instructions for adding this new field are included in the attached document. 12.21 FAQ: HOW CAN I USE CDD REPORTS TO PERFORM MAIL MERGE WITH MS WORD? Details: KB ID 6503 CLICK, DRAG, AND DRILL 341 Sample report with scriptlet for automating Mail Merge. This report depends on MS Word and Excel being installed on the client PC. This report works only in "thick" CDD (Insight and stand-alone CDD). This report DOES NOT WORK on the 7i server. Extended Text: Details: The report uses a scriptlet that automates the Mail Merge to MS Word from within CDD reports. The sample report shows the basic setup and function calls that are required. The scriptlet can be used with any CDD report to Mail Merge to Word. The scriptlet currently supports exporting up to 26 data items (this can be expanded in the scriptlet code). 12.22 FAQ: WHY ARE CDD REPORTS NOT DISPLAYING TRANSLATED DESCRIPTIONS? Details: KB ID 6523 CDD Report fields that are set up to translate to the descriptions from the GLUPGN screens do not display the translation. For example, if the description of the GLOBJ.PART02 field in the catalog manager is set up to display the medium description from the GLUPGN screen (\godm), it instead displays the field name (PART02). Resolution: This issue is usually a result of NUUPUS security setup for the user that does not specify a default Ledger on the MISC tab. Users should be set up with default ledgers (both GL and JL) in order for CDD to properly translate the descriptions for key and object parts, etc. 12.23 FAQ: WHY AM I GETTING THE ERROR IN 7I RUNNING CDD REPORTS: "A SEMI COLON Details: KB ID 6529 CDD reports with runtime criteria can occasionally cause this error. This error is directly related to the ampersand character (&) being used in the name of the runtime selection criteria. Resolution: CLICK, DRAG, AND DRILL 342 Rename the runtime selection criteria associated with the report design so that the ampersand character is removed. Ideally the only "special" character that will ever be used in the CDD report name or description is the underscore character (_). 12.24 FAQ: HOW CAN I USE CDD TO DO A DOCUMENT ATTACHMENT LOOKUP FOR DOCUMENTS Details: KB ID 6562 The CDD report, AttachDetails_002, can be used to review attachment data. The report uses several tables mentioned in KB 6279. To search by attachment value, use the runtime criteria named "AttachValue" when running the report. You will be prompted for a value (the criteria use the "like" operator so you can enter partial values with wild-cards). The report will then search for any documents where at least one of the attachment values matches the prompt value. To search by Attachment ID, use the runtime criteria name "AttachID" when running the report. You will be prompted for an Attachment ID and the report will list all documents that are attached to that ID. 12.25 FAQ: WHY DON'T CDD DRILL DOWNS USING SYSPERIOD WORK THE SAME IN 7I? Symptoms: KB ID 6572 When you define a drill down in CDD using the system field SYSPERIOD as a part of the drill selection criteria the report may not work properly in 7i. Symptoms can range from the drill down report not returning any data to the drill down report returning incorrect results. Details: The CDD System Field SYSPERIOD is a numeric field. In CDD this field is handled differently and can be used as a selection criteria to select data from the database regardless of whether the data item is a character or a numeric. In 7i, the value of the field is held in an XML storage which first converts the item into a specific numeric value. This numeric value includes a decimal point and trailing zeros (4 becomes 4.00). This means that the value cannot be used to select against a character field. You can verify this by looking at the request.xml file on the 7i sever for the drill down report in question and verifying that the value does include a decimal place and trailing zeros. Resolution: CLICK, DRAG, AND DRILL 343 You can change your drill down selection criteria to use the CDD System Field SYSPERIODCHAR. This field value is correctly stored in 7i XML storage and can be used to retrieve the correct values. If you are experiencing a CDD report that is not drilling correctly in 7i, and SYSPERIOD is used in the selection criteria, try changing it to use SYSPERIODCHAR to see if the report starts working correctly. Be sure to log completely out of 7i before testing the new drill down definition. You can confirm that you are using the new drill down definition by looking at the request.xml on the 7i server and verifying that the value does NOT include a decimal place and trailing zeros. NOTE: This issue is addressed in ticket 299894 (7.6.3.138). 12.26 FAQ: HOW DO I EXPORT TO XLSGEN USING A SCRIPTLET IN CDD? Details: KB ID 6582 This sample report shows a simple Export to XLSGEN example. The report is designed to be run on the 7i server and will not perform properly in "thick" CDD. Extended Text: Report Name: Sample_XLSGEN_Export (SampleExportToXLSGEN.czf) Additional Info: The report uses the xlsgenexport scriplet to provide mundane functionality of exporting CDD data to XLSGEN. The report consists of a very simplistic PE listing with address info. The user is prompted for export (Y/N). The report macro shows the way to put data in an XLSGEN data row and add the row to the Excel spreadsheet. Note: The resulting Excel file is attached to the CDD/7i report output window. For details please refer to CDD/7i documentation. For additional details regarding XLSGEN object model and usage please see attached XLSGEN documentation. Download Note: The attached help file has been modified to allow downloading through a firewall. After you download the help file you must rename it include the .chm extenstion (rename xlsgen_help to be xlsgen_help.chm). CLICK, DRAG, AND DRILL 344 12.27 FAQ: WHY DO I GET THE ERROR "SEEK FAILED ON COMPLETE DAISY PRINT" IN Details: KB ID 6663 When a user double clicks on an empty CDD folder they will receive the following error: "Seek Failed on Complete Daisy Print". Resolution: There is currently no resolution or work-around for this error. Insight will continue to function properly after the user receives this error. BiTech has an INACTIVE development task for this issue (249739). 12.28 FAQ: WHY AM I GETTING THE ERROR "MASK DOES NOT EXIST IN NEXT QUESTION Extended Text: KB ID 6690 Error when opening CDD Reports Folders: "Mask does not exist in next question master. (TDPA)" This error indicates that the mask in the parenthesis is not found as a valid mask in the IFAS subsystem. The steps listed below walk through the process of removing a mask from NUUPJB. The actual error may vary depending on the Mask listed in the parenthesis. Also, the error may occur multiple times, with different masks, if the client has multiple invalid masks in NUUPJB. 1. Log into IFAS 2. Go to the "Next Question Prompting" screen by entering the mask NUUPJB and hit enter. 3. Once you are in the "Next Question Prompting" screen hit the F7 key to go into ‘Browse Mode'', your cursor should now be at the bottom of the screen at the "Mask" prompt. 4. Hit the ‘Tab'' key twice to go to the ‘Question'' prompt, type TD01 and hit enter. 5. Hit the ‘Tab'' key once to get the cursor in the "MENU?" prompt, type a Y and hit enter. CLICK, DRAG, AND DRILL 345 6. You should now be in the "Menu" screen and there will be a list of the masks that you want to erase. If you erase the masks in this screen and then save the changes by hitting the ''Enter'' key they will no longer show up in Insight. 12.29 FAQ: HOW DO I ADD SUBSTRING COLUMNS IN THE CDD CATALOG MANAGER? Details: KB ID 6740 Using the CDD Catalog Manager it is possible to add a substring column to a CDD table. The attached Word document includes screen shots and step by step instructions on this process. Below is the syntax required for each of the DBMS engine currently supported by CDD. Extended Text: DBMS Syntax INFORMIX column_name[start,end] Example: column: pe_name[2,5] value: Administrative Builders result: dmin SQL Server column_name[start,length] Example: column: pe_name[2,5] value: Administrative Builders result: dmini ORACLE CLICK, DRAG, AND DRILL 346 column_name[start,length] Example: column: pe_name[2,5] value: Administrative Builders result: dmini 12.30 FAQ: ERROR "SERVER ERROR IN '/' APPLICATION" RUNNING Details: KB ID 6903 ERROR: "Server Error in '/' Application" generated in 7i screen when attempting to run a CDD report from the Reports Section of the Options Bar. ERROR: "Server Error in '/' Application: The Resource Cannot be Found" generated in 7i screen when attempting to run a CDD report from the Reports Section of the Options Bar. Resolution: If you are experiencing this error you need to upgrade to patch 7.6.3.150. 12.31 FAQ: WHY ARE SOME (OR ALL) OF MY CDD REPORTS NOT VISIBLE IN 7I? Details: KB ID 6993 After upgrading to 7i, CDD reports are not visible in the 7i CDD Reports Folders. Extended Text: Symptom: In order for 7i to display the CDD reports, the report must be stored in the XML storage format. Possible Resolution: CLICK, DRAG, AND DRILL If the CDD reports are visible in Insight or Thick CDD, you may need to run the report conversion process within System Administrator (Configure->Convert Report/Category). Additional Details: Here is the SQL that is used to fetch the report listings in thick and thin CDD: THICK CDD (CDD and Insight): SELECT rpt_id,description FROM bsi_sec_folder_obj,bsi_rpt_def WHERE (bsi_rpt_def.rpt_id = bsi_sec_folder_obj.obj_name and bsi_rpt_def.dbno = bsi_sec_folder_obj.dbno and bsi_sec_folder_obj.obj_type = 1 and bsi_sec_folder_obj.folder = 'S55810F17-5FE9-491B-BE54-1E236B52229' and bsi_sec_folder_obj.dbno = 1) THIN CDD (7i) - Note the additional selection criteria for REPORTXML: SELECT rpt_id,description FROM bsi_sec_folder_obj,bsi_rpt_def,bsi_sys_blob WHERE (bsi_rpt_def.rpt_id = bsi_sec_folder_obj.obj_name and bsi_rpt_def.dbno = bsi_sec_folder_obj.dbno and bsi_sec_folder_obj.obj_type = 1 and bsi_rpt_def.dbno = bsi_sys_blob.dbno and bsi_rpt_def.rpt_id = bsi_sys_blob.name and bsi_sys_blob.category = 'REPORTXML' and bsi_sec_folder_obj.folder = 'S55810F17-5FE9-491B-BE54-1E236B52229' and bsi_sec_folder_obj.dbno = 1) ORDER BY description 12.32 FAQ: WHAT DOES THE "UPDATE APPLICATION DIALOG" DIALOG MEAN? Extended Text: KB ID 7007 347 CLICK, DRAG, AND DRILL 348 When trying to launch CDD from the client 7i server the Update Application dialog is displayed (see screen shots). Work-Around: Determine the directory where CDD is installed. Use explorer to display contents of directory. Add File Version to the list of columns displayed in Explorer (see screen shots). Confirm that the installation appears to be a correct (all file versions should be the same). Note that many files in the directory will have no version, or a version that is not within the standards of our versioning system. You are only interested in the files that look like our software versions. Once you determine the correct version you will need to update the registry HKEY_LOCAL_MACHINE\SOFTWARE\BiTech\CDD\Version. 12.33 FAQ: WHY ARE DECIMAL VALUES TRUNCATED IN XLSGEN EXPORT? Extended Text: KB ID 7025 Why are decimal values being truncated when I export using XLSGEN in a CDD macro? Answer: Your report might be using the "Number" method to export the data value. Change to use the "Float" method to force XLSGEN to respect the decimal places. 12.34 FAQ: WHY DOES ISDBNULL NOT WORK CORRECTLY IN A GROUP FOOTER? Details: KB ID 7026 When used in the macro of a Group Footer region, IsDBNull() does not return a correct value. The function appears to be looking at the wrong data row. Instead of looking at the last row of the current group, it is looking at the first row of the next group. There is no known work-around. However, the reports can often be modified to use the IsDBNull() function in the detail region of the report. See Also: Please see KB 6331 and KB 7033 for more details of working with IsDBNull() and date fields in CDD macros. CLICK, DRAG, AND DRILL 349 12.35 FAQ: WHY DOESN'T ISDBNULL WORK WITH ELEMENTS FROM DATA LOOKUPS OR Details: KB ID 7033 The CDD macro language function IsDBNull() does not work when looking at items from a data lookup or a subreport. This appears to be an issue relating to data row management in CDD. There is no known work-around. See KB 6331 and KB 7026 for more details of working with IsDBNull(). 12.36 FAQ: HOW DO I ADJUST THE OPENLINK CLIENT RECEIVE TIMEOUT? Details: KB ID 2142 Sometimes larger CDD reports will timeout due to the Receive Timeout, for the Openlink Client, being set to low. This document will show how to increase that setting in the registry. THIS HELPS WITH RPC TIMEOUTS WHEN RUNNING LARGER CDD REPORTS. Extended Text: Sometime larger CDD reports will timeout due to the Receive Timeout, for the Openlink Client, being set to low. By default it is set to 120. To change the value, open the registry editor. From the start menu, select "Run". In the "Open" field, type "regedit". When registry editor is opened, you will find the Receive Timeout key under the following path: HKEY_LOCAL_MACHINE\Software\ODBC\OPENLINK.INI\Communications\Receive Timeout Set the Receive timeout to at least 3600. If you run your report again, and it still times out, return to regedit and set the key to 7200. NOTE: It is wise to backup the system registry before making any changes. 12.37 FAQ: CDD SELECTION CRITERIA AGAINST DATETIME (TIMESTAMP) IN AN ORACLE DATABASE? Details: KB ID 6540 CLICK, DRAG, AND DRILL 350 Writing selection criteria against a DATE or TIMESTAMP using only the date portion '12/31/2003' results in no data being returned. This is due to the fact that the data in the database is stored with a time value in addition to the date value. Details: In ORACLE you cannot properly create selection criteria against a DATE or TIMESTAMP data type. Putting in a valid date, such as "12/31/2005" will result in no data being returned. Resolution: You must create a new column in your database table that is based on the datetime field that you are attempting to select against. Instructions for adding this new field are included in the attached document. 12.38 FAQ: PRINTED CDD REPORT FROM 7I DOES NOT SHOW SHADING Extended Text: KB ID 5911 To fix this problem: In Internet Explorer go to Tools>>Internet Options and click on the Advanced tab. Next go to the Printing subsection and make sure Print background colors CLICK, DRAG, AND DRILL and images is selected. 351 CLICK, DRAG, AND DRILL 12.39 FAQ: HOW TO SCHEDULE CDD REPORT TO RUN DAILY Extended Text: KB ID 6016 How to Schedule CDD Report to Run Daily Currently, the limitation of CDD is that you can only schedule the CDD report to run just once. The schedule CDD report can not run on a daily basis. This document illustrates how to setup the Windows scheduler to run the report on a nightly basis. First, schedule the CDD report. 352 CLICK, DRAG, AND DRILL 353 CLICK, DRAG, AND DRILL Once the CDD report is scheduled, you can see the scheduled task in Start>Settings>Control Panel>Schedule Tasks. 354 CLICK, DRAG, AND DRILL If you Right-Click on the task, you can go to the “Schedule” tab and modify the task to run daily instead of once: 355 CLICK, DRAG, AND DRILL 356 NOTE: When you modify the schedule task, the system will ask you for the administrative rights login. So ask the client for the administrator login and password for the PC. If you click on the “Task” tab, you’ll see that the when the task is run, it will look in the C:\SunGard\Bin folder for the .xml file. This .xml file is created automatically when you did the scheduling. (See below). CLICK, DRAG, AND DRILL 357 CLICK, DRAG, AND DRILL 358 CLICK, DRAG, AND DRILL 359 The Problem is that when the scheduler runs this task, it will go into the C:\SunGard\Bin folder and look for the .xml file. Once the scheduled task is complete, it will remove the .xml file out of this directory. So the next day when the task is run again, it will fail because the .xml file has already been removed. This is why it can not be schedule to run more than once. The solution is to make a backup copy of the .xml files and copy the .xml files to a backup folder and create a windows task to copy the .xml file from the backup folder into the C:\SunGard\Bin folder before the scheduled CDD report executes. The following example shows the backup folder is called “temp”. This folder contains all the .xml files that CDD scheduler created. (The .xml files are copied FROM C:\SunGard\Bin folder. This is a manual process). Then create a COPY command to COPY FROM the “temp” folder into C:\SunGard\Bin. The following is the setup of the scheduled COPY task. 1) Open Notepad application and execute the copy command. CLICK, DRAG, AND DRILL The copy command is keyed into the notepad application. 360 CLICK, DRAG, AND DRILL When finish, go to File>Save As and save the file as copy.cmd (you can call this file what ever you like. Make sure the extension is .cmd otherwise windows can’t execute it). Then go back to the Schedule Tasks in Start>Settings>Control Panel>Schedule Tasks and double-click on “Add Scheduled Task” 361 CLICK, DRAG, AND DRILL 362 CLICK, DRAG, AND DRILL Setup the time of day you want this “copy” task to run: When finish, you’ll see a new task called “copy” in the Scheduled Tasks: 363 CLICK, DRAG, AND DRILL That’s it. In summary, the schedule CDD will execute at 1:50 PM every day and remove the .xml file in C:\SunGard\Bin folder. At 1:52 PM everyday, the copy task will copy all the .xml files from the backup folder called “temp” into the C:\Sungard\Bin folder. The process repeats the next day FOREVER (except weekends). 364 CLICK, DRAG, AND DRILL 12.40 365 FAQ: ATTACHING EXCEL OUTPUT TO CDD REPORTS IN 7I Extended Text: KB ID 6219 With the new 3rd party tool from ExcelGenerator (http://www.excelgenerator.com) we can create formatted Excel output and attach it to the CDD output in 7i. Below is information about creating a budget to actual report that will have an option Excel file attached via 7i, or if running through CDD/Insight it will drop the file onto the user's PC. The Excel file in 7i appears in the top left corner attached to the paper clip (you may need to run the report to completion to get the icon to refresh). Also below is information on installing the XLSGEN.dll. Make sure the component is registered on each 7i server (regsvr32 xlsgen.dll). In our in-house testing, we had difficulties with Windows2000 Servers streaming the Excel file correctly but it worked fine with Windows2003 and XP servers. This component will be automatically installed on the servers on the next 7.6 service pack. 12.40.1 Installing XLSGEN Purchase a license http://www.excelgenerator.com/ Copy the xlsgen.dll file to the SunGard products bin Directory. Use the Run command to install the dll. CLICK, DRAG, AND DRILL 366 C:\Progra~1\SunGar~1\Bin\regsvr32.exe xlsgen.dll A successful Install will look like this… 12.40.2 Using XLSGen.DLL for Attaching Excel Output to 7i CDD Reports The following lists the macros necessary to enable the attachment of Excel output to 7i CDD reports. All colored macros should be added to the report in the sections shown. The exception is the data output macros (displayed here in the Detail section, they should be placed wherever CLICK, DRAG, AND DRILL 367 the data is ready for export. They may also be used more than once within the report if you wish to export multiple levels of data to Excel (ex. Detail, Sub-Totals, Report Totals, etc.). The maroon fields need to be defined as User-Fields. The ExcelFlag is intended to be used as a prompted User-Field (however you can hard code the value as a ‘Y’ value if you wish the report to always create the Excel output). See below for the setup example. Leave the Prompt Blank to limit to a particular option. CLICK, DRAG, AND DRILL 368 There is also a OutputLbl that needs to be created. It should be a User-Field with Character type and at least 100 characters in size. Place this at the End of Report to display the output location when running the report in CDD/Insight. And finally the macros: 'Declare Option Explicit: performance is better than using uninitialized variables Option Explicit ' ********** Begin Variable Declarations ********** ' Excel/XLSGen Output Variables Dim appXLSGen, WorkBook, WorkSheet Dim idxRow, idxColumn, strCalc Dim FileName, AttachFileName Dim StyleDefault, StyleHeading, StyleNumber Dim StyleTotal, StyleTotalNumber ' ********** ' ********** End Variable Declarations Region: Initialize Sub Initialize ' File Output will be Prompted Option ********** ********** CLICK, DRAG, AND DRILL ExcelFlag = UCase(ExcelFlag) If ExcelFlag = "Y" Then ' Create Excel Generation Object Set appXLSGen = CreateObject("ExcelGenerator.ARsTdesign") ' Create a new Excel file, and retrieve a workbook. ' InServerMode checks to see if report is being run with 7i. This will assign ' different mapping to the file for later review. If InServerMode Then FileName = GetFilePath("Acct Summary.xls") Else FileName = GetFilePath("C:\Documents and Settings\" & _ "All Users\Desktop\Acct Summary.xls") End If ' Save this off for later AttachFileName = FileName ' Opens the existing Workbook or creates a new one if one isn't found. Set WorkBook = appXLSGen.New(FileName) ' Create a new WorkSheet in the Workbook Set WorkSheet = WorkBook.AddWorkSheet("Sheet1") 369 CLICK, DRAG, AND DRILL 370 ' Define Various Style types for use throughout the report/export process Set StyleDefault = WorkSheet.NewStyle ' Style Heading is Bold, with a Solid Gray Background Set StyleHeading = WorkSheet.NewStyle StyleHeading.Font.Bold = True ' Style Number is a two decimal format with negative values displayed in parens Set StyleNumber = WorkSheet.NewStyle StyleNumber.Format = "_(* #,##0.00_);_(* \(#,##0.00\);;" ' Style Total is Bold with Under Lines for Visual Impact Set StyleTotal = WorkSheet.NewStyle StyleTotal.Borders.Top.Style = 1 ' Thin Top Border StyleTotal.Font.Bold = True ' Style Total Number is Bold with Under Lines for Visual Impact and ' two decimal format with negative values displayed in parens Set StyleTotalNumber = WorkSheet.NewStyle StyleTotalNumber.Borders.Top.Style = 1 ' Thin Top Border StyleTotalNumber.Format = "_(* #,##0.00_);_(* \(#,##0.00\);;" ' Generate Heading (first applying the Style Information) StyleHeading.Apply StyleTotalNumber.Font.Bold = True CLICK, DRAG, AND DRILL ' This is where you define the Column Headers for the Excel File. ' Note the (Row,Column) referencing. When adding additional columns ' you will need to keep incrementing the numbers. ' Populate values into the worksheet with (Row,Column) Coordinates) WorkSheet.Label(1,1) = "Fund" WorkSheet.Label(1,2) = "Fund Description" WorkSheet.Label(1,3) = "Function" WorkSheet.Label(1,4) = "Function Description" WorkSheet.Label(1,5) = "Major Object" WorkSheet.Label(1,6) = "Major Object Description" WorkSheet.Label(1,7) = "Budget" WorkSheet.Label(1,8) = "Expenditures" WorkSheet.Label(1,9) = "Encumbrances" WorkSheet.Label(1,10) = "Balance" ' Reset Style to Default StyleDefault.Apply ' Manage Row Numbers as you populate Excel File idxRow = 2 End If 371 CLICK, DRAG, AND DRILL End Sub ' ********** Region: Detail ********** Sub Detail ' Calc Budget/Encumbrances/Actuals setbudgets GLBA_MSTR.LEDGER,"GLBA_MSTR.BUDGET01", _ "GLBA_MSTR.BUDGET02","GLBA_MSTR.BUDGET03","GLBA_MSTR.BUDGET04", _ "GLBA_MSTR.BUDGET05","GLBA_MSTR.BUDGET06","GLBA_MSTR.BUDGET07", _ "GLBA_MSTR.BUDGET08","GLBA_MSTR.BUDGET09","GLBA_MSTR.BUDGET10" BUDGET = getifasbudget(GLBA_MSTR.LEDGER,SYSBUDGETVERSION, _ GLBA_MSTR.BUDGET01,GLBA_MSTR.BUDGET02,GLBA_MSTR.BUDGET03, _ GLBA_MSTR.BUDGET04,GLBA_MSTR.BUDGET05,GLBA_MSTR.BUDGET06, _ GLBA_MSTR.BUDGET07,GLBA_MSTR.BUDGET08,GLBA_MSTR.BUDGET09, _ GLBA_MSTR.BUDGET10) ACTUAL = computeamount(SYSPERIOD,GLBA_MSTR.ACTUAL01, _ GLBA_MSTR.ACTUAL02,GLBA_MSTR.ACTUAL03,GLBA_MSTR.ACTUAL04, _ GLBA_MSTR.ACTUAL05,GLBA_MSTR.ACTUAL06,GLBA_MSTR.ACTUAL07, _ GLBA_MSTR.ACTUAL08,GLBA_MSTR.ACTUAL09,GLBA_MSTR.ACTUAL10, _ GLBA_MSTR.ACTUAL11,GLBA_MSTR.ACTUAL12) 372 CLICK, DRAG, AND DRILL ENCUMBRANCE = getamount(SYSPERIOD,GLBA_MSTR.EN01, _ GLBA_MSTR.EN02,GLBA_MSTR.EN03,GLBA_MSTR.EN04, _ GLBA_MSTR.EN05,GLBA_MSTR.EN06,GLBA_MSTR.EN07, _ GLBA_MSTR.EN08,GLBA_MSTR.EN09,GLBA_MSTR.EN10, _ GLBA_MSTR.EN11,GLBA_MSTR.EN12) BALANCE = BUDGET – ACTUAL - ENCUMBRANCE ' These Macros go in the region that you want to actually export the data at. ' That may be a Header, Detail or Footer region. These can be used multiple ' times within a report to output at multiple levels (ex. Sub-Totals, Report ' Totals). ' File Output will be Prompted Option If ExcelFlag = "Y" Then ' Reset Style to Default StyleDefault.Apply ' When Adding the Data Values to the Excel Sheet the Type of Value will ' determine what code to use in the WorkSheet.[Type] syntax. Options ' are: Label (character type values) ' Number (numeric values) ' Function (passing a function that Excel should use for calculations) 373 CLICK, DRAG, AND DRILL ' Populate Data Values using (Row, Column) Coordinates WorkSheet.Label(idxRow, 1) = GLKEY.PART1 WorkSheet.Label(idxRow, 2) = "FundDesc" WorkSheet.Label(idxRow, 3) = GLKEY.PART3 WorkSheet.Label(idxRow, 4) = "FunctionDesc" WorkSheet.Label(idxRow, 5) = GLOBJ.PART2 WorkSheet.Label(idxRow, 6) = "MajObjDesc" ' Apply Style Formats as necessary StyleNumber.Apply WorkSheet.Number(idxRow, 7) = BUDGET WorkSheet.Number(idxRow, 8) = ACTUAL WorkSheet.Number(idxRow, 9) = ENCUMBRANCE ' This is an example of passing a Calculation Function to Excel strCalc = "=G" & idxRow & _ "-H" & idxRow & _ "-I" & idxRow WorkSheet.Formula(idxRow, 10) = strCalc ' Manage Row Numbers as you populate Excel File StyleDefault.Apply 374 CLICK, DRAG, AND DRILL idxRow = idxRow + 1 End If End Sub ' ********** Region: End of Report - Excel Output ********** Sub EndOfReport ' This group of Macros Adds an optional Report Total row and attaches ' the file to the 7i screen or drops the file into the specified ' directory. These macros need to be run at the End of Report so ' you will need to add the section as necessary. ' File Output will be Prompted Option If ExcelFlag = "Y" Then ' Apply Appropriate Style StyleTotal.Apply ' Output the Data/Totals WorkSheet.Label(idxRow, 1) = "Report Total" ' Apply Appropriate Style StyleTotalNumber.Apply WorkSheet.Formula(idxRow, 7) = "=SUM(G2:G" & idxRow - 1 & ")" 375 CLICK, DRAG, AND DRILL 376 WorkSheet.Formula(idxRow, 8) = "=SUM(H2:H" & idxRow - 1 & ")" WorkSheet.Formula(idxRow, 9) = "=SUM(I2:I" & idxRow - 1 & ")" WorkSheet.Formula(idxRow, 10) = "=SUM(J2:J" & idxRow - 1 & ")" ' Cleanup App/End CDD Control strCalc = "A1:J" & idxRow WorkSheet.Rows(strCalc).AutoFit = True WorkBook.Close Set appXLSGen = Nothing ' Tell 7i Attachment is available and to link the output to 7i screen If InServerMode Then AttachFile AttachFileName, "Excel Output" else ' Excel Output Label OutputLbl = "File Saved to: " & FileName End If End If End Sub 12.41 FAQ: CDD REPORT FILE MANAGEMENT SETTINGS ON THE 7I SERVER Details: KB ID 6363 CLICK, DRAG, AND DRILL 377 7i Registry settings that control the lifetime of the CDD report files, as well as the interval between cleanup attempts. Registry Key: HKEY_LOCAL_MACHINE\SOFTWARE\bitech\Report Processing Service Name: FileStorageCleanup Type: DWORD Value: The value represents the number of minutes between file cleanup cycles. The clean up cycles remove CDD report files that have "expired" (see below). Default: 720 minutes (12 hours) Name: ReportExpiration Type: DWORD Value: The value here represent the number of days that a CDD report file (xml) can be allowed to reside on the server. When a file has resided on the server for more than "x" days, it is considered to be expired and can be removed the next time the cleanup process runs. Default: 7 days IMPORTANT: You must restart Data Processing Services for changes in these settings to be recognized by the 7i server. NOTES: These two values work in conjunction with each other. FileStorageCleanup should not exceed the expected life of the Data Processing Services. Since some clients choose to restart Data Processing on a daily basis, this interval should not exceed 1440 (24 hours). Once a day should be sufficient, since that equals the granularity of the ReportExpiration interval. An appropriate interval for FileStorageCleanup is between 8 and 12 hours. ReportExpiration should be monitored so that the size of the FileStoragePath directory does not become bloated. Also, clients may not wish to leave sensitive data on their server for extended periods, so a shorter period (1 day) may be a reasonable setting. CLICK, DRAG, AND DRILL 12.42 378 FAQ: REVIEW CDD PAGES IN MEMORY Extended Text: KB ID 6912 Pages in Memory is an option that allows you to tune CDD performance. It allows you to specify the number of pages to be held in memory once a report is run. Please see the attached document for screen shots of the Pages in Memory setting. The default value for Pages in Memory is 30. The minimum is 1 and the maximum is 100. On computers with limited RAM (Random Access Memory), Pages in Memory can be set to a smaller value. On computers with expanded RAM, or in situations where you want to be able to browse back and forth through a report that is many pages long, Pages in Memory can be set to a higher value. However, even on the most advanced computer there is a limit to the number of report pages that can be stored. That is why there is a maximum value for Pages in Memory. One thing to keep in mind is that the amount of memory used per report page will vary depending on the complexity of the report: the more items on the report, the more memory it will need to store the report page. One "side-effect" of having a limited number of Pages in Memory can be seen when you try to print a report after you have already paged forward past the number of Pages in Memory set in the Report Preferences. For example, if your Pages in Memory is set to 30, CDD can only keep 30 report pages active at any given moment. This means that when you scroll to page 31, CDD must "drop" the first page. At this point, if you tried to print the report, you would only be able to print from page 2 forward. The only way print to whole report is to run the report again and print it before scrolling past the Pages in Memory limit. Since the pages that you have not yet displayed are not in memory yet, Pages in Memory only affects "previous" pages. Often times user may want to review the report output before sending the output to the printer. That can only be done by running the report a second time and sending it to the printer without scrolling forward past the Pages in Memory setting. However, it is worth noting that there is no maximum number of pages for a CDD report, and there is no maximum number of pages that CDD can send to the printer. 12.42.1 Review Pages in Memory CLICK, DRAG, AND DRILL To review your pages in memory setting, look under Edit -> Preferences in the CDD menus. 379 CLICK, DRAG, AND DRILL 380 This will bring up the Preferences dialog. Click on the Report tab to see you Pages in Memory setting. The default value is 30. The max is 100. CLICK, DRAG, AND DRILL 381 13 Appendix A: Catalog Manager 13.1 Catalog Manager The Catalog Manager is designed to allow you to format tables contained in a System Catalog. The Manager can be opened at any time while working on a report, but it is typically utilized by a system administrator as part of the system catalog formatting process. To open the Catalog Manager, select “Tools, Catalog Manager” from the main menu. CLICK, DRAG, AND DRILL The Catalog Manager window will be displayed. The database tables are listed on the left. On the right is the tree of all tables in the System Catalog, including their columns. The database tables (on the right) can be selected individually or collectively. To select multiple tables, select the first table and then either press the Shift key and click on additional table (to select a set of adjacent tables) or press the Ctrl key and click on multiple tables (to select non-adjacent tables). 382 CLICK, DRAG, AND DRILL When an item is selected the Import button is enabled. The import will attempt to create a Catalog Table using the same characters as the Database table, except that all the characters will be shifted to uppercase. 383 CLICK, DRAG, AND DRILL 13.2 Catalog Table Properties Accessible by right clicking the mouse on the desired item, Properties shows the editable properties of a column. To view the Catalog Table Properties, select Properties. The Catalog Item Properties window will be displayed. 384 CLICK, DRAG, AND DRILL 13.3 General Tab The General tab simply indicates the name of the Database Table to which the catalog table points. 385 CLICK, DRAG, AND DRILL 386 13.4 Details Tab The Details tab allows you to change the name and description of the table to best reflect the contents and use of the table. The other choices available to you when you right-click on a table include: Add Column which allows you to add a single column to a Catalog Table. Validate which will attempt to determine if any of the columns in the Database are not used in the Catalog table, or if any of the columns in the catalog table are no longer found in the Database table. Remove Table which will remove the table from the System Catalog. These options are discussed below. CLICK, DRAG, AND DRILL 387 13.5 Add Column The Column Name becomes the name on the catalog column. The drop-down list labeled “Choose Database Column” shows all of the columns in the database table. You must select one of the items in the list. When one is selected, a default column name is provided by CDD (the Database name will appear in all upper case characters). Click OK to add the new column to the table. CLICK, DRAG, AND DRILL 388 13.6 Validate The Orphaned Columns list displays the columns that are used in the Catalog Table that reference columns that do not exist in the Database Table. Check off the columns you wish to remove from the table. Unused Columns is a list of the columns in the Database Table that are not used in the Catalog table. Check off the columns you wish to add to the table. CLICK, DRAG, AND DRILL 389 13.7 Remove Table Selecting Remove Table allows you to remove the selected table from the Information Category. Because this can significantly alter the data available through the catalog for your reports, you will be prompted to make sure you want to take this action. Click Yes to remove the selected table. CLICK, DRAG, AND DRILL 390 13.8 Column Properties The Catalog Manager allows you to customize the columns of the selected table. Select the column you want to work on. To access Column Properties right click on the desired item. Remove Column will remove the column from the Catalog Table. To edit the properties of the column, choose Properties. The Catalog Item Properties window will be displayed. CLICK, DRAG, AND DRILL 13.9 General Tab The General tab simply indicates the name of the Database Table to which the catalog table points. 391 CLICK, DRAG, AND DRILL 13.10 Details Tab The Details tab allows you to view and change the item name and description. It also displays the heading which indicates the heading title that will be applied when the column is placed on a report design using the report wizard. The type field displays the SQL data type of the underlying data and is a read only field. The item properties portion of the Details tab allows you to make decisions about how the column is to be used when the report is run. Selectable indicates whether you can select on this column. Nullable determines whether this column can contain null data. Case Sensitive determines whether the column is case sensitive. Money indicates whether the column contains a monetary value. 392 CLICK, DRAG, AND DRILL 13.11 Display Tab The Display tab allows you to customize the way the data returned from the column is displayed in the final report. Mask allows you to apply an edit mask (for more information about edit masks, see appendix B). Size indicates the point size to be used for this item when the report is run. Multi-line determines whether the item can contain more than one line of data. Effects allows you to apply font effects such as bold and italics to the item when the report is run. Justification determines whether the data is to be right, left, or center justified when the report is run. Text Color allows you to change the color of the text. Likewise, Background allows you to change the color of the text background. Once the Catalog Tables and Columns have been adjusted, click Close to return to the main CDD window. 393 CLICK, DRAG, AND DRILL 13.12 394 Catalog View Manager The Catalog View Manager allows you to create unique tables which contain SQL statements that pull data from multiple tables and can then be used as Information Categories when creating new reports. Catalog Views can be created to perform many of the same operations as Macros. To access the Catalog View Manager, select “Tools, Catalog View Manager” from the main menu. The Catalog View Manager window will be displayed. CLICK, DRAG, AND DRILL To create a new CDD View, click New. The General window of the Create View Catalog process will be displayed. 395 CLICK, DRAG, AND DRILL 396 In the General window, assign a name and description to the View you are creating. Once you have entered this information, click Next. The SQL window will be displayed. The SQL window allows you to write an SQL statement directing the system to retrieve specific data from a selected table or tables. For example, if for budgeting purposes you wanted to select the net of credits minus debits from a particular budget table, the SQL statement you would create might appear as follows: select glt_cr - glt_dr net from glt_trns_dtl This statement directs the system to let “net” be the result of the General Ledger Credit value minus the General Ledger Debit value and instructs that this data is to be retrieved from the glt_trns_dtl table. CLICK, DRAG, AND DRILL 397 The SQL window allows you to enter this information by either typing the entire statement or by using a combination of typing and selecting the SQL statement keys. After entering the SQL statement… CLICK, DRAG, AND DRILL 398 …click the Check Syntax button. The system will check the statement to be sure that it conforms to SQL syntax requirement. If there are errors in the statement the system will display these in the Database Error message window. If the syntax of your statement is correct, click Next. The Items window will be displayed. The Items window allows you to check the columns which will be returned based on the view you are creating. To edit the column, click Edit. The Items Properties window will be displayed. CLICK, DRAG, AND DRILL 13.13 General Tab The General tab simply indicates the name of the Database Table to which the catalog table points. 399 CLICK, DRAG, AND DRILL 13.14 400 Details Tab The Details tab allows you to view and change the Item Name and Description. It also displays the Heading which indicates the heading title that will be applied when the column is placed on a report design using the report wizard. The Type field displays the SQL data type of the underlying data and is a read only field. The Item Properties portion of the Details tab allows you to make decisions about how the column is to be used when the report is run. Selectable indicates whether you can select on this column. Nullable determines whether this column can contain null data. Case Sensitive determines whether the column is case sensitive. Money indicates whether the column contains a monetary value. CLICK, DRAG, AND DRILL 13.15 Display Tab The Display tab allows you to customize the way the data returned from the column is displayed in the final report. Mask allows you to apply an edit mask (for more information about edit masks, see appendix B). Size indicates the point size to be used for this item when the report is run. Multi-line determines whether the item can contain more than one line of data. Effects allows you to apply font effects such as bold and italics to the item when the report is run. Justification determines whether the data is to be right, left, or center justified when the report is run. Text Color allows you to change the color of the text. Likewise, Background allows you to change the color of the text background. 401 CLICK, DRAG, AND DRILL Once the you have edited the new view, click Finish to return to the main CDD window. Once you have created a view, this view will be displayed the next time you select “Tools, Catalog View Manager.” This view can then be edited, or deleted, by selecting it and then clicking on the appropriate buttons. 402 CLICK, DRAG, AND DRILL 403 14 Appendix B: Edit Masks 14.1 Edit Masks for Numeric Data Elements 14.1.1 Using Edit Masks to Apply Color to Numeric Data Elements Edit masks can include signifying information to specify color for numeric data elements based on the value of the element. When applying color to edit masks, the masks are always arranged in the following order: Mask 1 (positive value); Mask 2 (negative value); Mask 3 (zero value) Note: The masks must be separated by semi-colons. The color is assigned to the mask by entering the name of the color to be applied to the mask immediately following the mask itself. The color name must be enclosed in brackets, as seen in the example below: ##,###.##[black]; ##,###.##[red]; ##,###.##[blue] The color options available are as follows: Black White Blue Dk Blue Cyan Dk Cyan Green Dk Green Magenta Dk Magenta Red Dk Red Yellow Dk Yellow Lt Gray Dk Gray CLICK, DRAG, AND DRILL If no color is entered as part of the mask, the default color will be applied. For example, if the default color for the data element is green and the edit mask is entered as ##,###.##; ##,###.##[red]; ##,###.## The positive values (first position) and the zero values (third position) will use the default color, in this case green. Only the negative values (second position) will use the unique color, in this case red. The following table illustrates the use of the edit mask field. In each example, a numeric field is being formatted. Formatted Result Value in on the Report database Edit Mask 12,345 12345 **,*** *1,234 1234 **,*** ** 123 123 **,*** ** *12 12 **,*** ** **1 1 **,*** ** *** 0 **,*** 12,345 12345 &&,&&& 01,234 1234 &&,&&& 01,234.56 1234.56 &&,&&&.&& 404 CLICK, DRAG, AND DRILL 12,345 12345 ##,### 1,234 1234 ##,### 123 123 ##,### 12 12 ##,### 1 1 ##,### 0 ##,### -1 ##,### 1 12345.67 12345.67 .01 0.01 ##,###.## .01 -0.01 ##,###.## - 1,234.56 -1234.56 -##,###.## - -123.45 -##,###.## -123.45 -123.45 --#,###.## ($12,345.67) -12345.67 ($$$,$$$.&&) ( 123.45 $123.45) $123.45123.45 -123.45 ($$$,$$$.&&) ($$$,$$$.&&) ($12,345.67)-12,345.67 ( ##,###.## (($$$,$$$.&&) $12.34)-12.34 (($$$,$$$.&&) $12.3412.34 (($$$,$$$.&&) 405 CLICK, DRAG, AND DRILL ($12,345.67)-12,345.67 406 (((,(($.&&) ($12.34)-12.34 (((,(($.&&) $12.3412.34 (((,(($.&&) The edit masks for numeric data elements consist of ten characters interpreted as follows: * This character fills any positions in the display field not occupied by digits with asterisks (*). & This character fills any positions in the display field not occupied by digits with zeroes. # This character fills any positions in the display field not occupied by digits with blanks. , This is displayed as a comma if there are digits to the left. Otherwise it is blank. . This is displayed as a period marking the decimal point in the number. There may only be one period in any edit mask. This character is a literal. It is displayed as a minus sign when the number is less than zero. Otherwise it is blank. Several negative signs in a row will float to the right-most position which does not interfere with the digits of the number. If a dollar sign ($) follows a group of minus signs, it and the minus signs float together. That is, the left-most digit will be immediately preceded by a $ and then a minus sign will be in front of the $ if the number is less than zero. + This character is a literal. It is displayed as a minus sign when the number is less than zero. Otherwise it is a plus sign. Several positive signs in a row will float to the right-most position which does not interfere with the digits of the number. ( This character is a literal. It is displayed as a left parenthesis when the number is less than zero. Otherwise it is blank. It is the accounting parenthesis that is used in place of the minus sign to indicate a negative number. Several left parentheses in a row will float to the right-most position which does not interfere with the digits of the number. If a dollar sign ($) follows a group of left parentheses, it and the parentheses float together. That is, the left-most digit will be immediately preceded by a $ and then a left parenthesis will be in front of the $ if the number is less than zero. CLICK, DRAG, AND DRILL 407 ) This character is a literal. It is displayed as a right parenthesis when the number is less than zero. Otherwise it is blank. It is the accounting parenthesis that is used in place of the minus sign to indicate a negative number. One of these characters generally closes a format string that begins with a left parenthesis. $ This character is a literal. It is displayed as a dollar sign. When several dollar signs are grouped in a row, a single dollar sign floats to the position immediately to the left of the left-most digit of the number. See above for how it floats together with a minus sign or left parenthesis when it follows one of these two characters in the format string. 14.1.2 Edit Masks for Date and Time Data Elements The following table illustrates the use of the edit mask field. In each example, a date and time field containing November the fourteenth, nineteen-hundred and ninety-four, 45 seconds past one-thirty in the afternoon (November 14, 1994 at 1:30:45pm) is being formatted. This date falls on a Monday. Formatted Result on the Report Edit Mask 111494 mmddyy 141194 ddmmyy 941114 yymmdd 94/11/14 yy/mm/dd 94 11 14 yy mm dd 1994 14 11 yyyy dd mm 11-14-94 mm-dd-yy Nov. 14, 1994 mmm. dd, yyyy Nov 14 1994 mmm dd yyyy CLICK, DRAG, AND DRILL 408 (Mon) Nov. 14, 1994 (ddd) mmm. dd, yyyy Mon, 11-14-1994 ddd, mm-dd-yyyy Nov. 14, 1994 at 13:30:45 mmm. dd, yyyy at HH:MM:SS The edit masks for date and time data elements consist of characters interpreted as follows: dd Day of the month as a 2-digit number (01-31) ddd Day of the week as a 3-letter abbreviation (Sun through Sat) jjj Day of the year as a 3-digit number left-filled with zeroes (Julian) mm Month as a 2-digit number (01-12) mmm Month as a 3-letter abbreviation (Jan through Dec) yy Year as a 2-digit number relative to its century (00-99) yyyy Year as a 4-digit number (0001-9999) HH Hour of the day as 2-digit number (01-24) MM Minutes of the hour as a 2-digit number (00-59) SS Seconds of the minute as a 2-digit number (00-59) All other Characters in a date or time edit mask will be printed as entered 14.1.3 Edit Masks for Character Data Elements The following six characters in the edit mask of a character-type field cause the contents of the field to be displayed on the report as indicated. All other characters in the edit mask field will be printed as entered. # Digits 0-9 will be displayed CLICK, DRAG, AND DRILL A A-Z and a-z will be displayed N Combination of the above two; all alphanumerics will be displayed L All alphabetic characters will be displayed in lower case U All alphabetic characters will be displayed in upper case X All characters in field will display as entered 409 CLICK, DRAG, AND DRILL 410 15 Appendix C: IFAS 7i IQ Mapping With IFAS 7i, the traditional terminal-based interactive inquiries (IQ) are replaced with Click, Drag, and Drill reports. However, many users are used to the standard menu location of the IQ Reports (GLIQ, APOHIQ, etc.). We have added an option to the JCL that allows IFAS menu masks to be mapped to CDD Folders. The syntax of the mapping statement is "[cddfolder://<folder_id>]" where "<folder_id>" is the object ID of the desired folder. Note: Folder ID is not the same as the description typically shown to users. The folder ID can be identified with a simple query of the us_secobj_mstr. (ex: select us_so_id from us_secobj_mstr where us_so_desc = 'GL Reports') CLICK, DRAG, AND DRILL 411 By default, the base security structure for CDD contains IQ folders created specifically for this mapping. The folders information is listed below: If the folders are not present for a specific IFAS database, they can be recreated using the System Administrator application. (See the System Administrator documentation.) CLICK, DRAG, AND DRILL 412 16 Appendix D: Attaching Excel Output to 7i Reports 16.1 Using XLSGEN.DLL for Attaching Excel Output to 7i CDD Report The following lists the macros necessary to enable the attachment of Excel output to 7i CDD reports. All colored macros should be added to the report in the sections shown. The exception is the data output macros (displayed here in the Detail section, they should be placed wherever the data is ready for export. They may also be used more than once within the report if you wish to export multiple levels of data to Excel (Detail, Sub-Totals, Report Totals, etc.). The maroon fields need to be defined as User-Fields. The ExcelFlag is intended to be used as a prompted User-Field (however you can hard code the value as a ‘Y’ value if you wish the report to always create the Excel output). See below for the setup example. CLICK, DRAG, AND DRILL 413 Note: Leave the "Prompt" field Blank to limit to a particular option. There is also a OutputLbl that needs to be created. It should be a User-Field with Character type and at least 100 characters in size. Place this at the End of Report to display the output location when running the report in CDD/Insight. 16.2 The macros: 'Declare Option Explicit: performance is better than using uninitialized variables CLICK, DRAG, AND DRILL Option Explicit 414 CLICK, DRAG, AND DRILL 415 CLICK, DRAG, AND DRILL 416 CLICK, DRAG, AND DRILL 16.3 Installing the XLSGEN DLL Purchase a license http://www.excelgenerator.com/ Copy the xlsgen.dll file to the SunGard products bin Directory. Use the Run command to install the dll. 417 CLICK, DRAG, AND DRILL C:\Progra~1\SunGar~1\Bin\regsvr32.exe xlsgen.dll A successful Install will look like this… 418 CLICK, DRAG, AND DRILL 419 17 Appendix E: Tutorial 17.1 Creating an Accounts Payable Report The purpose of this tutorial is not only to help you gain familiarity with Click, Drag & Drill reporting, but also to provide you with step-by-step instructions to create a functional report. • • • • Multiple Sort Levels User-Defined Fields Text Fields Report Regions - Page Heading - Group Headers - Group Footers • • • • • - Multiple Detail Lines Page Footing End of Report Region Property Enhancements Macros User-Defined Selection Criteria Accounts Payable Report Specifications: The report is to be sorted in the following order: first by Ledger, then Vendor Name, then Status, and finally by Invoice Number. The report Detail Line will contain the following elements: InvoiceNumber, Invoice Date, Description, Key, Object, JL Key, JL Object,Due Date, PO Number, Check Number, Check Date, and Distribution Amount. Negative Distribution Amounts are to be displayed in RED. The report is to include a Group Header that contains Vendor ID and Vendor Name. The report is to include the following Group Footers: –Total Invoice Distribution Amount CLICK, DRAG, AND DRILL 420 –Invoice Status Total Summary (i.e., totals for Paid, Unpaid,Waiting Payment, and Reversed) and User-Defined Field“Vendor Net” which is derived by summing Paid & Unpaid invoices and then subtracting Reversed invoices. The report is to utilize User-Defined Selection Criteria. You will be prompted to enter desired report start and end dates. Create User-Defined field “Grand Total” that will represent the sum of all Vendor Nets. 17.2 Catalog Manager Unless previously imported by your system administrator, you will need to indicate which table(s) you wish to utilize in your report. These will be the tables that you use to create your Information Categories. Our report will extract data from two tables: PE_NAME_MSTR and OH_DTL. 1. Select “Tools, Catalog Manager” from the main menu… 2. Choose the tables "pe_name_mstr" and "oh_dtl" from the database tables list and click Import. These tables will now appear in the Catalog Table list on the right-hand side of the window. CLICK, DRAG, AND DRILL If desired, you may rename your tables and the associated columns. To perform this function, select your first table, click your right mouse button and select the properties option. When the Catalog Item Properties window appears, select the Details tab. 3. At this point, you may edit the table name as well as the table description. Upon completion, click OK. 4. To edit the associated columns, simply repeat the process described above for each of the column names in your table. Upon completion, Click OK. 421 CLICK, DRAG, AND DRILL 5. If you wish to edit a column format, select the Display tab in the Catalog Item Properties window. Additionally, you may edit the default size, mask, font and color. Upon completion, Click OK. 6. After you have imported and edited your tables, click Close in the Catalog Table Manager window. 17.3 Information Categories 1. Select "File, New" from the main menu…. 2. Select "Information Category", and click OK. 422 CLICK, DRAG, AND DRILL 423 3. Select the tables (OH_DTL & PENAME) to be used in your information category and click Finish. A table may be selected either by double-clicking on it, or by highlighting the item and then selecting the Add-> option. If you select an item in error, you may remove it by highlighting the item and then selecting the <-Remove option. 4. Establish an Inner Join between PENAME and OH_DTL. To do this, simply click the column PEID in the PENAME table and drag it over to the OH_PE_ID column in the OH_DTL table. 5. Save your new Information Category. Select "File, Save". CLICK, DRAG, AND DRILL 6. Assign your information category a name, description, and click OK. 17.4 Report Design 1.Select "File, New" from the main menu…. 2. Select "Report Design", and click OK. 424 CLICK, DRAG, AND DRILL 3.Choose "Columnar Report" and click Next. 4. Choose the information category that you defined in the previous section and click Next. 425 CLICK, DRAG, AND DRILL 5. Expand your available Database Items list by clicking on the "+" to its left in the Available Category Fields box. 6. Select the following report detail items: Invoice Number, Invoice Date, Description, Key, Object, JL Key, JL Object, Due Date, PO Number, Check Number, Check Date, and Distribution Amount. You may select the items either by double-clicking on them or by highlighting the item and then clicking on the directional arrow, in the middle of the screen. To remove an item click the . 7. When all of your fields have been selected as noted above, click Next. 426 CLICK, DRAG, AND DRILL 8. Define your Sort Items (ledger, vendor name, status, and invoice number) by selecting the desired items as described in step #6, and click Next. 9. Enter your report title, and click Finish. 427 CLICK, DRAG, AND DRILL 428 10. CDD automatically creates a "Rough Draft" according to the detail and sort items that you requested. Now you are ready to refine your report layout. You can re-label your report headings by simply double-clicking on a heading. A Report Object Properties window will appear that contains the selected item . Edit the item and click OK. Your new heading will be displayed immediately. 11. It is a good idea to periodically save your report throughout the design stage. Save your report by selecting "File, Save" from the main menu. Enter your report name, description, and click OK. For future saves, simply select "File, Save" from the main menu. 12.Create an additional detail region to be used for printing negative distribution amounts in red. With your cursor positioned on an "open" area of your report (i.e., not on a defined field or heading), right-click your mouse button and select "Insert" the “Region”. Select "Detail" and click Next. CLICK, DRAG, AND DRILL 13. Enter region description and click Finish. 14. Note the additional detail region on your report layout screen. Populate your newly defined detail region with same fields that appear in your original detail region. To include these items, click the desired item from the data list, drag and drop it in the new detail region. Your new region will be a mirror image of your original region with the exception of the color of the distributed amount field. 429 CLICK, DRAG, AND DRILL 430 15. With your cursor positioned on the distributed amount field in your second detail region, double-click the item. The Report Object Properties window will appear. Select the Format tab, change the text color to Red, and click OK. When you return to your report design, the field will be displayed in red. 16. To specify when the new region is to be utilized, position your cursor in an open area of your original detail region; right click your mouse button; select “Properties” then “Region”; and click the Print Conditions tab. Expand your Database Items list and select the distributed amount. Next click the ">=" button and then type in the number "0". Upon completion, click OK. This print condition states that a detail line will be printed in this region when the distributed amount is greater than or equal to zero (i.e., a positive number). CLICK, DRAG, AND DRILL 431 17. With your cursor positioned in an open area of your second detail region repeat the process described in step #16. This time instead of selecting records that are greater than or equal to zero, you will select records that are less than zero (i.e., negative values). Upon completion, click OK. This print condition states that a detail line will be printed in this region when the distributed amount is less than zero. 17.5 Group Headers and Group Footers For our purposes, each time there is a change in the invoice number, the total distributed amount for that invoice will be calculated, and each time there is a change in vendor, a recap of the previous vendor's activity will be calculated and displayed. The recap will include a total for each status category as well as a vendor net. CLICK, DRAG, AND DRILL 1.Right-click in an open area of your report design and select” Insert, Region” Group Header. Expand the Group Header Region Levels by clicking on the "+" located next to "Group Header". 2.Select item name (i.e., OH_DTL.OH_PE_NAME) for this Group Header and click Next. 432 CLICK, DRAG, AND DRILL 3.You may edit the Region Description if desired. Click Finish. 4. Note the new region "Group Header (OH_DTL.PE_NAME). Populate (i.e., drag and drop) this region with vendor ID and name fields. 433 CLICK, DRAG, AND DRILL 5. Create three Group Footers (refer to steps #1 - #4): 434 CLICK, DRAG, AND DRILL 435 6. Create two Text Fields that will be used to label your Invoice Number and Invoice Total and position them in the Group Footer Region "OH_DTL.OH_REF". From your Database Items list, drag and drop the Invoice Number and Distributed Amount fields onto that same region. 7. Change the Total Type to None in the Report Properties Box. To do this, you may either double-click your left mouse button with your cursor positioned on total field and select the Total tab, or by a right-click of your mouse button, select item properties, and select the Total tab from the Report Object Properties box. By changing the Total Type from Total to None, you eliminate the problem of duplicate addition. CLICK, DRAG, AND DRILL 436 17.6 User-Defined Fields Follow the steps below to create five user-defined fields to hold the following totals. These fields will be used in the Vendor Name Footer Region. Be sure to set the total type to None in the Report Object Properties (refer to step #7 in previous section). Vendor Paid (i.e. status = "PD") Vendor Waiting Payment (i.e. status = "WP") Vendor Unpaid (i.e. status = "DS") Vendor Reversed (i.e. status = "RV") Vendor Net (i.e. "PD" + "DS" - "RV") 1. Right-click your mouse button in an open area and select Insert, User Field. Enter the name, description, heading, and type for your UserDefined field, and click Next. CLICK, DRAG, AND DRILL 437 2. Select a mask (i.e., format for your field) and make any other desired changes. Click Next when complete. Repeat this process for each of your vendor status total fields. Note: each time you create a user-defined field, it will appear under the User Fields list in your Data Items list. CLICK, DRAG, AND DRILL 3. Once all of your fields have been defined, drag and drop them in the Group Footer Region "OH_DTL.OH_PE_NAME". 438 CLICK, DRAG, AND DRILL 439 4. Create four Text Fields that will be used to label your Invoice Status Totals and two additional Text Fields to label your Vendor Name and Total. Position all of these in the Group Footer Region "OH_DTL.OH_PE_NAME". Your report design should resemble the diagram below. CLICK, DRAG, AND DRILL 440 5. Create an End of Report region to hold the grand total. Right-click your mouse button and select Insert, Region. The Region Level window will appear; select End of Report, and click Next. CLICK, DRAG, AND DRILL 6. Enter the Region Description and click Finish. 7. Your report should resemble the example below. 441 CLICK, DRAG, AND DRILL 8. Right-click your mouse button in an open area and select Add User Field. Enter the name, description, heading, and type for your UserDefined field, and click Next. 442 CLICK, DRAG, AND DRILL 443 9. Select an edit mask and click Next. 10. No action is necessary in the Calculation window. Click Finish. 11. Create a Text Field that will be used to label your grand total and position it in the End of Report. From your User Defined Items list, drag and drop the grand total onto that same region. 12. Your report should resemble the above example. CLICK, DRAG, AND DRILL 444 17.7 Macros The CDD Macro function enables you to further refine your report. The macro function will be utilized to accumulate the various invoice status totals. To access the Macro function, simply click the Macros tab within your report design window. CLICK, DRAG, AND DRILL 445 17.7.1 17.7.2 Initialize the Grand Total Field 1. Initialize your User-Defined Grand Total field. In the Local Routines field, scroll to Initialize. Type the statement “GRAND_TOTAL = 0” as appears below. 2. Once you have finished the statement, click the Compile key . The following message will appear: CLICK, DRAG, AND DRILL 17.7.3 446 Initialize Other User Fields 1. Initialize your other User-Defined fields, by typing the statements below after selecting the Group Header (OH_DTL.OH_PE_NAME) from the Local Routine field. DS_TOTAL = 0 PD_TOTAL = 0 WP_TOTAL = 0 RV_TOTAL = 0 VENDOR_TOT = 0 CLICK, DRAG, AND DRILL 447 The purpose of this macro is to initialize your totals each time there is a change in vendor. If this particular macro was not utilized, each time there was a change in vendor your totals would include all of the previous vendors as well. Your screen should look like the figure below: 2. Once you have finished the statements, click the Compile key and look for the "Success" message. 17.7.4 Calculate Running Totals The next macro will keep a running total of all of the invoice types and a vendor net for each of the vendors with distributed amounts that are greater than or equal to zero. This macro also keeps a running total of the grand total that will appear at the end of your report. For each CLICK, DRAG, AND DRILL 448 record, this macro looks at the invoice status and then depending on its value, adds it to the appropriate status total. For instance, if an invoice has a reversed "RV" status, the distributed amount for that invoice will be added to the RV_TOTAL. Next, the macro calculates the current vendor total and grand total. 1. Type the statements below after selecting the Detail macro option. Upon completing, click the Compile key and look for the "Success" message. Select Case OH_DTL.OH_STATUS Case “DS” DS_TOTAL = DS_TOTAL + OH_DTL.OH_DIST_AMT Case “PD” PD_TOTAL = PD_TOTAL + OH_DTL.OH_DIST_AMT Case “WP” WP_TOTAL = WP_TOTAL + OH_DTL.OH_DIST_AMT Case “RV” RV_TOTAL = RV_TOTAL + OH_DTL.OH_DIST_AMT CLICK, DRAG, AND DRILL Your screen should appear like the figure below: 449 CLICK, DRAG, AND DRILL 450 2. This macro will keep a running total of all of the invoice types and a vendor net for each of the vendors that have distributed amounts that are less than zero. Recall the Print Conditions that were established earlier in the process. This macro also keeps a running total of the grand total that will appear at the end of the report. For each record, this particular macro looks at the invoice status and then depending on its value, adds it to the appropriate status total. For instance, if an invoice has a reversed "RV" status, the distributed amount for that invoice will be added to the RV_TOTAL. Next, the macro calculates the current vendor total and grand total. Type the above statements after selecting the Detail1 Local Routine field. Upon completion, click the Compile key and look for the "Success" message. Note: You can use your copy & paste options to save on typing time. CLICK, DRAG, AND DRILL 451 17.7.5 17.7.6 Selection Criteria The next goal is to establish report criteria. This will allow the person who is runs the report to extract specific data using the criteria. In this example, the user will be prompted to enter a start date and report date. When the report is executed, only those records having an invoice date between the specified start date and the run date of the report will be reported. 1. Select the View menu from the Main Toolbar and then select the Report Properties command. The Main Report Properties window will appear. Select the Report Prompts tab on this window. By clicking the boxes, place a check mark next to the two fields labeled Report Date and Start Date. Then press OK. See the figure below for an example: CLICK, DRAG, AND DRILL 2. Press the Selection Criteria button from the main menu and then press the Run Report button appear. Now, you are ready to define your report selection criteria. Click Add. 452 . The Selection Criteria window will 3. Expand your Database Items, select Invoice Date (OH_REF_DT), greater than or equal, data item and click Next. CLICK, DRAG, AND DRILL 4. Expand your System Fields, select Start_Date and click Finish. 5. Your screen will resemble the diagram below. 453 CLICK, DRAG, AND DRILL 6. Select Add again and expand your Database Items, select Invoice Date (OH_REF_DT), less than or equal, data item and click Next. 7. Expand your System Fields, select Report_Date and click Finish. 454 CLICK, DRAG, AND DRILL 455 8. Your screen should resemble the above example. Click Finish. 9. At the prompt, press Yes to save. Enter a name and description for your selection criteria. Select the Set as Default box and press OK. You can define multiple selection criteria for a single report. At run time, you will be asked to choose the desired selection criteria. CLICK, DRAG, AND DRILL 17.7.7 456 Report Enhancements 1. Add the following text fields to the Page Heading Region: Report Period, through, and Page #. Drag and drop Start and Report Dates from the System Fields data list to the left side of the Page Heading Region as displayed in the example below. When your report is run, the start and report dates entered by the user will be displayed in these two fields. CLICK, DRAG, AND DRILL 457 2. Drag and drop Page Number from the System Fields data list to the right side of the Page Heading Region as displayed in the example above. When your report is run, the system will automatically keep track of the number of pages in your report and display them in this field. 3. Drag and drop the following system fields to your footer region: current date, current time, report ID, report description, company name, and userid. Congratulations! Now you are ready to run your report! CLICK, DRAG, AND DRILL 17.7.8 458 Run a Report 1. To prompt the user for selection criteria you must click the selection criteria button . Then, right-click on the design and click the button. 2. Your default selection criteria will appear; click Finish, and the following Report Prompts window will appear. 3. Enter your selection criteria (i.e., Start Date and End Date), and click OK. Your report will be executed. CLICK, DRAG, AND DRILL 459 18 Appendix F: CDDsearch.exe CDDsearch will help you identity the CDD Reports that may be affected by an IFAS Release. This utility allows clients to identify any Table Definitions, Information Categories, and Reports that may be impacted by an IFAS Release. The tool is named "cddsearch.exe" and is located in the same directory CDD is executed on the user's PC. 18.1 Schema Change When looking for schema changes, the tool requires two xml files. The first file represents a client's IFAS Version and the second represents the next IFAS update that they will be loading. Alternatively it could be the current release and a previous one in order to view reports already impacted by the update changes. 18.2 XPath Query The second search option allows the use of XPATH queries to search CDD XML storage information. This will most likely not be useful in looking for update changes but was simply added as another search option. 18.3 Results File The next filename the tool needs is the location to put the search results. This tool creates a text file with the Table Definitions, Information Categories and Reports impacted with the schema changes. This will require a location that the current user has write permissions to on either the local or network filesystem. 18.4 Search Button Once the Old Schema file, New Schema file and Results file have been identified the search button will allow the process to begin. The progress bar to the left of the search button will inform the user how far along in the process the tool is currently. The "Search Status" box will inform the user what item is being searched currently and the "Matches Found" box will keep a count of the number of items (Information Categories or Reports) that have items impacted by the schema change. CLICK, DRAG, AND DRILL 18.5 Schema Files Although the schema files can be generated on the client system with xschema, refer to KB article # 5053 for a few examples. 460