Sie sind auf Seite 1von 828

Type the text for the HTML TOC entry Type the text for the HTML TOC

entry Type the text for the HTML TOC entry Impromptu Administration Guide

ADMINISTRATION GUIDE

IBM(R) COGNOS(R) Business Intelligence Series 7


IBM(R) Cognos(R) Impromptu(R)

ADMINISTRATION GUIDE

Product Information
This document applies to IBM Cognos Impromptu Version 7.4 and may also apply to subsequent releases. To check for newer versions of this document, visit the Cognos Software Services Web site (http://support.cognos.com).
(R) (R) (R)

Copyright
Copyright 2008 Cognos ULC (formerly Cognos Incorporated). Cognos ULC is an IBM Company. Portions of Cognos ULC software products are protected by one or more of the following U.S. Patents: 6,609,123 B1; 6,611,838 B1; 6,662,188 B1; 6,728,697 B2; 6,741,982 B2; 6,763,520 B1; 6,768,995 B2; 6,782,378 B2; 6,847,973 B2; 6,907,428 B2; 6,853,375 B2; 6,986,135 B2; 6,995,768 B2; 7,062,479 B2; 7,072,822 B2; 7,111,007 B2; 7,130,822 B1; 7,155,398 B2; 7,171,425 B2; 7,185,016 B1; 7,213,199 B2; 7,243,106 B2; 7,257,612 B2; 7,275,211 B2; 7,281,047 B2; 7,293,008 B2; 7,296,040 B2, 7,318,058 B2; 7,325,003 B2; 7,333,995 B2. Cognos and the Cognos logo are trademarks of Cognos ULC (formerly Cognos Incorporated) in the United States and/or other countries. IBM and the IBM logo are trademarks of International Business Machines Corporation in the United States, or other countries or both. Other company, product, or service names may be trademarks or service marks of others. While every attempt has been made to ensure that the information in this document is accurate and complete, some typographical errors or technical inaccuracies may exist. Cognos does not accept responsibility for any kind of loss resulting from the use of information contained in this document. This document shows the publication date. The information contained in this document is subject to change without notice. Any improvements or changes to the information contained in this document will be documented in subsequent editions. U.S. Government Restricted Rights. The software and accompanying materials are provided with Restricted Rights. Use, duplication, or disclosure by the Government is subject to the restrictions in subparagraph (C)(1)(ii) of the Rights in Technical Data and Computer clause at DFARS 252.227-7013, or subparagraphs (C) (1) and (2) of the Commercial Computer Software - Restricted Rights at 48CFR52.227 as applicable. The Contractor is Cognos Corporation, 15 Wayside Road, Burlington, MA 01803. This document contains proprietary information of Cognos. All rights are reserved. No part of this document may be copied, photocopied, reproduced, stored in a retrieval system, transmitted in any form or by any means, or translated into another language without the prior written consent of Cognos.

Table of Contents
Introduction 21 PART 1: Administering Impromptu 23 Chapter 1: Managing Catalogs 25 Create a Catalog 27 Change the Catalog Type 28 What is a Personal Catalog? 28 What is a Distributed Catalog? 28 What is a Shared Catalog? 28 What is a Secured Catalog? 29 Catalog Attributes 29 Managing Catalog Access 30 Controlling Catalog Access Using a Catalog Lock 30 Open a Master Distributed Catalog 30 Add Tables to a Catalog 31 Add Columns to a Catalog 31 Add the Same Table Twice to a Catalog 32 Sort Tables in a Catalog 32 Verify and Update Tables 33 Remove Tables and Columns 33 Qualify Catalog Content 34 Generate a Content Overview Report 34 Generate Default Reports 35 Chapter 2: Work with Folders and Folder Items 37 Create a New Folder 37 Copy and Paste Folders 38 Move Folders and Items in Folders 38 Remove Folders and Items in Folders 39 Rename Folders and Items in Folders 39 Sort Folders and Items in Folders 39 Generate a Folder from a Report 40 Synchronize Catalog Changes to Reports 40 Chapter 3: Work with Joins 41 Create an Equijoin 42 Create a Non-equijoin 42 Create an Outer Join 43 Create a Self Join 44 Create a Compound Join 44 Create a Complex Join 44 Create Joins Automatically When Creating a Catalog 45 Create Joins Automatically After Creating a Catalog 46 Test and Troubleshoot Joins 47 Change Joins 49 Remove Joins 49 Chapter 4: Working with Stored Conditions and Calculations 51 Building Expressions 51 Store a Condition or Calculation in a Catalog 53 Store a Summary in the Catalog 53 Administration Guide 3

Use a Stored Condition in a Calculation 54 Use a Stored Calculation in a Report 54 Use a Stored Condition as a Filter 55 Use a Stored Condition in Conditional Formatting 55 Change a Stored Condition or Calculation 55 Chapter 5: Working with Prompts 57 Create a Catalog Prompt 57 Modify a Catalog Prompt 59 Use a Catalog Prompt in a Report 59 Remove a Catalog Prompt from a Report 59 Create a Report Prompt 59 Modify a Report Prompt 60 Chapter 6: User Profiles and Data Access Requirements 63 Analyze User Requirements 63 Create a User Class 65 Edit a User Class 66 Remove a User Class 67 Use Access Manager to Control Security 67 Chapter 7: Techniques for Controlling User Access 69 Control Access Using Password Authentication 69 Assign or Change a Password for a User Class 69 Remove a Password from a User Class 70 Store a Database Password for a User Class 70 Prompt a User Class for a Database Password 70 Test User Access 71 Control Access to Objects 71 Control Access to Tables or Columns 71 Control Access to Folders and Items in Folders 72 Control Data Access Using Filters 73 Control Access Using a Catalog Lock 73 Control Access to Impromptu Functionality 74 Control Editing of the Catalog Structure 75 Control Creating and Editing Reports 75 Control the Ability to Enter SQL Directly 76 Control the Ability to Define User Classes 76 Chapter 8: Manage the Impact on the Network and Database 77 Use the Bulk Fetch Capability 77 Control the Retrieval of Large Text Items 77 Control the Number of Rows Retrieved 78 Control the Number of Tables Retrieved 78 Control Sorting on Non-Indexed Columns 79 Control the Creation of Outer Joins 79 Suppress Duplicate Rows of Data 79 Control the Creation of Cross-Product Queries 80 Control the Time a User Class Can Run Queries 80 Restrict the Time a User Class Is Connected to the Database 81 Adjust the Client/Server Balance 81 Assign Weights to Tables 82 Use Snapshots or Thumbnails 82 Chapter 9: Audit Impromptu Performance 85 Chapter 10: Work with HotFiles 89 Create a HotFile 90 Change or Update a HotFile 90 Add a HotFile to Your Catalog 91

4 IBM(R) Cognos(R) Impromptu(R)

Create a Catalog of Only HotFiles 91 Use a HotFile in Your Report 91 Use HotFiles as Lookup Tables 92 Share HotFiles by Including Them in Your Catalog 92 Join Multiple Databases Using HotFiles 92 Create and Use a HotFile for a Multiple Query Report 92 Chapter 11: Work with Stored Procedures 95 Create a Stored Procedure Report 96 Insert Parameters in a Stored Procedure Call 96 Hide Prompts for Stored Procedure Values 97 Chapter 12: Use SQL 99 View the Existing SQL for the Query 99 Create a Query By Writing Your Own SQL 99 Change a Query By Writing Your Own SQL 99 Generate Efficient SQL for Summary Level Reports 100 Chapter 13: Automating and Updating Impromptu 103 Standardizing Reports and Templates 103 Using Inheritance 104 Automating Tasks with Macros 105 Using the Impromptu Type Library 107 Manage the Size of Impromptu Reports 107 Create a Database Definition 109 Create a Database Definition for DB2 109 Create a Database Definition for a HotFile 111 Create a Database Definition for Informix 111 Create a Database Definition for Microsoft SQL Server via OLE DB 112 Create a Database Definition for ODBC 112 Create a Database Definition for Oracle 114 Create a Database Definition for Sybase Adaptive Server Enterprise 114 Copy a Database Definition 117 Remove a Database Definition 117 Select a Different Database for a Catalog 118 Connect to the Database 118 Chapter 14: Create and Customize a Chart 119 Choosing a Chart Type 119 Create a Chart 121 Change the Chart Type 123 Format a Chart 123 Add Chart Titles 124 Format Chart Titles, Axis Titles, Data Labels, and Legend Text 125 Format the Chart, Plot, and Legend Area 126 Change the Axis Labels and Scale Settings 126 Change the Grids Settings 128 Format Data Items 128 Hide or Show Data Labels in a Chart 129 Add and Format a Chart Legend 129 Show TrendLines 131 Correlation Chart 132 Chapter 15: Impromptu Chart Changes 135 Chapter 16: Impromptu Chart Controls 141 Formatting Dialog Box Controls 141 Grids and Scales Dialog Box Controls 142 Properties Dialog Box Controls 148 Titles Dialog Box Controls 155

Administration Guide 5

Trendlines Dialog Box Controls 155 Chapter 17: Product Sample Listing 157 Catalogs 157 Description 157 Location 157 Main Reports 157 Description 157 Location 160 Secondary Reports 161 Description 161 Location 161 Discovering Impromptu Reports 161 Location 162 Standard Templates 162 Description 162 Location 162 PowerPrompts Applications 162 Description 163 Location 163 OLE Automation (Macros) 164 Description 164 Location 164 User Defined Functions 164 Description 164 Location 165 Chapter 18: Integrating Impromptu with Other IBM Cognos Products 167 Use Architect with Impromptu 167 Import Impromptu Metadata into Architect 168 Export Catalogs from Architect 168 Integrate with Impromptu Web Reports 168 Preparing Your Reports for the Web 169 Security Interaction With Impromptu Web Reports 169 Integrate with IBM Cognos Query 169 Drilling Through to IBM Cognos Query 169 Importing Queries From IBM Cognos Query 170 Integrate with PowerPlay 170 Drilling Through from PowerPlay 171 Creating PowerCubes 172 Publish Reports to Upfront 172 Create NewsBox on Publish to Upfront 173 Data Formats and Locale Settings 174 Creating Accessible Reports 174 Enabling Accessibility Support 174 Design Considerations for Accessible Reports 175 Chapter 19: Troubleshooting and Best Practices 177 Unable to Identify Catalog Contents 177 PART 2: Creating Reports with Impromptu 179 Chapter 20: View a Report 181 View an Existing Report 181 View the Details of a Value in a Report 182 Change the Page Layout View of a Report 183 Chapter 21: View a Report with a Web Browser 185 Chapter 22: Print a Report 187 Preview a Report 188 6 IBM(R) Cognos(R) Impromptu(R)

Set Up the Printer 188 Print a Wide List Report on a Single Page 189 Print a List Report With Repeating Columns 190 Chapter 23: Export a Report 193 Export a Report to Other Applications 194 Add Report Navigation 195 Render a Report in Excel Format 196 Attach a Report to Email 196 CSV File Format 196 Chapter 24: Use Annotations 199 Chapter 25: Create a Report 201 Open a Catalog 202 Upgrade a Catalog or Report 203 Use the Report Wizard to Quickly Create a List Report 203 Use the Report Wizard to Quickly Create a Crosstab Report 204 Use a Template to Quickly Create a Report 205 Import a Query from IBM Cognos Query 207 Use a Report in Another Report 207 Create a Crosstab Sub-Report 208 Create Accessible Reports 208 Retrieve Data from the Database 209 Multiple Instances and Versions of Impromptu 209 Change the Number of Instances of Impromptu 210 Chapter 26: Add or Remove Data 211 Add Data to an Existing Report 211 Remove Data from a Report 212 Chapter 27: Group, Sort, or Associate Data in a Report 215 Group Data 217 Sort Data 218 Associate Data to a Grouped Data Item 219 Chapter 28: Filter or Find Data 221 Quickly Filter Data Using the Filter Button 222 Quickly Filter Data Using the Filter Drop-down Button 223 Filter a Report Using a Filter Stored in the Catalog 224 Filter Using Crosstab Titles 225 Find Specific Data in a Report 226 Copy, Cut, and Paste in the Expression Editor 227 Chapter 29: Work with Summaries 229 Create a Summary 230 Add a Total to a List Report 232 Use a Summary Stored in the Catalog 233 Move a Summary to Another Location 233 Chapter 30: Insert Text, Pictures, and Other Report Variables 235 Insert Text 235 Insert a Static Picture 236 Insert Page Numbers 238 Insert a Report Variable 239 Chapter 31: Hide, Show, Group or Resize Parts of a Report 241 Hide Part of a Report 242 Show Part of a Report 242 Unhide Part of a Report 242 Group Parts of a Report 243 Resize Part of a Report 244 Administration Guide 7

Stack Parts of a Report 244 Chapter 32: Format a Report 247 Apply a Template to an Existing Report 247 Add a Page Header or Footer 248 Adjust Margins 249 Align Parts of a Report 249 Position Part of a Report Using Snap to Grid 250 Chapter 33: Format Data 253 Justify Data 258 Enhance Data Display 259 Using the Currency Symbol List 259 Maintain Currency Symbols 260 Data Formats and Locale Settings 262 Number and Currency Data Type Formatting 262 Chapter 34: Add a Border Around Part of a Report 263 Add Color or a Pattern to Part of a Report 263 Change the Font 264 Apply a Style to Part of a Report 265 Chapter 35: Format a List or Crosstab Report 267 Hide or Show Grid Lines 267 Select Parts of a List Report 268 Move a Column 269 Change a Column Title 270 Change the Width of a Column 270 Change the Height of a Row 271 Add a Group or List Header or Footer 272 Change the Height or Width of a List Header or Footer 273 Keep Details and Group Headers (or Footers) Together 273 Insert a Page Break in a List Report 274 Select and Format Parts of a Nested Crosstab Report 274 Set the Default Format for Crosstab Columns 276 Chapter 36: Reporting While Disconnected From the Database 277 Create a Local Copy of the Report Data 278 Refresh a Local Copy of the Report Data 279 Remove a Local Copy of the Report Data 280 Chapter 37: Drill Through to IBM Cognos Query 281 Select the IBM Cognos Query Server 281 Set Up Drill-Through Access to IBM Cognos Query 282 Chapter 38: Prepare a Report for Impromptu Web Reports 283 Prepare a Report for Impromptu Web Reports 283 Create Burst Reports 285 Package HotFiles 285 Notify the Report Administrator 286 Chapter 39: PowerPrompts Developer Studio 287 Chapter 40: Report Specifications 289 File Searching 290 Command Line Switches 291 -m macro-filename 291 macro-filename 291 report-name 291 Chapter 41: Configuration Files 293 ini File Format 293 Function Definition Table (FDT) Files 294 8 IBM(R) Cognos(R) Impromptu(R)

Cognos.ini 294 Cern.ini 294 [IBM Cognos Locations] 294 Impromptu.ini 295 [Data Attributes] 296 [Default Directories] 297 [Startup Options] 298 [Query Options] 302 [Object Attributes] 304 [Styles] 304 [Graph Default Colors] 306 [Query Statistics] 306 [MRU Files] 307 Use Type Libraries 307 Chapter 42: Get Help on Basic and Advanced Topics 309 Chapter 43: Troubleshooting 311 Cannot Access the Datasource 311 Cannot Open a Catalog Created with Architect 312 Cannot Open a Catalog with Current User Class or Version of Impromptu 312 Cannot Connect to the SQL Server Database 313 Cannot Connect to the MS SQL Server 313 Cannot Find the Report or One of Its Components 313 Unable to Connect to the Database 314 PART 3: Mastering Impromptu Reports 315 Chapter 44: Report Data 317 Getting the Results You Want 317 Specify the Catalog for Your Reports 317 Group Automatically 318 Define Filters 318 Detail and Summary Filters 318 Create Filters 319 Use Filter Expressions 319 Filter Without Changing Your Summaries 320 What You Can Do Using Filters 321 Tips for Filters 325 Use Prompts to Select Report Data 325 Type-in Prompts 325 Picklist Prompts 326 When to Use the Types of Prompts 329 Using the Prompt Manager 329 What You Can Do Using Prompts 333 Format Report and Catalog Prompts 334 Summaries 336 Summarize Data 337 Create a Summary 340 Changing a Summarys Association 341 Create or Copy a Summary 342 Change a Detailed Data Item into a Summary 343 Calculated Fields 344 Create Calculated Fields 344 What You Can Do Using Calculations 346 Highlight Data 352 Create Styles 352 Conditionally Format Data 354 Conditionally Hide and Show Report Objects 356 Administration Guide 9

Chapter 45: Report Formats 359 Formatting Techniques 359 Data Formats and Locale Settings 359 Customize Data and Objects 359 Define Report Layouts with Templates 361 Set a Default Template 362 Customize the Templates Preview Image 362 Set the View for Templates 363 Create Effective Templates 363 Create Placeholders 365 Modifying Existing Placeholders 367 Create Calculated Placeholders 367 Insert Placeholders 368 Create Complex Layouts with Frames 369 The Parent/Child Relationship 370 Designate a Primary Frame 371 Insert a Frame 371 Select a Frame 373 Assign Names to Frames 373 List Frames 374 Form Frames 375 Chart Frames 378 Text Frames 379 Picture Frames 380 Chapter 46: Complex Reports 383 Present Complex Data 383 Crosstab Reports 383 Quickly Change a List Report into a Crosstab Report 384 Build Crosstabs from a List Query 384 Add Summaries to Crosstabs 386 Create Calculated Columns 388 Filter Data in Crosstab Reports 389 Swap Rows and Columns 390 Change a Crosstab to a List Report 390 Work With Sub-Reports 390 Create Reports Containing Sub-Reports 392 Edit Sub-Report Queries 392 Link Sub-Reports 393 Use Drill-Through Reports 394 Test Drill-Through Reports 397 Present Results with Other Applications 398 Using OLE to Present Impromptu Reports 398 Embed Objects In Impromptu 401 Embed Impromptu Objects in Other Applications 403 Link Impromptu Reports in Other Applications 404 Using HTML to Create Reports on the Web 405 Add Report Navigation 405 Align Report Objects in Impromptu 406 Eliminate Overlapping Objects in a Report 407 Avoid Multiple Scrollbars in HTML Report Output 408 Improving Performance 408 Save Reports as HTML 408 HTML Files 409 Distributing HTML Report Output 410 Export a Report in Excel Format 410 Exporting Reports with Multiple List Frames to Excel 411

10 IBM(R) Cognos(R) Impromptu(R)

Avoiding Multiple Worksheets on Export to Excel 411 Align Report Objects Before Export to Excel 411 Eliminate Overlapping Objects in Excel Reports 412 Add Worksheet Names Before Export to Excel 412 Change the Worksheet Order Before Export to Excel 412 Group Report Objects to Export Them to the Same Excel Worksheet 413 Rendering Headers and Footers in Excel Report Output 413 Export a Report to Excel with Images in the Header and Footer 413 Using Summaries in Excel Report Output 414 Using Data Scoping to Enhance Excel Report Output 414 Export a Text Field with Leading Zeroes to Excel 414 Export a Numeric Field with Null or Missing Values to Excel 415 Export a Form Frame within a List Frame To Excel 415 Chapter 47: Data and Databases 419 Choose Your Data Source 419 How Impromptu Retrieves Data 419 Take Advantage of a Cache Query 420 How Databases are Attached to Catalogs 420 Your Copy of the Database 420 Local Snapshots 421 Thumbnails 421 Use HotFiles 421 Chapter 48: About Catalogs 425 What Can You Do with Catalogs? 425 Use Catalogs 425 How Catalogs Open 427 Create a Personal Distributed Catalog 427 What Can You Change? 428 Rename Folders and their Contents 429 Create Catalog Folders 429 Move Folders and their Contents 430 Store Filters in Catalogs 430 Change a Predefined Filter Condition 431 Store Calculated Data Items and Summaries in Catalogs 431 Create and Store Prompts in Catalogs 432 Add User Classes 433 Chapter 49: Optimize Performance in Impromptu 435 Create Efficient Reports 435 The Difference Between Queries and Reports 435 Client/Server Balancing 436 Which Client/Server Options are Most Efficient? 437 Who Sets the Client/Server Balancing Option? 437 Summaries 437 Retrieve Summary Data Items 437 Put Summaries in Footers 437 Sorting on Database Summaries 438 Associating Summaries with Data Items 438 Choosing an Optimal Summary Strategy 438 Filters 442 Changes to the Filter 442 Database Summaries 442 Impromptu Functions 443 Non-Indexed Columns 443 Impromptu Functions 443 If/Then/Else and Lookup Statements 443

Administration Guide 11

Functions 443 Report Formatting Commands 444 Scan Data for Best Fit 444 Fit to Page 444 Use Alternative Data Sources 444 Test Your Queries Using Thumbnails 444 Improve Performance Using Snapshots 444 Improve Performance Using HotFiles 445 How Outer Joins Affect Your Work 445 What is an Outer Join? 446 When Not to Use Outer Joins 446 Outer Joins Examples 446 Limit the Data 447 Minimize Connection Time 447 Create Separate Accessible Reports 447 Manage the Size of Impromptu Reports 448 Chapter 50: Customize Impromptu 449 Customize Menus 449 Set Up a Launch Menu Command 450 Customize Toolbars and Buttons 450 Show or Hide Toolbars 450 Create a Custom Toolbar 450 Customize Toolbar Buttons 451 Set Up a Launch Button 451 Distribute Custom Menus and Toolbars 452 PART 4: Using Macros with Impromptu 453 Chapter 51: Introduction to Impromptu OLE Automation 455 Rendition ID 456 OLE Automation and Impromptu Registry Keys 457 Chapter 52: Run a Macro 459 Run a Macro in Impromptu Using a Command, Menu Command, or Toolbar Button 459 Run a Macro in Impromptu at Startup 459 Run a Macro in Impromptu Using a Command Line Option 460 Run a Macro in Impromptu Before Opening a Report 460 Chapter 53: Objects 461 Application Object 462 Catalog Object 464 CatalogLevel Object 465 Column Object 466 Database Object 467 DatabaseConnection Object 469 DatabaseDefinition Object 469 Expression Object 470 FolderItem Object 471 PublishExcel Object 472 PublishHTML Object 473 PublishPDF Object 474 QueryItem Object 475 ReportDocument Object 476 SchemaLevel Object 479 SelectedFrame Object 480 StoredProcedure Object 481 Table Object 482 TableLink Object 483 12 IBM(R) Cognos(R) Impromptu(R)

UserClass Object 484 Chapter 54: Collections 487 CatalogLevels Collection 488 Columns Collection 489 Databases Collection 490 DatabaseConnections Collection 490 DatabaseDefinitions Collection 491 DeniedCatalogs Collection 492 DeniedColumns Collection 493 DeniedFolderItems Collection 494 DeniedSchemas Collection 495 DeniedSelectValues Collection 496 DeniedTables Collection 497 FilteredColumns Collection 498 FilteredTables Collection 498 Folders Collection 499 Items Collection 500 QueryItems Collection 501 SchemaLevels Collection 501 SelectedFrames Collection 502 Tables Collection 503 TableLinks Collection 504 UserClasses Collection 505 Chapter 55: Methods 507 Activate Method 510 Add Method (CatalogLevels, SchemaLevels, UserClasses) 511 Add Method (Tables) 512 Add Method (Columns) 513 Add Method (Databases) 515 Add Method (TableLinks) 516 Add Method (DeniedCatalogs, DeniedColumns, DeniedFolderItems, DeniedSchemas, DeniedSelectedValues, DeniedTables) 517 AddExternalHotfile Method 518 AddFolder Method 519 AddItem Method (Use parameter) 520 AddItem Method (Column parameter) 522 AddTable Method 523 AppendEx Method (No Prompt) 524 Token Table 526 Prompt Syntax 529 ApplyTemplate Method 533 ChangeUserClass Method 534 Clear Method 535 ClearTOCColumns Method 536 Close Method 536 CloseCatalog Method 536 CloseReport Method 537 Commit Method 538 ConnectDatabase Method 539 CopySpecialToClipboard Method 540 CopyTo Method 541 CopyToClipboard Method 542 CreateAlias Method 542 CreateCatalog Method 543 CreateEmptyCatalog Method 544 CreateFilterFor Method 545 Administration Guide 13

CreateSnapshot Method 546 CreateStoredProcedure Method 547 DatabaseConnected Method 547 Delete Method 548 DisconnectDatabase Method 548 DistributedUpdate Method 549 Execute Method 549 Export Method 550 ExportASCII Method 551 ExportData Method 552 ExportdBASE Method 553 ExportExcelWithFormat Method 554 ExportHotFile Method 555 ExportSQL Method 555 ExportText Method 556 ExportTransformer Method 557 FileSetPrinter Method 558 GenerateReport Method 559 GetAppVersionInfo Method 560 GetDataValue Method 561 GetErrorNumber Method 562 GetFilterFor Method 569 GetNextQueryError Method 569 GetParameter Method 576 GetSelectedText Method 576 InsertQualificationLevel Method 577 Interactive Method 578 MoveTo Method 579 OpenCatalog Method 579 OpenCatalogEx Method 581 OpenDrillDownReport Method 583 OpenReport Method 584 OpenReportExA Method 585 OpenReportNoExecute Method 586 Print Method, PrintOut Method 587 Publish Method 588 PublishXML Method 589 QueryDialog Method 590 QueryItems Method 591 Quit Method 592 ReExecute Method 592 Remove Method 593 RemoveFilterFor Method 594 RemoveQualificationLevel Method 595 Reset Method 596 RetrieveAll Method 597 RetrieveRows Method 597 Save Method (Catalogs) 598 Save Method (Reports) 598 SaveAs Method 599 SetProcedure Method 600 Title Method 602 TOCAddColumn Method 603 UpdateCatalog Method 604 UseDatabase Method 604 Visible Method 605

14 IBM(R) Cognos(R) Impromptu(R)

Chapter 56: Properties 607 ActiveCatalog Property 611 ActiveDocument Property 612 ActiveUserClass Property 612 AllSelectedFrames Property 613 Application Property 614 CanAddOrModifyFolders Property 616 CanAddOrModifyUserClasses Property 617 CanCreateNewReports Property 617 CanDirectEnterSQL Property 618 CatalogLevels Property 619 CatalogName Property 620 CatalogOpened Property 620 Columns Property 621 Condition Property 622 ConnectionString Property 623 Count Property 623 CreatorUserClass Property 624 CrossProductPermission Property 625 CSVExportOptions Property 626 DatabaseConnected Property 627 DatabaseConnections Property 628 DatabaseDefinitions Property 629 DatabaseItem Property 629 Databases Property 630 DBObject Property 631 Definition Property 632 DeniedCatalogs Property 632 DeniedColumns Property 633 DeniedFolderItems Property 634 DeniedSchemas Property 635 DeniedSelectValues Property 635 DeniedTables Property 636 Description Property 637 EncryptedPassword Property 638 ErrorDocument Property 639 ExportMetaTags Property 639 ExportOptions Property 640 Filename Property 641 FilteredColumns Property 642 FilteredTables Property 643 FolderItem Property 644 FolderPath Property 645 Folders Property 646 Formula Property 647 FormulaEx Property 647 FormulaExB Property 652 FromPage Property 655 FullName Property 656 HasTextBlobLimit Property 656 IsDistributed Property 657 IsExternal Property 658 IsKey Property 659 IsLocked Property 660 IsSynonym Property 661 Item Property 662 Items Property 663 Administration Guide 15

LeftTable Property 663 MasterCatalogFilename Property 664 MasterName Property 665 MasterTable Property 666 MaxQueryExecutionTime Property 667 MaxRowsRetrieved Property 668 MaxTablesPerReport Property 669 MaxTextBlobCharacters Property 670 MetaDataItem Property 670 MetaDataPath Property 672 MinimizeConnectTime Property 673 Modified Property 674 Name Property 675 NameSpace Property 676 NonIndexSortingPermission Property 677 OuterJoinPermission Property 678 Parent Property 678 Path Property 680 PlainTextPassword Property 680 PublishHTML Property 681 PublishPDF Property 682 QualificationLevel Property 683 QueryExecutionTimeWarnAfter Property 684 QueryItem Property 685 QueryProcessing Property 686 ReadIsolationLevel Property 687 ResultType Property 687 RightTable Property 688 RowsRetrievedWarnAfter Property 689 SchemaLevels Property 690 SelectDistinctPermission Property 691 SelectedFrames Property 692 SQL Property 693 SuppressTOCDuplicates Property 693 TableLinks Property 694 Tables Property 695 TablesPerReportWarnAfter Property 696 TOC Property 697 TOCByPageNumber Property 697 ToPage Property 698 Type Property 698 UniqueID Property 700 UseQueryWarnings Property 701 UserClasses Property 702 UserName Property 703 Value Property 703 Version Property 704 Weight Property 705 WindowState Property 706 Chapter 57: Sample Macros 709 Annotation Sample 709 Add Catalog Prompts Sample 711 Drill-Through Report Sample 712 Open Report Sample 713 Scheduled Job Sample 714 Catalog Content Sample 715

16 IBM(R) Cognos(R) Impromptu(R)

Copy Rows To Notepad Sample 716 Create Catalog Sample 717 Create Empty Catalog Sample 718 Excel Options Upgrade Sample 719 Insert Qualification Levels Sample 720 Products (Publish as HTML) Sample 721 Sales By Country (Publish as HTML) Sample 722 PART 5: Using Expressions with Impromptu 723 Chapter 58: Expressions 725 Building Expressions 725 Functions 726 Summaries 726 Values 726 Operators 727 How to Create Prompts 727 Chapter 59: Functions 729 Access Security Functions 729 Catalog-User-Profile 729 User-Classes 730 User-Name 730 Date and Time Functions 731 Add-Days 732 Add-Months 733 Add-Years 733 Age 733 DateDayDiff 734 Datetime-to-Date 734 Date-to-Datetime 734 Date-to-Days-from-1900 734 Date-to-String 735 Day 735 Day-of-Ymd-Interval 735 Daysint-to-Ymdint 735 Days-from-1900-to-Datetime 736 Days-to-End-of-Month 736 First-of-Month 736 Hour 736 Last-of-Month 737 Make-Datetime 737 Minute 737 Month 738 Month-of-Ymd-Interval 738 Months-Between 738 Number-to-Date 739 Number-to-Datetime 739 Phdate-to-Date 739 Pre50-Months-Between 739 Second 740 Time-to-Zero 740 Today 740 Year-of-Ymd-Interval 740 Year 741 Years-Between 741 Ymdint-Between 741 Ymdint-to-Daysint 742

Administration Guide 17

Numeric Functions 742 Absolute 742 Ceiling 743 Floor 743 Integer-Divide 743 Mod 744 Number-to-Characters 744 Number-to-String 744 Number-to-String-Padded 744 Power 745 Round-Down 745 Round-Near 746 Round-Up 746 Round-Zero 747 Sqrt 747 Text Functions 748 Char_Length 749 Characters-to-Integer 749 Decrypt 749 Encrypt 750 First-Word 750 Left 750 Lower 750 Match-Pattern 751 Octet_Length 752 Pack 752 Position 752 Reverse 753 Right 753 Sound-of 753 Spread 753 String-to-Integer 754 String-to-Number 754 Substitute 754 Substring 754 Trim-Leading 755 Trim-Trailing 755 Upper 755 Chapter 60: Summary Functions 757 Average 758 Count 758 Maximum 758 Minimum 759 Moving-Average 759 Moving-Total 759 Percentage 760 Percentile 761 Quantile 761 Quartile 762 Rank 762 Running-Average 763 Running-Count 763 Running-Difference 764 Running-Maximum 765 Running-Minimum 765 Running-Total 766

18 IBM(R) Cognos(R) Impromptu(R)

Standard-Deviation 766 Tertile 767 Total 768 Variance 768 Chapter 61: Constants and Operators 769 Arithmetic, Logical, and String Operators 769 Arithmetic Operators (+, -, *, /, Div, -(x) ) 770 And Logical Operator 770 Or Logical Operator 770 Not Logical Operator 770 String Operator (+) 771 Comparison Operators 771 Between 771 Comparison Operator Symbols 771 Contains 772 Exists 772 In 772 Is Missing 772 Is Not Missing 773 Like 773 Starts With 773 Chapter 62: Components 775 All 775 Any 776 Auto 776 Dataset 776 Default 776 Descending 777 Distinct 777 For 777 If / Then / Else 777 Lookup 778 Null 778 Prefilter 778 Prompt 778 Replace With (->) 778 Report 779 Sort-by 779 Glossary 781 Index 799

Administration Guide 19

20 IBM(R) Cognos(R) Impromptu(R)

Introduction
The Impromptu Administration Guide shows you how to design, create, and maintain an Impromptu environment that meets the needs of your users. It explains the importance of analyzing user requirements creating catalogs organizing folders making joins creating calculations, conditions, and prompts setting up user classes and security auditing and optimizing performance automating tasks The last part of the document explains how to use Database Definition Manager to set up database access. Additional reference chapters list the samples included with Impromptu, tips for integrating with other IBM Cognos products, and troubleshooting information. The document concludes with a glossary of terms and an index. For more information about using this product, visit the Cognos Software Services Web site (http://support.cognos.com). For information about education and training, click the Education link from this site. This document is available as online help and an online book. Our documentation includes user guides, tutorial guides, reference books, and other materials to meet the needs of our varied audience.

Online Help
All information is available in online help. Online help is available from the help button in a Web browser, or the Help menu and help button in Windows products. You can also download the online help from the Cognos Software Services Web site (http://support.cognos.com). The environments.html file accessible from the /support/products part of this Web site lists the operating systems, browsers, Web servers, directory servers, database servers, and OLAP servers currently supported by IBM Cognos products.

Books for Printing


The information in each online help system is available in online book format (PDF). However, the information from a given help system may be divided into more than one online book. Use online books when you want to print a document or when you want to search the whole document. You can print selected pages, a section, or the whole book. You are granted a non-exclusive, non-transferable license to use, copy, and reproduce the copyright materials, in printed or electronic format, solely for the purpose of providing internal training on, operating, and maintaining the IBM Cognos software. An annotated list of other documentation, the Documentation Roadmap, is available from the Windows Start menu or the Impromptu Help menu. You can also read the product readme files and the installation guides directly from IBM Cognos product CDs.

Administration Guide 21

Introduction

22 IBM(R) Cognos(R) Impromptu(R)

PART 1: Administering Impromptu

Administration Guide 23

24 IBM(R) Cognos(R) Impromptu(R)

Chapter 1: Managing Catalogs


A catalog is a file containing the information that Impromptu users need to create reports. Catalogs are central to the operation of Impromptu, and creating a catalog is one of your key tasks as an administrator. A properly-created and maintained catalog results in a reporting environment that makes sense to your users, and makes administering Impromptu easier for you. Catalogs store metadata associated with the database structure including the name and location of the database names of the columns in the selected tables join relationships between tables In addition, a catalog contains folders, conditions, and calculations that you design and create. The folders, conditions, and calculations that you define in your catalog provide report users with a logical view of the physical data (in the database) that the catalog accesses.

What You Can Do


As an administrator, you can create different types of catalogs: personal distributed shared secured As the creator of a catalog, you can change the catalog type select the tables to include define the join relationships between the tables change the names or locations of the folders You can also open a master distributed catalog add tables and columns to a catalog add the same table twice to a catalog sort tables verify and update tables remove tables and columns limit the scope of data for the catalog; see "Control Access to Objects" (p. 71) use keys; see "Control Editing of the Catalog Structure" (p. 75) and "Create Joins Automatically When Creating a Catalog" (p. 45) qualify catalog content; see "Qualify Catalog Content" (p. 34) add calculations, conditions, or prompts; see "Store a Condition or Calculation in a Catalog" (p. 53) and "Create a Catalog Prompt" (p. 57) generate content overview reports generate default reports

How Many Catalogs Should You Create?


Impromptu can handle many catalogs. If you have an extremely large amount of data and many tables in your database, then defining more than one catalog might make sense. In this case, a single catalog could be difficult to use. It might take too long to load and navigate the catalog, and join maintenance might become involved.

Administration Guide 25

Chapter 1: Managing Catalogs More catalogs mean more administration and maintenance, though, and as a rule it is advisable to have only one catalog per application per physical location. Impromptus user classes and security features make it easy to manage a wide variety of user requirements with a single catalog.

What Effect Does a Catalogs Size Have?


As you include more tables, folders, and security restrictions in a catalog, it becomes larger. The size of a catalog can determine the type of catalog you choose to create. With a distributed catalog, the larger the master distributed catalog the longer it takes to copy the personal distributed catalog to the user machine, the more traffic there is on the network, and the longer it takes to synchronize the master and personal catalogs. There are no internal limits to the size of a catalog; that is, it can contain any number of tables. But large catalogsanything approaching 1 MB in sizecan be inefficient, especially on slower machines. As a catalog increases in size: maintenance time increases it takes longer to load the catalog, which increases the minimum time taken to run a report organizing folders for easy use by users becomes more difficult user class security becomes more involved join definition becomes more complex, with more chance for join loops distributed catalog synchronization takes longer It is difficult to provide an ideal size for a catalog, or a maximum number of tables in a catalog. It is best to add incrementally and check performance at each step, testing it on a typical end user machine for a real world feel.

Things to Consider Before Creating a Catalog


Before starting to create a catalog, you should be able to answer these questions: 1. What information do you want to include in the catalog? For example, do you want to see data for a particular division of your company? If you are interested in creating reports that present only marketing information, then you probably need to access only the tables in the database that contain marketing data. 2. Do you want to create a catalog that contains all the tables from the database, or only selected tables? Including all the tables is easier, because you do not have to specify the individual tables to include. But if you include tables that arent needed, processing efficiency might decrease, and it might be more difficult for users to find information they need. As a rule, include only those tables that must be accessible to users. Some database tables are used strictly for linking other tables. They should be included in the catalog for join purposes, but excluded from the folders. The range of tables to include in any one catalog should always be based on user and reporting requirements. 3. What table joins do you want to set up? When you create a catalog, you can join tables so users can retrieve data from more than one table at a time. Do you want Impromptu to create the joins for you automatically? Do you want to use keys and/or same-named columns for the automatic joins? If you do not want Impromptu to create the joins for you, do you know the joins you want to create? Although you can edit joins at any time, before starting to create a catalog you should have a join strategy in mind.

Some Catalog Tips


Here are some tips to keep in mind when creating and maintaining catalogs: Advise users to save their personal distributed catalogs with the same name as the master. This will minimize confusion that can arise when users have many catalogs in their directory and need to determine which master catalog is being referenced.

26 IBM(R) Cognos(R) Impromptu(R)

Chapter 1: Managing Catalogs The more folders a catalog has, the larger it is. Avoid repeating folders as subfolders in many different folders. Each copy of the folder increases the size of the catalog. This must be balanced with the need to make the catalog valuable to the user and the need to ease the administrative burden. Denying access to a lot of folders for a large number of user classes increases the size of the catalog. When a user has access to a folder, no overhead is added, but denying access increases catalog size. You should monitor this feature closely.

Create a Catalog
Before you can create a catalog, you must have access to the data in the database, and you must define a logical database so that Impromptu can access the data. For more information about defining database connections, see "Create a Database Definition" (p. 109). Once you create a database definition, you can create the type of catalog that best meets the needs of your intended users: personal, distributed, shared, or secured. During catalog creation, you must add tables from the database and define the join relationships. Impromptu automatically creates a default set of folders based on the tables that you add from the database. You can also define Impromptu keys that provide additional information for joining tables. Once you have done this, you must define folders, folder items, and any calculations and conditions that you require.

Steps
1. From the Catalog menu, click New. 2. In the File name box, type a file name for the catalog. Note: Impromptu automatically adds the extension .cat to catalog names and stores catalog files in the same folder as your Impromptu application. Specify your own default catalog folder using the File Locations tab (Options command, Tools menu), to override this setting. 3. In the Description box, type a description of the catalog. Note: A catalog description is optional. 4. In the Catalog type box, click the type of catalog you want to create: personal, distributed, shared, or secured. 5. In the Name box, select the database the catalog will access. Note: If the database definition does not exist, then you must create it. Click Databases if you want to add a new database definition, and then click OK to return to the New Catalog dialog box. 6. Select the tables you want to include in the new catalog by using one of the following options: Click Select tables and select the database tables that you want to include in the new catalog. Click Include all tables. Impromptu creates your catalog with all the database tables, builds, default joins, and creates two user classes: Creator and User. For more information, see "Add Tables to a Catalog" (p. 31). 7. Click OK. 8. If you are using a database that requires a user ID and password, in the Database User ID and Database Password boxes (Catalog Login dialog box), type your user ID and password. 9. In the Joins dialog box, define any necessary table joins, and then click OK. For more information, see "Work with Joins" (p. 41). 10. In the User class box (Catalog Login dialog box), select the Creator user class, and then click OK. Note: You should make a backup copy of the catalog after you create your catalog, and before you change it further. 11. Continue to develop your catalog by adding folders; see "Create a New Folder" (p. 37) and "Copy and Paste Folders" (p. 38) moving folder items; see "Move Folders and Items in Folders" (p. 38)

Administration Guide 27

Chapter 1: Managing Catalogs adding conditions or calculations; see "Working with Stored Conditions and Calculations" (p. 51) 12. If you created a distributed, shared, or secured catalog, then place the catalog in a physical location accessible by your users.

Change the Catalog Type


When designing catalogs, it is best to set the catalog type based on users reporting needs. For example, if youre creating a catalog for users accessing canned reports and who will never change the reports, create a secured catalog. If youre creating a catalog for users who want to add their own custom folders, create a distributed catalog and set up the appropriate user classes. If necessary, you can change one catalog type to another by changing certain attributes within the catalog. For example, if youve developed a personal catalog and later want to enable access by other users, you can change the personal catalog into a shared or distributed catalog.

What is a Personal Catalog?


A personal catalog is a catalog that you do not intend to make accessible to other Impromptu users. You can create personal catalogs to access databases from which you require personal reports. Personal catalogs are for individual use only and there are no security considerations. Only the creator of the catalog can access the data referenced by the catalog.

What is a Distributed Catalog?


A distributed catalog consists of an original master distributed catalog that the administrator controls and maintains, and one or more local catalogs (personal distributed catalogs) that are created when users open the master distributed catalog. Distributed catalogs are useful to maintain a certain level of control over the catalog, but allow catalog users to create their own local copies of the catalog. Once users have created their own personal distributed catalog, they can modify it to meet their own specific reporting needs. You can enable your users to modify their personal distributed catalogs by assigning them privileges to modify folder structures and add conditions and calculations. With a distributed catalog, you can enable the Folders and User Profiles commands so that your users can organize the contents of their personal distributed catalog by creating new folders create conditions and calculations to store in their catalog disconnect from the LAN and continue to work with their personal distributed catalog connect and disconnect from the database create user classes, set passwords, and control the user environment manage the impact on the network and database Impromptu maintains a link with the master distributed catalog and automatically updates the linked personal distributed catalogs with changes to the master. This enables users to change the contents of their personal distributed catalog, while ensuring that changes to the master are applied to their personal distributed catalogs. Note: Users cannot change the names or locations of the folders that the administrator adds to the catalog.

What is a Shared Catalog?


A shared catalog is generally stored on a LAN to provide access for all users. When you open a shared catalog, you are working with the same copy of the catalog as all other users. The creator of a shared catalog can change and grant privileges to specific users that enable them to organize the contents of the catalog by creating new folders, editing folders you've created, and changing their location work with conditions and calculations stored in the catalog 28 IBM(R) Cognos(R) Impromptu(R)

Chapter 1: Managing Catalogs connect and disconnect from the database

Note: No more than 20 users can be simultaneously connected to a read-write shared catalog. This is a limitation of Microsoft's implementation of compound files. As a workaround, you could use a distributed catalog. However, there are situations where distributed catalogs will not work well (for example, getting an updated copy of a large master distributed catalog with a slow dial-up access). You could also make the shared catalog read-only as another workaround. You may negate some user privileges if you do this. The same problem occurs for reports for the same reason.

What is a Secured Catalog?


A secured catalog is a read-only catalog that only the Creator can change. Use secured catalogs to deploy "canned" reports for audiences that have no need to customize their reports. Users cannot change a secured catalog, and they cannot create or change any of the reports based on the catalog. Users can only view, run, export, and print reports. In addition, users can connect to and disconnect from the database.

Catalog Attributes
The following table outlines the default attributes of each catalog type. You can add new user classes and modify existing ones. Use the descriptions in this table to determine the catalog type that meets your user's needs: Catalog Type Personal Attributes Has only the Creator user class with full privileges. You can: create and edit reports edit folders add and modify user classes create type-in SQL reports Has a Creator and a User user class. The Creator user class has full privileges. The User user class can: create and edit reports add and modify user classes Distributed Has a Creator and a User user class. The Creator user class has full privileges. The User user class can: create and edit reports edit folders add and modify user classes Only this type is designated as a Distributed catalog in the Catalog Properties dialog box. Secured Has a Creator and a User user class. The Creator user class has full privileges. The User user class can view reports, but it can't create reports, change reports, or make changes to the catalog.

Shared

Administration Guide 29

Chapter 1: Managing Catalogs

Managing Catalog Access


If you change a personal catalog to any other catalog type, it is likely that it will contain only the Creator user class (although Personal catalogs can contain multiple user classes). To grant others access to the catalog, you must add other user classes. By default, Impromptu adds a user class named User automatically. For more information, see "Create a User Class" (p. 65). It is unusual to change a shared, distributed, or secured catalog to a personal catalog. You can do so only by deleting all user classes other than the Creator user class. If you change a shared, secured, or distributed catalog to another catalog type, you must change the governor settings for all user classes other than the Creator. For more information, see "Control Editing of the Catalog Structure" (p. 75) and "Control Creating and Editing Reports" (p. 75).

Steps
1. To change a distributed catalog, click the Properties command from the Catalog menu, and then click or clear the Make this a distributed catalog check box. This change is in addition to any changes required for user classes. 2. If you change a distributed catalog into either a shared or a secured catalog, you must inform the catalog users. Their local copies of the distributed catalog are no longer linked to a master distributed catalog. 3. If you change a shared or secured catalog into a distributed catalog, inform the catalog users that they will be prompted to save their own local copy of the catalog.

Controlling Catalog Access Using a Catalog Lock


Locking a catalog is another method of controlling catalog access. A locked catalog restricts access to the Creator user class. When a member of the catalog Creator user class attempts to open a locked catalog, they must provide password authentication before opening it. A catalog lock is specified by the administrator and exists in addition to the common logon authentication required by IBM Cognos products and the catalog logon authentication. If a user who is not a member of the Creator user class attempts to open a locked catalog, they are prompted for the usual catalog logon credentials only. For more informaton, see "Control Access Using a Catalog Lock" (p. 73).

Open a Master Distributed Catalog


Only the Creator user class can change the master distributed catalog. When any user class other than the Creator user class opens a master distributed catalog, Impromptu makes a copy of the catalog. This copy is known as a personal distributed catalog. By default, every time a personal distributed catalog is opened, Impromptu automatically updates it with changes to the master distributed catalog. Catalog users can change their default settings so that they must manually update their personal distributed catalogs. You can have only one catalog open at any one time. To open a different catalog, you must first close the current catalog. You should disconnect personal distributed catalogs used in Impromptu Web Reports from the master distributed catalog. For more information about preparing reports for Impromptu Web Reports, see the Impromptu User online help.

Steps
1. 2. 3. 4. From the Catalog menu, click Open. Click the catalog and click Open. From the User class box, click the user class to which you have access. If required, type your catalog password. Note: Impromptu asks you to name your copy of the catalog.

30 IBM(R) Cognos(R) Impromptu(R)

Chapter 1: Managing Catalogs 5. In the Database User ID and Database Password boxes (Catalog Login dialog box), type your user ID and password if you are using a database requiring a user ID and password. 6. In the File name box, type a name for your personal distributed catalog and click OK.

Add Tables to a Catalog


A table in a database is a portion of the database containing one kind of information organized into rows and columns. You can add one or more tables from the active database to a catalog. When you add a table, a folder is automatically created. When the database metadata changes, you can update tables in the catalog instead of re-creating the catalog. You can attach filters to tables or columns to filter out data before showing the report. These filters are automatically added to the report's own filter when the report is executed. You cannot have any reports open when you add tables to a catalog. Adding and removing tables and columns can cause existing reports to fail. Validate existing reports and regenerate them to ensure they work correctly.

Steps
1. From the Catalog menu, click Tables, and then click the Edit tab. Note: If you add tables when you create a new catalog, the Tables dialog box appears automatically. 2. In the Database tables box, select the table or tables to add to the catalog. 3. Click Add. 4. In the Create joins box, select one of the following options to specify how to create table joins: To open the Edit tab (Joins dialog box) where you can create the table joins, click Manually. This is the default. To join the tables using the columns that are defined as keys, click Using key only. To create no table joins, click None. You can manually create them later. To join the tables using the columns that are defined as keys or the first column that is named the same in each table, click Using key or First matching column. Note: Impromptu matches tables using keys. If one table has a key and the other table does not, Impromptu searches for a column with the same name and data type as the key. If there are no keys in either table, Impromptu matches columns based on the first matching name and data type that it finds. For more information, see "Work with Joins" (p. 41). 5. If you are using keys, define keys for the tables. Note: You do not need to define keys if your database has indexed columns. 6. Qualify the tables to control how tables are qualified for SQL queries, and click OK.

Add Columns to a Catalog


You can add one or more columns from the active database to a catalog. You can add columns when you create a new catalog to an existing catalog if changes to the database affect the catalog if your catalog requirements change

Steps
1. From the Catalog menu, click Tables, and then click the Edit tab. 2. In the Database tables box, double-click the database owner and table containing the column or columns to add. Administration Guide 31

Chapter 1: Managing Catalogs Note: Your database may not have a database owner. 3. Select the column or columns to add to the catalog. 4. Click Add. A folder for the table is created in the Catalog tables box. The folder contains only the column or columns you selected. 5. In the Create joins box, select one of the following options to specify how to create the table joins. To open the Edit tab (Joins dialog box) where you can create the table joins, click Manually. This is the default. To join the tables using the columns defined as key, click Using key only. To create no table joins, click None. You can manually create them later. To join the tables using the columns defined as keys or the first column that is named the same in each table, click Using key or First matching key. Note: Impromptu matches tables using columns that have been defined as keys. If one table has a key and the other table does not, then Impromptu looks for a column with the same name and data type as the key. If there are no keys in either table, Impromptu matches columns with the same name and data type. For more information, see "Work with Joins" (p. 41). 6. If you are using keys, define keys for the tables. Note: You do not need to define keys if your database has indexed columns. 7. Qualify the tables if you want to control how tables are qualified for SQL queries, and click OK.

Add the Same Table Twice to a Catalog


You can create a table alias to add a second copy of a table to the same catalog. The second copy of the table is added with a different name. You can create table aliases to relate values within a single table. For example, if all the employee data is in one table in the database, you can find out which employee works for which manager by adding the table, then adding an alias of the table, and finally creating a self-join between the table and alias. use in a filter expression. This enables you to create a view of part of the data in a table. For example, you can create a view for managers of the Employee table by aliasing the Employee table under the name of Managers, and then use a filter expression on the Managers table to create the view.

Steps
1. 2. 3. 4. 5. From the Catalog menu, click Tables, and then click the Edit tab. In the Database tables box, click the table to add to the catalog. Click Alias. Type the alias name and click OK. Click OK.

Sort Tables in a Catalog


You can sort tables to better manage large catalogs. Tables can be sorted alphabetically in ascending or descending order or restored to the original sort order.

Steps
1. From the Catalog menu, click Tables. 2. Click a table, then click the sort icon at the top of the appropriate list box. To sort the database tables, click a table in the Database tables box. To sort the catalog tables, click a table in the Catalog tables box. 32 IBM(R) Cognos(R) Impromptu(R)

Chapter 1: Managing Catalogs 3. From the drop-down list, click to sort the items in ascending order (a to z) to sort the items in descending order (z to a) to restore the default order 4. Click OK.

Verify and Update Tables


If the database has changed, you can ensure that the catalog contains the most up-to-date information by: Verifying that the owners, tables, and columns in the open catalog still exist in the database. If an owner, table, or column is not in the database, you can rename or remove it from the catalog so the catalog matches the new database information. Updating a table in a master distributed catalog with the most current database information. You need to update the tables in the master distributed catalogs if the table definition in the database changes. You cannot have any reports open when you verify or update tables.

Steps to Verify the Tables in a Catalog


1. From the Catalog menu, click Tables. 2. In the Catalog tables box, click the table or tables to verify. 3. Click Verify. Note: If the table or a column within the table is no longer in the database, an X appears over the table icon. 4. Remove or rename the table or column in the table to fix the error, and click OK. For more information, see "Remove Tables and Columns" (p. 33).

Step to Update a Table with the Current Database Information


From the Catalog menu, click Update Catalog. Note: If Impromptu cannot find the source catalog, you are be prompted to locate and select the source catalog in the Update: Source Catalog Not Found dialog box.

Remove Tables and Columns


A table is a portion of the database containing a set of information systematically arranged into rows and columns. A catalog identifies the tables in the database you can access using Impromptu. You remove tables and columns from an existing catalog if changes to the database affect it, or if your catalog requirements change. When you remove a table or column, Impromptu prevents you from using invalid data by automatically removing all associated folders, folder items, conditions, joins, and calculations. You cannot have any reports open when you remove tables and columns.

Steps to Remove a Table from a Catalog


1. From the Catalog menu, click Tables, and then click the Edit tab. 2. In the Catalog tables box, click the table or tables to remove. 3. Click Remove. Note: When you click Remove, Impromptu lists the columns and governor restrictions for the table you are removing as well as the tables that are joined to the table that you are removing. 4. Click OK to remove the selected items, and click OK again.

Steps to Remove a Column from a Catalog


1. From the Catalog menu, click Tables, and click the Edit tab. Administration Guide 33

Chapter 1: Managing Catalogs 2. In the Catalog tables box, double-click the database owner and the table containing the column or columns to remove. Note: Your database may not have a database owner. 3. In the Catalog tables box, select the column or columns to remove. 4. Click Remove. Note: When you click Remove, Impromptu lists the columns you are removing, their governor restrictions, and any joins for those columns. 5. Click OK to remove the column, and click OK again.

Qualify Catalog Content


You can qualify tables in SQL queries to ensure your users access the correct tables. You can use unqualified table names to control how selected tables are qualified in SQL queries. You can qualify tables with information on database, owner, table, and column. By default, tables are fully qualified. You can set up an annotation server to help users identify their tables and columns. For more information, see "Unable to Identify Catalog Contents" (p. 177). You can remove the qualifiers for table names at any time.

Examples
You have a catalog of sales data, containing one table called sales, that you are testing before releasing it to your end users. You qualify the table as <test>.<yourname>.<sales>, identifying the table as belonging to the test database and to the yourname owner. When you are ready to release the catalog, you remove the database and owner qualifiers to identify the table only as sales. The Great Outdoors Company has acquired a small operation that manufactures one of its product lines. When the two sets of data are combined at the database level, the data will contain many of the same names as your data at headquarters. You can maintain one catalog for the two regions by qualifying the tables for the different locations, so that the users will access the correct tables even though they are named the same.

Steps
1. From the Catalog menu, click Tables, and then click the Qualification tab. Note: If your database does not support qualified tables, the Qualification tab is unavailable. This tab is enabled for only the Creator. 2. In the Catalog tables box, click the table to qualify. 3. To add qualifiers to the table, click Qualify more. Note: Each time you click Qualify more, another qualifier is added to the table, starting with the lowest level available to the selected table. The levels of qualifiers from the lowest to highest level are column (lowest level), table, owner, and database (highest level). 4. To remove qualifiers from the tables, click Qualify less. Note: Every time you click Qualify less, another qualifier is removed from that table, starting with the highest level applied to the selected table. 5. Click OK when you finish qualifying tables.

Generate a Content Overview Report


You can generate a content overview report on the contents of the current catalog. The report is saved as an ASCII text file. A content overview report describes catalog information, such as the catalog name and location information about the database, such as the database's logical name, the physical name, and the type of database

34 IBM(R) Cognos(R) Impromptu(R)

Chapter 1: Managing Catalogs database tables and columns folders in the catalog and the items in each folder table joins information about user classes, such as the name and access privileges of each user class

You can use this report to track your catalog as you create or edit it. You can also give users a hard copy so that they can see changes to the catalog. You can only generate a content overview report for a catalog that you created.

Steps
1. From the Catalog menu, click Content Overview. 2. In the Files name box, type a name for the report. Note: If you do not specify an extension, Impromptu automatically adds the extension .icr. 3. From the Save as type box, do one of the following: To save a content report, click Content Report (*.ICR). To save a different file type, click All files (*.*). 4. Click the drive and directory where you want to store the report. 5. Click Options, and click one of the following: To include information about the table joins, click Table join expressions. To include the tables and columns, and their associated conditions, click Tables and columns. To include folders and folder items, including conditions and calculations, click Folder hierarchy. To include information about user classes, click User class information. 6. Click OK, and then click Save.

Generate Default Reports


You can generate default reports for selected tables, and then use the reports as the starting point for creating custom reports.

Steps
1. 2. 3. 4. 5. 6. 7. From the Catalog menu, click Generate Reports. In the Tables box, click a table. Click Generate. If the template on which you want to base the report appears in the FastFind tab, double-click the template. Click Browse to find a template in another location. Repeat steps 2 to 5 to generate a report for another table. Click Close. The report is assigned the name of the table from which it was generated, and an .imr extension is added to the name. From the File menu, click Open to view the report.

8.

Administration Guide 35

Chapter 1: Managing Catalogs

36 IBM(R) Cognos(R) Impromptu(R)

Chapter 2: Work with Folders and Folder Items


When you create a catalog, each table in the catalog appears as a folder containing the table's columns. You can also store conditions, calculations, and catalog prompts in folders. Folders enable you to organize data items logically, according to users needs, rather than based on how tables and views are physically stored in the database. This logical rendering of information enables report users to access information without knowing about the tables, indexes, and joins that comprise a typical corporate database.

What You Can Do


You can modify and organize the folders and items in the folders. You can create new folders and show the contents of a folder copy folders and folder items and paste them in new locations move and remove folders and folder items rename folders and folder items sort folders and folder items generate a folder from a report use folder items to synchronize catalog changes to reports

Who Can Modify and Organize Folders and Folder Items?


If the user is using a Catalog that they created Personal distributed catalog, and you have enabled the user to use the Folders command Then the user Can create, modify, and organize folders and folder items in the catalog. Can create, modify, and organize folders and folder items in the catalog. The user cannot modify and organize folders you create. Personal distributed catalog, and you have prevented the user from using the Folders command Shared catalog, and you have enabled the user to use the Folders command Shared catalog, and you have prevented the user from using the Folders command Secured catalog Cannot create, modify, and organize folders and folder items. Can create, modify, and organize folders and folder items in the catalog. Cannot create, modify, and organize folders. Cannot create, modify, or organize folders.

Create a New Folder


Folders are an important administrative tool because they enable you to logically organize data items based on users needs, rather than on how physical tables are structured in the database. You can reorganize the contents of your catalog by creating new folders that reflect the different needs of your business.

Administration Guide 37

Chapter 2: Work with Folders and Folder Items For example, while the GOSales database contains tables such as OrderDetails, SalesStaff, and Sales_Branch, your sales managers are interested in Sales Orders and Locations. To make it easier for users to find the data they need, you can reorganize the folders into a "business view" that is meaningful. You create a Locations folder to hold the SalesStaff and SalesBranch information. You can generate a folder containing a table that you want added from the database to your catalog. When you select a table, Impromptu creates a folder with the name of the table and adds it to your folders list. If a folder exists with the same name, Impromptu adds a number to distinguish it from the existing folder. There should be a balance between the number of levels of subfolders in a catalog and the number of items in any one folder. If there are too many items in a folder, users must scroll through lists of items to find what they need.

Steps
1. Close any open reports. 2. From the Catalog menu, click Folders. 3. Click Folder. To create a new folder inside an existing one, open and select the existing folder before clicking Folder. 4. In the Name box, type the name of the new folder, and click OK.

Copy and Paste Folders


You can copy folders and paste them in new locations. You can reorganize the contents of your catalog to make it more intuitive. Changes to the original folder do not affect copies of the folder.

Steps
1. Close any open reports. 2. From the Catalog menu, click Folders. 3. To copy a folder or item in a folder, do one of the following: To copy a folder, click the folder and click Copy. Click the folder that you want the copied folder to appear above, click Paste, and then click OK. To copy an item in a folder, select the item and click Copy. Click the folder into which you want to copy the item. Click Paste, and click OK.

Move Folders and Items in Folders


You can move folders and items to new locations that are more intuitive. To move folders or folder items, cut and then paste them. Your reports should still work. If you copy and paste folders or folder items and then delete the original items, your reports based on that catalog may fail. You can control how reports are synchronized to a changed catalog. For more information, see "Synchronize Catalog Changes to Reports" (p. 40).

Steps to Move Folders


1. 2. 3. 4. 5. 6. Close any open reports. From the Catalog menu, click Folders. Click the folder you want to move. Click Cut. Click the folder you want the folder to appear above. Click Paste and click OK.

Steps to Move Items in Folders


1. Close any open reports.

38 IBM(R) Cognos(R) Impromptu(R)

Chapter 2: Work with Folders and Folder Items 2. 3. 4. 5. From the Catalog menu, click Folders. In the Catalog folders box, select the item you want to move, and click Cut. Select the folder into which you want to move the cut item. Click Paste and click OK.

Remove Folders and Items in Folders


You can remove folders and items in folders. Folder items can include conditions, calculations and prompts. Removing tables or columns can cause existing reports to fail. You can control how reports are synchronized to a changed catalog. For more information, see "Synchronize Catalog Changes to Reports" (p. 40).

Steps
Close any open reports From the Catalog menu, click Folders. Click the folder or item you want to remove. Click Cut. Note: If you remove something by mistake, click Undo to reverse the Cut command. 5. Click OK. 1. 2. 3. 4.

Rename Folders and Items in Folders


You can rename folders and items to make their names more intuitive. For example, suppose you have a Date column name in every table, but it means something different in each case. It might be the Order Date in the Orders table, the Product Release Date in the Products table, and the First Order Date in the Customers table. In this case, to eliminate the possibility of confusion, use different names in the various folders to identify exactly what each date represents. Renaming tables or columns can cause existing reports to fail. You can control how reports are synchronized to a changed catalog. For more information, see "Synchronize Catalog Changes to Reports" (p. 40).

Steps
1. 2. 3. 4. 5. 6. Close any open reports. From the Catalog menu, click Folders. Click the folder or item you want to rename. Click Edit. In the Name box, type a new name or edit the current name and click OK. Click OK and click OK again.

Sort Folders and Items in Folders


You can sort folders and folder items to better manage large catalogs. Folder and folder items can be sorted in ascending or descending alphabetical order or restored to the original sort order.

Steps
1. 2. 3. 4. Close any open reports. From the Catalog menu, click Folders. Click a folder or folder item, then click the sort icon at the top of the Catalog folders list box. From the drop-down list, click to sort the items in ascending order (a to z) to sort the items in descending order (z to a) Administration Guide 39

Chapter 2: Work with Folders and Folder Items to restore the default sort order When you select a folder and the folder is open, Impromptu sorts only the folders and folder items immediately beneath the selected folder. It does not sort items in any nested folders. the folder is closed, Impromptu sorts the folder and folder items at the same level in the folder hierarchy. 5. Click OK.

Generate a Folder from a Report


You can generate a folder with a set of columns and conditions from a report. This is a quick way to create and test calculations. For information about creating conditions and calculations, see "Working with Stored Conditions and Calculations" (p. 51).

Steps
1. Close any open reports. 2. From the Catalog menu, click Folders. Note: If you want to store the new folder in a specific folder, open the folder. 3. Click Generate. 4. In the Generate Folder dialog box, click Report, and then click OK. 5. Click the report containing the columns and conditions you want, and click Open. Note: To add more reports, repeat steps 3 to 5. 6. Click OK.

Synchronize Catalog Changes to Reports


When you open an Impromptu report using a modified or different catalog than the one the report was created with, Impromptu attempts to update the report item references to match the folder items. Matching occurs as follows: match on the unique, internal ID if the internal ID is not found, match on the full folder path and folder item name Matching on the first folder item with the same name as the report item is not attempted. It can be useful to match on the first folder item with the same name as the report item if you reorganized the catalog folder structure and want the report to use the new references. To enable matching in this way, you must add the Allow Lazy Path Matching=T setting to the [Startup Options] section of the Impromptu.ini file. If you add this setting, ensure that all folder items in your catalog have unique names.

40 IBM(R) Cognos(R) Impromptu(R)

Chapter 3: Work with Joins


Joins relate the data in one table to the data in another table in the same database, enabling you to retrieve data from more than one table at a time. For example, you may want to see the purchases made by each customer, but the information about purchases is stored in the Sales table and the information about customers is stored in the Order table. You create joins between these two tables so you can create reports that use columns from each of these tables. A join can have several columns linked together. The relationship between the columns is called a link. You can create different types of joins manually. This is the default setting. create joins automatically when creating a catalog by using keys or the first matching column; see "Create a Catalog" (p. 27). create joins automatically after a catalog has been created. To sort a list of joins, click a join, then click the Sort icon at the top of the list box. Select one of the Sort commands. You can sort joins in ascending or descending alphabetical order or you can restore the original sort order. When deciding what joins to make, you might want to consider alternatives to some joins. For example, instead of trying to manipulate joins, you might want to create more simple reports that users can drill between, or to create sub-reports. If you create an incorrect join, reports show unexpected or incorrect results. Correct joins ensure that no cross-product queries are created. Once you specify all the joins, all reports automatically reflect these joinseven reports created before the joins were specified.

Choosing the Appropriate Joint Type


When you create a catalog, Impromptu prompts you for join information. Impromptu creates equijoins by default. You can create these types of joins: Type of Join Equijoin Non-equijoin Operator = Equal <> Not Equal To < Less Than > Greater Than <= Less Than or Equal To >= Greater Than or Equal To Self join Outer Join Compound Join Complex Join Any of the above Not applicable Not applicable Not applicable "Create a Self Join" (p. 44) "Create an Outer Join" (p. 43) "Create a Compound Join" (p. 44) "Create a Complex Join" (p. 44) See this description "Create an Equijoin" (p. 42) "Create a Non-equijoin" (p. 42)

Administration Guide 41

Chapter 3: Work with Joins

Create an Equijoin
An equijoin retrieves all the rows from one table that have matching rows in another table. For example, the linked columns of a databases Products and Orders tables are the two columns for Product Number. An equijoin between these tables would match up equal values in the two Product Number columns, then retrieve rows from both tables that contain these values. All of the possible combinations of these rows could then be reported on. Impromptu creates equijoins by default when Impromptu automatically creates joins. You can also create equijoins manually.

Steps
From the Catalog menu, click Joins, and then click the Edit tab. In the Join paths box, click the table to which you want to add a join. In the Available tables box, click the other table in the join. Click Add. Decide whether you are going to create the equijoin as a diagram or expression. In the View as box, click Diagram. Or, to create an equijoin by defining an SQL expression, click Definition and create the join expression using the Join components and Join definition boxes. 7. Click the column in each table you want to link. 8. Click Add Link. Note: If you link more than four columns in a table join, Impromptu automatically shows the links as an expression. 9. Click OK when you have completed adding the links. 1. 2. 3. 4. 5. 6.

Create a Non-equijoin
A non-equijoin retrieves all the rows from one table that meet the criteria in another table. The criteria are based on expressions you define using the following operators: <> < > <= >= Not Equal To Less Than Greater Than Less Than or Equal To Greater Than or Equal To

Example
To create a Sales Representative report showing which representatives sold more than a given representative, you could compare the values in the sales amount columns with a non-equijoin. You would use the greater than (>) operator, together with a self join (see "Create a Self Join" (p. 44).)

Steps
1. 2. 3. 4. 5. 6. 7. From the Catalog menu, click Joins, and then click the Edit tab. In the Join paths box, click the table to which you want to add a join. In the Available tables box, click the other table in the join. Click Add. Decide whether you are going to create the non-equijoin as a diagram or expression. In the View as box, click Diagram. Click the column in each table you want to link.

42 IBM(R) Cognos(R) Impromptu(R)

Chapter 3: Work with Joins 8. Click Add Link. Note: If you link more than four columns in a table join, Impromptu automatically shows the links as an expression. 9. From the box between the two columns, select a non-equijoin operator to make the table join a non-equijoin, and then click OK. You can create a non-equijoin by defining an SQL expression. Follow the same procedure as creating a non-equijoin by diagram except click Definition instead of Diagram to create the join expression using the Join components and Join definition boxes. Impromptu show joins as definitions for joins with more than four columns linked together.

Create an Outer Join


An outer join retrieves rows from two or more tables even if there are no matching rows. An outer join can be a left, right, or full outer join. The side of the outer join determines which rows are reported on, even if there is no match. To determine whether to create a left or right outer join, you must know the relationship between the two tables you are joining. The outer join goes on the master side (which returns all rows), not the detail side. A full outer join retrieves all the rows from both tables, as if you combined a left outer join with a right outer join. To enable outer join processing, in the Access tab of an open report (Query dialog box, Report menu), ensure that the Include Missing Table Join Values (Outer Join) check box is selected. If Impromptu is required to assist a database that provides less than complete support for the SQL-92 definition of outer join processing, this can slow performance. When defining outer joins, please refer to your vendor documentation.

Example
For each customer there may not always be a sale. Sales information is stored in one table and Customer information in another table. When Impromptu retrieves the data from both tables, it shows the customer record even if a customer has not bought an item.

Steps
1. 2. 3. 4. 5. From the Catalog menu, click Joins, and then click the Edit tab. In the Join paths box, click the table to which you want to add a join. In the Available tables box, click the other table in the join. Click Add. In the View as box, click Diagram or Definition, and do one of the following: Goal Action

click both Outer Join check boxes To retrieve all records from both tables and merge records where matches are found (a full outer join) To retrieve all records from the table on the left, matched or not, and the matching values from the table on the right (a left outer join) as a diagram, click the Outer join check box on the left as a definition, click the Outer Join check box on the top as a diagram, click the Outer join check box on the right as a definition, click the Outer join check box on the bottom

To retrieve all records from the table on the right, matched or not, plus the matching values from the table on the left (a right outer join) 6. Click OK.

Administration Guide 43

Chapter 3: Work with Joins

Create a Self Join


Use self joins to add two or more references to the same table in a catalog, so you can compare data in a column to other data in the same column, and thereby understand how they are related. To create a self join, you create an alias table based on a source table, so you have two tables with the same contents but different names. You then join the alias table to its source, either with an equijoin, a non-equijoin, or an outer join.

Example
Your employee data is in one database table called Employees, and you want to find out which employees work for which manager. You add the Employees table to the catalog and then alias the Employees table to add it a second time. You call the aliased table Managers and create a join between the Employees table and the Managers table. You create a report showing which employees work for each manager.

Steps
1. Add a table to the catalog, and then add the same table again using an alias. For more information, see "Add the Same Table Twice to a Catalog" (p. 32). 2. From the Catalog menu, click Joins, and then click the Edit tab. 3. In the Join paths box, click the table to which you want to add a join. 4. In the Available tables box, click the table alias. 5. Click Add. 6. Create an equijoin, non-equijoin, or outer join for the tables, and click OK. To create an equijoin, see "Create an Equijoin" (p. 42). To create a non-equijoin, see "Create a Non-equijoin" (p. 42). To create an outer join, see "Create an Outer Join" (p. 43).

Create a Compound Join


A compound join is a join containing several columns joining two tables. Compound joins are useful where multiple columns generate a unique key to join to another table. Sometimes a relational database has a unique key, which is a combination of two or more columns. A compound join can be used in combination with a non-equijoin, a self join, or an outer join.

Example
You join the Customer table and the Outlet table by linking city and state. You type the following:
CUSTSITE.CUST_NO=ORDER.CUST_NO and CUSTSITE.SITE_NO=ORDER.SITE_NO

Steps
1. 2. 3. 4. 5. 6. From the Catalog menu, click Joins, and then click the Edit tab. In the Join paths box, click the table to which you want to add a join. In the Available tables box, click the other table in the join. Click Add. In the View as box, click Definition. In the Join component box, double-click the join components to add them to the join expression. Separate each table join with "and" or "or". Note: In the Join components box, double-click the Database component to add columns to your join expression. 7. Click OK.

Create a Complex Join


A complex join uses an expression to join two tables. 44 IBM(R) Cognos(R) Impromptu(R)

Chapter 3: Work with Joins They are not used frequently, although they can be used in conjunction with a non-equijoin or outer join. Use a complex join, for example, when your organization acquires another organization, and you must consolidate information for the two organizations.

Example
You need to join the product code in the Sales table to the product code in the Products table. However, the product code in the Sales table is four digits long while the product code in the Products table is the same four digits plus two more digits for the branch code. You use a complex join to link these columns.
Sales.prod_code = Substring (Products.prod_code, 1,4)

Limitations Associated with Complex Joins


Complex joins cannot use summary calculations. You can use only simple expressions within a complex join. When defining complex joins, be aware of the interaction between Impromptu and the database. If you use internal expressions and functions that are calculated by Impromptu rather than the database, this could slow computer performance.

Steps
1. 2. 3. 4. 5. 6. From the Catalog menu, click Joins, and then click the Edit tab. In the Join paths box, click the table to which you want to add a join. In the Available tables box, click the other table in the join. Click Add. In the View as box, click Definition. In the Join components box, double-click the join components to add them to the join expression. Note: In the Join components box, double-click the Database component to add columns to your join expression. 7. Click OK.

Create Joins Automatically When Creating a Catalog


When you create a catalog, you can create joins automatically using keys or the first matching column. Impromptu keys do not have to correspond to database keys. Define Impromptu keys for the tables if you want to use keys to join tables, and if the columns are not indexed in the database.

Example
You define Cust-id as the key of the Customer table because there can be only one customer number for each customer.

Steps to Define a Join Using a Specific Key or Column


1. 2. 3. 4. From the Catalog menu, click Tables, and then click the Edit tab. In the Database tables box, click the tables to add to the catalog. Click Add. In the Create joins box, click one of the following options to specify how to create the table joins: To join tables using the keys you define, click Using key only. To join tables using the keys you define or the first column with the same name and data type, click Using keys or first matching column.

Administration Guide 45

Chapter 3: Work with Joins If both tables have keys defined, Impromptu joins the tables using keys. If one table has a key, Impromptu looks for the first column with the same name and data type in the second table. If neither table has a key, Impromptu looks for the first column in each table with the same name and data type. 5. Click OK. 6. Ensure that the joins created by Impromptu are valid.

Steps to Define New Keys for a Table


1. From the Catalog menu, click Tables, and then click the Edit tab. Note: If you are defining keys while creating a catalog, the Tables dialog box appears as part of creating a catalog. 2. In the Catalog tables box, double-click a table to open it. 3. Click the column or columns you want to define as keys. Note: Impromptu shows a key icon next to the selected column name. 4. Double-click the table to close it. 5. Repeat steps 2 to 4 to define keys for other tables. 6. Click OK when you have defined all of the keys.

Steps to Change or Remove a Key


1. From the Catalog menu, click Tables, and then click the Edit tab. 2. In the Edit tab (Table dialog box), do one of the following: To remove a key for the table, click the column that is defined as a key, click Key and then click OK. To change a key for the table, remove the current key, then select the new column to be defined as a key, click Key, and then click OK. Note: Impromptu inserts a key next to the column name.

Create Joins Automatically After Creating a Catalog


You can create a catalog without defining any table joins, and then later create joins automatically. At any point, you can see exactly which joins are already defined for an existing table.

Steps to View Existing Joins


1. From the Catalog menu, click Joins, and then click the Edit tab. 2. In the Join paths box, click the table you want to view, and then click Show Joins. 3. In the Join paths box, click the table joins to see how individual table columns are joined.

Steps to Create New Joins


1. 2. 3. 4. 5. From the Catalog menu, click Joins, and then click the Edit tab. In the Join paths box, click the table to which you want to add a join. In the Available tables box, click the other table in the join. Click Generate. In the Create table joins for new tables box, click one of the following options: To join tables by the keys you define, click Using keys only. To join tables by the keys you define or the first column with the same name and data type, click Using keys or the first matching column. If both tables have keys defined, Impromptu joins the tables using keys. If one table has a key, Impromptu looks for the first column with the same name and data type in the second table. If neither table has a key, Impromptu looks for the first column in each table with the same name and data type. 6. Click OK to accept your table join setting, and then click OK again. Note: By default, Impromptu joins these tables with an equijoin.

46 IBM(R) Cognos(R) Impromptu(R)

Chapter 3: Work with Joins

Test and Troubleshoot Joins


You can test table joins to identify the tables Impromptu uses when creating reports, and to locate problems that might cause unexpected reporting results. Test results are displayed in either a diagram format or as an expression. You can use the Analyze feature to find unjoined (orphan) tables or circular loops in your join structure. After you receive the diagnosis (No Spanning Tree, Isolated Tables, or Loop message), you may be able to resolve the problem by creating an alias or by editing the join.

Performance Considerations
If the joins between tables are not specified, a cross-product report is generated. These types of reports should be avoided. They take a long time to generate, and can display meaningless results. Joining multiple tables using any matching columns can result in powerful reporting capabilities, but may have performance costs. You might want to restrict joins to those between primary and foreign keys only.

Steps to Test Your Join Strategy


1. From the Catalog menu, click Joins, and then click the Test tab. 2. In the Available tables box, click the tables you want to test, and then click Add. The Join strategy box shows the table joins, including intermediate tables Impromptu uses to create reports based on the selected tables.

Steps to Analyze and Correct Joins


1. From the Catalog menu, click Joins, and then click the Analyze tab. 2. Select the table join you want to analyze. 3. You can correct found problems by doing one of the following: To delete the entire table join, click Remove Join. To create an alias for the table join, click Create Alias. To edit the table join, click Edit Join. When you correct a problem, the next problem automatically appears. To skip a table join problem, click Next to show the next problem. To move to the beginning, click Restart to show the first problem. When you have resolved all table join problems, the Exception box shows an "End of List" message. 4. Click OK.

Resolving No Spanning Tree or Isolated Table Problems


If the message displayed in the Analyze tab is
Exception: NO SPANNING TREE There is no single spanning tree for all tables

or
Exception: ISOLATED TABLE There are no paths defined for this table

then there are single tables, or groups of joined tables, that are not linked to the other tables in the join structure. In the case of No Spanning Tree, a join is missing between groups of joined tables. In the case of an Isolated Table, an orphan table exists. Before you can include information from the unjoined groups or orphaned tables in reports, you must complete the join structure. To solve No Single Spanning Tree and Isolated Table join problems, you can: Join the isolated table(s) with the rest of the join structure. This is usually recommended. Leave the join structure as is. It might not be necessary to join the isolated table, because some reports only require information from a single table.

Administration Guide 47

Chapter 3: Work with Joins

Resolving Loop Problems


If the message displayed indicates that there is a loop in a join structure, then two or more tables are linked together in multiple ways, providing more than one pathway for accessing tables in the database. The culprit in the case of a loop join is often a lookup table, because it is joined to many tables in the catalog. Loop joins can cause the joins generated to be less than optimal, decreasing performance. They might also cause you to receive unexpected results. To solve loop join problems, you can: Leave the join structure as is. Impromptu automatically tries to use the shortest route in joining multiple tables. Leaving the loop structure unchanged may be an acceptable option if the shortest route is the most efficient. But the structure of the database might work against this option, depending on the type of data and the use of indexes. Remove a table from the catalog. This solution requires a re-evaluation of the amount of data that will be included in the catalog and the reporting capabilities possible with the catalog. Remove one or more joins (see the example below). Review your data first, to determine which join is unnecessary. Removing the wrong join might result in duplication of data in a query, and inefficient data retrieval. Create alias tables with separate joins defined for each alias table (see the example below). This strategy requires additional maintenance in both defining the joins and maintaining the folders. In addition, it may result in additional folders which can add to user confusion.

Solving a Loop Join: An Example


The figure below shows an example of a loop join in which tables A and C can be joined through either table B or table E. Table A Table B Table C

Table D

Table E

The result returned when going through table B might be significantly different from the one returned when going through table E. While both queries are valid, only one will return the result that you want. A query might be using the desired path until one additional field is added from a lookup table referenced by more than one of the tables in the original query. The query then contains a loop join, and may use the non-desired path.

Solution 1: Editing the Join Strategy


The figure below shows how the loop join was resolved by removing unnecessary joins. Table A Table B Table C

Table D

Table E

Now, tables A and C can only be joined through table B, and the desired path will be used.

Solution 2: Using Alias Tables


The figure below shows how the loop join was resolved using alias tables, represented in the figure with dotted borders.

48 IBM(R) Cognos(R) Impromptu(R)

Chapter 3: Work with Joins

Table Da Table Ea Table Db

Table A

Table B

Table C

Table D

Table E

Table Ec

We have aliased the lookup tables D and E in order to have one instance for each additional table to which the look-ups are joined. Once again, the only join path from A to C is now through B.

Solving a Reference Table Join Problem: An Example


Frequently, two non-related tables have a common reference table they both use. For example: the Employee table has a Country code that is also in a Country reference table the Supplier table has a Country code that is also in the Country reference table Because of this, a join strategy between these two tables might be established using this reference table as a means of joining the tables. This would be an incorrect join strategy. To correct it, you could add an alias table for the reference table, and change one of the joins for the two tables to the new alias table.

Change Joins
You may need to change the joins if the tables contain columns that should not be joined the database changes and you need to update the joins If you change a join, all reports use the new join. You can change the table joins at any time. You can change a join as a diagram change a join as an expression

Steps
1. From the Catalog menu, click Joins, and then click the Edit tab. 2. In the Join paths box, double-click the table you want to view. 3. In the Join paths box, select the table join you want to change. Impromptu shows the columns in each table and which columns are linked. 4. Click Diagram or Definition. 5. If you clicked Diagram, do one of the following: To change the join type, select two linked columns and click a different join type. To link additional columns, click two columns and click Add Link. 6. If you clicked Definition, select the part of the table join to change. In the Join definition box, click the join components to modify your expression. 7. Click OK.

Remove Joins
You can remove an entire table join or you can remove the link between two columns in a table join. Modifying or removing joins may change the SQL generated by existing reports. You need to confirm the SQL. Administration Guide 49

Chapter 3: Work with Joins

Steps
1. From the Catalog menu, click Joins, and then click the Edit tab. 2. In the Join paths box, select the table you want to view, and then click Show Joins. 3. In the Join paths box, do one of the following: To remove a join, select the table join in Joins paths that you want to remove, and then click Remove. To remove a link, select the table join you want to remove. In the Diagram view, click the Join Operator box for the columns that are linked together, and then click Remove Link. 4. To remove other table joins or links, repeat step 3. 5. Click OK.

50 IBM(R) Cognos(R) Impromptu(R)

Chapter 4: Working with Stored Conditions and Calculations


A condition (also called a filter or a filtering condition) is a business rule or calculation that evaluates to a true-false value. For example, this condition uses a tables Country column to filter data so that only North American data is included in a report:
Country in (United States, Canada, Mexico)

A calculation is an expression that uses existing data items to calculate a new data item. Use calculations to summarize data or perform calculations on data. For example, you can define a calculation that gives the discounted price for a preferred customer. Storing conditions and calculations in a catalog saves you and your users time, because you do not have to re-create frequently-used expressions for re-use in reports. You can define the same expression once, maintain it centrally, and re-use it in all of your relevant reports. For example, you can ensure that Low Margin figures always mean the same thing. This calculation uses the existing items of Price and Cost to calculate a value for Low Margin:
if ((Price - Prod Cost) <= 0.20 * Price) then (Low Margin) else NULL

If you change the stored calculation for Low Margin, all reports that use the Low Margin calculation are updated automatically. You can use filters to limit the data that certain user classes can see. You can also organize your conditions and calculations so they are easy to find. For example, create a folder called Exception Conditions to hold all conditions that track exceptions. For more information, see "Work with Folders and Folder Items" (p. 37).

Building Expressions
To create a calculation or condition, you define an expression using the syntax rules enforced by Impromptu. You select expression components from a list of available components that make sense in the given expression context. The components of an expression can include: Functions, Summaries, Values, Catalog Columns, and Operators.

Functions
The Functions folder in the Available Components box contains functions provided by Impromptu or by your database. These are pre-defined calculations, such as string, numeric, and date calculations, that are designed to operate on various data types.

Summaries
Summaries calculate additional data items by applying a mathematical procedure to selected data items in a report or catalog. They include: Average: Returns the average value of selected data items Count: Returns the number of selected data items Maximum: Returns the maximum value of selected data items Minimum: Returns the minimum value of selected data items Percentage: Returns the percent of the total value for selected data items Percentile: Returns the percentile value of selected data items Rank: Returns the rank value of selected data items Running-Average: Returns the running average value of selected data items

Administration Guide 51

Chapter 4: Working with Stored Conditions and Calculations Running-Count: Returns the running count of selected data items Running-Maximum: Returns the running maximum of selected data items Running-Minimum: Returns the running minimum of selected data items Running-Total: Returns the running total of selected data items Total: Returns the total of selected data items Standard Deviation: Returns the standard deviation of selected items

Summary results depend on the set of data that is summarized. For example, if a column of data is grouped in your report, then a different result will be created for each of those groups from the single application of a summary.

Values and Catalog Columns


Values include string, number, date, time, date-time, and interval. They can be entered into the expression in three ways: From the Value folder as a string, numeric or data. Values are typed directly into the expression once the type of value is determined. Remember to press Enter to complete the entry. From the catalog data, by referencing database columns directly. From the report data, by referencing items already in the report. When you select a string, Impromptu inserts two quotation marks and positions the cursor between them. You enter the string between the quotation marks. When you select a number, Impromptu inserts the number 0. You overwrite it with the number you want included in the expression. When you select date-time values, Impromptu inserts the current date and/or system time in quotation marks. You can overwrite it with other data values.

Operators
Operators specify what happens to the values on either side of the operator. There are four types: logical operators define a relationship between two parts of an expression (for example: and, not, or) arithmetic operators perform arithmetic operations on two parts of an expression (for example: +, -, *, /) string operators concatenate two character strings (+) comparison operators filter data by comparing one or more values that you enter against the values in the database (for example: like, =)

Expression Editing Permissions Depend on Catalog Type


Depending on the catalog type, your users may or may not be able to use all of the functionality related to conditions and calculations. If your users are using a Catalog that they created Then your users Can create, use, change, rename, and remove conditions.

Personal distributed catalog or a shared catalog Can create, change, rename, and remove and you have enabled them to use the Folders conditions. command Your users can use conditions you create in their filters, conditional formatting, and calculations. Your users cannot change, rename, or remove conditions that you create.

52 IBM(R) Cognos(R) Impromptu(R)

Chapter 4: Working with Stored Conditions and Calculations If your users are using a Then your users

Personal distributed catalog or a shared catalog Can use conditions you create in their filters, conditional formatting, and calculations. and you have prevented them from using the Folders command Your users cannot create, change, rename, or remove conditions. Secured catalog Cannot create, use, change, rename, or remove conditions.

Store a Condition or Calculation in a Catalog


It may be appropriate to store each condition in a separate folder in the catalog. Some examples of separate folders that can be used to store conditions are: Time periods. These could contain conditions for fiscal years, quarters, YTD, QTD, Year-over-Year, current month Year-over-Year, and so on. Geographic. These could contain conditions for individual locations, or geographic reporting roll-ups. Functional. These could contain summary filters on levels of the product hierarchy or distribution channels Calculations can be stored next to the data items used to create them.

Example
One of the complaints you have received about reports over the years is that there arent enough standards. Often reports do not agree from one region to the next. For example, a calculation of year-to-date sales and profit margins from Europe is calculated differently than the same figure for North America. This occurs because the managers for these regions use their own calculations to derive these values. As a result, a comparison of profit margins between the two regions is difficult. In the Great Outdoors catalog, to track levels of sales representative performance across regions, you create catalog conditions that isolate normal sales versus those that didnt close within a specified number of days: Sale Closed On Time, where the condition is Day(Closed Date - Order Date) <= 5 Sale Closed Late, where the condition is Day(Closed Date - Order Date) > 5

Steps
From the Catalog menu, click Folders. Click Condition or Calculation, as appropriate. In the Name box, type a name for the condition or calculation. Build an expression. For more information, see "Building Expressions" (p. 51) and the Expression Editor User Guide. 5. Click OK. Note: If you select a folder, the new expression appears before the selected folder. If you do not select a folder, the new expression appears at the end of the list. 6. Click OK. 1. 2. 3. 4.

Store a Summary in the Catalog


You can store a frequently used summary in the catalog so you do not have to re-create it in every report. You can store only summaries that already exist in a saved report in the catalog.

Administration Guide 53

Chapter 4: Working with Stored Conditions and Calculations To store a summary in the catalog, generate a folder based on the report containing the summary, and then delete all data items but the summary from the folder. You need to enable your users to use the Folders command.

Example
You routinely summarize the quantity of a product sold at the various levels of your operations. You store a Total (Qty) summary in the catalog to use it later in any report.

Steps
1. 2. 3. 4. 5. 6. 7. Close all open reports. From the Catalog menu, click Folders. Click Generate. Click Report, and click OK. Click the report containing the summary you want to add to the catalog and click OK. Open the new folder and click the data items you do not want to add to the catalog. Click Cut, and click OK.

Use a Stored Condition in a Calculation


You can use conditions in an if/then calculation to create a more complex calculation. For example, to convert American prices to Canadian currency without changing the original American prices, create this calculation:
if (North_American_Customer) then (Product_Price * 1.43) else (Product_Price)

In this calculation, "North American Customer " is a condition stored in the catalog.

Steps
1. Open a report. 2. From the Report menu, click Query, and then click the Data tab if you opened a list report the Crosstab tab if you opened a crosstab report 3. Click the calculation button. 4. In the Available components box, double-click If and then double-click Catalog Columns. 5. Select the condition you want to use and click OK. The selected condition appears in the Expression box. You can use the condition from the catalog on its own or you can add to the condition. 6. Click OK.

Use a Stored Calculation in a Report


You can use a calculation that is stored in a catalog in a report.

Example
You use a calculation that calculates the discounted price for a valued customer.

Steps
1. Open a report. 2. From the Report menu, click Query, and then click the Data tab if you opened a list report the Crosstab tab if you opened a crosstab report 3. In the Catalog box, select the calculation to use. 4. Click Add, and click OK.

54 IBM(R) Cognos(R) Impromptu(R)

Chapter 4: Working with Stored Conditions and Calculations

Use a Stored Condition as a Filter


You can use a stored condition as a filter in a report, for example to retrieve data that falls between two dates.

Steps
Open a report or template. From the Report menu, click Query, and then click the Filter tab. In the Available components box, click Catalog Columns. Select the condition you want to use and click OK. Note: The selected condition appears in the Filter Definition box. You can use the condition from the catalog on its own or you can add to the condition. 4. Click OK. 1. 1. 2. 3.

Use a Stored Condition in Conditional Formatting


You can use a condition stored in the catalog in conditional formatting, for example to show sales figures below quota in red.

Steps
1. 2. 3. 4. 5. 6. 7. In a report or template, select one or more report objects. From the Format menu, click Conditional Formats. Click Conditions. Click Add Catalog Condition. In the Catalog folders box, click the condition, and click OK. Click Close. From the Change style to box, select the style, or create your own style, and then click OK to associate your condition with a style. 8. Click OK.

Change a Stored Condition or Calculation


You can change a condition or calculation stored in the catalog at any time.

Example
You define a condition that sets a region to consist of certain states. If another state is added to the region, you add the new state to the condition once. All reports using the condition change to show the new state in the region.

Steps
1. 2. 3. 4. 5. 6. 7. Close any open reports. From the Catalog menu, click Folders. In the Catalog folders box, click the condition or calculation you want to change. Click Edit. Click the part of the expression you want to change. Change the expression and click OK. Click OK.

Administration Guide 55

Chapter 4: Working with Stored Conditions and Calculations

56 IBM(R) Cognos(R) Impromptu(R)

Chapter 5: Working with Prompts


A prompt is an expression that you set up, to enable users to specify selection criteria when generating their reports. Prompts help users quickly find the information they need from a report. For example, you can define a prompt that enables sales representatives to select customer sites by city. Or your prompt can ask your users to specify a date range for the data to be included in the report:
Enter the Start Date of the date range Enter the End Date of the date range

There are two kinds of prompts: picklist and type-in. For type-in prompts, the user types a value on which the report filter is based. Picklist prompts retrieve their values from a text file (file picklist), from a data item in another report (report picklist), or from a data item the catalog (catalog picklist). Cascading prompts are picklist prompts that use information from a previous prompt to determine which options to display in the picklist. You can view the hierarchy for any cascading prompt, including the definitions and data requirements at each level. For more information about creating cascading picklist prompts, see the PowerPrompts Reference online book.

What You Can Do


You can store a prompt in a catalog, add a prompt stored in the catalog to a report, and modify or delete any prompt in the catalog. You can use the Prompt Manager to create new prompts in a report re-order the prompts modify existing prompts in the report delete prompts from the report You can access the Prompt Manager using OLE automation. For more information, see the Impromptu Macro online help.

Example
You create a report listing current product inventory and price. The report is long and users have to scroll through all the data to locate specific price and stock information. To make the report more usable, you create a prompt to enable users to pick the name of the item whose price and stock data they want to see. You store the prompt in the catalog so all users can use the prompt.

Limitations
Impromptu does not allow circular prompt references: you cannot create a prompt using a data item from the report you are viewing. You can however, make a copy of your report, and create a prompt using the data item from the copied report. If you use the characters, '|' or ',' as prompts when opening a report, the report will fail. If you want to use these characters in prompts, precede them with the '%' character, for example, '%|' or '%,'.

Create a Catalog Prompt


You can create a catalog prompt, so you and your users can use it in any reports that are based on the catalog.

Administration Guide 57

Chapter 5: Working with Prompts For example, you can define a Start Date and End Date and prompt for the date range during report generation. The prompts you define are available to all your users, but users cannot delete or modify catalog prompts.

Steps
1. Open or create a catalog. 2. From the Catalog menu, click Folders. 3. Click Prompt. The Prompt Definition dialog box appears. 4. In the Name box, type the name of the prompt to appear in the Folders dialog box. 5. In the Message box, type the message users see in the Prompt dialog box when the report opens. 6. From the Type box, click the type of prompt you want to create. If you click Type in, the user types a value on which the report filter is based. You define the type of value in the Data type list box. In the Default value box, type a default value to use if the user does not type anything. Date, time and date-time values are initialized to zeros in the ISO date-time format. If you accept the initial values, then at run time, the default prompt value is set to the current date and time in the users locale. If you click File picklist, the user selects a value from an existing text file that contains one value on each line. Click Browse to specify the file to use for the picklist values. If you click Report picklist, the user selects a data item for filtering from an existing report. Click Browse to specify the report. Select the report data item from the list. If you want the user to select one data item in the prompt (for example, Store Name) but have a different item appear in the report (for example, Contact Person), select a data item and click Display to use it in the prompt, and then select a different item and click Use for the corresponding item to appear in the report. If you click Catalog picklist, the user selects a data item for filtering the report from the catalog; select the catalog data item from the Catalog Columns. If you want the user to select one data item in the prompt (for example, Store Name) but have a different item appear in the report (for example, Contact Person), select a data item and click Display to use it in the prompt, and then select a different item and click Use for the corresponding item to appear in the report. Note: The default maximum number of entries in a file picklist is 100. You can change the default value using the Picklist Limit property in Configuration Manager. For more information, see the IBM Cognos Configuration Manager User Guide. In the Order box, click Ascending, to sort a file picklist prompt in ascending order. 7. If you are defining a prompt for use in stored procedure reports, click Advanced and check the settings in the table below. Otherwise, go to step 8. For Database data type Use the default value Do the following Specify the data type of the stored procedure parameter. Select to use the default value specified for the Type In prompt. Use for stored procedure parameters that are constants; the user will not be prompted to provide any value. Specify (in bytes) the size of the stored procedure parameter. Specify the total number of digits on either side of the decimal point that can be represented by this prompt. Specify the order of magnitude of the number. For example, if the scale is two, the number 1234 is displayed as 12.34 (because the decimal point is moved two places to the left).

Size Precision Scale

58 IBM(R) Cognos(R) Impromptu(R)

Chapter 5: Working with Prompts 8. Click OK to create the prompt and return to the Folders dialog box. Tip: You can review existing reports to determine commonly used prompts that you want defined in the catalog.

Modify a Catalog Prompt


You may want to change the text that shows in a prompt when users open a report. You can also change the filter values that show in the prompt, so the users can filter the report on a new set of values.

Steps
1. 2. 3. 4. 5. Open or create a catalog containing a prompt. From the Catalog menu, click Folders. Click the prompt you want to change, and click the Edit button. Change the prompt as required. Click OK twice.

Use a Catalog Prompt in a Report


You can use prompts stored in the catalog in your reports. This enables you to re-use your most frequently used prompts without having to re-create them for every report.

Steps
Create or open a report that uses a catalog containing a prompt. From the Report menu, click Query. Click the Filter tab, and define an expression for the filter. Double-click Catalog Columns to open the Catalog dialog box. Click the prompt you want to insert, and click OK. Note: A prompt is identified by the question mark icon. 6. Finish defining the filter expression and click OK. 1. 2. 3. 4. 5.

Remove a Catalog Prompt from a Report


You can remove a catalog prompt you no longer need from your report. The Prompt Manager still shows the catalog prompt although it is not being used in your report.

Steps
1. 2. 3. 4. Create or open a report that uses a prompt from the catalog. From the Report menu, click Query. Click the Filter tab. Click the prompt expression and press Delete to remove only the prompt. Note: Click Clear to remove the entire filter expression, including the prompt.

Create a Report Prompt


You can create a prompt for the current report, including a stored procedure, if required. For more information, see "Work with Stored Procedures" (p. 95). You can drag and drop prompts to re-order them in the Prompt Manager. The report user sees the prompts in the resulting order.

Steps
1. Create or open a report. 2. From the Report menu, click Prompt Manager. 3. Click New.

Administration Guide 59

Chapter 5: Working with Prompts 4. In the Name box, type the name the prompt to appear in the Folders dialog box. 5. In the Message box, type the message users see in the Prompt dialog box when the report opens. 6. From the Type box, click the type of prompt you want to create. If you click Type in, the user types a value on which the report filter is based. You define the type of value in the Data type list box. In the Default value box, type a default value to use if the user does not type anything. Date, time and date-time values are initialized to zeros in the ISO date-time format. If you accept the initial values, then at run time, the default prompt value is set to the current date and time in the users locale. If you click File picklist, the user selects a value from an existing text file that contains one value on each line. Click Browse to specify the file to use for the picklist values. If you click Report picklist, the user selects a data item for filtering from a saved report. Click Browse to specify the report. Select the report data item from the list. If you want the user to select one data item in the prompt (for example, Store Name) but have a different item appear in the report (for example, Contact Person), select a data item and click Display to use it in the prompt, and then select a different item and click Use for the corresponding item to appear in the report. If you click Catalog picklist, the user selects a data item for filtering the report from the catalog; select the catalog data item from the Catalog Columns. Note: The default maximum number of entries in a file picklist is 100. You can change the default value using the Picklist Limit property in Configuration Manager. In the Order box, click Ascending, to sort a file picklist prompt in ascendinlg order. 7. If you are defining a prompt for a stored procedure report, click Advanced and check the settings in the table below. For more information, see "Insert Parameters in a Stored Procedure Call" (p. 96). Otherwise, go to step 8. For Database data type Use the default value Do the following Specify the data type of the stored procedure parameter. Select to use the default value specified for the Type In prompt. Use for stored procedure parameters that are constants; the user will not be prompted to provide any value. Specify (in bytes) the size of the stored procedure parameter. Specify the total number of digits on either side of the decimal point that can be represented by this prompt. Specify the order of magnitude of the number. For example, if the scale is two, the number 1234 is displayed as 12.34 (because the decimal point is moved two places to the left).

Size Precision Scale

8. 9. 10. 11. 12. 13.

Click OK to create the prompt and return to the Prompt Manager dialog box. Click OK. From the Report menu, click Query. Click the Filter tab and define an expression for the filter. In the Available components box, click Prompt Manager to show the defined prompts. Click the prompt you created, and click OK. Finish defining the filter expression and click OK.

Modify a Report Prompt


You can modify the name and other properties of a prompt you create in a report.

60 IBM(R) Cognos(R) Impromptu(R)

Chapter 5: Working with Prompts

Steps
1. 2. 3. 4. Create or open a report that containing a prompt. From the Report menu, click Prompt Manager. Click the prompt you want to modify, and click Edit. Changes the prompt as required and click OK twice.

Administration Guide 61

Chapter 5: Working with Prompts

62 IBM(R) Cognos(R) Impromptu(R)

Chapter 6: User Profiles and Data Access Requirements


If you had to create and maintain a different catalog for each group of users in your organization, your task as an administrator would be huge. But with Impromptu you can define different user classes for different communities who use the same catalog. When you set up user classes, you are creating gateways for different types of users, while retaining a single point of maintenance for yourself. As you create user classes below other user classes, the security settings are inherited. The combination of user class and inherited security means you can create a single catalog and a few reports. Impromptu automatically channels the right data to the right people, based on your security settings. For example, managers and their employees may use the same catalog, but only the managers can view employee salary data. By creating two user classes, one for the managers and one for the employees, you can ensure that the employee user class cannot view restricted salary information. You can share some of the administrator responsibilities by enabling one or more user classes to create subordinate user classes. For example, you could create a user class called Team Leaders, and allow the team leaders to create user classes for their team members. Note: If Access Manager is installed on your computer, then security could be controlled by Access Manager. For more information, see "Use Access Manager to Control Security" (p. 67).

Analyze User Requirements


Users are typically knowledge workers who need to generate a variety of reports. Depending on the privileges you assign them, and the type of environment you set up for them, they might or might not be able to print reports create their own reports customize their environment by modifying a catalog work with automated tasks or automate their own tasks provide limited administrative support to other users create reports accessible to disabled users To determine user requirements, you might want to interview representatives of different user groups to assess their levels of knowledge and technical expertise, and to determine their functional areas and hierarchical levels.

Determining User Classes


You can group users in many ways, including: by data requirements (for example, all managers requiring data on employee salaries) by departments or divisions within the organization (for example, the European sales region) by function (for example, an intermediate level administrator who administers a catalog for a functional group of users) When you create a catalog, the Creator user class is set up automatically. Users in this class have full control over the catalog. If the catalog you create is a shared, distributed, or secured catalog, an additional class named User is set up as a subset of Creator. The privileges of the users in this class depend on the type of catalog created.

Administration Guide 63

Chapter 6: User Profiles and Data Access Requirements Once you have created a catalog, you can define additional user classes. Create at least one user class based on the Creator user class, and then do one of the following: continue to base new user classes on the Creator user class use your new user class as the base or parent for each child class As you create new classes, you can set security by value and by field, and tailor the business view for each class. You can also edit and delete user classes, to accommodate re-organizations, activity changes, and personnel changes. User classes must be unique for each catalog; you cannot have two classes with the same name. Also, be careful when deleting user classes, because subclasses of the class you delete are also deleted.

Determining the Domain of Data


Once you know the user classes you need, you can determine the domain of data in your database to which each user class needs access. Knowing this will help you determine the type of Impromptu catalog to set up, the tables to include in the catalog, the joins to make between tables, and the folders and columns to include. When you have discussed the users requirements with them, and analyzed their needs, you can systematically break the requirements down into "What information does the user want, by what." What they want to see translates into data columns in Impromptu. The "WHAT they want BY" determines the column groupings they require.

Example 1: A Sales Analysis


The domain of data for a sales group might look like this: 1 Products Product lines Brands Products Stock Keeping Unit (SKU) 2 Time Years Quarters Months 3 Organizations Sales Divisions Sales Districts Sales Reps 4 Customers Sales Rank Customers 5 Indicators Units Ordered Number of Orders Order Value $ Revenue Discount Average Selling Price The columns in the table represent the information users will need: An additional report might be needed with customer details such as name, phone number, balance outstanding, and similar information.

Example 2: A Regional Breakdown


As database administrator, you must provide access to data for: senior sales managers regional sales managers country managers sales representatives sales outlets (customers)

64 IBM(R) Cognos(R) Impromptu(R)

Chapter 6: User Profiles and Data Access Requirements The reporting needs vary greatly from one class of user to the next. Senior sales managers want concise reports of sales figures on a regular basis, and some of them want the ability to create their own custom reports. The corporate head office needs reports on a company-wide basis, while regional offices want reports for their regions only. Each regional and country office has its own distinct reporting needs, and the sales policies and procedures vary from region to region. You set up the following user classes to meet these needs: Sr Sales Mgr Prod ReportsHas access to all data, with several special managerial-level folders set up to highlight pertinent sales trends and reports. This is a secured user class, meaning that report users cannot create or change reports. This meets the requirement for pre-packaged production reports for your senior managers. Sr Sales Mgr Ad Hoc ReportsThis user class is not secured, so report users can create new reports or change existing ones. Regional ManagerHas access to only the tables, folders, and data values that apply to his or her region. The regional manager acts as a regional report administrator, adding user classes as required and setting up folders to match the specific business view of his or her region. All user classes that a regional manager creates or modifies automatically inherit the security restrictions for that regional manager. Country ManagerInherits the restrictions that apply to a regional manager. Each regional manager imposes further restrictions on tables, folders, and data values for the countries within his or her region. Country Sales RepInherits the restrictions that apply to a country manager. Each country manager imposes further restrictions to the data for his or her sales representatives. As a result, each sales representative can see data for his or her customers, and is prohibited from seeing the sales records of other salespeople. OutletsHas access only to data about company products, excluding pricing and sales data. This is a secured user class, meaning that customers cannot alter the reports you provide them. This meets the requirement for electronically distributing an online brochure of your products while maintaining tight security.

Determining the Data Elements


You will need to determine how to map the elements defined in the domain of data to elements defined in the database, keeping in mind that: some elements may not be available some elements need to be derived some elements can be in more than one place, or have different names When doing this type of analysis, you might find it helpful to make a sketch of your database, showing the table joins you need to ensure that users can access the data they need.

Planning on Change
It is important to be as precise as possible when determining user requirements, but it is next to impossible to define them exactly. Requirements typically are not fixed; they change from day to day with changing business issues. Instead, when planning your Impromptu environment, keep in mind that you are documenting the domain of data that your users think they need, plus some representative standard reports based on this domain. As users become proficient with Impromptu, they will probably create their own reports, and take on more responsibilities. But you will likely still need to add or remove data items from the users domain of data.

Create a User Class


When you create a shared, secured, or distributed catalog, Impromptu automatically creates two user classes: Creator and User. From the Creator user class, you can create, change, and remove user classes. You can also create, change, and remove any subordinate user classes if your user class has the appropriate access. Administration Guide 65

Chapter 6: User Profiles and Data Access Requirements A member of the catalog Creator user class can lock a catalog. When a catalog is locked, members of the Creator user class must provide an additional password to open the catalog. Other user classes can open a locked catalog as read-only. Each child user class inherits the same set of privileges and restrictions as the parent user class on which it is based. User classes are shown as a parent-child hierarchy in the User Classes tab (User Profiles dialog box).

Limitations
Only the Creator user class can add or modify the user classes defined in a master distributed catalog. Child user classes can have fewer but not more, privileges than the parent user class.

Example
You set up a user class for the Sales department that lets them see only sales data. You then set up another user class in the same catalog for the Accounting department that lets them see only financial data. When the catalog is secured by a namespace, user classes in the catalog must also exist in the namespace.

Steps to Create a User Class


1. From the Catalog menu, click User Profiles, and then click the User Classes tab. 2. Click the user class on which you want to base the new user class. Note: You may need to double-click a user class to see the hierarchy of subordinate classes within this catalog. 3. Click Add. 4. In the Class name box, type a unique name for the new user class. 5. If you want to protect this catalog, type a password in the User class password box. 6. In the Verify box, type the password again to verify the password set in step 5, and then click OK. 7. Repeat steps 2 to 6 to create additional user classes and click OK. Click Cancel to close the User Profiles dialog box without creating the user class.

Steps to Allow a User Class to Create Other User Classes


1. From the Catalog menu, click User Profiles, and then click the Governor tab. 2. In the User class box, click the user class you want to modify. 3. Select the Add/modify user classes check box, and click OK.

Edit a User Class


You can edit user classes. You can assign or change the password for the Creator user class. If you have appropriate access, you can edit the user class names and passwords. You cannot edit the user class that you are currently logged on with, unless you are logged on as a Creator user class.

Steps
1. From the Catalog menu, click User Profiles, and then click the User Classes tab. 2. In the User Class box, click the user class you want to edit. Note: You may need to double-click a user class to see its hierarchy of subordinate classes within the catalog. 3. Click Edit. 4. If you want to edit the user class name, type a new name for the user class in the Class name box.

66 IBM(R) Cognos(R) Impromptu(R)

Chapter 6: User Profiles and Data Access Requirements 5. If you want to assign or edit the password, type the new password in the User class password box. For more information, see "Assign or Change a Password for a User Class" (p. 69). 6. In the Verify box, type the password again, and then click OK, to verify the password edited in step 5. 7. Repeat steps 2 to 6 to edit other user classes, and click OK.

Remove a User Class


You can remove subordinate user classes that are no longer required. You cannot remove the Creator user class. Use caution when deleting user classes, as all subordinate classes (child) of the user class (parent) are automatically deleted.

Steps
1. From the Catalog menu, click User Profiles, and then click the User Classes tab. 2. In the User Class dialog box, click the user class you that want to remove. Note: You may need to double-click a user class to see its hierarchy of subordinate classes within the catalog. 3. Click Remove. 4. Repeat steps 2 and 3 to remove other user classes, and click OK.

Use Access Manager to Control Security


Impromptu comes with Access Manager, a set of tools you can use to control security for all your IBM Cognos products. You may want to use Access Manager with Impromptu catalogs to avoid forcing users to log on more than once when they move between applications. Access Manager also allows you to administer security for all your catalogs in one place instead of maintaining separate security structures for each catalog. To integrate with Access Manager, you must ensure that Access Manager is installed and configured properly on your computer.This includes specifying a default namespace for your computer. For more information, see the Access Manager documentation. the user classes in your catalogs match the user classes in your Access Manager namespace Access Manager uses LDAP technology: a list of users and user classes and the corresponding passwords and permissions are stored in a namespace on a directory server. When you log on to an IBM Cognos product, Access Manager prompts you for signon information. It then checks the namespace specified in the Catalog Properties dialog box, to determine whether you have the appropriate access privileges. If Access Manager finds your signon in the namespace, it determines which user classes you belong to and checks the catalog. If you belong to one user class that exists in the catalog, Access Manager logs you on using that user class. If you belong to more than one user class that exists in the catalog, Access Manager prompts you to pick a user class, then opens the catalog. If you use Access Manager to control security for more than one catalog, you must ensure that the user classes in all your catalogs are synchronized. Also, each catalog automatically contains a Creator user class. If you add a user to the Creator user class in Access Manager, that user will have access to all your catalogs. If you want restrict access available to the Creator user class, you can lock the catalog. For information about locking a catalog, see "Control Access Using a Catalog Lock" (p. 73).

Security When You Don't Specify a Namespace


If you dont specify a namespace, but you have Access Manager set up on your computer, Impromptu checks a default namespace first. If you arent listed in the default namespace, you can still log on using catalog security. You can also use Access Manager to add your operating system user name and password to the namespace so that you can log on to the catalog automatically.

Administration Guide 67

Chapter 6: User Profiles and Data Access Requirements Note: If Access Manager isn't on your computer, then security is in based in the catalog. For more information about catalog-based security, see "User Profiles and Data Access Requirements" (p. 63). For more information, see the Access Manager Administration Guide.

68 IBM(R) Cognos(R) Impromptu(R)

Chapter 7: Techniques for Controlling User Access


By default, all user classes have access to all data in the catalog. However, as a member of the privileged Creator user class, there are a number of ways to set up access security for your database. You can: assign passwords to user classes to restrict access to sensitive data, or to provide a more focused view of the information in the Impromptu database; see "Control Access Using Password Authentication" (p. 69). define access privileges at the column, table, or folder level, or for a specified filter value in the catalog; see "Control Access to Objects" (p. 71). identify which user classes can edit the catalog structure, create and edit reports, enter SQL directly, or define subordinate user classes. For more information, see "Control Access to Impromptu Functionality" (p. 74). To set user environment controls for a hierarchy of user classes, change the user class at the top of the hierarchy. Subordinate user classes inherit controls and settings from the user class at the top. Although a restriction for a user class is inherited by all child classes, when you grant a privilege for a user class, that privilege is not inherited by all its child classes. Any user class with the appropriate permissions may control the environment for subordinate user classes. For example, as a member of the Managers user class you have permission to control the environment for a subordinate Employees user class. For more information about defining user classes appropriate to your needs, see "User Profiles and Data Access Requirements" (p. 63).

Control Access Using Password Authentication


You can protect a catalog by assigning a password to a user class, which all user class members must enter to use the catalog. Passwords are case-sensitive, and can consist of alphanumeric characters and spaces. You can: create user classes that match the needs of your user community protect catalogs by assigning passwords to each user class accessing that catalog store database user IDs and passwords within the catalog

Assign or Change a Password for a User Class


When you set up a user class, you can assign it a password. Users in that class will be prompted when they attempt to use a catalog. To change a password, you edit the user class definition. If a user forgets the user class password, and for some reason you have no record of it, you as the Creator can create a new password. But if you forget the Creator password you cannot create a new one; you must recreate the catalog.

Steps
1. From the Catalog menu, click User Profiles, and then click the User Classes tab. 2. In the User Class dialog box, click the user class you want to modify. Note: You may need to double-click a user class to view its hierarchy of classes within the catalog. 3. Click Edit. 4. In the User class password box, type the new password, or change the existing password. 5. In the Verify box, type the password again to verify the password. Administration Guide 69

Chapter 7: Techniques for Controlling User Access 6. Click OK, and click OK again to close the User Profiles dialog box.

Remove a Password from a User Class


You can remove the password you have set for any user class. To remove a password, you edit the user class definition.

Steps
1. From the Catalog menu, click User Profiles, and then click the User Classes tab. 2. In the User Class box, click the user class you want to modify. Note: You may need to double-click a user class to view its nested hierarchy of classes within the catalog. 3. Click Edit. 4. In the User class password box, click the password and press the Delete key. 5. Click OK, and click OK again to close the User Profiles dialog box.

Store a Database Password for a User Class


You can maintain security and simplify login by suppressing the prompts for the database user ID and password. Impromptu does this by embedding the user ID and password within the user class profile. Impromptu stores user IDs and passwords in an encrypted format in the catalog. This allows users to access a database without knowing what user name or password is being used. If the database server has enabled password aging, and a password has expired, the catalog entry must be updated before the user can connect to the database again. If the password is embedded in the catalog, make sure that password aging is not applied. If password aging is applied, when a password expires the user will be unable to define a new password and unable to access the catalog. If you use password aging, place the password in the Database account.

Example
The Great Outdoors database is updated by sales staff as new orders are placed. On an average day, this can mean a few thousand transactions. You decide to allow managers to view data that is currently being updated by another user. This gives your sales managers the most up to date information possible. To remove the necessity for your managers to remember multiple user IDs and passwords for the information they need to access, you set the Senior Sales Manager user class so that it automatically attaches to the database with a specific user ID and password that Impromptu stores in the catalog. You do the same thing for customers who need access to the online company product brochure.

Steps
1. 2. 3. 4. 5. 6. From the Catalog menu, click User Profiles, and then click the Database tab. In the User class box, click the user class you want to modify. Click the Database logon option button. In the User ID box, type the database user ID. In the Password box, type the database password. In the Verify box, type the password again, and then click OK.

Prompt a User Class for a Database Password


By default, Impromptu prompts user classes to enter the user ID and password for the database each time they run a series of reports. The Database tab of the User Profiles dialog box is available only for databases that support certain options. If the tab is available, you can use it to:

70 IBM(R) Cognos(R) Impromptu(R)

Chapter 7: Techniques for Controlling User Access predefine database logon information set up a prompt for a password when a user class attempts to access the database

Steps
1. From the Catalog menu, click User Profiles, and then click the Database tab. 2. In the User Profiles dialog box, click the user class you want to modify. 3. Click the Prompt for database security option button, and click OK.

Test User Access


You can test the catalog for each of your user classes, checking to make sure that it meets users' requirements before giving it to them. You can then refine the catalog before users work with it. You can also easily change the catalog after giving it to your users. Your users will get the latest version of the catalog automatically.

Steps
To test how the catalog works for your users, change your user class to one of the user classes you created. 1. From the Catalog menu, choose User Class. 2. In the User class box, select one of your Manager user classes. Click OK. 3. Click the Catalog menu. Notice that commands that are unavailable to the Managers are grayed. For example, they cannot update the catalog or access the Tables or Joins selections. But they can set up user classes based on their own class, and they can organize Folders. 4. From the Catalog menu, click User Profiles. Click the Governor tab. Managers can view and change the user classes below them in the hierarchy, but cannot change their own access privileges. 5. Click OK. Return to the Catalog menu and change the user class to one of the lower level user classes. Look at the Catalog menu again. 6. Notice that the lower-level user class is more restricted than the Manager user class. Unlike managers, the lower-level user class cannot modify Folders or User Profiles.

Control Access to Objects


You can control access to sensitive or protected data by limiting the access of specific user classes. You can also re-instate user class access to data. You can use the Impromptu catalog (User Profiles) for this purpose, or Access Manager. For more information, see "Use Access Manager to Control Security" (p. 67) and "Security Interaction With Impromptu Web Reports" (p. 169).

Control Access to Tables or Columns


You can enable or prevent user class access to specific tables or columns in the catalog. When you control access to the entire table, access is prohibited to all of the table's columns. When access to a table is denied, any reference to that table in a report will result in a query execution error. You can also give a user class access to a table but not to a folder. Users in the class can then run a report that uses the table, but cannot change the report. If a user class is denied access to a column in a table, the user cant run existing reports accessing the column. If a user class is granted access to a column in a table, but denied access to the same column in a folder, the user can run an existing report showing the restricted column. The user cannot create a new report using that column, however, because it does not appear in the catalog. If access is denied at the parent level of a class hierarchy, then all child classes below that parent are automatically also denied access.

Administration Guide 71

Chapter 7: Techniques for Controlling User Access

Example
In order to secure product sales information from your customers, you set security by field so that the user class Outlets can see only the product information you want them to see. In this case, you want to grant them access to the following information: product number product name product type and line product picture To do this, you deny the Outlets user class access to all tables but Products. Within the Products table, you deny the Outlets user class access to all columns except Prod_No, Product, Prod_Type, Prod_Line, and Picture.

Steps
1. 2. 3. 4. 5. From the Catalog menu, click User Profiles, and then click the Table Access tab. In the User class box, click the user class you want to modify. In the Catalog tables box, double-click the appropriate table. Select the appropriate column, table, or database. Click Grant Access to enable access, or click Deny Access to prevent access, and then click OK. Note: An icon beside the name of the column, table, owner, or database indicates if access is denied.

Control Access to Folders and Items in Folders


You can enable or prevent user class access to specific folders or folder items in the catalog. This is useful because a catalogs folder structure is typically organized by business view, group, or perspective. Security by business view prevents users from seeing folders that contain sensitive data they are not allowed to see. For example, you can restrict members of a user class from accessing data from another department. Folder access can be granted or denied for each user class. If access is denied at the parent level of a class hierarchy, all child classes below that parent are automatically also denied access. When folder access is denied, the user does not see that folder when using the catalog to create or modify reports. You can also apply security governors to top-level folders, nested folders, or individual columns within those folders. By combining the controls available through User Profiles with those available through folder editing, you can achieve the exact folder presentation that you want for each user community.

Steps
From the Catalog menu, click User Profiles, and then click the Folder Access tab. In the User class box, click the user class you want to modify. In the Permission to box, click Access or Select Values as required. In the Catalog folders box, click the folders or items the user class can access or cannot access. Click Grant or Deny. Note: If you deny Select Values to a specific object (such as a folder), the user class cannot perform a select values operation, on any column in that folder or sub-folder. 6. Click OK. Note: An icon appears beside the folder name, indicating if access is denied to this folder. 1. 2. 3. 4. 5.

72 IBM(R) Cognos(R) Impromptu(R)

Chapter 7: Techniques for Controlling User Access

Control Data Access Using Filters


Using the Filters tab of the User Profiles dialog box, you can set up conditional expressions that will filter out unnecessary or sensitive data for a user class, giving you security by value. You can define a filter that provides a more focused view by limiting the scope of data retrieved from a table or column. Filters can also improve performance by limiting the number of records retrieved. All reports using the same filter automatically change when you modify the filter.

Example
To secure data for your regional managers, you set up a filter that grants them access to their own regional data only. When a user class creates a report using the Region table, they see only data for their region. The users do not have to manually filter out data when they create a report. Later, you can modify the filter so that new regions added to the Region table are automatically available to the applicable user class.

Steps to Create or Modify a Filter for a User Class


1. 2. 3. 4. 5. 6. 7. 8. 9. From the Catalog menu, click User Profiles, and then click the Filters tab. In the User classes box, click the user class for which you want to create or modify a filter. In the Catalog tables box, double-click the database component. Select the table for which you want to create or modify a filter. Click Edit. In the Available components box, double-click Catalog Columns. Click the column for which you want to create or modify a filter, and click OK. Build or modify a filter and click OK. Click OK.

Steps to Remove a Filter from a User Class


1. 2. 3. 4. From the Catalog menu, click User Profiles, and then click the Filters tab. In the User classes box, select the user class from which you want to remove a filter. In the Catalog tables box, double-click the database component. Select the table with the filter you want to remove. Note: Tables with associated filters show a filter icon beside their name. 5. Click Clear to remove the filter from the user class, and click OK.

Control Access Using a Catalog Lock


By default, the Creator user class has unrestricted access to a catalog and can restrict access to other user classes. Typically, this is how you want catalog access to be managed. However, there may be certain occasions when you want to restrict access even to members of the Creator user class. You can lock a catalog to further restrict its access to the catalog Creator user class. This added security will prevent all members of the Creator User Class in the Access Manager namespace from accessing this catalog. This security is important where you have multiple catalogs, each with different users who are Creators, and all users are members of the Creator User Class in the same Access Manager namespace. When a member of the catalog Creator user class attempts to open a locked catalog, they must provide password authentication to unlock the catalog before opening it. A catalog lock is specified by the administrator and exists in addition to the common logon authentication required by IBM Cognos products and the catalog logon authentication. If a user, who is not a member of the Creator user class, attempts to open a locked catalog, they are prompted for the usual catalog logon credentials only.

Lock a Catalog
Locking a catalog prevents a user from opening it using the catalog Creator user class, unless the user provides an additional password for authentication.

Administration Guide 73

Chapter 7: Techniques for Controlling User Access After you open a locked catalog using the necessary authentication, you can remove the lock on the catalog. For information about opening a locked catalog, see "Unlock a Catalog" (p. 74).

Steps
1. From the Catalog menu, click Lock Catalog. The Lock Catalog command is only enabled when: the catalog is opened by someone belonging to the Creator user class the catalog is opened in read and write mode 2. In the Lock Catalog dialog box, in the Password box, enter a password. 3. In the Confirm Password box, enter the password again. 4. Click Lock Catalog. When a catalog is locked and a user belonging to the Creator user class tries to open it, the user is prompted to enter a password before gaining access to the catalog. This password is requested in addition to the IBM Cognos Common Logon and the Catalog Logon passwords. Users that do not belong to the Creator user class are not prompted for the Open Locked Catalog password since they do not require Creator privileges.

Unlock a Catalog
Before you can unlock a catalog, you must first open it using the credentials the administrator specified when the lock was created. After you open the catalog, you can then change the status from locked to unlocked. For information about locking a catalog, see (p. 73).

Steps
1. From the Catalog menu, click Open. 2. Browse to the catalog and click Open. 3. If the IBM Cognos Common Logon dialog appears, enter a user id and password and click Log On. 4. In the Catalog Logon dialog box, in the User class box, click Creator, and click OK. If you are a member of the Creator user class that belongs to the catalog namespace, your password is supplied. 5. In the Open Locked Catalog dialog box, enter a password and click OK. The catalog opens. You can now permanently unlock the catalog, if you choose. 6. To remove the lock from the catalog, from the Catalog menu, click Unlock Catalog. 7. In the Unlock Catalog dialog box, click Unlock Catalog.

Control Access to Impromptu Functionality


You can define privileges for one or more user classes, to grant them access to a particular set of Impromptu features and functionality. Specific settings in the Governor tab of the User Profiles dialog box enable you to control processing capabilities by user class. The first block of settings-Sorting on Non-Indexed Columns through Cross-Product Queries (No Table Joins)-permit you to Allow, Warn, or Prevent various options. The warn and prevent message will appear when Impromptu detects the specified condition. The second block of settings determines whether the user can perform the following actions: Create/Edit Reports - See "Control Creating and Editing Reports" (p. 75). Edit Folders - If the Edit Folders checkbox is selected, users in the user class can append folders to the catalog structure and modify the folders. For shared and secured catalogs, this checkbox is cleared. See "Control Editing of the Catalog Structure" (p. 75). Add/Modify User Classes - If this option is selected, users in the user class can create new user classes. This means the users can share some of the Impromptu administrator tasks. For example, you can allow the Managers user class to create user classes for the Employees they manage. See "Control the Ability to Define User Classes" (p. 76). 74 IBM(R) Cognos(R) Impromptu(R)

Chapter 7: Techniques for Controlling User Access Direct Entry SQL - If this option is selected, users in the user class can edit Structured Query Language (SQL) in reports, and the Edit SQL button will be available in the Query dialog box. This is appropriate only for users who have a strong knowledge of SQL. Also, it reduces the portability of the catalog. In most cases this checkbox should be cleared. See "Control the Ability to Enter SQL Directly" (p. 76).

Example
You have two groups of users requiring access to the same catalog. However, one group needs view-only access to standard reports, while the other group needs edit access to the data structure, catalog structure, and reports.

Control Editing of the Catalog Structure


Any user class that can edit the catalog structure has complete read-write access to that catalog. Place catalogs in a read-only directory to prevent users from changing the catalog, even if they have permission to edit the Impromptu folders.

Distributed Catalogs
By default, only the Creator user class can modify the structure of a master distributed catalog. User classes can modify certain aspects of their personal distributed catalog structure. You can prevent a user class from editing the catalog structure.

Shared Catalogs
By default, only the Creator user class can edit the catalog structure of a shared catalog. While you edit the structure of a shared catalog, all other subordinate user classes cannot open the catalog. All user classes use the same copy of the catalog, and you cannot edit the folders until everyone using the shared catalog closes the catalog.

Secured Catalogs
By default, only the Creator user class can edit the catalog structure of a secured catalog.

Steps
1. From the Catalog menu, click User Profiles, and then click the Governor tab. 2. In the User class box, click the user class you want to modify. 3. Select the Edit folders check box to enable access, or clear the Edit folders check box to prevent access, and then click OK.

Control Creating and Editing Reports


By default, all user classes can create and edit reports. You can prevent a user class from creating and editing reports, although the user class can run previously created reports. Use of this checkbox is appropriate if the user class will be doing ad hoc reporting. If they will only execute standard reports, clear this checkbox option (this is what the secured catalog does). Clear this box when you are changing an existing catalog to a secured catalog. You can restore reporting, editing, and creation capabilities at any time. User classes cannot create and edit reports for secured catalogs. Secured catalog users can only run previously created reports. However, report consumers can create drill-through links even if they do not have update privileges for a report. It is good business practice to place standard or shared reports in read-only folders so users cannot modify them. Users can then create their own reports while using your reports.

Steps
1. From the Catalog menu, click User Profiles, and then click the Governor tab. 2. In the User class box, click the user class you want to modify.

Administration Guide 75

Chapter 7: Techniques for Controlling User Access 3. Select the Create/edit reports check box to enable access, or clear the Create/edit reports check box to prevent access, and then click OK.

Control the Ability to Enter SQL Directly


You can enable a user class to enter SQL directly to create queries if you need to have Impromptu run a complex query that cannot be generated automatically (such as CONNECT BY in Oracle) the query is used in, or created by, another application you are an expert in SQL and want to use your knowledge to create queries By default, only the Creator user class can enter SQL directly. If a user inadvertently sets direct SQL editing (Profile tab, Query dialog box), then that user can only update the report by typing SQL statements. The user must access all of Impromptus advanced reporting features such as sorting, grouping, and filtering, through SQL. For more information about entering SQL directly, see "Use SQL" (p. 99).

Disadvantages of Entering SQL Directly


The following are disadvantages of entering SQL directly: A poorly defined or not valid SQL query can be time-consuming to execute. Any restrictions you set in the User Profiles dialog box and the Access tab (Query dialog box) no longer apply, except for limits set on the number of rows retrieved and the length of time a user class can run queries. For example, a user has access to all the tables and columns in the catalog, including data the user may not have permission to see. Security-by-value conditions and filters are ignored. Catalog portability is reduced.

Steps
1. 2. 3. 4. From the Catalog menu, click User Profiles, and then click the Governor tab. In the User class box, click the user class you want to modify. Select the Direct entry SQL check box. Click OK.

Control the Ability to Define User Classes


You can allow mid-level managers to create user classes for their employees, if they have the Administrator version of Impromptu. You can also allow them to place restrictions on the activities of subordinate user classes. For example, they can limit access to sensitive data, or improve system performance by preventing actions that might be time-consuming or of little benefit. You can remove any user class except the Creator user class.

Steps
1. From the Catalog menu, click User Profiles, and then click the Governor tab. 2. Change the query restrictions or access privileges for one or more user classes, to meet the current requirements for your catalog. Note: The settings for user classes in a master distributed catalog are automatically inherited by each personal distributed catalog. 3. Cllick OK.

76 IBM(R) Cognos(R) Impromptu(R)

Chapter 8: Manage the Impact on the Network and Database


Performance can become an issue on a network supporting a large number of users who frequently retrieve large amounts of data. As the administrator, you can reduce performance issues by setting operational constraints for each user class. You can manage the impact on the network and database by controlling user actions such as the number of characters a user class can retrieve from large text items (BLOBs) the number of rows a user class can retrieve the number of tables that can be used by a report sorts on non-indexed columns the ability to create outer joins the display of duplicate rows of data in a report the creation of cross-product reports direct entry of SQL You can also manage the impact by defining runtime parameters. For example, specifying the retrieval of large results sets using bulk fetch to increase performance limiting the execution time of queries minimizing the time a user class is connected to the database balancing the client/server load assigning weights to tables specifying alternate data sources such as snapshots or thumbnails

Use the Bulk Fetch Capability


Impromptu attempts to retrieve more than one row of data at a time to reduce processing time. However, if Impromptu attempts to retrieve too many rows at once, your network traffic may increase. There are two fetch-related settings, which operate independently of one another, but Impromptu administrators can only change the first: rows retrieved per fetch call, if your database supports this feature. To change the default setting for this parameter, locate the following line in the [Query Options] section of the Impromptu.ini file, and increase the value from the default (n=100) to a higher number: bulk fetch rows=n rows fetched into the user buffer In Oracle implementations, increasing the value of the rows retrieved parameter (first option) may speed up data retrieval. See your database documentation for more information about the most efficient bulk fetch settings.

Control the Retrieval of Large Text Items


You can control the number of characters user classes can retrieve from large text items or binary large objects (BLOBs). If your database supports BLOBs, Impromptu truncates the BLOB to the size you specify.

Administration Guide 77

Chapter 8: Manage the Impact on the Network and Database The Creator user class can set the maximum volume of text a subordinate user class can retrieve. Members of any other user class can restrict only the volume of text retrieved for their subordinate user classes. You can also control the text BLOB limit at the query level by typing the limit in the Maximum Number of Characters to be Retrieved for Large Text Items box (Access tab, Query dialog box). For example, you set a general limit for retrieving large text items for all reports created by a user class, but you also set a different, more restrictive limit for any specific report run by the same user class. Impromptu lets you restrict data volumes using both the number of records and the size of BLOB fields. To have items span more than one page, the height must be set to dynamic.

Steps
1. From the Catalog menu, click User Profiles, and then click the Governor tab. 2. In the User class box, click the user class you want to modify. 3. In the Maximum number of characters to be retrieved for large text items box, type a number from 1 to 65534 as the number of characters the user class can retrieve, and click OK. Note: To set unlimited retrieval, type a number larger than 65534 and click OK. Impromptu resets the box when there is no limit.

Control the Number of Rows Retrieved


The Creator user class can set the number of rows any subordinate user class can retrieve. All other user classes, with add/modify permission, can further restrict the number of rows subordinate user classes can retrieve. The Access tab (Query dialog box) can also control the number of rows retrieved at the query level. For example, you set a general limit for the number of rows retrieved for all reports created by a user class, but you set a different limit for a specific report run by the same user class. Impromptu counts rows as they are retrieved and issues a warning or stops at the pre-set number.

Steps
1. From the Catalog menu, click User Profiles, and then click the Governor tab. 2. In the User class box, click the user class you want to modify. 3. In the Warn at box (under Data retrieval limits box), type or modify the number of rows retrieved when the user class is warned and then click OK. 4. In the Stop at box (under Data retrieval limits box), type or modify the maximum number of rows retrieved and then click OK.

Control the Number of Tables Retrieved


The Creator user class can control the number of tables a user class can retrieve for a report. Impromptu counts tables as they are retrieved and issues a warning or stops at the pre-set number.

Steps
1. From the Catalog menu, click User Profiles, and then click the Governor tab. 2. In the User class box, click the user class you want to modify. 3. In the Warn at box (under Report table limits box), type or modify the number of tables retrieved when the user class is warned and click OK. 4. In the Stop at box (under Report table limits box), type or modify the maximum number of tables retrieved and then click OK.

78 IBM(R) Cognos(R) Impromptu(R)

Chapter 8: Manage the Impact on the Network and Database

Control Sorting on Non-Indexed Columns


Sorting data is faster if your database has indexed columns, or if you have defined columns as keys for tables. For example, LastName is the indexed column for the Customers table. Your users sort by only the LastName column to make data retrieval faster. By default, any user class can sort on non-indexed columns. You can improve Impromptu's data retrieval performance by preventing a user class from sorting on non-indexed columns warning a user class that sorting on non-indexed columns is time-consuming The Creator user class can set privileges for sorting on non-indexed columns for any subordinate user class. All other user classes, with permission to add or modify user class privileges, can set only more restrictive privileges for subordinate user classes. For example, if you have a user class called Manager with a subordinate user class called Employees, then the Manager user class can set privileges for the Employees user class.

Steps
1. From the Catalog menu, click User Profiles, and then click the Governor tab. 2. In the User class box, click the user class you want you want to modify. 3. In the Sorting on non-indexed columns box, do one of the following: To prevent a user class from sorting on non-indexed columns, click Prevent. To issue a warning message when the user class sorts on a non-indexed column, click Warn. To allow the user class to sort on non-indexed columns, click Allow. 4. Click OK.

Control the Creation of Outer Joins


Outer joins are a type of join that retrieves all of the rows from one table even when there are no matching rows in another table. This type of join can produce very large reports, slowing performance, but some users may need to use this feature. For example, the Sales group would probably want to report all orders by product, including those products that had no sales. The Creator user class can set privileges for creating outer joins for any subordinate user class. All other user classes, with permission to add or modify user class privileges, can set only more restrictive privileges for subordinate user classes.

Steps
1. From the Catalog menu, click User Profiles, and then click the Governor tab. 2. In the User class box, click the user class you want to modify. 3. In the Outer joins box, do one of the following: To prevent a user class from creating an outer join, click Prevent. To issue a warning message when the user class uses an outer join, click Warn. To allow the user class to use an outer join, click Allow. 4. Click OK.

Suppress Duplicate Rows of Data


You can control how a user class displays duplicate rows of data in a report by: preventing a user class from displaying duplicate rows of data in a report warning a user that duplicate rows of data are suppressed allowing a user class to display duplicate rows of data in a report The Creator user class can set privileges for displaying duplicate rows of data for any subordinate user class. All other user classes, with permission to add or modify user class privileges, can set only more restrictive privileges for subordinate user classes. Administration Guide 79

Chapter 8: Manage the Impact on the Network and Database Suppressing duplicate rows in a report can slow processing. It will affect results on local processing such as RSUM.

Steps
1. From the Catalog menu, click User Profiles, and then click the Governor tab. 2. In the User class box, click the user class you want to modify. 3. In the Eliminate duplicate rows (select distinct) box, do one of the following: To prevent the user class from displaying duplicate rows of data, click Prevent. To issue a warning message when the user class displays duplicate rows of data, click Warn. To allow the user class to display duplicate rows of data, click Allow. 4. Click OK.

Control the Creation of Cross-Product Queries


Cross-product queries retrieve data from tables which are not joined. They take a long time to generate, can show meaningless results, and may retrieve a large number of rows of data. You can control how a user class uses cross-product queries by enabling a user class to create cross-product queries preventing a user class from creating cross-product queries warning a user class that creating cross-product queries is time-consuming By default, no user classes can create cross-product queries. The Creator user class can set privileges for creating cross-product queries for any subordinate user class. All other user classes, with permission to add or modify user class privileges, can set only more restrictive privileges for subordinate user classes. For example, if you have a user class called Manager with a subordinate user class called Employees, then the Manager user class can set privileges for the Employees user class.

Steps
1. From the Catalog menu, click User Profiles, and then click the Governor tab. 2. In the User class box, click the user class you want to modify. 3. In the Cross-product queries (no table joins) box, do one of the following: To prevent the user class from creating cross-product queries, click Prevent. To issue a warning message when the user class creates cross-product queries, click Warn. To enable the user class to create cross-product queries, click Allow. 4. Click OK.

Control the Time a User Class Can Run Queries


You can control the time a user class can run a query. Members of the Creator user class can set this time limit for any user class. All other user classes, with permission to add or modify user class privileges, can set only more restrictive privileges for subordinate user classes. Impromptu first gathers statistics on the report size, so you may have to run the report a few times to build up the statistical base. The database you use might have features for controlling execution time as well.

Steps
1. From the Catalog menu, click User Profiles, and then click the Governor tab. 2. In the User class box, click the user class you want to modify. 3. In the Warn at box (under Query execution time limits box), type or modify the time (in minutes) when you want to warn the user class and then click OK.

80 IBM(R) Cognos(R) Impromptu(R)

Chapter 8: Manage the Impact on the Network and Database 4. In the Stop at box (under Query execution time limits box), type or modify the time (in minutes) when you want to stop the user class and then click OK. 5. Click OK.

Restrict the Time a User Class Is Connected to the Database


You can restrict the length of time that a user class is connected to the database by using a temporary cache to store query results. Impromptu automatically disconnects from the database once the query is run, and automatically reconnects when you run another query. Normally, user classes are connected to the database from the time the user opens a catalog until they close the catalog or disconnect from the database.

Steps
1. From the Catalog menu, click User Profiles, and then click the Client/Server tab. 2. In the User class box, click the user class you want to modify. 3. Select the Minimize connection time to the database check box and click OK.

Adjust the Client/Server Balance


You can adjust the client/server balance so that queries are processed on only the server, with limited local processing, or with flexible processing.

Database Only
Use the Database Only option to process on the database server only. You might want to use this option when queries are very large, or when you want the Structured Query Language (SQL) generated by queries to be portable to other applications that access your database. In interactive queries, the Database Only option requires that the query is completely processed on the database server in one query submission. As a result, this option prevents building a query that involves both details and subtotals.

Limited Local Processing


Use the Limited Local Processing option when you want data passed from the database server to the PC, which handles processing locally. In interactive queries, the Limited Local Processing option attempts to perform as much of the processing on the database server as is possible through the use of multiple queries. Impromptu will then combine the results on the PC. For example, if you want last names changed to uppercase, and you put this condition in the footer of a query, Impromptu applies uppercase to the data as it is displayed. If you put the uppercase condition in the header, Impromptu retrieves all rows in the database and then applies the uppercase condition. Limited Local Processing wont work if you want to sort on a calculated column requiring local expressions, or if a filter is based on a calculated column. For example, you could not sort or apply a filter on a COUNT, SUM, AVE, MAX or MIN column. Note: By default, the standard templates provided by Impromptu are set to Limited Local Processing. If your reporting environment requires flexible processing, you can modify the settings in the templates for all new reports that you create.

Flexible Processing
With this option, depending on the database, the entire result set can be sent to the PC, where local sorts are performed. This option allows Impromptu to execute any query, but it can increase network traffic. When you are using a local database, the Report Query dialog box displays the message "local database, flexible processing assumed."

Administration Guide 81

Chapter 8: Manage the Impact on the Network and Database

Steps
1. From the Catalog menu, click User Profiles, and then click the Client/Server tab. 2. In the User class box, click the user class you want to want to modify. 3. In the Query processing box, click one of the following option buttons: To run queries completely on the server, click Database only. To run queries with limited local processing, click Limited local processing. To let Impromptu decide where to run queries, click Flexible processing. 4. Click OK.

Assign Weights to Tables


Table weighting specifies the order in which tables will be retrieved and joined. The more detailed the table, the bigger the weight that should be assigned. The objective is to get Impromptu to read the summary table first, and then join to successively more detailed tables. By assigning weights to your tables, you control which tables are preferred as intermediate tables in join strategies. Impromptu uses these weights when creating SQL queries by ordering the tables in the FROM clause, from the lightest to the heaviest. Smaller tables are always preferred. By default, tables are added into the catalog with the weight of 5. Outer joins, if used, will change the weighting order.

Example
A report with Customer (CUSTOMER table), Order_No (ORDER table), and Rep_Name (REP table) selects columns from the CUSTOMER table, then the ORDER table, and then the REP table, because that is the order they are referred to in a query. By assigning a weight of 20 to the order table, a weight of 10 to the Customer table, and a weight of 2 to the REP table, you determine a more efficient order of the tables in the FROM clause. The Rep table has been given a higher priority (1 being the highest priority). Due to this weighting, tables are selected in the order: REP-ORDER-CUSTOMER. Why? If direct joins between these tables exist, then data will be selected from the tables in the order based on table weight. However, in this case, there is no direct join between Rep and Customer. They have to be joined through the Order table. Impromptu creates the table joins in this order:
"Rep.Rep_no=Order.Rep_no and Customer.Order_no=Order.Order_no"

In many cases, weighting enables you to optimize queries. Some database optimizers override the weighting option in Impromptu. Advanced databases do a better job of optimizing queries and are unaffected by the order of the tables in the SQL.

Steps
1. From the Catalog menu, click Tables, and then click the Weighting tab. 2. In the Catalog tables (relative weight) box, click the table or tables with the weight you want to increase or decrease and do one of the following: To decrease the weight until the desired weight is reached, click Smaller. To increase the weight until the desired weight is reached, click Bigger. You can double-click the table to continue decreasing or increasing the weight. 3. Click OK.

Use Snapshots or Thumbnails


When Impromptu retrieves information directly from the database, it goes back to the database when you change a query. Selecting an alternative data source can make returning to the database unnecessary, reducing the cost of reporting over your corporate network. Impromptu supports the following alternate data sources: HotFiles; see "Work with HotFiles" (p. 89)

82 IBM(R) Cognos(R) Impromptu(R)

Chapter 8: Manage the Impact on the Network and Database snapshots thumbnails

Using Snapshots
A snapshot retrieves all the information for a report and stores it in a permanent cache on the PC. The data is stored along with the report format in the *.imr file. A snapshot can be used like a database. You dont need access to the database to use a snapshot. A report can be produced directly from the snapshot. Because you are not accessing the database, you cannot add columns to a snapshot or build a less restrictive filter. Snapshots are suitable for working disconnected from the LAN. Use snapshots when: You want to have all the data you need for your report in one file. When you work with a report that contains a snapshot, you can sort, group, calculate, add filters, and so on. You want to e-mail your report as a single file attachment. When you create a snapshot for a report, the snapshot is saved along with the report in the *.imr file. You can send the .imr file to someone who doesnt have access to your database but who has Impromptu. You want to open a report without access to the catalog. Using a snapshot is one way to work with your reports, even when you are not connected to the LAN; for example, when you are using a laptop.

Creating a Snapshot
Before you can create a snapshot, you must have a report open. To create a snapshot, you can: use the Snapshot button on the Standard PowerBar use the snapshot options in the Access tab of the Query dialog box use the Save As command from the File menu

Refreshing a Snapshot
If you created your snapshot to preserve historical data, you should not perform a refresh on it, because the data must be maintained intact, for archival puposes. However, if your purpose is to present an updated view of the data, you can refresh your snapshot using either of the following methods: use the Snapshot button on the Standard PowerBar use the Access tab of the Query dialog box

Scheduling Snapshots
You can schedule snapshots using IBM Cognos Scheduler. To do this, run a report and always save it as a snapshot to a different filename using the Report tab in the Scheduler. Saving a report as a snapshot and re-running it results in the data never being updated.

Using Thumbnails
Impromptu can retrieve a specified number of records from the database and store them in a temporary cache on the PC called a thumbnail. Impromptu attempts to use the thumbnail exclusively, and does not return to the database unless necessary. When you sort, group, apply restrictive filters, or add columns that are calculations based on existing columns, Impromptu performs these actions locally, without accessing the database. Unlike snapshots, thumbnails allow you to apply less restrictive filters and add one or more columns, and Impromptu will automatically go back to the original database to get new information. Thumbnails are suitable for testing purposes.

Administration Guide 83

Chapter 8: Manage the Impact on the Network and Database

84 IBM(R) Cognos(R) Impromptu(R)

Chapter 9: Audit Impromptu Performance


Impromptu can record information about the tasks you perform in a log file. You can use the information to monitor performance and make decisions about how to improve the efficiency of your Impromptu environment. Impromptu comes with a set of tools that you can use to configure your log file and export the information into a database. Then, you can run a sample Impromptu report on the information to audit Impromptu performance. There are two small applications that come with Impromptu that help you perform auditing: 1) Audit Configuration and 2) Audit File Processor. Use the Audit Configuration application to: enable auditing set the audit file location configure how much space audit files will take store the SQL statements Impromptu uses to get information Use the Audit File Processor application to: set the audit file load location set the audit data database; you can use any database that can be accessed through ODBC set whether audit files are deleted after loading create database tables add data from the audit files to the database tables Each session of Impromptu records all events in the audit file along with important context information about those events. For example, when you open a report while auditing is turned on, Impromptu records the name of the report and how long it took to open that report. Impromptu Web Reports has its own auditing application and cannot collect auditing data for Impromptu and vice versa. This is because the log files created are of different versions. Note: There is no support for Impromptu auditing on UNIX. A sample auditing catalog (Audit.cat) and a report (Auditing Report.imr) are included in the Impromptu samples. For more information on these two samples, see "Product Sample Listing" (p. 157).

Steps to Audit Impromptu Performance Using Log Files


1. Create a new data source. 2. Create a database file for that data source. If you are using an Access database file (.mdb), create that file using Access, not ODBC Administrator. Note: When creating the Access database, set security and user group settings because you will be prompted for them in the AuditFileProcessor application. 3. Check to see if AuditConfig.exe and AudifFileProcessor.exe are in your installation_location\Bin folder. If they are, skip to step #4. Otherwise, run the Custom Installation of Impromptu and select the Audit check boxes in the Component Selection dialog box. 4. Start the Audit Configuration application (AuditConfig.exe), enable auditing, and specify where to store the audit files. For instructions, see "Steps to Use the Audit Configuration Application" (p. 86). Note: Ensure that the directory location for your log files is write-enabled 5. Start Impromptu. 6. Open a report and make some general changes to create some events in your log files.

Administration Guide 85

Chapter 9: Audit Impromptu Performance 7. Close Impromptu. 8. Start the Audit File Processor application (AuditFileProcessor.exe), process the audit files, and store their data in the database file you created in step 2. For instructions, see "Steps to Use the Audit File Processor Application" (p. 86) and "Steps to Set Audit File Processor Options" (p. 86). 9. Start Impromptu and create a database definition using the data source you created in step 1. 10. Create a catalog using the database definition you created in the previous step. 11. Create your report or use one of the sample auditing reports.

Steps to Use the Audit Configuration Application


1. Select the Enable Auditing check box to enable auditing. Note: To turn off auditing, clear the Enable Auditing check box. 2. In the Location Root for Audit Files box, enter the root location of the audit files. 3. In the Maximum Size of Each File in (KB) box, type the maximum audit file size. When this size is exceeded, Impromptu creates a new file. 4. In the Maximum Size of Each Directory with Audit Files in (KB) box, type the maximum folder size. When this size is exceeded, the oldest audit file in this folder is deleted. 5. Select the Write SQL to Disk check box to save SQL in files. SQL logging files are written to a sub-folder of the root folder called SQL. 6. Select the Exit on Error check box to stop editing if an error occurs. 7. Select the Do Not Create Session Directories check box if you don't want session directories. Each time the auditing .dll is loaded, Impromptu creates a unique sub-folder of the root folder called SessionN, where N is a unique number, unless you select this check box. 8. Click OK to close the application and save changes. Note: The auditing log files are called AUDIT########.log, where ######## is a hexadecimal number. The files are stored in folders called Session########. If SQL auditing is enabled, SQL log files are stored in subfolders of the session folders. These subfolders are called SQL########.

Steps to Use the Audit File Processor Application


1. In the Input Audit Files Directory box, enter the root location of the audit files to process. 2. In the ODBC Data Source Name box, enter the ODBC data source name for the database to store the audit data. 3. Click Options to open the Options dialog box. You can set various processing options, such as deleting auditing files after they are loaded and stopping when an error is encountered. 4. Click Start. The Status box shows the number of audit files processed and the number of lines in the current file that have been processed. Note: To stop audit file processing, click Stop.

Steps to Set Audit File Processor Options


1. To create the audit database tables in the specified data source, click Create Tables. Note: You only have to create the tables once. 2. In the Input Audit Files Directory box, enter the root location of the audit files to process, if necessary. 3. In the ODBC Data Source Name box, enter the ODBC data source name for database to store the audit data. 4. To search for Session sub-folders under the specified path, select the Check Session sub-directories check box. 5. To delete audit files from the system disk as they are processed, select the Delete Audit Files check box.

86 IBM(R) Cognos(R) Impromptu(R)

Chapter 9: Audit Impromptu Performance 6. To play a system beep sound when processing a batch of files is finished, select the Beep on Finish check box. 7. To stop processing the audit files when an error is encountered, select the Stop on Error check box. 8. To open the ODBC Administrator dialog box, click ODBC Administrator. Tip: The location and ODBC name that appear automatically are set in the parent application.

Administration Guide 87

Chapter 9: Audit Impromptu Performance

88 IBM(R) Cognos(R) Impromptu(R)

Chapter 10: Work with HotFiles


A HotFile is a flat sequential file. It acts as a separate local data table that can be added to your catalog or used in a report as if it were a database table. Both the data and the definitions are stored in the HotFile. Once created, a HotFile is independent of the database columns from which it was created, and you can use it in any report or catalog. You can join a HotFile to database tables, reports, or other HotFiles.

Using HotFiles
For simpler situations where you have a relatively small or stable set of data that you wish to join to another database, use a HotFile. For example, if you have Branch information in Oracle (a few hundred records) that you need to join to a large Sybase database, use a HotFile to extract the Branch information and join it to the Sybase database. However, if you have one database with thousands or millions of rows that you need to combine with another database with thousands or millions of rows, a HotFile is not the answer. Products such as Sybase OmniServer and Oracle Transparent Gateway allow you to use an existing database server for the joins. Products like Digital's AccessWorks/DBI allow you to use either an existing database server or a separate dedicated database server to join the data. You can: generate reports using data from multiple databases. You can join information from different databases in heterogeneous database environments, or in environments where you must query multiple databases simultaneously. For example, suppose your corporate data is stored in an Oracle database and some of your own personal data is stored in a personal dBASE database. You can create a HotFile from either of these databases and then use that HotFile to create reports in conjunction with the other database. use HotFiles as lookup tables or in report prompts. Reports that query large datasets can slow computer performance when you use them as lookup tables or in report prompts. For example, if you use report that accesses a large dataset to filter values in a second report, Impromptu runs the large report and reads through the dataset to apply the filter. Instead, create a HotFile with the data you want in your lookup table or prompt, and then use the HotFile in your query. use HotFiles as a database. You can store important reporting data from a corporate database in HotFiles, and then use these HotFiles as a database that you access in a catalog. This enables you to stage your data for local queries, without submitting queries to the database. add data items to a report not included in your catalog by adding them directly from a HotFile. For example, you may want to speed up processing time by putting calculated and summary data in a HotFile share HotFiles by including them in your catalog. create and use HotFiles for a multiple query report that Impromptu executes in a single query. A multiple query report requires more than one query of the data to create the report. For each individual query in a multiple query report, you can create a HotFile, and then create a report that queries the HotFiles.

Limitations of HotFiles
Below are some limitations surrounding the use of HotFiles: HotFiles exist on the client.

Administration Guide 89

Chapter 10: Work with HotFiles HotFiles are not indexed, therefore, joins may take longer than expected to execute. Also, Impromptu must use Sort/Merge and sequential scan to filter. HotFile size is limited only by available disk space. However, you should not use HotFiles to store very large query results as they could slow computer performance.

Example
Each of your regional offices uses its own small database to track regional promotions and sales initiatives. However, The Great Outdoors corporate information is stored in a Sybase database. When your regional managers receive your standard reports and templates, they need a way to easily incorporate data from the corporate Sybase database with the information in their local databases. To overcome the multiple database type problems at The Great Outdoors, you create a HotFile called PRODSALE. This HotFile contains sales information from all regions. You set in place an OLE automation procedure that automatically builds this HotFile at the end of each calendar month, and then mails it to your regional managers. Your regional managers use the information in this HotFile with the information in any of the catalogs they have created for their regional databases. This way, your regional managers can easily correlate their sales results with the costs they have incurred in their regional promotions.

Create a HotFile
You can create a HotFile of a report you want to use separately from your database. The following are cases where you might use a HotFile to improve processing efficiency: If you have a large static data set that you use for many reports, you can create a HotFile for this data and use the HotFile data rather than querying the data on the database. If you have a yearly sales table that you use for your financial reports, you can create a HotFile with the subset of data you require and use the HotFile data rather than the database. If you want to access a sales table from one corporate database, and a product table from a different database, you can create a HotFile of the product table and join the HotFile to the corporate database. If you have a complex exception report that requires multiple passes to get the information that you need, you can create a HotFile of your first report (first pass that extracts certain attributes or information), create another Hotfile of any subsequent passes to eliminate or summarize information, and then create the final report from the final HotFile. You can use a macro to automatically create a HotFile.

Examples
You have millions of rows in a database and you commonly use 20 of them. You create a HotFile containing only those 20 rows. This saves processing time when executing queries by reducing the number of rows in the query. You have to generate a daily report of the previous days sales and the sales table containing the data item is not in the local database. You use a macro to automatically create a new HotFile every day.

Steps
1. 2. 3. 4. Create or open the report with the data items you want in your HotFile. From the File menu, click Save As. In the File name box, type the name for the HotFile. In the Save as type list, click HotFile (*.IMS) and then click Save.

Change or Update a HotFile


HotFiles are local tables. After you create a HotFile, you may want to update the data or change the tables.

90 IBM(R) Cognos(R) Impromptu(R)

Chapter 10: Work with HotFiles

Example
You want to create a sales report for July, but you have created a HotFile using June sales tables. You change or update the HotFile by overwriting the older file.

Steps
1. Create or open the report containing the data items you want to include in your changed HotFile. 2. Save your report or query as a HotFile with the same name as the previous HotFile. 3. Click Yes to replace the existing HotFile. The existing tables and data are overwritten.

Add a HotFile to Your Catalog


You can include a HotFile in your catalog. You can also create a catalog of HotFiles. You need to create a database definition for the HotFile catalog. For more information, see "Create a Database Definition for a HotFile" (p. 111).

Examples
You have your sales commission conversion table in a separate database. You add the sales commission conversion table to your commissions catalog using a HotFile. You notice that everyone in the office is constantly using a specific set of HotFiles. You create a database definition for those HotFiles to enable easier access.

Steps
Close all open reports. From the Catalog menu, click Tables. Click the HotFiles option button. Select the folder containing the HotFile you want and click OK. The folders path appears above the Database tables box. 5. In the Database tables box, select the HotFile to add to your catalog, and then click Add. Note: The HotFile table looks the same as any other table in the catalog. 6. Click OK. 1. 2. 3. 4.

Create a Catalog of Only HotFiles


You can create a catalog containing HotFiles only if you have defined a set of HotFiles as a database. For more information, see "Create a Database Definition for a HotFile" (p. 111). You can add unlimited sets of HotFiles to the catalog.

Example
All your sales data are in HotFiles. You create a sales catalog containing only those HotFiles.

Steps
1. Create a new catalog. 2. Add the HotFiles to the catalog.

Use a HotFile in Your Report


You can use a HotFile in your report.

Example
You want to test a theory that expenses are proportional to salary, and the salary data item is in a separate database. You create a HotFile with the salary data item to use in your report.

Administration Guide 91

Chapter 10: Work with HotFiles

Steps
1. 2. 3. 4. Open a report to obtain the data items you need for your report. From the Report menu, click Query. In the Data source box, select HotFile. Click Browse to locate and select the HotFile directory and click OK. In the directory box, double-click the HotFile data items you want to use. Click OK when you have selected all the HotFile data items.

Use HotFiles as Lookup Tables


Large datasets can slow computer performance when you use them as lookup tables. For example, if you use a large report as a dataset that filters values in a filter expression, Impromptu runs the dataset report and then reads through the dataset to apply the filter. If your data is static, create a HotFile with the data that you want in your lookup table, and then use the HotFile in your query.

Share HotFiles by Including Them in Your Catalog


You can share a HotFile by including it in the catalog. This eliminates the need for your users to individually add the tables themselves. HotFiles in your catalog appear the same as any data tables in the catalog. Your users cannot tell the difference between a HotFile table and a regular database table; the data appears as a part of the catalog.

Example
You are the administrator for a master distributed catalog and several people using this catalog ask for data on a database you do not normally use. You create a HotFile of the data.

Join Multiple Databases Using HotFiles


You can use HotFiles to access multiple databases in one query. HotFiles are stored locally and you must update the HotFiles when you want it to reflect changes to the HotFiles data source.

Example
You want to access a sales table from the corporate Oracle database, and a product table from a Sybase database. You create a HotFile of the product table and join the HotFile to the corporate database.

Steps
1. Select one database as the basic database used in Impromptu. 2. Create HotFiles of the tables in any of the other databases. Note: Use the same folder so that you can access the tables at the same time. You may want to give alias names to identical tables from different databases. 3. Create a database definition for the HotFiles you create. 4. Create a catalog with the basic database and the HotFiles database. 5. Open the catalog.

Create and Use a HotFile for a Multiple Query Report


You can create: a complex exception report requiring multiple summary filters

92 IBM(R) Cognos(R) Impromptu(R)

Chapter 10: Work with HotFiles For example, if you have to list all your branch offices in descending order of risk, where the percentage of risky transactions is greater than 50%, you can create a HotFile with a summary filter to identify risky transactions. You then create another HotFile to eliminate stable branch offices. Finally, you create a report that separates the unstable branch offices into several levels of instability. A risky transaction is defined as a transaction with a potential to result in a loss (negative profitability). a statistical analysis report summarizing raw transactional data For example, if you want to determine the attributes of your best customers, you can create a HotFile to determine what customer has what attribute. You can then create another HotFile to determine the factors affecting the attributes. Finally, you can create a report to rank the customers and show resulting attributes. a result set report listing the components of an object For example, if you want to find all the parts used in a particular model of car, you can produce an intermediate HotFile by entering your own SQL, and then use the HotFile to support additional filtering, summaries, and percentages.

Steps
1. 2. 3. 4. 5. Create a HotFile of your first report. Create subsequent HotFiles as necessary. Create a final report. Select the HotFiles that you created in step 1 to include in your catalog. Query the HotFiles.

Administration Guide 93

Chapter 10: Work with HotFiles

94 IBM(R) Cognos(R) Impromptu(R)

Chapter 11: Work with Stored Procedures


Impromptu can access stored procedures (SQL scripts or other code routines stored in your database) and show the results in a list report. They improve the performance of repetitive tasks because they are only compiled the first time you run them. Impromptu comes with a Stored Procedure (.imp) template. You can use the Stored Procedure.imt template to create reports that call stored procedures and show the results in a simple list report. When you create a new report using the template, the Query dialog box is replaced by the Stored Procedure dialog box. To access the procedure, type the following and click OK:
call procedure name (?parameter1? IN, ?parameter2? OUT)

You must create a prompt for each input and output parameter your stored procedure requires. For example, a stored procedure requires a customer number and returns the number of tents the customer purchased in March. Use the Prompt Manager to create a prompt for each parameter, and then type the prompts into the call:
call sp_custinfo (?custid? IN, ?marchsales? OUT)

When you create the prompts, you must give them the same name as the parameter that the stored procedure requires. You must also provide as much information as possible about the type of data the stored procedure returns. You can specify data type information using the Advanced options of the Prompt Definition dialog box. If you always want to submit the same value for a parameter, you can set the value as a default and use the default every time you run the report. Select the Use the Default Value check box (Prompt Definition dialog box) to use the default value automatically when you run the report. You can create stored procedure reports in either administrator or user versions of Impromptu, provided that the user class that you used to attach to the catalog permits you to edit SQL. To allow SQL editing, select the Direct Entry SQL check box from the Governor tab of the User Profiles dialog box. Any user class that can create and edit reports can reuse a stored procedure report in another report, using either version of Impromptu. To allow your users to create and edit reports, select the Create/Edit Reports check box in the Governor tab of the User Profiles dialog box.

Stored Procedure Processing Constraints


The following are processing constraints associated with stored procedures: If a stored procedure returns more than one result set, Impromptu can only access the first one. You can't save a stored procedure report as an .iqd file. You must use uppercase to specify the name of an ORACLE stored procedure. By default, prompts are single select. A Type In prompt response could contain multiple, comma-separated values, but it would require the stored procedure to parse it. Stored procedure reports have the same limitations as type-in SQL reports. To remove these limitations, use stored procedure reports as data sources for other reports. Save your report, and then create a new report using the same catalog. In the Data Sources box (Query dialog box), you can select Hotfiles and Reports, and browse for the stored procedure report. Or, you can use the Tables dialog box to add the stored procedure report to your catalog, and then join this report to other reports or tables from the database. For more information, see "Use SQL" (p. 99). You can still add formats, borders, and patterns to the stored procedure report. However, if you reuse a report in another, then the result set of the reused report has to be locally cached when you execute the final report. This may increase processing time.

Administration Guide 95

Chapter 11: Work with Stored Procedures Impromptu can access stored procedures from any IBM Cognos-supported database. Stored procedures can also be accessed using ODBC connections. For information about supported databases and versions, see the Cognos Software Services Web site (http://support.cognos.com).

Create a Stored Procedure Report


Stored procedures are routines of code stored in a database. Among other capabilities, a stored procedure can retrieve data. A Stored Procedure.imt template is provided to assist you in creating stored procedure reports. An example of a stored procedure is:
call range_sp1 ( ?ParamStartDate? IN, ?ParamEndDate? IN )

Stored procedures have the following components: Syntax <procedure_name> <parameter> Explanation The name of the procedure. Type either the name or fully qualified name, for example, catalog.schema.proc_name. A prompt that provides the parameter. The name should indicate its purpose ("DATE"). Append the parameter type (one of: "IN", "OUT" or "IN OUT") after the prompt name. This component is optional, although most stored procedures have parameters. <status> A prompt that returns a status value. This component is optional. Except for Sybase, most stored procedures won't return a status.

Steps
1. From the File menu, click New. 2. Select the Stored Procedure template (Stored Procedure.imt) and click OK. If you do not have a catalog already open, the Open Catalog dialog box appears for you to select the catalog to use. The SQL tab of the Stored Procedure dialog box appears. 3. Type the name of the stored procedure. Note: Use uppercase to specify the name of an ORACLE stored procedure. 4. Click Insert Parameters to add a parameter. 5. Create a prompt for each input and output parameter. Note: You may have to insert "IN", "OUT" or "INOUT" and a comma between parameters. 6. Click Verify to test the SQL syntax. 7. If the SQL syntax is OK, click OK. Otherwise, fix your SQL syntax and click Verify again. 8. Save the report as an Impromptu report (.imr), not as a HotFile (.ims). 9. Use your report in another report.

Insert Parameters in a Stored Procedure Call


Generally, you use prompts to specify values for all input and output parameters, and you specify any constant values directly in the stored procedure. (You can turn off user-prompting for these default values by selecting the Use The Default Value check box in the Prompt Definition dialog box.)

96 IBM(R) Cognos(R) Impromptu(R)

Chapter 11: Work with Stored Procedures Although you are required to use prompts to specify the output parameter values, those values are only placeholders required for syntax checking. The output parameter values have no impact on the stored procedure execution. Input parameters are available for use within the stored procedure and are used for prompting users for values required during query execution. For example, if a stored procedure called dba.MyStoredProc takes an employee number (integer) and the department name (string) as input, then you cannot make a call to the stored procedure as shown below:
call dba.MyStoredProc(100, "HR")

You first have to define two prompts (because there are two input parameters); for example, EmpNo (datatype: integer) and Dept (datatype: string), with 100 and HR as default values for the prompts.
call dba.MyStoredProc(?EmpNo?, ?Dept?)

Impromptu is able to access the first result from a stored procedure. Subsequent results are not available within Impromptu. If you want the output parameters returned with the result set, list them in the Select statement. This may not work for all databases.

Example
In this example, X and Y are output parameters and are returned with the result set.
PROCEDURE QCSP_PARM_REF (RESULT1 IN OUT ACCTCURTYPE, X OUT NUMBER, Y IN OUT CHAR, Z IN NUMBER, RESULT2 IN OUT B_S_CURTYPE1) is BEGIN X := 1; Y := 'Y'; OPEN RESULT1 FOR SELECT *, X, Y, Z FROM ACCT WHERE ACCT.ACCT_CD = Z; OPEN RESULT2 FOR select bill_sum_key, trn_proj_id, acct_id, org_id from BILLING_SUM; END;

Steps
1. Position the pointer where you want the prompt. 2. Click the Insert Prompt button to open the Prompt Manager dialog box. 3. In the Available prompts box, if the prompt already exists, click the prompt and then click OK. Otherwise, click New and define the prompt in the Prompt Definition dialog box. For more information, see "Working with Prompts" (p. 57).

Hide Prompts for Stored Procedure Values


In some circumstances, you may want to hide a prompt from a user; for example, when providing constant parameters to a stored procedure or for output parameters that will be overwritten, and for which the input value is meaningless.

Steps
1. 2. 3. 4. 5. 6. Open the stored procedure report. From the Report menu, click Prompt Manager. In the Available prompts box, click the prompt to hide. Click Edit. Click Advanced. Select the Use the default value check box and click OK twice.

Administration Guide 97

Chapter 11: Work with Stored Procedures

98 IBM(R) Cognos(R) Impromptu(R)

Chapter 12: Use SQL


What is SQL?
SQL, or Structured Query Language, is the standard query language for accessing information from relational databases. You do not need to know SQL to use Impromptu, since Impromptu automatically generates the SQL needed to retrieve data for your reports.

What You Can Do


Impromptu generates SQL statements for your reports and queries. You can view and alter existing SQL statements or you can write SQL statements from scratch. You can also insert SQL statements that are extracted from other applications that use non-standard SQL. This is not recommended since many Impromptu features are no longer available when you manually enter SQL code. Once you alter the SQL statements, you can only change the query by manually editing the SQL statement.

Limitations
Once you edit SQL statements, you cannot: access some Impromptu tabs (for example, Data, Sort, and Filter). The remaining tabs provide only limited functionality access some of the toolbar buttons (for example, Sort, Filter, and Snapshot) re-establish most of the governor settings that control permissions schedule reports to be executed on a remote server

View the Existing SQL for the Query


You can view existing SQL for a query.

Steps
1. From the Report menu, click Query, and then click the Profile tab. 2. Click the SQL option button to show the SQL code for this query.

Create a Query By Writing Your Own SQL


You can create a query by writing your own SQL.

Steps
1. Create a new report using a template. The Query dialog box appears. 2. Click the Profile tab. 3. Click the SQL option button. Note: The SQL option button only appears if the administrator has enabled SQL access for you. For more information, see "Control the Ability to Enter SQL Directly" (p. 76). 4. Click Edit. 5. In the SQL Query tab, create a SQL statement, and click OK.

Change a Query By Writing Your Own SQL


You can change a query by modifying the SQL statements. Administration Guide 99

Chapter 12: Use SQL

Steps
From the Report menu, click Query, and then click the Profile tab. Click the SQL option button. Click Edit. Click where you want to modify the SQL statements and then do one of the following: To add your own SQL, type the SQL. To paste copied SQL statements, click Paste. To create prompts, click the Insert Prompt. To change a calculation or filter, altern the SQL statement. Note: If you want to maintain the report layout, you must use the same data item name references Impromptu has assigned. 5. Click Verify for Impromptu to verify the functionality of the new or existing SQL statements. 6. Click OK. 1. 2. 3. 4.

Generate Efficient SQL for Summary Level Reports


Impromptu can efficiently execute the common summary report.

Steps
1. Group the query on the column for which you want to view summary values (for example, by CUSTOMER). 2. Associate all related columns to the column you grouped in step 1. 3. Use the summary functions to add the summary columns to the report. Note: In the Query dialog box, click the Eliminate duplicate rows check box to set select distinct for your query.

Example 1
As shown in the following query, Impromptu varies the join specification in the bottom-most derived tables to reduce joins and suppress duplicate records. The query groups on the Order_no column (c9) and associates all related columns to Order_no, Customer name (c13), Address (c12), City (c11), and Province/State (c10). The select distinct for the Outlet and the association of the related columns means that no processing is done on the computer, and all the grouping and sorting is performed by the database.
select c9 as c1, c13 as c2, c12 as c3, c11 as c4, c10 as c5, c8 as c6 from (select T1."ORDER_NO" as c7, SUM(((1 - T4."DISC_PRCNT" / 100) * (T4."PRICE" * T4."QTY"))) as c8 from "CUSTSITE" T3, "ORDER" T1, "CUSTOMER" T2, "ORDRDETL" T4 where ((T3."CUST_NO" = T1."CUST_NO") and (T3."SITE_NO" = T1."SITE_NO")) and (T2."CUST_NO" = T3."CUST_NO") and (T1."ORDER_NO" = T4."ORDER_NO") group by T1."ORDER_NO" ) D2, (select distinct T1."ORDER_NO" as c9, T3."PROV_STATE" as c10, T3."CITY" as c11, T3."ADDRESS1" as c12, T2."CUSTOMER" as c13 from "CUSTSITE" T3, "ORDER" T1, "CUSTOMER" T2

100 IBM(R) Cognos(R) Impromptu(R)

Chapter 12: Use SQL


where ((T3."CUST_NO" = T1."CUST_NO") and (T3."SITE_NO" = T1."SITE_NO")) and (T2."CUST_NO" = T3."CUST_NO") ) D1 where (c9 = c7) order by c1 asc

Example 2
The application of this optimization depends on how the query is grouped. For example, if you group on ORDER.Order_no rather than ORDRDETL.Order_no, the query is not fully optimized. As a result, an extra server-based join is performed. In this case, instead of the above efficient version, the bottom-most derived table is constructed as follows:
select distinct c9 as c1, c13 as c2, c12 as c3, c11 as c4, c10 as c5, c8 as c6 from (select T1."ORDER_NO" as c7, SUM(((1 - T4."DISC_PRCNT" / 100) * (T4."PRICE" * T4."QTY"))) as c8 from "CUSTSITE" T3, "ORDER" T1, "CUSTOMER" T2, "ORDRDETL" T4 where ((T3."CUST_NO" = T1."CUST_NO") and (T3."SITE_NO" = T1."SITE_NO")) and (T2."CUST_NO" = T3."CUST_NO") and (T1."ORDER_NO" = T4."ORDER_NO") group by T1."ORDER_NO" ) D2, (select distinct T1."ORDER_NO" as c9, T3."PROV_STATE" as c10, T3."CITY" as c11, T3."ADDRESS1" as c12, T2."CUSTOMER" as c13 from "CUSTSITE" T3, "ORDER" T1,s "CUSTOMER" T2 where ((T3."CUST_NO" = T1."CUST_NO") and (T3."SITE_NO" = T1."SITE_NO")) and (T2."CUST_NO" = T3."CUST_NO") ) D1 where (c9 = c7) order by c1 asc

Example 3
As another example, if you have not associated the Order columns with "Order_no", you must click the Eliminate Duplicate Rows check box in the Filter tab (Query dialog box). This query retrieves all sales records to the computer for sorting. The resulting query is inefficient and returns a large volume of data:
select distinct c9 as c1, c13 as c2, c12 as c3, c11 as c4, c10 as c5, XSUM(c14 for c9) as c6 from (select T1."ORDER_NO" as c9, T3."PROV_STATE" as c10, T3."CITY" as c11, T3."ADDRESS1" as c12, T2."CUSTOMER" as c13, ((1 - T4."DISC_PRCNT" / 100) * (T4."PRICE" * T4."QTY")) as c14 from "CUSTSITE" T3, "ORDER" T1, "CUSTOMER" T2, "ORDRDETL" T4

Administration Guide 101

Chapter 12: Use SQL


where ((T3."CUST_NO" = T1."CUST_NO") and (T3."SITE_NO" = T1."SITE_NO")) and (T2."CUST_NO" = T3."CUST_NO") and (T1."ORDER_NO" = T4."ORDER_NO") ) D1 order by c1 asc

102 IBM(R) Cognos(R) Impromptu(R)

Chapter 13: Automating and Updating Impromptu


Impromptu has features to help you automate and maintain your Impromptu environment. You can: create standard reports and templates take advantage of Impromptus inheritance feature distribute a revised Impromptu.ini file to users mail shortcuts automate tasks with IBM CognosScript Editor, IBM CognosScript Dialog Editor, and IBM Cognos Scheduler use the Impromptu Type Library manage the report size

Standardizing Reports and Templates


One way to make your job as an administrator easier is to create standard reports and templates for your users. These help ensure consistency, and make it easier for you to maintain Impromptu and for your users to use Impromptu.

Standard Reports
A standard or production report is a report that you create and distribute to users. You can do this by creating a secured catalog where users cannot create or alter reports a distributed or shared catalog and placing the associated reports in a read-only directory. This prevents users from modifying the original copies of the production reports that you distribute, but allows them to make changes to their own copies of the reports. Creating standard reports gives users an easy entry point into Impromptu, and ensures that your reports have a consistent look and feel. For example, customer statements, invoices, and monthly profit and loss reports should reflect company standards, and should not be modified by users. You could create a specific catalog for these reports, but that would increase your maintenance time. Instead, try making a read-only file or directory that cannot be modified regardless of the type of catalog used. Users can open the report/template and save a report using a new name.

Templates
Templates are patterns or models that can be used to build reports. Like standard reports, templates help ensure report consistency throughout your organization. They give users a starting point for creating reports, but dont limit users to the extent that standard reports do. Templates are the basis for all reports. They can be as simple as the default simple list template supplied with Impromptu. They can also be much more complex, and include place holders, calculations, prompts, and formatting. Impromptu comes with several templates that you can use to begin creating your own business reports. If your users create the same type of reports frequently, you might also want to provide them with a set of standard templates you have created. You can use the Impromptu default templates as is, modify them to suit your business requirements, or create your own templates. Templates can be used for classic reporting styles such as mailing labels, invoices, sales reports, expense reports, name and address books, and product catalogs. You can roll out standard templates with your Impromptu catalogs and have users access them immediately.

Administration Guide 103

Chapter 13: Automating and Updating Impromptu The possibilities are endless when designing templates. For example, you can define two templates with similar headings but different page orientation (portrait and landscape). Or, you can use a single template and allow the user to switch the orientation as needed. To keep the proper alignment of headings with both paper orientations, use the alignment options Center, Left, and Right Aligned With Parent. Impromptu automatically adjusts to changes in page size and paper orientation. If you include placeholders in templates, to represent data items that should appear in the report, you make it easy for users to know the type of data to include in reports built from the template. Mailing labels, for example, might include placeholders for name and address. For information about creating templates, see the online book Mastering Impromptu Reports.

Example
As a world class company, it is important that you provide reports with a consistent look and feel for all of your Great Outdoors users. On the other hand, because The Great Outdoors company does span the globe, it is equally important that you give regional report users the ability to customize their reports to meet local requirements. In addition to controlling the look of reports, you must provide your users with "head starts" that enable them to build their own reports quickly and easily. To satisfy the common needs of your users, you create a set of standard templates and reports. For example, for senior, regional, and country managers, you create a template called Top Performers. Within this template are placeholders into which managers can place key sales data items, such as sales, product, and sales representative. The template automatically groups the data by the data items against which sales are measured, and then applies ranking and conditional highlighting to the report values so that key performers stand out immediately. Because you have already set up security by value for your regional and country managers, they automatically see the top performers within their own regions. For your salespeople, you create standard reports that outline their individual sales performance. In addition, you create both templates and standard reports that enable salespeople to browse customer and product information. The templates enable sales personnel to create their own customer and product reports, while the standard reports give all sales representatives the same kind of information in a consistent format. For your customers, you create a standard product brochure report. This report displays product information that your customers can use in their own promotions and sales outlets. Because you earlier secured the user class Outlets by denying its users the ability to create or change reports, your customers cannot change the information in your product brochure. They can use it in sales situations at any time.

Using Inheritance
Impromptus powerful inheritance features enable you to easily maintain and update the reports you distribute. Because all user classes are subordinate to yours, you control what each user class can access. Moving down the user class hierarchy, each user class automatically inherits the security restrictions of the user class above it. As a result, when you make a change near the top of the user class hierarchy, the change occurs throughout your entire user community. The inheritance of higher-level settings applies to: standard conditions, calculations, and prompts in the catalog. If your users have added a standard condition or calculation to a report, and you change the condition or calculation, the change is automatically reflected in the next report created. changes in table or folder access changes in the database or the business view Making changes in any of these areas causes the changes to automatically apply to your users. In the case of a shared catalog, all users access the information in a single catalog. Changing that catalog ensures that each user sees the changes the next time he or she opens that catalog. In the case of a distributed catalog, changes are inherited when the catalog distributes itself (makes a personal copy), or a personal copy is updated.

104 IBM(R) Cognos(R) Impromptu(R)

Chapter 13: Automating and Updating Impromptu

Updating and Maintaining Your Environment: An Example


The original creation of a reporting solution for The Great Outdoors company is actually a small part of your job as the database administrator. As processes and operations change within the company, you constantly receive requests for new reports. In addition, as the database changes over time, you are continually performing time-consuming maintenance on the reports that you distribute. For example, in a single day, you receive memos that inform you of the following company activities: European operations are changing effective one week from today, with the addition of new offices in both Greece and Holland. For security considerations, product sales history data is no longer to be distributed beyond the regional manager level. A major new account has been signed with a company named Total Fitness Shops. This new customer has over 40 retail outlets throughout the United States. After you update your corporate database to accommodate the new regional offices in Europe, and you add the data for the new account, updating the catalog to match is simple. To handle the new country offices in Europe, you enhance your European Customers condition so that it contains the new country codes for Greece and Holland. You could make this task even simpler if you store your country codes in a dataset and update the report that creates the dataset. To enforce the new security restrictions, you deny access to sales history data to all country managers. Impromptus inheritance feature ensures that sales personnel are automatically restricted in the same fashion. To make the users views of data match the new business view, you add a custom condition called Total Fitness Outlets to your catalog. This provides instant access to information about the new customer to all of your American managers and salespeople.

Automating Tasks with Macros


A macro is a set of instructions that enables you to automate complex or repetitive tasks. You can use macros to: generate reports use existing library functions and subroutines or ones that you create perform complex string and numeric operations open and close files activate other applications generate snapshots and HotFiles integrate applications using OLE As part of your overall distribution strategy, you can use IBM Cognos Scheduler, together with Impromptus advanced OLE automation methods and the IBM CognosScript macro language. By combining these powerful utilities, you can automate the distribution of Impromptu reports while integrating Impromptu with other applications at the same time. The three main utilities used to create, test, debug, and schedule Impromptu macros are: IBM CognosScript Editor IBM CognosScript Dialog Editor IBM Cognos Scheduler When you install Impromptu, these utilities are placed by default in the same program group as Impromptu.

IBM CognosScript Editor


You can use IBM CognosScript Editor to create, test, and debug macros. Use this utility to enter the macro commands using the IBM CognosScript language. You can run IBM CognosScript Editor from within Impromptu or directly from Windows. Administration Guide 105

Chapter 13: Automating and Updating Impromptu You can use IBM CognosScript Editor to: open, close, save and rename macros access the dialog editor create, copy, cut, undo, and find text check syntax (debugging) run macros debug or single-step through instructions set/clear breakpoints display functions Among other things, you can use IBM CognosScript and OLE automation to: create, read, update, and delete catalogs create and maintain joins write and edit expressions create and maintain user classes manage database connections For more information about IBM CognosScript Editor, refer to the IBM CognosScript Editor online Help.

IBM CognosScript Dialog Editor


You can use IBM CognosScript Dialog Editor to create custom dialog boxes for use in your more complex Impromptu macros. You can run this utility from within Impromptu or directly from Windows. For more information about IBM CognosScript Dialog Editor, refer to the Dialog Editor online Help.

IBM Cognos Scheduler


IBM Cognos Scheduler launches reports, programs, and macros based on times and dates that you specify. These scheduled launches are called "tasks." For example, you can create a task that launches: an IBM CognosScript macro that automatically runs a production report or builds a HotFile every day of the week, starting at 2:00 A.M. an Excel macro to run once a week on a specified day at a specified time. Your Excel macro might include OLE automation statements that automatically run a linked Impromptu report. an IBM CognosScript macro that automatically runs a set of Impromptu reports once a month, then mails the reports to a group of users a request to batch Impromptu reports on the database server Scheduler enables you to run programs after hours, freeing you for other work during the day and reducing network traffic during peak hours. Use IBM Cognos Scheduler to run automated processes at pre-set intervals, whether or not you are at your computer. You can use IBM Cognos Scheduler to run tasks unattended, since you can specify security parameters for your databases and Impromptu catalogs within the Scheduler. IBM Cognos Scheduler stores catalog user IDs and passwords in an encrypted format, so they are not visible when a task is running. Once you have created a task and scheduled it to run at a specific time, all you have to do is leave your computer on with IBM Cognos Scheduler running. At the specified time, IBM Cognos Scheduler will automatically perform the tasks. You can start IBM Cognos Scheduler: from the Cognos folder (the recommended method) from the Start button in Windows from the Windows Explorer by double-clicking Schdl_go.exe from Impromptu by choosing the Scheduler command from the Tools menu

106 IBM(R) Cognos(R) Impromptu(R)

Chapter 13: Automating and Updating Impromptu from Impromptu by clicking the Launch Scheduler button on the toolbar

To have IBM Cognos Scheduler run when you start Windows, copy the shortcut to the startup folder. To have IBM Cognos Scheduler working in the background, minimize it or run it from the Windows application tray on the taskbar. For more information about IBM Cognos Scheduler, refer to the Scheduler online Help.

Using the Impromptu Type Library


Impromptu comes with a type library that contains descriptions of all the exposed Impromptu objects, properties, and methods. The type library makes it easier for programmers in C++ to use Impromptu automation components in their code. To access the type library, reference the Impclient.tlb file in the folder where Impromptu is installed. For more information about automating and maintaining Impromptu, see the Impromptu Macro Help.

Manage the Size of Impromptu Reports


Impromptu reports can become large in size over time. An Impromptu.ini file setting lets you control the size of the report files by occasionally defragmenting or removing unused information when the files are closed.

Steps
1. Ensure that Impromptu Administrator is closed. 2. Using a text editor, browse to the Impromptu.ini file. The file is located in the installation_location/bin directory. 3. Open the file and in the [Startup Options] section, find the following setting:
Report Defrag Threshold=<n>

4.

5. 6. 7. 8. 9.

If this setting does not exist, add it. To achieve full compression, set the Report Defrag Threshold value to 100. Setting the Report Defrag Threshold value to 0 (zero), turns off defragmentation. If you set Report Defrag Threshold to a value other than 0 (zero), the value is read as a percentage of the amount of accessible data in the report before the report is defragmented. If the percentage of accessible data falls below the threshold value you set, the report will be defragmented and the unused data in the report will be removed. For a complete description of the Report Defrag Threshold setting, see the Impromptu User Help. Save and close the Impromptu.ini file. Start Impromptu Administrator and open the report. If prompted to upgrade the report, select Yes. From the File menu, click Save. From the File menu, click Close.

Important: If you do not close the report, it does not get compressed.

Administration Guide 107

Chapter 13: Automating and Updating Impromptu

108 IBM(R) Cognos(R) Impromptu(R)

Set Up Database Access


A database is a collection of data related to a particular purpose. A database can contain tables, views, synonyms and stored procedures. Impromptu supports local and remote databases. You can access local databases on your computer remote databases (all others) via the database vendors application program interface (API) or via an ODBC Gateway driver

Supported Databases
Impromptu often changes supported databases between release versions. To define and edit database definitions for users of a pre 32-bit release, you may need to use the Database Definition Manager from that release. For information about the databases supported by Impromptu, visit the Cognos Software Services Web site (http://support.cognos.com).

Distributed Sorting
When setting up database access, you must consider how your database sorts data. You need to determine if your database sorts data in the same order as the operating system on which your IBM Cognos products is installed. To ensure that data is sorted appropriately, you may need to make minor modifications to our database connection. For more information about controlling and troubleshooting distributed sorting in IBM Cognos products, visit the Cognos Software Services Web site (http://support.cognos.com).

What You Can Do


To access a database for the first time, you need to create a database definition. You can then use this definition in the Impromptu catalogs you create. After you create a database definition, you can change or remove the database definition select a different database for the catalog connect to and disconnect from the database

Create a Database Definition


Before you create any catalogs, you must first create the database definitions for the databases you want to use with Impromptu. A database definition consists of the logical name you give the database the type of database the location of the database security information Many databases have unique definition requirements. The Test button is not available until you provide the minimum information required for the database definition. If you want to change a database definition, you do not need to define it again. You need to edit the current definition.

Create a Database Definition for DB2


Steps
1. From the Catalog menu, click Databases. 2. In the Database Gateways and Drivers box (Database Definition Manager dialog box), select DB2. 3. Click New Database.

Administration Guide 109

4. In the Logical Database Name box (Database Definition dialog box), type a name for the database. 5. In the DB2 Database Name box, type a name for the DB2 database. 6. In the DB2 Connect String box, type the information you want appended to the database connect string. 7. Select the User ID and Password check boxes in User Prompts to prompt users for their user ID and password when they use this database. 8. To set the timeouts under the Timeouts box, do the following In the Connect box, set the time (in seconds) you want Impromptu to wait for the DB2 Gateway to connect to the database. In the Reply box, set the time (in seconds) you want the database to wait for your reply before timing out. 9. Select the Use Asynchronous Open check box to let users use other applications while Impromptu waits for the database connection. By default, Asynchronous Open is turned off and you cannot work with other applications while Impromptu waits for data, unless you cancel the query. 10. Click Test. If Impromptu cannot connect to the database, a dialog box appears describing the error. You may have to reboot your system to resolve this connection error. 11. Click Options to use an alternative concatenate operator, or pattern escape metacharacter. 12. Click OK.

Problems with Date-Time Expressions from Earlier Versions


For reports upgraded from Impromptu 5.0 or earlier versions, an error message may appear if you use the DB2 UDB varchar() function and the first argument is a date, time, or datetime datatype. When these reports are run in Impromptu 5.0 and the first argument is a date, time, or datetime, DB2 interprets it as a character string and the second argument is accepted automatically. When these same reports are upgraded to Impromptu Series 7 and subsequent releases, DB2 treats the first argument as a date, time or datetime, and the second argument produces an error message. To fix this problem, remove the second argument from the varchar() function in your report query. For DB2 under AS/400, this is not an issue. The database does not accept date, time, or datetime datatypes as the first argument when using the varchar() function.

Problems with Comma Decimal Points


If your DB2 database uses commas instead of periods as the decimal point, an error message may appear when you run a calculation that uses decimal numbers. Impromptu converts the commas to periods before submitting the calculation to DB2. To prevent the commas from being converted, in your Cogdmd2.ini file, type the following:
[Exceptions Separators DATABASE:DSN] Decimal_Separator="locale specific" [Exceptions Delimiters DATABASE:DSN] Numeric_Delimiter="'"

Problems Involving DB2 MVS and CASE Expressions


An error message appears if Impromptu sends a CASE expression with an IN predicate as part of a query to a DB2 MVS database. For example, the following expression contains an IN predicate:
IF ( Module Code = 'PO' and Process Enabled Flag IN ( 'Y', 'N' ) ) THEN 'YN' ...

This expression produces SQL like


"select ... CASE WHEN ((T1.\"S_MODULE_CD\" = 'PO') and (T1.\"PROCESS_ENABLED_FL\" IN ('Y','N'))) THEN ('YN') ..."

110 IBM(R) Cognos(R) Impromptu(R)

This SQL produces an error message if sent to a DB2 MVS database. The error message shown looks something like this:
DMS-E-GENERAL, A general exception has occurred during operation 'prepare request'. DMS-E-GENERAL, A general exception has occurred during operation 'prepare request'. [IBM][CLI Driver][DB2] SQL0582N A CASE expression in a VALUES clause, IN predicate, GROUP BY clause, or ORDER BY clause cannot include a quantified predicate, an IN predicate using a fullselect, or an EXISTS predicate. SQLSTATE=42625

To avoid this error, process the query locally or replace the CASE expression in the query SQL. For example, replace the previous CASE expression with something like this:
IF ( Module Code = 'PO' and ( Process Enabled Flag = 'Y' or Process Enabled Flag = 'N' ) ) THEN 'YN' ...

Create a Database Definition for a HotFile


You can save report data in a file called a HotFile, which you can then make available to a catalog. You can then use the data in the HotFile like a regular database table. You can create a HotFile from any database. To use a HotFile in a catalog, you create a database definition for the HotFile. Because all HotFiles that are in the same local or network folder are treated as a database, you can access tables from several different databases simultaneously. For example, you notice that people regularly use certain HotFiles, you put the HotFiles in a folder on the LAN and create a database definition for the LAN folder.

Steps
1. From the Catalog menu, click Databases. 2. In the Database Gateways and Drivers box (Database Definition Manager dialog box), select HotFile. 3. Click New Database. 4. In the Logical Database Name box (Database Definition dialog box), type a name for the database. 5. In the Location box, select the location of the HotFile folder on your hard disk or LAN. 6. Click Test. If Impromptu cannot connect to the HotFile, a dialog box appears describing the error. 7. Click OK.

Create a Database Definition for Informix


The Informix gateway is used to access Informix, XPS, and Dynamic Server IDS databases. 1. From the Catalog menu, click Databases. 2. In the Database Gateways and Drivers box (Database Definition Manager dialog box), select Informix. 3. Click New Database. 4. In the Logical Database Name box (Database Definition dialog box), type a name for the database. 5. In the Database Name box, type the name of the database as it appears on the server that you are accessing. 6. In the Host Name box, type the name of the node where the database is located. Note: This name must specify a server on the network. 7. In the Database Server Name box, type the name of the server or node where the database is located.

Administration Guide 111

8. Select the User ID and Password check boxes in User Prompts to prompt users for their user ID and password when they use this database. Specify the service name that the database will use to listen for incoming connection requests by clicking the SQLEXEC option button SQLTURBO option button User-specified option button and typing a name in the text box The service name can be a maximum of 19 characters in length. See your Informix documentation for more information. 9. Click Test. If Impromptu cannot connect to the database, a dialog box appears describing the error. 10. Click OK.

Create a Database Definition for Microsoft SQL Server via OLE DB


You can access Microsoft SQL Server using OLE DB. 1. From the Catalog menu, click Databases. 2. In the Database gateways and drivers box (Database Definition Manager dialog box), select Microsoft SQL Server OLE-DB. 3. Click New Database. 4. In the Logical database name box (Database Definition - OLE DB dialog box), type a name for the database, for example, GOSALES. 5. In the Provider box, type the name of the data provider sqloledb. 6. In the Provider string box, type the database connect string and be sure to identify the default database. Use the actual database name, for example, database=gosales. 7. In the Data Source box, type the name of the server where the database is located. 8. Select the User ID check box to have users prompted for a user ID when they use the database. 9. Select the Password check box to have users prompted for a password when they use the database. 10. Click OK.

Create a Database Definition for ODBC


The ODBC gateway connects to a variety of ODBC drivers that access a wide variety of database systems. Depending on the database, you may have to perform additional tasks. For example, if your dBASE system uses the OEM character set, you must convert to the ANSI character set before you begin using your ODBC connection. For information, see your dBASE documentation.

Special Considerations
Several ODBC data sources including AS/400 via IBM's CA and DB2 support the extended SQL syntax: Optimize for n rows. For Impromptu to add this syntax to the SQL passed to these databases, search in the Cogdmod.ini file in the bin folder for the keyword Optimize and read the instructions in that section. Impromptu issues metadata requests via ODBC for table, column, index and API calls (such as, sqlStatistics and sqlSpecialColumns) as it creates a catalog or during query execution. Impromptu now defers fetching metadata for API calls (such as, sqlStatistics and sqlSpecialColumns), indexes, and tableType until required. These fetches can be deferred forever if dbkeys are supported, blobs are not accessed, and scrollable cursors are not used. If you are connected to a RedBrick database through ODBC, an error message may appear when you use the sqlTables function. To avoid the error, contact RedBrick for a patch.

112 IBM(R) Cognos(R) Impromptu(R)

To access DB2 through ODBC, you must type a ODBC connect string in the ODBC Connect String box in Database Definition Manager to tell Impromptu which DB2 server you are using. DB2 server type MVS/ESA OS/400 VSE & VM UDB ODBC connect string SQL_DBMS_NAME=DSN SQL_DBMS_NAME=QSQ SQL_DBMS_NAME=ARI SQL_DBMS_NAME=SQL

Here is an example connection string:


attachdirect d1 dblogicname "DB2" "DSN=DB2;UID=user;SQL_DBMS_NAME=DSN;PWD=password@ASYNC=1@0/0" OD

Steps
1. From the Catalog menu, click Databases. 2. In the Databases Gateways and Drivers box (Database Definition Manager dialog box), select ODBC. 3. Click New Database. 4. In the Logical Database Name box (Database Definition dialog box), type a name for the database. 5. In the ODBC Data Source box, select a data source. 6. In the ODBC Connect String box, type the information you want appended to the connect string for the database. Some ODBC drivers (for example, for Oracle) permit you to specify additional information, such as network type or password, when connecting to ODBC. For more information, see your ODBC documentation or speak to your network administrator. 7. Select the User ID and Password check boxes in User Prompts if you want the users to be prompted for their user ID and password when they use this database. 8. To set the timeouts under the Timeouts box, do the following: In the Connect box, set the time (in seconds) you want Impromptu to wait for the ODBC Gateway to connect to the database. The default setting is 0, where Impromptu waits indefinitely for the ODBC Gateway to connect to the database. If the ODBC Gateway fails to connect to the database in the set time, then Impromptu reports the failure as an error message. In the Reply box, set the time (in seconds) you want the database to wait for your reply before timing out. The default is 0, where the database waits indefinitely for your reply. 9. Select the Use Asynchronous Open check box to let users use other applications while Impromptu waits for the database connection. By default, Asynchronous Open is turned off and you cannot work with other applications while Impromptu waits for data, unless you cancel the query. Some ODBC Gateways do not support Asynchronous Open. Refer to the documentation for your ODBC Gateway for more information. 10. Click Test. If Impromptu cannot connect to the database, a dialog box appears describing the error. 11. From the Tools menu, click ODBC Administrator. Note: ODBC Administrator is also available from the control panel. 12. Define your ODBC data source using the ODBC Administrator (Data Sources dialog box). Note: You must define the data source using the ODBC Administrator before you can access the data source from Impromptu. For more information see the documentation for your ODBC driver. 13. Click Options to use an alternative concatenate operator, or pattern escape metacharacter. Administration Guide 113

14. Click OK.

Create a Database Definition for Oracle


You can configure the amount of data retrieved from Oracle either by buffer size or number of records. For more information, see the Fetch Buffer Size and Fetch Number of Rows entries in the Cogdmor.ini file in the installation_location\cern\bin folder. If you use user-defined functions with an Oracle database, an error may appear saying that there was a type-mismatch. This error could be caused by a DATE input parameter value being converted to a DATETIME value or some other similar conversion within Impromptu. To fix this problem, add the following to the [UDA Misc] section of your Cogdmor.ini file:
[UDA Misc] Check_Input_Parm_Types=F

Steps
1. From the Catalog menu, click Databases. 2. In the Databases Gateways and Drivers box (Database Definition Manager dialog box), select Oracle. 3. Click New Database. 4. In the Logical Database Name box ( Database Definition dialog box), type a name for the database. 5. In the SQL*Net Connect String box, type the logical database name or the SQL*Net connect string. For more information about the SQL*Net connect string, see your Oracle documentation. 6. In the Gateway Type box, select None. 7. Click Test. If Impromptu cannot connect to the database, a dialog box appears describing the error. 8. Click OK.

Create a Database Definition for Sybase Adaptive Server Enterprise


You can configure the amount of data retrieved from Sybase during fetch operations. For more information, see the NUMOFROWS entry in Cogdmct.ini in the installation_location\cern\bin folder.

Steps
1. From the Catalog menu, click Databases. 2. In the Databases Gateways and Drivers box (Database Definition Manager dialog box), select Sybase Adaptive Server Enterprise. 3. Click New Database. 4. In the Logical Database Name box (Database Definition dialog box), type a name for the database. 5. In the SQL Server Name box, type or select the name of the server used by the database. If you do not know the name of the server, check your Sql.ini file. 6. In the User Prompts, select the Password check box to prompt users for their password when they use this database. The User ID check box is selected by default, and cannot be cleared. 7. In the Database Name box, do one of the following to specify the databases that your users can access click Master if you want users to see all the databases whether or not they have access to them click User-Specified and type the name of the database to which users will be restricted 8. In the Timeouts box, set the timeout by doing the following

114 IBM(R) Cognos(R) Impromptu(R)

9.

10.

11.

12.

13.

In the Connect box, enter the time (in seconds) you want Impromptu to wait for Sybase Adaptive Server Enterprise to connect to the database. The default setting is 0, where Impromptu waits indefinitely for the Sybase Adaptive Server Enterprise driver to connect to the database. If Impromptu fails to connect to the Sybase Adaptive Server Enterprise driver within the specified time, then Impromptu reports the failure as an error. In the Reply box, enter the time (in seconds) you want the database to wait for your reply before timing out. The default setting is 0, where Impromptu waits indefinitely for your reply. In the Network box, set the network options by doing the following For Packet Size, type the size of each packet you send over the network. Ask your network administrator about the maximum packet size you can send over your network. For Async Level, set the asynchronous processing value to 1 (the minimum) to enable faster processing within Impromptu. If you set it to 4 (the maximum), processing is faster within other applications but Impromptu is slower. In the Polling Time Slice box, type the number of milliseconds you want the Sybase Adaptive Server Enterprise to wait for a response from the network. For example, if you want the time to be 1.5 seconds, type 1500. In the Application Name box, type the name of the application that you want to see on the server. This information is obtained from the sys_processes table. Click Test. If Impromptu cannot connect to the database, a dialog box appears describing the error. You may have to reboot your system to resolve this connection error. Click OK.

Administration Guide 115

116 IBM(R) Cognos(R) Impromptu(R)

Change a Database Definition


You can change the name, location or type of the database for a database definition at any time. The [Databases] section of the Cognos.ini file automatically updates when you change the logical database name the database type or database gateway other entries (for example: SQL*Net connect string for Oracle) If you change a database definition, you need to update your users' Cognos.ini files.

Steps to Change a Database Definition


1. From the Catalog menu, click Databases. 2. In the Databases Gateways and Drivers box (Database Definition Manager dialog box), select a logical database. 3. Click Edit. Note: The Edit button is enabled only when a logical database is selected and is disabled for all other tree selections. 4. Make all required changes and click OK.

Copy a Database Definition


If you want to create a new database definition with a lengthy connection string that is similar to an existing one, you can copy and then edit the existing definition. You can also copy a database definition and alter it when you are readying a catalog for deployment.

Steps
1. From the Catalog menu, click Databases. 2. In the Databases Gateways and Drivers box (Database Definition Manager dialog box), select a logical database. 3. Click Copy. Note: The Copy button is enabled only when a logical database is selected and is disabled for all other tree selections. 4. In the Logical Database Name box (Database Definition dialog box), the name of the selected database is prefixed with the string "Copy of". To rename the database, type a new name in the Logical Database Name box. 5. Click OK.

Remove a Database Definition


You can remove a database definition from Impromptu if you no longer require access to the related database. Removing the database definition removes the connection information for the database from the [Databases] section of the Cognos.ini file. It does not remove the database information from the catalog. If you later open a catalog that contains the database definition you removed, Impromptu connects the database definition to the Cognos.ini file again. Whenever the database administrator makes changes to the structure of the database (the columns and tables that already exist in reports), you may need to perform maintenance on your catalogs and reports to ensure that they correctly refer to the tables and columns they need.

Steps
1. From the Catalog menu, click Databases. 2. In the Databases Gateways and Drivers box (Database Definition Manager dialog box), select a logical database. 3. Click Delete. Note: The Delete button is enabled only when a logical database is selected and is disabled for all other tree selections. Administration Guide 117

4. Click OK.

Select a Different Database for a Catalog


You can change the database used by a catalog. The database you select may have a completely different structure from the previous database. You can use the Tables dialog to edit the catalog structure to match the new database.

Example
You created a catalog that was attached to a test database. You are ready to deploy the catalog, but you want it attached to the production database. You select a different database for the master catalog to access before deploying the catalog.

Steps
1. From the Catalog menu, click Tables and click the Edit tab. 2. In the Database box, select a database. 3. Click OK.

Connect to the Database


You need to connect a catalog to the database before you can access the tables and columns in the database. When you open a catalog, Impromptu automatically connects to the database. When you open a report, the related data is also automatically retrieved from the database. Automatic connection can be switched off so you can open reports without automatically retrieving data from the database.

Step to Manually Connect to a Database


With a catalog open, click Connect from the Catalog menu. Note: The Connect command is only available if you are currently disconnected from the database. You may be prompted to log on as follows: In the User Class box, select your user class to log on to the catalog. In the Database box, type your user ID and password to log on to the database, and click OK. If Impromptu cannot connect to the database, a dialog box appears.

Steps to Enable Automatic Connection to the Database


1. From the Tools menu, click Options and then click the General tab. 2. Select the Auto-Attach To The Database When Catalog Is Opened check box and click OK.

What If ...
You want to disconnect from a database? From the Catalog menu, click Disconnect. You will want to disconnect if your laptop does not have access to the database the database server is unavailable you want to work with a snapshot of the data

118 IBM(R) Cognos(R) Impromptu(R)

Chapter 14: Create and Customize a Chart


In Impromptu, you can add charts to reports to show data graphically. You can choose from several different chart types. After you add a chart, you can change the chart type or customize the chart to improve readability and presentation. In particular, you can add chart titles, use grid lines and include a legend. You can also add labels for the data in a chart, and specify the format for the labels, such as style, font type, and size. For certain chart types, you can add a trendline. For a list of the controls related to chart formatting, see (p. 141). For information about how tasks are done differently in this version of Impromptu compared to earlier releases, see (p. 135).

Choosing a Chart Type


Description
A chart is a visual representation of data that you can use to quickly and easily evaluate information. To choose a chart type, consider what you want the chart to illustrate. Different chart types and configurations emphasize different things. Purpose Show contributions of parts to a whole Compare variables Compare trends in data over time Highlight trends Compare trends and relationships between data Create a graphical view of a project schedule Compare the difference between values such as stock prices Chart type pie bar area radar correlation Gantt HLCO (high low close open) HLO (high low open) Identify a pattern scatter bubble

Area Charts
Area charts show trends in data over time by emphasizing the total quantity of several data items under the curve. If data is ungrouped, the chart shows the group summaries for the first data item. If data is grouped, each data item shows as a data group on the primary axis. Area charts can have depth added, or have a three-dimensional layout. Area charts plot data on the primary axis.

Administration Guide 119

Chapter 14: Create and Customize a Chart

Bar Charts
Bar charts highlight changes over time and compare totals and individual values. A bar chart can reveal trends and patterns. If data is ungrouped, each bar represents a summarized data item or a summarized row of values for a data item. If data is grouped, each bar represents a group. Bar charts can have depth added, or have a three-dimensional layout. Bar charts plot data on the primary axis.

Bubble Charts
Bubble charts are line charts in which the data points are represented typically by bubbles. The advantage of using a bubble chart instead of a line chart is that the size of the marker provides quantitative information. Bubble markers can be changed to other formats such as stars. Bubble charts plot data on the primary axis, secondary axis, and measure line. The measure data value is represented by the size of the bubble.

Correlation Charts
Correlation charts are bar charts overlaid with a line chart that allows you to show two different measures with a shared x-axis and two y-axes. The left and right y-axes can each have a different scale, enabling you to visually correlate dissimilar measures. For example, you can show products on the shared x-axis, with order income on the right-hand y-axis and order revenue on the left-hand y-axis, and visually compare the relationship between order income and order revenue for each product. For information about how to create a correlation chart, see (p. 132). For information about how to format a correlation chart, see (p. 132).

Gantt Charts
Gantt charts provide a graphical view of a project schedule. Gantt charts are horizontal. To create a Gantt chart, you must group your data, and the second data item must be greater than the first data item. Gantt charts plot data on the primary axis and the secondary axis.

HighLowCloseOpen (HLCO)
HighLowCloseOpen (HLCO) charts highlight changes for a specific time period to compare the difference between pairs of values. HighLowCloseOpen charts plot data on the primary axis, secondary axis and measures line. You can also use the HighLowCloseOpen chart type to create a HighLow chart and a HighLowClose chart. To create a HighLow chart, you do not specify a measure value. To create a HighLowClose chart, specify one measure.

HighLowOpen (HLO)
HighLowOpen (HLO) charts track financial data such as the daily high, low and open price of a stock. It is a variation of the HighLowCloseOpen chart. HighLowOpen charts plot data on the primary axis, secondary axis and measures line. The measure line plots only one measure.

Line Charts
Line charts plot data at equidistant points connected by lines to illustrate trends. Line charts are commonly used to show trends over time. Because the markers in a line chart can be formatted to take a up very little space, line charts are useful when you want to plot charts that have many data values. If data is ungrouped, the chart shows a single line containing points for each data item.

120 IBM(R) Cognos(R) Impromptu(R)

Chapter 14: Create and Customize a Chart If data is grouped, the chart shows multiple lines for each data item. The primary axis shows the data groups. Line charts plot data on the primary axis. Line charts can have depth added, or have a three-dimensional layout. Line charts with depth are known as tape charts. A log chart is a line chart that uses a logarithmic scale.

Pie Charts
Pie charts show the relationship of parts to the whole. Data is represented as pie-shaped segments in a circle. Pie charts can have depth added. If data is not grouped, each segment represents a data item. If data is grouped, each segment represents a group summary. Pie charts plot data on the primary axis.

Radar Charts
Radar charts are used primarily as a comparative tool. Multiple data values are plotted on a circle and joined by connecting lines to create a radial figure. You can use either the area created by the connecting lines or the actual values on the chart to do a comparative analysis. Radar charts plot data on the primary axis.

Scatter Charts
Scatter charts highlight the correlations between large sets of data or several changing data items. It is commonly used to analyze data when there is no obvious correlation between two pieces of data, such as revenue versus inventory counts. It can be used to identify a pattern by illustrating the relationship between independent variables. Scatter charts plot data on the primary axis and the secondary axis.

Create a Chart
Description
To create a chart, you pick the data that you want to appear in the chart. Depending on the chart type you select, you can plot one or more data values. Data values are plotted for the primary axis, secondary axis, and for measures. For more information about the chart types available and the data requirements for each, see "Choosing a Chart Type" (p. 119). You can manipulate the view of the data by pivoting the data on the primary axis changing the data mode and viewing the date either by row or column Before you create a chart, you must define the report query. For more information, see the following entry in the online help index: reports, creating.

Steps
1. With a report open, from the Insert menu, click Chart Frame. 2. Place the pointer where you want to locate the upper-left corner of the frame and drag the mouse diagonally until the frame is the size you want. The Chart Properties dialog appears. 3. In the Chart type box, click the chart type. The chart type sets whether you can plot one or more data values. 4. On the Data tab, in the Query data box, select the data items for the query. Use the arrow to move data items from the Query data box to the Primary Axis, Secondary Axis, and Measure(s) boxes, as required. Only numeric data items appear in the Query data box. Administration Guide 121

Chapter 14: Create and Customize a Chart Tip: To remove a data item, click the data item located in the Primary Axis, Secondary Axis, or Measure(s) box, and click the arrow. 5. On the Data tab, do one or more of the following. Goal Show in a chart the first row in a grouped data item. Action In the Mode box, click By Row.

Show in a chart the first column in a grouped In the Mode box, click By Column. data item. Swap rows and columns. You must have at least one grouped data item. Click Pivot data. If you swap rows and columns in a chart that is grouped by rows, it becomes grouped by columns. Select the Plot null data check box. Select the Plot negative data check box.

Plot null data. Plot negative data. 6. Click OK.

More Info What if ...


You are upgrading a chart and the chart does not have the correct number of data values specified for the chart type? You can upgrade or open the report but you receive a warning. You cannot apply the settings for the chart until the required data values are specified. You want to remove a chart? Select the chart and press the Delete key. You want to create a 100% pie chart? Select the pie chart type, and then on the Format tab of the Chart Properties dialog box, click Properties. In the Properties dialog box, on the Data Labels tab, select the Show Values and As Percentage check boxes. You want to create a percent or stacked bar chart? Select the bar chart type, and then on the Format tab of the Chart Properties dialog box, click Properties. In the Properties dialog box, on the Layout tab, select Percent or Stacked. You want to create a horizontal bar chart? In the Chart type list, select Bar chart, and then on the Format tab of the Chart Properties dialog box, click Properties. In the Properties dialog box, on the Layout tab, under Axes, select the Horizontal option. You want to create a bar chart with depth that is horizontal and 100% stacked. In the Chart type list, select Bar chart, and then on the Format tab of the Chart Properties dialog box, click Properties. In the Properties dialog box, on the General tab, click Depth and specify the amount of depth. On the Layout tab, select Stacked and Horizontal. You want to create a three-dimensional bar chart. In the Chart type list, select Bar chart, and then on the Format tab of the Chart Properties dialog box, click Properties. In the Properties dialog box, on the Layout tab, select True 3D Column. The three-dimensional layout is only available when the bar chart plots data vertically, that is, on the x-axis.

Tips
To quickly access the Chart properties, right-click the chart and click Properties.

122 IBM(R) Cognos(R) Impromptu(R)

Chapter 14: Create and Customize a Chart

Related Topics
"Choosing a Chart Type" (p. 119) "Format a Chart" (p. 123)

Change the Chart Type


Description
There are many chart types that you can choose when adding a chart to a report. Choosing the appropriate chart type depends on the purpose of the chart. For example, if you want to compare parts to the whole, a pie chart is suitable. If you want to compare quantitative data such as annual sales, you may want to use a bar chart. For more information, see "Choosing a Chart Type" (p. 119). Charts plot data values on one or more axis. If you change chart type, ensure that you specify data values for each of the required axes.

Steps
1. Right-click the chart and click Properties. Check that the Chart Properties dialog box opened. If another dialog box opened instead, you did not have the chart selected. Click Cancel to close the dialog box, press Esc to clear your selection, and try again. 2. In the Chart type box, click a chart type. 3. Click the Data tab and specify any additional data values, if required. For example, a pie chart requires only primary axis values whereas a scatter chart requires both primary and secondary axis values. 4. Click OK.

Related Topics
"Format a Chart" (p. 123) "Add Chart Titles" (p. 124) "Format the Chart, Plot, and Legend Area" (p. 126) "Format Chart Titles, Axis Titles, Data Labels, and Legend Text" (p. 125) "Change the Axis Labels and Scale Settings" (p. 126) "Change the Grids Settings" (p. 128) "Format Data Items" (p. 128) "Hide or Show Data Labels in a Chart" (p. 129) "Add and Format a Chart Legend" (p. 129) "Show TrendLines" (p. 131)

Format a Chart
Description
There are many formatting options that you can use to enhance your charts. For example, you can add a footnote, change the chart background color, add a legend, and so on. When formatting charts, you can define properties that apply to the entire chart or to particular data items in the chart. To format particular data items, use the Customize per Data Item dialog box. (p. 128) To define chart properties that apply globally, use the Properties dialog box.

Steps
1. Right-click the chart, click Properties, and then click the Format tab. Check that the Chart Properties dialog box opened. If another dialog box opened instead, you did not have the chart selected. Click Cancel to close the dialog box, press Esc to clear your selection, and try again.

Administration Guide 123

Chapter 14: Create and Customize a Chart 2. Click the Format tab and use the available controls to set the chart properties. The tabs and settings that appear can vary depending on the chart type you select. Here are some of the formatting changes you can make. Goal Specify a layout type such as stacked, percent, and true 3D column. Add data labels. Add a legend. Add dual axes. Show trendlines. Add a chart title, subtitle, or footnote. Add a title for the category or value axis. Add a series title. Customize the grids and scales of the category axis, y-axis, and series axis. Customize data items. Change the chart, plot or legend background color. Change the font formatting of such chart characteristics as chart titles, legend text, and data labels. Click Grids and Scales. Click Customize per Data Item. In the Chart background box, click the item to format, and click Edit. In the Font formatting box, click the item to format, and click Edit. Action Click Properties, and click the Layout tab. Click Properties, and click the Data Labels tab. Click Properties, and click the Look tab. Click Properties, and click the Layout tab. Click Trendlines. Click Titles.

3. To accept your formatting changes, click OK.

Related Topics
"Change the Chart Type" (p. 123) "Add Chart Titles" (p. 124) "Format the Chart, Plot, and Legend Area" (p. 126) "Format Chart Titles, Axis Titles, Data Labels, and Legend Text" (p. 125) "Change the Axis Labels and Scale Settings" (p. 126) "Change the Grids Settings" (p. 128) "Format Data Items" (p. 128) "Hide or Show Data Labels in a Chart" (p. 129) "Add and Format a Chart Legend" (p. 129) "Show TrendLines" (p. 131)

Add Chart Titles


Description
Charts can have a main title, a subtitle, a footnote, a category axis title, a Y1 axis title, a Y2 axis title, and a series axis title. You can specify a title for the Y1 and Y2 axes, if your chart has dual value axes. The series axis title is available only for three-dimensional charts. The category and value titles (Y1 and Y2) are available only in charts that use the x-axis and y-axis, respectively.

124 IBM(R) Cognos(R) Impromptu(R)

Chapter 14: Create and Customize a Chart

Steps
1. Right-click the chart, click Properties, and then click the Format tab. Check that the Chart Properties dialog box opened. If another dialog box opened instead, you did not have the chart selected. Click Cancel to close the dialog box, press Esc to clear your selection, and try again. 2. On the Format tab, click Titles, and then in the Titles dialog box, choose from the available options. Select the Title check box and type a main title for the chart Subtitle check box and type a subtitle. A subtitle appears beneath the main title. Footnote check box and type a footnote. A footnote appears in the lower, right-hand corner of the chart. Category Title check box and type a title for the x-axis Value Title (Y1) check box and type a title for the Y1-axis Value Title (Y2) check box and type a title for the Y2-axis Series Axis check box and type a series title 3. Click OK. After you have added a title, you can format it using the Font formatting box located on the Format tab of the Chart Properties dialog box. See, (p. 125).

More Info What if ...


You want to remove titles? Clear the appropriate check box: Title, Subtitle, Footnote, Category Title, Value Title (Y1) Value Title (Y2) and Series Axis.

Related Topics
"Change the Chart Type" (p. 123) "Format a Chart" (p. 123) "Format the Chart, Plot, and Legend Area" (p. 126) "Format Chart Titles, Axis Titles, Data Labels, and Legend Text" (p. 125) "Change the Axis Labels and Scale Settings" (p. 126) "Change the Grids Settings" (p. 128) "Format Data Items" (p. 128) "Hide or Show Data Labels in a Chart" (p. 129) "Add and Format a Chart Legend" (p. 129) "Show TrendLines" (p. 131)

Format Chart Titles, Axis Titles, Data Labels, and Legend Text
Description
Certain chart objects such as chart and axis titles, data labels, and legend text permit font formatting. Font formatting includes specifying font color, size, style and alignment. Certain objects, such as data labels, also permit rotation. Rotating objects can be useful when you want to avoid overlapping text.

Steps
1. Right-click the chart, click Properties, and then click the Format tab. Check that the Chart Properties dialog box opened. If another dialog box opened instead, you did not have the chart selected. Click Cancel to close the dialog box, press Esc to clear your selection, and try again. 2. On the Format tab, in the Font formatting box, click the object to format, such as Data Labels. Administration Guide 125

Chapter 14: Create and Customize a Chart 3. Click Edit and, in the Formatting dialog box, specify the format characteristics. 4. Click OK twice. The chart appears with the new formatting you specified.

Related Topics
"Change the Chart Type" (p. 123) "Format a Chart" (p. 123) "Add Chart Titles" (p. 124) "Format the Chart, Plot, and Legend Area" (p. 126) "Change the Axis Labels and Scale Settings" (p. 126) "Change the Grids Settings" (p. 128) "Format Data Items" (p. 128) "Hide or Show Data Labels in a Chart" (p. 129) "Add and Format a Chart Legend" (p. 129) "Show TrendLines" (p. 131)

Format the Chart, Plot, and Legend Area


Description
The chart has three distinct areas that you can format: chart, plot and legend. The plot area is that area of the chart enclosed by the x-axis and the y-axis. The legend area refers to the legend background. The chart area includes the remaining areas other than the plot and legend areas. For the chart, plot and legend areas, you can customize the line and fill properties.

Steps
1. Right-click the chart, click Properties, and then click the Format tab. Check that the Chart Properties dialog box opened. If another dialog box opened instead, you did not have the chart selected. Click Cancel to close the dialog box, press Esc to clear your selection, and try again. 2. On the Format tab, in the Chart background box, click the chart, plot or legend area, and then, click Edit to specify the fill color, pattern, and pattern color. 3. Click OK twice. The chart appears with the new formatting you specified.

Related Topics
"Change the Chart Type" (p. 123) "Format a Chart" (p. 123) "Add Chart Titles" (p. 124) "Format Chart Titles, Axis Titles, Data Labels, and Legend Text" (p. 125) "Change the Axis Labels and Scale Settings" (p. 126) "Change the Grids Settings" (p. 128) "Format Data Items" (p. 128) "Hide or Show Data Labels in a Chart" (p. 129) "Add and Format a Chart Legend" (p. 129) "Show TrendLines" (p. 131)

Change the Axis Labels and Scale Settings


Description
Customize the axis labels and scale settings in a chart to enhance your charts.

126 IBM(R) Cognos(R) Impromptu(R)

Chapter 14: Create and Customize a Chart Note that the tabs and settings that appear in the Grids and Scales dialog box can vary depending on the chart type you select.

Steps
1. Right-click the chart, click Properties, and then click the Format tab. 2. On the Format tab, in the Display options box, click Grids and Scales. 3. In the Grids and Scales dialog box, click the axis to format. Depending on the chart type and chart layout, you can have a Y1 axis, Y2 axis, X Axis, Category Axis, Z Axis, and Series Axis. The Series Axis is only valid for three-dimensional charts. The Y2 Axis appears when the chart has dual axes. The Z Axis appears for bubble and scatter charts. 4. On the General tab, specify where you want the axis labels to be located. In addition to specifying the location, you can arrange the value labels in descending order and the category labels in reverse order. 5. On the Labels tab, choose whether to show or hide the axis labels. For the X Axis, you can stagger the labels or manually set the number of categories you want to show. For the Y Axis, you can specify whether to show the maximum or minimum value label. 6. On the Scales tab, format the chart scale. Note that the Scales tab is not available if the Series Axis or Category Axis tab is selected. Here are the formatting changes you can make. Goal Specify a logarithmic scale Start the scale with zero Manually set the maximum value on the scale Action Select the Make Logarithmic check box. Select the Always Include Zero check box. Select the Set Maximum Value check box, and enter a value in the box.

Manually set the minimum value on the scale Select the Set Minimum Value check box, and enter a value in the box. 7. Click OK twice to accept your formatting changes. Tip: After you have added axis labels to the chart, you can specify such characteristics as font style, color, alignment, and rotation. For more information, see (p. 125).

Related Topics
"Change the Chart Type" (p. 123) "Format a Chart" (p. 123) "Add Chart Titles" (p. 124) "Format the Chart, Plot, and Legend Area" (p. 126) "Format Chart Titles, Axis Titles, Data Labels, and Legend Text" (p. 125) "Change the Grids Settings" (p. 128) "Format Data Items" (p. 128) "Hide or Show Data Labels in a Chart" (p. 129) "Add and Format a Chart Legend" (p. 129) "Show TrendLines" (p. 131)

Administration Guide 127

Chapter 14: Create and Customize a Chart

Change the Grids Settings


Description
Grid settings let you add major and minor grid lines to a chart and add and specify the location of grid labels. Note that the tabs and settings that appear in the Grids and Scales dialog box can vary depending on the chart type you select.

Steps
1. Right-click the chart, click Properties, and then click the Format tab. 2. On the Format tab, in the Display options box, click Grids and Scales. 3. In the Grids and Scales dialog box, click the axis to format. Depending on the chart type and chart layout, you can have a Y1 axis, Y2 axis, X Axis, Category Axis, Z Axis, and Series Axis. The Series Axis is only valid for three-dimensional charts. The Y2 Axis appears when the chart has dual axes. The Z Axis appears for bubble and scatter charts. 4. On the Grids tab, specify whether to show the major and minor grid lines. If you add grid lines, you can specify a grid style, such as Outer Ticks, and you can manually specify the grid intervals. For certain charts, you can also add and specify the location of a custom grid line by selecting the Draw Custom Line at check box. 5. Click OK twice to accept your formatting changes.

Related Topics
"Change the Chart Type" (p. 123) "Format a Chart" (p. 123) "Add Chart Titles" (p. 124) "Format the Chart, Plot, and Legend Area" (p. 126) "Format Chart Titles, Axis Titles, Data Labels, and Legend Text" (p. 125) "Change the Axis Labels and Scale Settings" (p. 126) "Format Data Items" (p. 128) "Hide or Show Data Labels in a Chart" (p. 129) "Add and Format a Chart Legend" (p. 129) "Show TrendLines" (p. 131)

Format Data Items


Description
Formatting the data items in a chart can enhance the appearance of the chart and better communicate information in the chart. Depending on the chart type, you can set data item properties such as color, line style, marker style, and marker size.

Steps
1. Right-click the chart, click Properties, and then click the Format tab. Check that the Chart Properties dialog box opened. If another dialog box opened instead, you did not have the chart selected. Click Cancel to close the dialog box, press Esc to clear your selection, and try again. 2. Click Customize Per Data Item and set any properties you want for any data items, then click OK twice.

Related Topics
"Change the Chart Type" (p. 123) "Format a Chart" (p. 123)

128 IBM(R) Cognos(R) Impromptu(R)

Chapter 14: Create and Customize a Chart "Add Chart Titles" (p. 124) "Format the Chart, Plot, and Legend Area" (p. 126) "Change the Axis Labels and Scale Settings" (p. 126) "Change the Grids Settings" (p. 128) "Hide or Show Data Labels in a Chart" (p. 129) "Add and Format a Chart Legend" (p. 129) "Show TrendLines" (p. 131)

Hide or Show Data Labels in a Chart


Description
You can hide or show data labels in a chart. You can also format the data labels by adding bolding, for example, as well as changing the font type and size.

Steps
Right-click the chart, click Properties, and then click the Format tab. On the Format tab, in the Display options box, click Properties. In the Properties dialog box, click the Data Labels tab. To have data labels appear in the chart, select the Show Data Labels check box. In the Labels Location box, choose where you want the labels located. You can choose Outside Maximum Inside Maximum Center Base of Chart 6. In the Label Format box, choose how labels appear. You can specify Value Label Label & Value 7. Click OK twice. 1. 2. 3. 4. 5.

Related Topics
"Change the Chart Type" (p. 123) "Format a Chart" (p. 123) "Add Chart Titles" (p. 124) "Format the Chart, Plot, and Legend Area" (p. 126) "Format Chart Titles, Axis Titles, Data Labels, and Legend Text" (p. 125) "Change the Axis Labels and Scale Settings" (p. 126) "Change the Grids Settings" (p. 128) "Format Data Items" (p. 128) "Add and Format a Chart Legend" (p. 129) "Show TrendLines" (p. 131)

Add and Format a Chart Legend


Description
You can include a chart legend with your chart. When you add a legend, the chart is resized within the boundaries of the chart frame to accommodate the legend. You may have to adjust the chart frame to better present the chart and the legend together. When legend markers do not appear in the legend because there are too many to fit within the legend boundaries, an arrow indicates that there are more markers.

Administration Guide 129

Chapter 14: Create and Customize a Chart After you add a legend, you can specify the location of the legend relative to the chart. You can also specify the location of the markers and legend text and set the style of the legend frame. If you are upgrading charts with legends, the legend will appear to the right of the chart and legend markers to the left of the legend text. You can change this if you want.

Steps
1. Right-click the chart, click Properties, and then click the Format tab. Check that the Chart Properties dialog box opened. If another dialog box opened instead, you did not have the chart selected. Click Cancel to close the dialog box, press Esc to clear your selection, and try again. 2. On the Format tab, click Properties, and on the Look tab, click Show Legend. 3. In the Markers and Text box, specify the location of legend markers and text by clicking one of the following: Markers to Left of Text Markers to Right of Text Text Centered on Marker Markers Above Text Markers Below Text 4. In the Layout box, specify the location of the legend. You can specify Legend on the Right Side Legend on the Left Side Legend Below Chart 5. In the Box Style box, specify whether to include a box frame and the box style for the legend. 6. Click OK twice. The chart legend appears in the chart with the characteristics you specified.

What if ...
You are upgrading charts with legends? The legend shows to the right of the chart. Legend markers show to the left of the legend text. You want to change the font type, style, and color of the text in the legend. On the Format tab, in the Font formatting box, specify Legend text and click Edit. You want to exchange the values in the legend for the values on the primary axis? In the Chart Properties dialog box, click the Data tab and select the Pivot data check box. The Pivot data check box is not valid for some types of charts.

Related Topics
"Change the Chart Type" (p. 123) "Format a Chart" (p. 123) "Add Chart Titles" (p. 124) "Format the Chart, Plot, and Legend Area" (p. 126) "Format Chart Titles, Axis Titles, Data Labels, and Legend Text" (p. 125) "Change the Axis Labels and Scale Settings" (p. 126) "Change the Grids Settings" (p. 128) "Format Data Items" (p. 128) "Hide or Show Data Labels in a Chart" (p. 129) "Show TrendLines" (p. 131)

130 IBM(R) Cognos(R) Impromptu(R)

Chapter 14: Create and Customize a Chart

Show TrendLines
Description
A trendline is a line that indicates the general direction of a series of data over time. For example, are production costs trending up? Are sales increasing year after year? Important: Trendlines do not predict the future. They merely show trends in data based on historical information. A trendline can connect all actual data points or it can be a line that is computed mathematically, such as the moving average line. In the latter instance, the line smooths the fluctuations of the actual data points in the series. The data points through which the trendline is drawn, or that it approximates, can represent individual data elements or groups of data elements such as averages or medians. You can add trendlines to the following charts: area, bar, line, and scatter. You can draw linear, logarithmic, polynomial, exponential and moving average trendlines.

Steps
1. Right-click the chart, click Properties, and then click the Format tab. Check that the Chart Properties dialog box opened. If another dialog box opened instead, you did not have the chart selected. Click Cancel to close the dialog box, press Esc to clear your selection, and try again. 2. On the Format tab, click Trendlines, and select the Show Trendlines check box. With trendlines selected, you can then make the following changes: Goal Specify the type of trendline to draw. Action In the Regression Type box, click a trendline type. For a polynomial trendline, you must specify the degree of linear regression in the Order box. The value must be greater than one but no greater than the number of groups in the chart. For Moving Average, you must specify the number of periods in the Period box. The value must be greater than 1 and less than the number of groups. In the chart, show the equation that was used Select the Show Equation check box. to calculate the trendline. In the chart, show the coefficients values used to draw the trendline. Have the trendline appear in the same color as the selected data series. 3. Click OK twice. Select the Show Coefficients Values check box. Select the Show Color same as Series check box.

Related Topics
"Change the Chart Type" (p. 123) "Format a Chart" (p. 123) "Add Chart Titles" (p. 124) "Format the Chart, Plot, and Legend Area" (p. 126) "Format Chart Titles, Axis Titles, Data Labels, and Legend Text" (p. 125) "Format a Chart" (p. 123)

Administration Guide 131

Chapter 14: Create and Customize a Chart "Change the Axis Labels and Scale Settings" (p. 126) "Change the Grids Settings" (p. 128) "Hide or Show Data Labels in a Chart" (p. 129) "Add and Format a Chart Legend" (p. 129)

Correlation Chart
A correlation chart plots data using columns or bars and a line. To identify the data item plotted by the line, see the Chart Properties, Data tab, Primary Axis box while in a chart. The last data item listed in the Primary Axis box is plotted by a line on the Y2 axis. This data item cannot be moved to the Y1 Axis. A correlation chart always has a dual axis. To view the data items plotted by the Y1 and Y2 Axis, see the Properties dialog box, Dual Y Options tab. For information about how to create a correlation chart, see (p. 132). For information about how to format a correlation chart, see (p. 132).

Example - Create a Correlation Chart to Show Order Income Relative to Order Revenue
You are a report author at The Great Outdoors Company. You are requested to create a chart that shows the correlation between order revenue and order income from 2004 to 2006. You decide to create a correlation chart because it allows you to correlate two dissimilar measures.

Steps
1. From the File menu, click New and on the FastFind tab, click Blank, and click OK. 2. In the Open Catalog dialog box, click gosales.cat and click Open. 3. If you are prompted for a userid and password, type Administrator in the UserID box and leave the Password box empty. Click Log On. 4. In the Catalog Logon for GOSALES.CAT dialog box opens, accept the default values and click OK. 5. In the Query dialog box, define the report query as follows: Click the calculation button and in the Calculation Definition dialog box, create the expression, year (Orderdate), name it Order Year, and click OK. On the Data tab, add Order Income, and Order Revenue to the Query data box. On the Group tab, click Order Year and click Group. Click Order Income and click Associate. Do the same for Order Revenue. Click OK. 6. From the Insert menu, click Chart Frame and drag the pointer to create the chart frame. 7. In the Chart Properties dialog box, in the Primary Axis box, remove the data items listed by default, and add Order Revenue followed by Order Income. Click OK. 8. Right click the chart, click Properties, and in the Chart type box, click Correlation and click OK. The last data item in the Primary Axis list appears as a line in the correlation chart. In our example, this is Order Income. 9. Save the report and name it correlation_chart.imr. You are now ready to format the chart (p. 132).

Example - Format the Correlation Chart Correlation_chart.imr


You created a correlation chart named correlation_chart.imr that shows the relationship between order revenue and order income (p. 132). You want to format this chart before you distribute it throughout your department.

Steps
1. With correlation_chart.imr open, right-click on the chart, click Properties, and click the Format tab. 2. In the Chart background box, click Chart area, and Edit. On the Fill tab, click dark gray and click OK. 132 IBM(R) Cognos(R) Impromptu(R)

Chapter 14: Create and Customize a Chart 3. In the Chart background box, click Plot area, and Edit. On the Fill tab, click light gray and click OK. 4. Click Titles, and add a Title, Footnote, Value Title (Y1) and Value Title (Y2). Name them as follows: for Title, type Order Income for Footnote, type Order Income Correlated to Order Revenue for Value Title (Y1), type Order Revenue for Value Title (Y2), type Order Income 5. To format the chart titles, in the Font formatting box, click the title, and click Edit. In the Formatting dialog box, specify the font, font size and style and alignment. 6. To add a legend, click Properties, click the Look tab, specify the following legend settings and click OK: Markers to the Right of Text Legend below Chart Beveled Frame 7. To customize the data items in the chart, click Customize per Data Item. In the Color column, click the Order Revenue color. In the Formatting dialog box, click Pattern, and specify a pattern. Experiment with different background and foreground colors until you get an acceptable combination. Click OK. Your chart should look something like this:

Tip: To make the bars in the chart narrower, increase the gap width. On the Format tab, click Properties, and on the General tab, increase the Gap Width value.

Administration Guide 133

Chapter 14: Create and Customize a Chart

134 IBM(R) Cognos(R) Impromptu(R)

Chapter 15: Impromptu Chart Changes


Formatting charts in the Impromptu Series 7 Version 4 release has changed significantly from the last release. Powerful new dialogs have been introduced that offer more functionality. So, moving to the latest version of Impromptu means that you will not lose any functionality that you had in previous versions. However, it does mean that you will do certain tasks differently in the new environment. To identify the changes related to formatting charting, see the following topics: chart types chart properties titles legends data properties grids, scales and axis labels Data formats depend on the locale configuration settings for your IBM Cognos Series 7 product. By default, IBM Cognos Series 7 server products and IBM Cognos Impromptu use a data format configuration file named cerlocale.xml. For information about managing data formats, copying data format information, or editing the data format configuration file, see the Configuration Manager User Guide.

Chart Types
See the following table to compare how you add and change the chart type in Impromptu Series 7 Version 3 and Series 7 Version 4. Goal Add a 2D bar chart Series 7 Version 3 In the Chart Properties dialog, in the Chart type list, click 2D Bar. Series 7 Version 4 In the Chart Properties dialog box, in the Chart type list, click Bar. On the Format tab, click Properties, and then on the General tab, un-check the Depth check box (no Depth). In the Chart Properties dialog box, in the Chart type list, click Bar. On the Format tab, click Properties, and then on the General tab, specify Depth. In the Chart Properties dialog box, in the Chart type list, click Pie. In the Chart Properties dialog box, in the Chart type list, click Pie. On the Layout tab, click 2D Circular Pie.

Add a 3D bar chart. Note: This 3D bar chart is not a true three-dimensional chart. It is a 2D bar chart with depth. Add a pie chart.

In the Chart Properties dialog, in the Chart type list, click 3D Bar.

In the Chart Properties dialog, in the Chart type list, click either 2D Pie or 3D Pie. In the Chart Properties dialog, in the Chart type list, click 2D Pie.

Add a 2D pie chart.

Administration Guide 135

Chapter 15: Impromptu Chart Changes Goal Add a 3D pie chart. Series 7 Version 3 In the Chart Properties dialog, in the Chart type list, click 3D Pie. Series 7 Version 4 In the Chart Properties dialog box, in the Chart type list, click Pie. On the Format tab, click Properties, and then on the General tab, specify Depth. In the Chart Properties dialog box, in the Chart type list, click Area. Click the Format tab, click Properties, and on the General tab, un-check the Depth check box (no Depth). In the Chart Properties dialog box, in the Chart type list, click Area. Click the Format tab, click Properties, and on the General tab, specify Depth. In the Chart Properties dialog box, in the Chart type list, click Line. Click the Format tab, click Properties, and on the General tab, un-check the Depth check box. In the Chart Properties dialog box, in the Chart type list, click Line. Click the Format tab, click Properties, and on the General tab, specify Depth. In the Chart Properties dialog box, in the Chart type list, click Line. Click the Format tab, click Grids and Scales, and then on the Scales tab, click Make Logarithmic. In the Chart Properties dialog box, in the Chart type list, click Line. Click the Format tab, click Properties, and on the General tab, specify Depth.

Add a 2D area chart.

In the Chart Properties dialog, in the Chart type list, click 2D Area.

Add a 3D area chart. Note: This 3D area chart is not a true three-dimensional chart. It is a 2D area chart with depth. Add a line chart.

In the Chart Properties dialog, in the Chart type list, click 3D Area.

In the Chart Properties dialog, in the Chart type list, click Line.

Add a 2D line.

In the Chart Properties dialog, in the Chart type list, click Tape.

Add a log chart.

In the Chart Properties dialog, in the Chart type list, click Log.

Add a tape chart.

In the Chart Properties dialog, in the Chart type list, click Tape.

136 IBM(R) Cognos(R) Impromptu(R)

Chapter 15: Impromptu Chart Changes

Other Chart Properties


See the following table to compare how you change certain other chart properties in Impromptu Series 7 Version 3 and Series 7 Version 4. Goal Change chart background, plot and legend color. Series 7 Version 3 On the Format tab, in the Select box, click the chart. Under the Background color option, click Customize. The color you specify applies to the chart, plot and legend areas. Show chart values as a percent. Swap the chart axes. On the Format tab, click Percent. On the Format tab, click Swap. Series 7 Version 4 On the Format tab, in the Chart background box, click the area of the chart to format: chart, plot or legend. Click Edit and use the Formatting dialog box to format the color. On the Format tab, click Properties. On the Layout tab, click Percent. On the Format tab, click Properties. On the Layout tab, select the Horizontal check box. On the Format tab, click Properties, and on the General tab, specify an Explode value. This value is applied to each piece of the pie. To customize the Explode value for a particular slice, on the Format tab, click Customize per Data Item.

For pie chart, specify a pullout slice.

On the Format tab, in the Select box, click the chart. Click Show pullout slice. Use the dropdown list to specify the data item to pull out.

Titles
See the following table to compare how you change chart titles in Impromptu Series 7 Version 3 and Series 7 Version 4. Goal Add a chart title. Series 7 Version 3 In the Chart Properties dialog box, on the Format tab, click Chart Title. Series 7 Version 4 In the Chart Properties dialog box, click the Format tab, and then click Titles. Click the Title check box and type a title.

Add a primary or x-axis title.

On the Format tab, click the In the Chart Properties primary or x-axis Title. dialog box, click the Format tab, and then click Titles. Click the Category Title check box and type a x-axis title. On the Format tab, click the In the Chart Properties secondary or y-axis Title. dialog box, click the Format tab, and then click Titles. Click the Value Title (Y1) check box and type a y-axis title.

Add a secondary or y-axis title.

Administration Guide 137

Chapter 15: Impromptu Chart Changes Goal Format a title. Series 7 Version 3 On the Format tab, in the Select box, click the chart or axis title, then click Font. Use the Chart Font dialog box to format the title. Series 7 Version 4 In the Chart Properties dialog box, on the Format tab, use the Font formatting list box to select the title, then click Edit.

Legends
See the following table to compare how you add and format a legend in Impromptu Series 7 Version 3 and Series 7 Version 4. Goal Add a legend. Series 7 Version 3 In the Chart Properties dialog box, on the Format tab, click Legend, and then click Show the legend. On the Format tab, click Legend, with Show the legend selected, specify the legend location and the location of markers and legend text. In the Chart Properties dialog box, on the Format tab, click Legend, then click Font. Use the Chart Font dialog box to format the legend text. Series 7 Version 4 In the Chart Properties dialog box, on the Format tab, click Properties. Click the Look tab, and select Show Legend. In the Chart Properties dialog box, on the Format tab, click Properties. Click the Look tab, select Show Legend, and specify the legend options. In the Chart Properties dialog box, on the Format tab, use the Font formatting list box to select the title, then click Edit.

Change legend and legend marker location.

Format legend text.

Data Properties
See the following table to compare how you change data properties in Impromptu Series 7 Version 3 and Series 7 Version 4. Goal Plot null data. Series 7 Version 3 Series 7 Version 4

In the Chart Properties On the Format tab, in the Null data box, click Plot as dialog box, on the Data tab, zero or Exclude from chart. select the Plot null data check box. Available only for line Available only for line and charts. correlation charts. On the Format tab, in the Select box, click the chart. In the Display options box, in the Show Values box, click where you want the data labels to appear. In the Chart Properties dialog box, on the Format tab, click Properties. Click the Data Labels tab, select Show Data Labels, and then specify Labels Location and Label Format.

For bar charts only, change the location of data labels.

138 IBM(R) Cognos(R) Impromptu(R)

Chapter 15: Impromptu Chart Changes Goal Per data item, customize data item color marker style marker size line style For the entire chart or series, specify line style, marker style and size. This applies to line, bubble and scatter charts. On the Format tab, click the To format marker shape and chart. In the Display options size: box, specify line style, On the Format tab, click marker style and size. Properties and use the General tab. To format the line style: On the Format tab, click Customize per Data Item and specify the line style for each data item. Show data items with color. On the Format tab, click the chart. In the Display options box, in the Data item colors box, click Show as colors. Data items automatically appear in different colors. After you specify color to show, to customize the color of each data item, click Customize per Data Item. Show data items with pattern. On the Format tab, click the chart. In the Display options box, in the Data item colors box, click Show as patterns. On the Format tab, click Customize per Data Item and in the Color column, click the color for a data item. In the Formatting After you specify pattern, to dialog box, in the Fill customize the pattern for Options, click Pattern. In each data item, click the Choose a Pattern dialog Customize per Data Item. box, specify the fill pattern, foreground and background color. On the Format tab, click Customize per Data Item and the color of a data item. In the Formatting dialog, specify a color from the color palette. Series 7 Version 3 On the Format tab, in the Select box, click the chart. Click Customize per Data Item. Series 7 Version 4 In the Chart Properties dialog box, on the Format tab, click Customize per Data Item.

Grids, Scales and Axis Labels


See the following table to compare how you add and format grids and scales in Impromptu Series 7 Version 3 and Series 7 Version 4. Goal Add gridlines. Series 7 Version 3 On the Format tab, in the Select box, click the chart. Select the Primary gridline check box to gridlines to the x-axis. Select the Secondary gridline check box to add gridlines to the y-axis. Series 7 Version 4 On the Format tab, click Grids and Scales. Click the axis tab, and then click the Grids tab. You can specify gridlines, grid style and grid spacing for major and minor gridlines.

Administration Guide 139

Chapter 15: Impromptu Chart Changes Goal Add and format x-axis labels. Series 7 Version 3 On the Format tab, in the Select box, click the Labels button for the x-axis. Select Show the labels check box to add the axis labels. Click Font to format the labels. Series 7 Version 4 To add labels: On the Format tab, click Grids and Scales. Click the Category Axis, and use the Labels tab and General tab to add labels and specify how they display. To format labels: On the Format tab, in the Font formatting list, click the axis you want to format, for example, Category axis, and then click Edit. Wrap x-axis labels. On the Format tab, in the Select box, click the Labels button for the x-axis. Select Show the labels check box to add the axis labels. Click Word wrap to wrap labels. Word wrap text: You cannot specify word wrap explicitly. Text is wrapped automatically. For information on formatting x-axis labels, see "Add and format x-axis labels". Truncate text: You cannot specify that text be truncated explicitly. It is truncated automatically. For information on formatting x-axis labels, see "Add and format x-axis labels". To add labels:

Truncated x-axis labels.

On the Format tab, in the Select box, click the Labels button for the x-axis. Select Show the labels check box to add the axis labels. Click Truncate to truncate labels.

Add and format y-axis labels.

On the Format tab, in the Select box, click the Labels button for the y-axis. Select the Show labels check box to add the axis labels.

On the Format tab, click Grids and Scales. Click the a y-axis tab, and use the Labels tab and General tab to add labels and specify Select Customize the scale and then edit the Minimum, how they display. Maximum and Number of steps boxes to customize the labels.

140 IBM(R) Cognos(R) Impromptu(R)

Chapter 16: Impromptu Chart Controls


Impromptu provides several dialog boxes that you can use to format charts. These include the Properties, Titles, Trendlines, Grids and Scales, Customize per Data Item, and Formatting dialog boxes. To assist you with chart formatting, you can find a list of controls for the following dialog boxes, together with a description of each control and the chart types that use them. The dialog boxes are listed alphabetically. Formatting dialog box Grids and Scales dialog box Properties dialog box Titles dialog box Trendlines dialog box For information about chart-related tasks, see (p. 119). For information about how tasks are done differently in this version of Impromptu compared to earlier releases, see (p. 135).

Formatting Dialog Box Controls


Here is a list of the controls in the Formatting dialog box. Not all the controls apply to every chart type or chart configuration. If a control does not apply, either the control does not appear in the dialog box, or it appears but is unavailable. For information about chart-related tasks, see (p. 119). For information about how tasks are done differently in this version of Impromptu compared to earlier releases, see (p. 135).

Font tab
Specifies font characteristics for certain chart objects, such as chart titles, axes titles, data labels, and legend text. Here are an alphabetical list of the controls you find on the Font tab. Name Alignment list box Color palette Font list box Rotation list box Size list box Style buttons Transparent button Description Specifies the text alignment. You can align text left, right, or have it centered. Specifies font color. Specifies the font type. Rotates text. Rotating text can help avoid overlapping text, for example, in axis labels. Specifies the font size. Specifies the font style: italic, bold, and underline. Makes text transparent.

Administration Guide 141

Chapter 16: Impromptu Chart Controls

Line tab
Specifies line characteristics, such as line color, style, and thickness. Name Color palette Style list box Thickness list box Transparent button Description Specifies font color. Specifies the line style. Specifies the line width. Makes text transparent.

Fill tab
Specifies fill characteristics, such as fill color, fill pattern, and fill pattern color. Name Color palette Pattern button Transparent button Description Specifies font color. Opens the Choose a Pattern dialog box that lets you specify fill pattern, pattern background and foreground color. Makes text transparent.

Grids and Scales Dialog Box Controls


Use the Grids and Scales dialog box controls to add axis labels, scales and grids to your charts. The tabs on the left-side of the dialog box show the available axes in the chart: Y1 Axis, Y2 Axis (for dual-axes charts), Category Axis, X Axis (for bubble and scatter charts) and Series Axis (for three-dimensional charts). When you select an axis tab, the tabs for formatting appear at the top of the dialog box. Not all of the controls apply to every chart type or chart configuration. If a control does not apply, either the control does not appear in the dialog box, or it appears but is unavailable. For information about chart-related tasks, see (p. 119). For information about how tasks are done differently in this version of Impromptu compared to earlier releases, see (p. 135)

General tab
Here is an alphabetical list of controls in the General tab. Name Draw Categories in Reverse Order check box Draw Series in Reverse Order check box Description Reverses the categories plotted on the chart Category Axis. The Category Axis labels appear from left-to-right at the bottom of the chart. Axis Chart Type

Category Axis, area, bar, X Axis correlation, gantt, HLCO, HLO, line, radar area, bar, line

Reverses the data plotted on the Series Axis. Series Axis The Series Axis is only valid for three-dimensional charts.

142 IBM(R) Cognos(R) Impromptu(R)

Chapter 16: Impromptu Chart Controls Name Labels on Both Sides radio button Description Specifies the location for the Category or X Axis baseline and labels. Axis Chart Type

Y1 Axis: Y1 Axis Category Axis area, bar, bubble, correlation, X Axis The default category axis baseline and labels HLCO, HLO, appear at the bottom of the chart. line, radar, scatter Category Axis: gantt

Specifies the location for the Category or X Category Axis, area, bar, bubble, Labels on X Axis correlation, Bottom radio Axis baseline and labels. HLCO, HLO, button The default category axis baseline and labels line, radar, scatter appear at the bottom of the chart. Labels on Left radio button For the Y1 Axis, specifies that labels appear Y1 Axis, Y1 Axis: on the left side of the axis. Category Axis area, bar, bubble, correlation, HLCO, HLO, line, radar, scatter Category Axis: gantt Labels on Right radio button For the Y1 Axis, specifies that labels appear Y1 Axis, Y1 Axis: on the right side of the axis. Category Axis area, bar, bubble, correlation, HLCO, HLO, line, radar, scatter Category Axis: gantt Labels on Top radio button Specifies the location for the Category or X Axis baseline and labels. The default Category Axis baseline and labels appear at the bottom of the chart. Category Axis, area, bar, bubble, X Axis correlation, HLCO, HLO, line, radar, scatter Y1 Axis: area, bar, bubble, correlation, gantt, HLCO, HLO, line, radar, scatter X Axis: scatter Shows or hides the category or Y axis base Show the Axis Line on lines. This option is always enabled. the Chart Value Axis Crosses Between Categories Category Axis correlation

Make this a Descending Axis check box

Draws the numeric axis in descending order Y1 Axis for the X Axis value labels and columns. X Axis

When selected, offsets the area from the plot Category Axis, area, line edges so that there are gaps between the Y X Axis Axis and the start of the plot area values. When cleared, the categories are aligned flush to the plot area edge.

Administration Guide 143

Chapter 16: Impromptu Chart Controls

Scales tab
Here is an alphabetical list of controls in the Scales tab. Name Make Logarithmic check box Description Specifies a logarithmic scale. To set the logarithmic scale, you must choose manual scaling and set the minimum and maximum value to a value greater than zero. Axis Y1 Axis X Axis Z Axis Chart Type Y1 Axis: area, bar, bubble, correlation, gantt, HLCO, HLO, line, radar X Axis: bubble Z Axis: bubble Specifies whether to include a zero on the Always Include Zero numeric axis. check box This option is disabled when the Set Minimum Value option is selected. Y1 Axis X Axis Z Axis Y1 Axis: area, bar, bubble, correlation, gantt, HLCO, HLO, line, radar X Axis: bubble Z Axis: bubble Set Maximum Value check box Applies manual scaling on the axis. This allows you to specify a range of values that is different from the range specified in the data. The value you enter sets the maximum value that appears on the numeric axis. The value label and chart columns are adjusted to align with this value. Y1 Axis X Axis Z Axis Y1 Axis: area, bar, bubble, correlation, gantt, HLCO, HLO, line, radar X Axis: bubble Z Axis: bubble Y1 Axis X Axis Z Axis Y1 Axis: area, bar, bubble, correlation, gantt, HLCO, HLO, line, radar X Axis: bubble Z Axis: bubble

Set Minimum Applies manual scaling on the axis. This Value check allows you to specify a range of values that is different from the range specified in the box data. The value you enter sets the minimum value that appears on the axis. The value label and chart columns are adjusted to align with this value.

144 IBM(R) Cognos(R) Impromptu(R)

Chapter 16: Impromptu Chart Controls

Labels tab
Here is an alphabetical list of controls in the Labels tab. Name Automatic radio button Description Draws all labels on the axis. This option is available for the Category and Series axes. Axis Chart Type

Category Axis Category Axis: Series Axis area, bar, bubble, correlation, HLCO, HLO, line, radar Series Axis: area, bar, line

Hide labels for: Maximum Value check box

Shows or hides the maximum value on an axis.

Y1 Axis Y2 Axis X Axis

Y1 Axis: area, bar, bubble, correlation, HLCO, HLO, line, radar, scatter Y2 Axis: area, bar, correlation, line X Axis: bubble, scatter

Hide labels for: Minimum Value check box

Show s or hides the minimum value on an axis.

Y1 Axis Y2 Axis

Y1 Axis: area, bar, bubble, correlation, HLCO, HLO, line, radar, scatter Y2 Axis: area, bar, correlation, line, X Axis: bubble, scatter

Number of categories between labels radio button

Controls the number of labels that appear on the axis by specifying the number of labels that can be dropped between categories. By default, all labels appear. To restrict the number of labels, you must select the Show Labels with this Axis check box.

Category Axis area, bar, bubble, correlation, HLCO, HLO, line, radar

Administration Guide 145

Chapter 16: Impromptu Chart Controls Name Show Labels for this Axis check box Description Shows or hides numeric and Category Axis labels. Axis Chart Type Y1 Axis: area, bar, bubble, correlation, gantt, HLCO, HLO, line, radar, scatter Y2 Axis: area, bar, correlation, line Category Axis: area, bar, bubble, correlation, gantt, HLCO, HLO, line, radar X Axis: bubble, scatter Series Axis: area, bar, line

Y1 Axis Y2 Axis Category Axis On the numeric axis, labels identify the X Axis range of data values that are charted. On the Series Axis category axis, the labels show how data in the chart is grouped or categorized. When the check box is selected for the category axis, the axis labels appear immediately below the chart frame. For numeric axis labels, when the columns appear vertically from top-to-bottom or bottom-to-top, the labels on the Y1 Axis appear on the left side of the chart. For the Y2 Axis, the labels appear on the right side of a vertical chart and on the top for a horizontal chart. For 3D charts, the category labels appear on the lower right side of the chart.

Stagger Labels radio button

Category Axis Category Axis: X Axis area, bar, Staggering labels is useful when long labels correlation, are required for each data group but you do HLCO, HLO, not want the labels to wrap. line, radar By default, labels on the Category Axis X Axis: appear on a single line. If labels are too long bubble to fit on a single line, labels are wrapped at word breaks and appear on multiple lines. Staggers Category Axis labels. This option is not available for 3D charts.

Use Manual Number of Series radio button

Allows you to manually specify the number Series Axis of data series plotted in the chart.

area, bar, line

Grids tab
Here is an alphabetical list of controls in the Grids tab. Name Description Axis Chart Type Y1 Axis: area, bar, correlation, HLCO, HLO, line, scatter Y2 Axis: area, bar, correlation, line X Axis: scatter

Draws a custom grid line on the Y1 Axis or Y1 Axis Draw Y2 Axis Custom Line Y2 Axis in your chart. The location of the at check box grid line is specified by the value you enter X Axis in the Draw Custom Line at edit box.

146 IBM(R) Cognos(R) Impromptu(R)

Chapter 16: Impromptu Chart Controls Name Description Axis Chart Type

Y1 Axis: Grid Style list Specifies the style of grid line for major and Y1 Axis area, bar, bubble, Y2 Axis minor grid lines. You can specify the Category Axis correlation, gantt, following styles: HLCO, HLO, Regular Grids line, radar, scatter Grids and Ticks Y2 Axis: Inner Ticks area, bar, Outer Ticks correlation, line Spanning Ticks To format the width and color of a grid line, use the Formatting option on the Chart Properties, Format tab. Category Axis: area, bar, bubble, correlation, gantt, HLCO, HLO, line Y1 Axis Y2 Axis Y1 Axis: correlation, gantt, radar Y2 Axis: correlation Category Axis area, bar, bubble, correlation, gantt, HLCO, HLO, line

Gridlines per Controls the number of minor grid lines in interval box, the chart. Minor Gridlines tab

Set manual number of categories between gridlines radio button Minor Gridlines tab Show Gridlines check box

For minor grid lines on the Category Axis, specifies the number of categories between the grid lines.

Y1 Axis Y2 Axis To specify a grid line style, see the Grid Style Category Axis option. Series Axis Shows or hides major grid lines in a chart.

Y1 Axis: area, bar, gantt, correlation, HLCO, HLO, line, radar, scatter Y2 Axis: area, bar, correlation, line Category Axis: area, bar, bubble, correlation, gantt, HLCO, HLO, line, radar Series Axis: area, bar, line

Administration Guide 147

Chapter 16: Impromptu Chart Controls Name Use manual grid interval value check box Description For major grid lines, lets you set the grid interval value manually. Axis Y1 Axis Y2 Axis X Axis Chart Type Y1 Axis: area, bar, correlation, gantt, HLCO, HLO, line, radar, scatter Y2 Axis: area, bar, correlation, gantt, line X Axis: scatter

Properties Dialog Box Controls


Use the Properties dialog box controls to format chart characteristics that apply to the chart globally, such as the layout type, data labels, and legend. Here is a list of the controls in the dialog box, grouped by tab. Not all of the controls apply to every chart type or chart configuration. If a control does not apply, either the control does not appear in the dialog box, or it appears but is unavailable.

General tab
This tab specifies the general properties of a chart, which vary depending on the chart type. For example, you can specify tilt, depth, rotation and explode values for a pie chart. For the columns in a bar chart, you can specify shape, overlap, gap width between columns, and depth. For information about chart-related tasks, see (p. 119). For information about how tasks are done differently in this version of Impromptu compared to earlier releases, see (p. 135) Here is an alphabetical list of the controls in the General tab. Name Bubble size slider Connect Data Points with Lines check box Depth check box Description Specifies the size of the markers in a bubble chart. Shows or hides a connecting line between each marker in a series. Chart Type bubble scatter

Controls whether depth is added to a chart. When area, bar, correlation, gantt, cleared, the chart is flat. By default, all charts line appear with depth added to the chart frame and columns. This option is not available for bar charts with the True 3D layout.

Depth slider

Specifies the amount of depth to be applied to the chart. For a pie chart it controls the thickness of the pie. For the remaining charts, it controls the depth of the bars risers and frame. This option is not available for bar charts with the True 3D layout.

area, bar, bubble, correlation, gantt, line, pie

Direction slider

Specifies the direction in which the depth is applied. This option is not available for bar charts with the True 3D layout.

area, bar, correlation, line

148 IBM(R) Cognos(R) Impromptu(R)

Chapter 16: Impromptu Chart Controls Name Display Series Lines check box Explode slider Description Draws a line connecting the series data. Detaches all slices from the pie. Exploding a pie or donut chart detaches all slices away from the center. Gap Width slider Changes the gap between the group of bars or columns in each category. bar, correlation, gantt, HLCO, HLO, 3D area, 3D line ring pie pie Chart Type stacked bar, percent bar pie

Hole Size slider Keep aspect ratio constant check box

Controls the size of the hole in a ring pie chart. Controls whether a pie chart has to be perfectly circular when drawn. There are cases when a pie chart, with depth and a high Tilt value, looks better with a non 1:1 width: height aspect ratio. Changes the degree that bars or columns, within each category, overlap each other. This option is only available for a clustered chart. This option is not available for bar charts that have the True 3D layout.

Overlap slider

bar, correlation

Restore All button

Restores all slices of the pie to their original settings when slices have been detached or removed from a pie chart. Changes the shape of the bars or columns. This field is not available if the Use Depth check box is selected.

pie

Riser Shape list box

bar, correlation, gantt,

Rotation slider Shape list box

Rotates the pie chart. Changes the shape of markers. For line and scatter charts, this option is only available if Show Markers is selected.

pie bubble, line, scatter

Show line(s) check box Shows or hides the lines in a chart.

line

line, scatter Show Marker(s) check Shows or hides the markers in a chart. box For line charts, if this control is enabled, a marker is drawn on each line at locations representing the data values. For a bubble chart, if the user hides markers and does not select Connect Data Points with Lines, the scatter chart does not contain any columns representing the data values. Size slider Changes the size of markers. For bubble charts, if zero is used, the markers disappear from the chart. For scatter charts, this option is only available if Show Markers is selected. bubble, line, scatter

Administration Guide 149

Chapter 16: Impromptu Chart Controls Name Tilt box Description Tilts the pie chart. Lesser values make the pie chart flatter facing the viewer, whereas, the maximum value tilts the pie chart such that only the pie edge is shown. Chart Type pie

Layout tab
Changes the default layout. Depending on the chart, you can make the layout type absolute, percent, stacked, clustered, or three-dimensional. You can also specify whether data items appear on the vertical or horizontal axis. For certain charts, you can also specify dual axes. For information about chart-related tasks, see (p. 119). For information about how tasks are done differently in this version of Impromptu compared to earlier releases, see (p. 135) Here is an alphabetical list of the controls in the Layout tab. Name 2D Circular Pie check box Absolute radio button Angle box slider Area radio button Circular Data Lines check box Circular Gridlines radio button Description Adds depth to a pie chart. The tilt value is set to zero. Specifies that absolute data values are used. Rotates the chart, showing it at different angles. Shows the area enclosed by the data points. Draws the perimeter of a radar chart which is circular. Chart Type pie area, bar, line radar radar radar

Shows circular or value grid lines on a radar chart. radar You can toggle between circular or spider grid lines. With circular grid lines, you can also specify circular data lines. bar area, bar, bubble, line

Clustered radio button Creates a side-by-side group of columns. This is the standard type of column or bar chart. Dual Axes check box Creates a chart with two numeric axes (Y1 and Y2). To change the data series that are assigned to each axis, use the settings in the Dual Y Options tab. This option is only available for clustered and stacked area charts. It is not available for percent and 3D charts. Horizontal radio button Line radio button Percent radio button Plots data columns on the numeric or y-axis. Connects the data points in the chart using lines. Creates a column version of a pie chart. Each group calculates the percent of the total required for each series. The axis goes from zero to 100%. Shows data as a percentage of a total.

area, bar, correlation, line radar area, bar, line

Pie radio button Ring Pie radio button

pie

Creates a ring variant of the pie chart. The total of pie all slices is placed in the center.

150 IBM(R) Cognos(R) Impromptu(R)

Chapter 16: Impromptu Chart Controls Name True 3D radio button Show Close Show Open Spider Gridlines radio button Split check box Description Creates a standard three-dimensional chart that displays a riser for each value in the data set. Chart Type area, bar, line

Hides or shows the closing value in a HLCO chart. HLCO Hides or shows the opening value in a HLCO chart. HLO

Draws the circular or value grid lines such that the radar radar chart resembles a spider web. Assigns half of the series in the chart to the primary numeric axis (Y1) and the other half to the secondary numeric axis (Y2). It physically splits the chart and shows two separate numeric axes. All columns or bars are drawn from a single category axis base line. The series assigned to the Y1 and Y2 axes are drawn on opposite sides of the chart. If the Dual Axes check box is not selected, this check box is unavailable. area, bar, line

Stacked check box

Arranges the polygons formed by the data points such that the polygons are stacked one on top of the other. Shows stacked groups of columns or bars. Each stack is comprised of all the series in the group, added up to get a total. The axis is the total value of the cumulative points. Specifies the layout style in high-low-close-open and high-low-close charts. Data values can be represented using rectangular columns or vertical lines.

radar

Stacked radio button

area, bar, line

Style list

HLCO, HLO

Vertical radio button

Plots data columns on the category or X-Axis.

area, bar, correlation, line

Data Labels tab


Specifies whether to show data labels. If you choose to have data labels appear, you can specify the label location and format. For information about chart-related tasks, see (p. 119). For information about how tasks are done differently in this version of Impromptu compared to earlier releases, see (p. 135) Here is an alphabetical list of the controls in the Data Labels tab. Name Absolute Values radio button As Percentage check box Cumulative Values radio button Description Chart Type

Shows absolute data values. Available when you area, bar, line select the stacked and percentage chart layout type. Shows the data values in the chart as a percentage of the total. pie

Shows cumulative data values. Available when you area, bar, line select the stacked and percentage chart layout type.

Administration Guide 151

Chapter 16: Impromptu Chart Controls Name Label Format list box Description Selects the label format.The user can choose from the following options: Value, Label, or Label & Value. This option is enabled when the Show Data Labels check box is selected. If Value is selected, the data values appear at the corresponding location on each column. If Label is selected, the series labels appear. If Label & Value is selected, the series labels and data values appear. For bubble charts, you can choose an X and Y Value or Label. This selection is not available for scatter charts or charts with the True 3D layout. Labels Location list box area, bar, bubble, correlation, gantt, line, HLCO, This option is enabled when the Show Data Labels HLO, scatter check box is selected. Selects where the data labels appear next to the associated column or bar in the chart. This option is not available when the True 3D chart layout is selected. The data labels location can be one of the following: Outside Maximum, Inside Maximum, Center, or Base of Chart. For scatter charts, one of the following label locations can be selected: Above Marker, Below Marker, or Centered on Marker. Labels on Sides check box Shows the series labels on the sides of the chart. pie Chart Type area, bar, bubble, correlation, line, HLCO, HLO

On Slices radio button Shows the data values on each pie slice. Available if pie Show Values is selected. Do not select this check box to show the absolute values for each slice. On Slices radio button Shows the series labels on each pie slice. Available if Show Labels is selected. Outside Slices radio button (data values) Outside Slices radio button (series labels) Show as Percentage check box Show Data Labels check box Shows the data values outside each pie slice. Available if Show Value is selected. Shows the series labels outside each pie slice. Available if Show Labels is selected. Shows the data values in the chart as a percentage of the total. pie pie pie area, bar

Show or hides data labels for all series in the chart. area, bar, bubble, correlation, gantt, HLCO, HLO, line, radar, scatter

Show Labels check box Shows or hides the series label associated with each pie pie slice.

152 IBM(R) Cognos(R) Impromptu(R)

Chapter 16: Impromptu Chart Controls Name Show Leader Lines check box Description Shows or hides the leader lines from each pie slice next to the data value or series label. Available if the Outside Slices option is selected for values or labels. For data values, shows totals when you select the stacked layout type. Shows or hides data label values for each slice in the pie chart. Chart Type pie

Show Total radio button Show Values check box

area, bar pie

Dual Y Options tab


For charts that have dual y-axes, specifies which data series uses the Y1 axis and which data series uses the Y2 axis. This tab is not available for pie, gantt, radar, HLCO, and HLO charts. To add a dual axis to a chart, use the Layout tab. For information about chart-related tasks, see (p. 119). For information about how tasks are done differently in this version of Impromptu compared to earlier releases, see (p. 135) Here is an alphabetical list of the controls in the Dual Y Options tab. Name Y1 Axis list box Description Assigns a data series to the Y1 axis. When the Dual Y Options tab is enabled, the data series is divided by two. Half of the series is assigned to the Y1 Axis, and the other half is assigned to the Y2 Axis. The Dual Y Options tab is available only if the Dual Axes check box is selected in the Layout tab. Y2 Axis list box Assigns a data series to the Y2 Axis. When the Dual Y Options tab is enabled, the data series is divided by two. Half of the series is assigned to the Y1 Axis, and the other half is assigned to the Y2 Axis. The Dual Y Options tab is available only if the Dual Axes check box is selected in the Layout tab. Show Axis Split check box Show or hides the dual axes split line. Only available when the Dual Axes and Split Dual Axes check boxes are selected in the Layout tab. Selects the location where the chart is split into two halves. Only available when the Dual Axes and Split Dual Axes check boxes are selected in the Layout tab. area, bar, line area, bar, line area, bar, bubble, line Chart Type area, bar, bubble, line

Split Position slider

Look tab
Specifies a legend and legend properties for your chart. For example, you can specify where the legend is placed in chart. For information about chart-related tasks, see (p. 119). For information about how tasks are done differently in this version of Impromptu compared to earlier releases, see (p. 135)

Administration Guide 153

Chapter 16: Impromptu Chart Controls Here is an alphabetical list of the controls in the Look tab. Name Box Style list box Description Draws a text box around the entire legend area. The available options are: No Frame Single Line Frame Double Line Frame Beveled Frame Reverse Beveled Frame Layout list box Defines where the legend area markers and text appear in the chart. The available options are: Legend on Right Side Legend on Left Side Legend Below Chart Markers and Text list box Chart Type area, bar, bubble, correlation, gantt, HLCO, HLO, line, pie, radar, scatter

area, bar, bubble, correlation, gantt, HLCO, HLO, line, pie, radar, scatter

Defines the content and format of the legend area. area, bar, bubble, correlation, gantt, Available only if Show Legend it selected. HLCO, HLO, The following options are available: line, pie, radar, Markers to Left of Text scatter Markers to Right of Text Text Centered on Markers Markers Above Text Markers Below Text area, bar, bubble, correlation, gantt, If this check box is not selected, all other selections HLCO, HLO, related to the Legend are unavailable. line, pie, radar, scatter Shows or hides the chart legend.

Show Legend check box

Display Status tab


Use this tab to specify certain display options for pie and radar charts and charts with a three-dimensional layout. For information about chart-related tasks, see (p. 119). For information about how tasks are done differently in this version of Impromptu compared to earlier releases, see (p. 135) Here is an alphabetical list of the controls in the Display Status tab. Name Floor check box Left Wall check box Pie Name check box Description Shows or hides the floor in a three-dimensional chart. Chart Type 3D area, 3D bar, 3D line

Shows or hides the left wall in a three-dimensional 3D area, 3D bar, chart. 3D line Shows or hides the pie name, which is the category pie label. The category label appears below the pie chart. Shows or hides the total value in the center of each pie pie. Available only for ring pie charts. Shows or hides the labels for the right wall in a three-dimensional chart. 3D area, 3D bar, 3D line

Pie Total check box Right Wall check box

154 IBM(R) Cognos(R) Impromptu(R)

Chapter 16: Impromptu Chart Controls Name Description Chart Type radar

Show Y-Axis Values on Hides or shows the Y Axis values on the left-side the left check box of a radar chart.

Titles Dialog Box Controls


Here is a list of the controls, in alphabetical order, that you find in the Titles dialog box. Not all the controls apply to every chart type or chart configuration. If a control does not apply, either the control does not appear in the dialog box, or it appears but is unavailable. For information about chart-related tasks, see (p. 119). For information about how tasks are done differently in this version of Impromptu compared to earlier releases, see (p. 135). Name Category Title check box and edit box Footnote check box and edit box Description Defines a title for the Category Axis. Chart area, bar, gantt, HLCO, HLO, line, radar, area, bar, bubble, gantt, HLCO, HLO, line, pie, radar, scatter area, bar, bubble, gantt, HLCO, HLO, line, pie, radar, scatter area, bar, bubble, gantt, HLCO, HLO, line, pie, radar, scatter area, bar, bubble, gantt, HLCO, HLO, line, pie, radar, scatter

Defines a footnote. By default, the footnote is placed at the bottom right corner of the chart.

Subtitle check box and Defines a subtitle that allows you to provide edit box additional information about the chart. By default, the subtitle is placed at the top center of the chart directly below the chart title. Title check box and edit box Defines the main chart title. By default, the chart title is placed at the top of the chart.

Value Title (Y1) check box and edit box

Adds a title to the Y1 Axis.

Value Title (Y2) check box and edit box Series Axis check box and edit box

area, bar, bubble, Adds a title to the Y2 Axis. This title is available for dual-axes charts, where the chart has both a Y1 line, scatter Axis and a Y2 Axis. Adds a series axis title to describe the information charted on the Series Axis. This title is only available for three-dimensional charts where the axis labels that are normally displayed in the legend area are plotted along a secondary group axis. In the default configuration, the series labels appear on the lower left side of the three-dimensional cube. area, bar, line

X-Axis check box and edit box

Adds a title to the X Axis of the chart. Only bubble bubble, scatter and scatter charts include an X Axis.

Trendlines Dialog Box Controls


Here is a list of the controls, in alphabetical order, that you find in the Trendlines dialog box. Not all of the controls apply to every chart type or chart configuration. If a control does not apply, either the control does not appear in the dialog box, or it appears but is unavailable. Administration Guide 155

Chapter 16: Impromptu Chart Controls For information about chart-related tasks, see (p. 119). For information about how tasks are done differently in this version of Impromptu compared to earlier releases, see (p. 135). Name Order edit box Description Specifies the degree of linear regression for the polynomial trendline. Available only for a polynomial trendline. The Order number must be greater than one but no greater than the number of groups in the chart. Period edit box Specifies the period over which the moving average area, bar, line, line should be drawn. Available only for a Moving scatter Average trendline. Defines the type of trendline you want to appear. Available only if Show Trendlines is selected. You can choose the following regression types: linear, logarithmic, polynomial, exponential, moving average. Show Coefficient Values check box Shows or hides the coefficient values that are used area, bar, line, scatter for the trendline. Available for linear, logarithmic, polynomial, power, or exponential trendlines. Show Color Same as Series check box Show Equation check box Draws the trendline with the same color as the selected series. This option is selected by default. Shows or hides the equation that was used for the trendline. Available for linear, logarithmic, polynomial, power, or exponential trendlines. Show Trendlines list box Shows or hides a trendline for the selected series. area, bar, line, scatter area, bar, line, scatter area, bar, line, scatter area, bar, line, scatter Chart Type area, bar, line, scatter

Regression Type list box

156 IBM(R) Cognos(R) Impromptu(R)

Chapter 17: Product Sample Listing

Catalogs
The sample catalogs support all the sample reports and sample applications available for Impromptu and PowerPrompts.

Description
GoSales.cat
This catalog supports the sample reports that demonstrate new functionality incorporated within Impromptu. It is based on the database for The Great Outdoors, a fictitious camping equipment company.

IMP_Audit.cat
This catalog supports the Auditing_Report.imr sample report. The catalog is based on a fictitious audit database. It is created from the IMP_Audit.mdb database.

Location
File Name GoSales.cat IMP_Audit.cat Default Location \installation_location\Samples\Impromptu\reports \installation_location\Samples\Impromptu\audit\reports

Main Reports
The main sample reports are examples of the different ways you can use Impromptu.

Description
actual_sales_against_target_sales_(prompt).imr
This report demonstrates prompts, sorting, grouping, and filters. It also demonstrates the use of a sub-report within a main query. The report displays detailed yearly sales figures for each sales representative for the past three years. When you open the report, you are prompted to select the country you want the sales figures for.

Annual_Product_Sales.imr
This report assesses the annual performance of a Great Outdoors product. The report contains order details, retailer information, and a chart frame showing a three-year sales history. A logarithmic trend line shows the trend in total sales.

Administration Guide 157

Chapter 17: Product Sample Listing

company_letter_and_labels.imr
This report demonstrates the use of a sub-report within a main query. This report is a letter to level 3 representatives about the product sales targets for the year and an upcoming sales conference. The report includes a sub-report of address labels.

currency.imr
This report is in the PowerPrompts report set. See "PowerPrompts Applications" (p. 162).

customer_satisfaction.imr
The report demonstrates the use of conditional formats. This report lists the total number of returned items per product. The quality of each product is rated on a scale of 1 to 5, determined by the number of orders returned.

income_from_customers.imr
This report demonstrates drill through links to the secondary report Income_from_Customers_Drillthrough.imr. The report shows a list of retailers ranked by income. You can drill through on retailer name to see a detailed report listing income by individual product sales.

Order_Income_Correlation_Chart.imr
This report demonstrates the correlation chart and certain chart formatting features, such as the use of pattern and color in bar columns, a chart legend and chart background customization, and a chart footnote. The chart shows the correlation between order revenue and order income for a period of three years.

product_details_(prompt).imr
This report demonstrates prompts and drill through links. When you open the report, you are prompted to select the product type you want to include in your report. The report shows pictures, product names and descriptions of all the products within a product type. You can drill through on Product Name to see a report of projected sales versus return quantity.

Product_Margin_Export_to_Excel.imr
This report incorporates the proven practises of designing a report for export to Excel. This report displays the average production cost and margin for all products that are included in the golf and mountaineering equipment product lines using a list report and two pie charts with pull-out slices.

Product_Orders_Drill_Through.imr
This report demonstrates drill through. The report shows total sales for each Great Outdoors product by country. You can drill through on the Sales Staff Name, Productname and Ordernumber columns to see reports with greater detail.

Products.imr
Use this report with Drill-Through Report.mac, a macro that demonstrates the use of the OpenDrillDownReport method. The report lists all products.

Products_(Publish_as_HTML).imr
This report demonstrates simple aspects of Publish as HTML. The report lists all Great Outdoor products. You can view the report in both Impromptu and a Web browser.

158 IBM(R) Cognos(R) Impromptu(R)

Chapter 17: Product Sample Listing

pwp_tutorial_js.imr
This report is in the PowerPrompts report set. See "PowerPrompts Applications" (p. 162).

Revenue_and_Expense_Chart.imr
This report demonstrates a multi-line chart. The report displays total revenue and total expenses for all products in each product line. Various chart properties were used to demonstrate the modifications you can make to a chart to improve its readability. You can view the report in both Impromptu and a Web browser.

Revenue_Expense_and_Income_Chart.imr
This report demonstrates a multi-line chart. The report displays total revenue, total expenses, and total order income for all products in each product line. The data is filtered on the year 2005 only. Various chart properties were used to demonstrate the modifications you can make to a chart to improve its readability. You can view the report in both Impromptu and a Web browser.

Sales_by_Country_(Publish_as_HTML).imr
This report demonstrates intermediate aspects of Publish as HTML. The report lists total sales, sales margin, quantity, and order price for each product by country. You can view the report in both Impromptu and a Web browser.

sales_comparison_by_product_(prompt).imr
This report demonstrates the use of prompts, crosstab reports, and filters. When you open the report, you are prompted to select the product line you want to include. The report compares the sales figures for each product in that product line for the last three years.

SalesRep_Sales_Totals_(Publish_as_HTML).imr
This report demonstrates advanced aspects of Publish as HTML. The report shows detailed sales figures for several sales representative, such as the largest and smallest transaction, and sales totals for each retailer. You can view the report in both Impromptu and a Web browser.

sales_staff_report.imr
This report demonstrates grouped lists. Members of the sales staff are grouped by position and sorted by last name. Country, first name, phone number, and extension are other data items included in the report.

sales_volume_by_country_(prompt).imr
This report demonstrates prompts, sorting and grouping by data items. The report uses graphic frames, bar graphs, and list reports sorted by product type. When you open the report, you are prompted to select the country you want to include. The report shows customer sales information for each country you select.

simple_crosstab_report.imr
This report demonstrates a simple crosstab report. The report shows the yearly revenue totals for each product line.

singlepage.imr
This report is in the PowerPrompts report set. See "PowerPrompts Applications" (p. 162).

Administration Guide 159

Chapter 17: Product Sample Listing

UDF Integration.imr
This report is a copy of Products (Publish as HTML). Use the report with the HTML User Defined Function (UDF) sample. This report will fail unless the necessary steps documented in the html readme.txt file are followed. This file is located in \installation_location\bin\udf\Save As HTML folder.

Location
File Name actual_sales_against_target_sales_(prompt) .imr Annual_Product_Sales.imr company_letter_and_labels.imr customer_satisfaction.imr income_from_customers.imr Order_Income_Correlation_Chart.imr product_details_(prompt).imr Product_Margin_Export_to-Excel.imr Product_Orders_Drill_Through.imr Products.imr Products_(Publish_as_HTML).imr Revenue_and_Expense_Chart.imr Revenue_Expense_and_Income_Chart.imr Sales_by_Country_(Publish_as_HTML).imr sales_comparison_by_product_(prompt).imr Default Location \installation_location\Samples\Impromptu\ reports \installation_location\Samples\Impromptu\ reports \installation_location\Samples\Impromptu\ reports \installation_location\Samples\Impromptu\ reports \installation_location\Samples\Impromptu\ reports \installation_location\Samples\Impromptu\ report \installation_location\Samples\Impromptu\ reports \installation_location\Samples\Impromptu\ reports \installation_location\Samples\Impromptu\ reports \installation_location\Samples\Impromptu\ reports \installation_location\Samples\Impromptu\ reports \installation_location\Samples\Impromptu\ reports \installation_location\Samples\Impromptu\ reports \installation_location\Samples\Impromptu\ reports \installation_location\Samples\Impromptu\ reports

SalesRep_Sales_Totals_(Publish_as_HTML).im \installation_location\Samples\Impromptu\ r reports sales_staff_report.imr \installation_location\Samples\Impromptu\ reports

160 IBM(R) Cognos(R) Impromptu(R)

Chapter 17: Product Sample Listing File Name sales_volume_by_country_(prompt).imr simple_crosstab_report.imr UDF Integration.imr Default Location \installation_location\Samples\Impromptu\ reports \installation_location\Samples\Impromptu\ reports \installation_location\Bin\UDF\Save As HTML

Secondary Reports
These reports are used by the main reports to demonstrate Impromptu features such as drill through. Some are also used by macros.

Description
income_from_customers_drillthough.imr
Use this report with Income_from_Customers.imr, a report that demonstrates the use of drill through links. The report lists product sales by customer.

Product_Details_Drillthrough.imr
Product_Details_(prompt).imr uses this report to demonstrate drill through links. The report shows detailed projected versus return quantity information for the product you link from.

Product_Orders_Drill_Through1.imr
This is a drill-through report for Product Orders Drill-Through.imr. When you drill through on Productname, you see a detailed report about the orders for that product.

Product_Orders_Drill_Through2.imr
This is a drill-through report for Product Orders Drill-Through.imr. When you drill through on Sales Staff Name, you can see a report with detailed information about orders for that sales person.

Product_Orders_Drill_Through3.imr
This is a drill-through report for Product Orders Drill-Through.imr. When you drill through on Ordernumber, you see a report with details for that order.

Product_Orders_Drill_Through4.imr
This is a drill-through report for Product Orders Drill-Through.imr. When you drill through on Sales Staff Name or Productname, you can see a report with detailed order information.

Location
All secondary reports are in \installation_location\Samples\Impromptu\Reports.

Discovering Impromptu Reports


These are the sample reports used in the tutorials in Discovering Impromptu. "actual_sales_against_target_sales_(prompt).imr" (p. 157) "income_from_customers.imr" (p. 158) Administration Guide 161

Chapter 17: Product Sample Listing "income_from_customers_drillthough.imr" (p. 161) "Product_Details_Drillthrough.imr" (p. 161) "sales_staff_report.imr" (p. 159) "sales_volume_by_country_(prompt).imr" (p. 159) "simple_crosstab_report.imr" (p. 159)

Location
All Discovering Impromptu reports are in \installation_location\Samples\Impromptu\Reports.

Standard Templates
You can also open these templates using the shortcuts in \installation_location\Bin\User Workspace.

Description
Crosstab.imt
This is a standard crosstab template.

Form Letter.imt
This is a standard form letter template.

Grouped Crosstab.imt
This is a standard grouped crosstab template.

Grouped List.imt
This is a standard grouped list template.

Mailing Labels.imt
This is a standard mailing label template.

Simple List.imt
This is a standard list template.

Stored Procedure.imt
This is the template you use to call stored procedures.

Location
All standard templates are in \installation_location\Samples\Impromptu\Templates\Standard.

PowerPrompts Applications
The PowerPrompts tutorial and the sample applications are all generated from reports based on the GOSales.cat catalog. The PowerPrompts samples consist of several types of files. The application files (.xxm) are used with the PowerPrompts Developer Studio. The report files (.imr) contain the information for each application. Several HTML files (.htm) contain the formatting and appearance of the PowerPrompts applications.

162 IBM(R) Cognos(R) Impromptu(R)

Chapter 17: Product Sample Listing

Description
customersatisfaction.xxm and customer_satisfaction.imr
This report and application demonstrate cascading prompts. Each selection on a web page influences the choices available on the next page. For example, when a user selects a set of product lines the following prompt will restrict the user to product types that belong to the selected product lines. In the final report, each product row is highlighted in a color that reflects the relative success of the product based on product returns. Bright green indicates a very successful product, dark green means somewhat successful, dark red means somewhat unsuccessful, and bright red means very unsuccessful.

currency.xxm and currency.imr


This application is based on the currency.imr report, made specifically for this sample. The sample displays currency names, and the euro to local conversion value. This sample uses a query function to retrieve SQL used in the currency.imr report instead of a Dynamo or JavaScript from PowerPrompts. Any changes to the report in Impromptu are automatically picked up when the PowerPrompts application is run. Also, the query function adds a column from Impromptu into the PowerPrompts application.

singlepage.xxm and singlepage.imr


This report and application demonstrate different types of prompts on a single page. The sample displays a product name and the expected volume of sales for that product over time.

tutorial.xxm and pwp_tutorial_js.imr


This report and application are needed to complete the tutorial included in the Discovering PowerPrompts book. The report lists all the sales representatives and their sales transactions by retailer.

salesstaff.xxm and sales_staff_report.imr


This report and application demonstrate how the appearance of PowerPrompts can be dynamically changed based on themes selected by Upfront users. The sample displays sales staff names with their home country, occupational position and other information specific to the sales staff. The user filters the results based on occupational position and by country.

Location
File Name customersatisfaction.xxm customer_satisfaction.imr currency.xxm currency.imr singlepage.xxm singlepage.imr tutorial.xxm pwp_tutorial_js.imr Default Location \installation_location\samples\powerprompts\cascade \installation_location\samples\Impromptu\reports \installation_location\samples\powerprompts\queryreport \installation_location\samples\Impromptu\reports \installation_location\samples\powerprompts\singlepage \installation_location\samples\Impromptu\reports \installation_location\samples\powerprompts\tutorial \installation_location\samples\Impromptu\reports

Administration Guide 163

Chapter 17: Product Sample Listing

File Name salesstaff.xxm sales_staff_report.imr

Default Location \installation_location\samples\powerprompts\upfronttheme \installation_location\Impromptu\reports

Notes
If PowerPrompts is installed to a location other than C:\Program Files\Cognos\cern, the samples with the .xxm extension, will fail to run. You must specify the location of each .imr report.

OLE Automation (Macros)


Description
For information about the macros included with Impromptu, see the Sample Macros section of the Impromptu Macro online help. In the Documentation folder, double-click imp_mac.hlp.

Location
All macro files are in either \installation_location\Samples\Impromptu\Macros or \installation_location\Samples\CogMac.

User Defined Functions


Description
Software Developers Kit
These files are included: cogudf.h cogudf.mak cogudfty.h udf.mak udf.mdp udf.ncb udflib.lib Use these files in Microsoft Developer Studio with Visual C++ to build .dll files that contain external user defined functions (UDFs). Database UDFs These files are included: cogudfxx.sql database udf readme.txt impfunct update.txt informix udf.txt oracle udf.txt orfunct update.txt Use these files to implement an Oracle or Informix database UDF. When you use Impromptu to connect to the database for which the UDF has been implemented, the UDF will be visible in the expression editor.

Encryption UDFs
These files are included: 164 IBM(R) Cognos(R) Impromptu(R)

Chapter 17: Product Sample Listing cogudf encrypt update.sql encrypt readme.txt encrypt.c encrypt.def encrypt.dll impfunct encrypt update.txt

Use these files to implement encryption UDFs. When you implement the UDFs, they will be visible in the expression editor.

HTML UDFs
These files are included: cogudf html update.sql html readme.txt impfunct html update.txt pubhtml.c pubhtml.def pubhtml.dll Use these files to implement HTML UDFs. When you implement the UDFs, they will be visible in the expression editor.

Location
File Name SDK files Database UDF files Encryption UDF files HTML UDF files Default Location \installation_location\Bin\ \installation_location\Bin\UDF\Database UDFs \installation_location\Bin\UDF\Encryption \installation_location\Bin\UDF\Save As HTML

Administration Guide 165

Chapter 17: Product Sample Listing

166 IBM(R) Cognos(R) Impromptu(R)

Chapter 18: Integrating Impromptu with Other IBM Cognos Products


You can use IBM Cognos BI to give users across your enterprise access to important information quickly, and with easy, centralized administration. You can use Architect for centralized metadata modeling Use Architect to create a business model of your database that all your IBM Cognos BI products can use. You can export a part the model as an Impromptu catalog and use it to create reports. the DB2 Dimensional Metadata wizard to leverage dimensional data in DB2 Cube Views Access Manager for centralized, enterprise-wide security Access Manager uses LDAP technology to provide a single security structure for your entire enterprise. Impromptu Web Reports to distribute your reports over the Web in a managed environment Report consumers can subscribe to reports and use their Web browsers to view them in .pdf, .csv, .html, or .xls format. If they want more information about a certain column in a report, they can drill through to IBM Cognos Query, an ad hoc reporting product for the Web. IBM Cognos Query for Web-based reporting IBM Cognos Query users can create their own queries. They can sort, filter, group, and format data. Advanced users can create new queries that are then distributed to other users. You can import queries into Impromptu, save them as reports, and distribute them over the Web again using Impromptu Web Reports. PowerPlay for client- and Web-based OLAP reporting Use Impromptu to specify a set of data to use as an OLAP data source for PowerPlay. Also, if your users want to see the details behind a trend, they can drill through to an Impromptu report. Upfront to distribute reports directly to the Web Report consumers can use Upfront NewsBoxes to access reports. Configuration Manager to configure IBM Cognos Series 7 components Use to manage configuration settings, such as locale and accessibility.

Use Architect with Impromptu


You can use Impromptu to create and modify catalogs or you can use catalogs created in IBM Cognos Architect, a standard metadata application for IBM Cognos products. You can use Architect to assemble metadata from existing data sources, and then create a business model of your databases for use with Impromptu, PowerPlay, and IBM Cognos Query. You can create several catalogs from the same business model, each tailored to a specific audience. You can also create user classes for each catalog and set several properties, including whether the user class can create and edit reports the maximum number of rows the user class can retrieve the maximum number of database tables the user class can access which parts of the catalog the user class can view

Administration Guide 167

Chapter 18: Integrating Impromptu with Other IBM Cognos Products

Import Impromptu Metadata into Architect


You can import your existing catalogs into an Architect model. Architect converts your catalog folders and columns into entities and attributes, and imports condition filters, prompts, and calculations. When you import an Impromptu catalog into the Architect model, Architect uses the information contained in the catalog to automatically create the data access model, the business model, and a package. Architect matches the user classes of the catalog with those in Access Manager. The Architect catalog contains a reference to a namespace on the directory server where Access Manager stores security information. If users arent listed in that namespace they cant open the catalog. You can use Architect to set up governor options for the Access Manager user classes in the namespace. For more information about using Architect to create catalogs, see the Architect online Help.

Task List Before Moving Existing Catalogs Into Architect


Because Architect uses Access Manager for security, ensure the following before importing your catalogs: If you use more than one catalog with the same user classes, the user classes must have the same permissions and restrictions. For example, the Sales user class in Catalog1.cat must be identical to the Sales user class in Catalog2.cat. If there are discrepancies, you will lose security information when you import the catalogs. If different user classes in different catalogs share the same name, rename them before you import the catalogs. For example, Catalog1.cat contains a user class called Sales that regional sales administrators use to track the performance of each sales representative. Catalog2.cat contains a user class called Sales that sales representatives use to check their own performance against quota. You should rename the user classes to Sales Admin and Sales Rep. The user class names in your catalogs match the user class names in the Access Manager namespace. If Architect cant find a user class in the namespace, it discards the security information for that user class when you import the catalog.

Export Catalogs from Architect


You can copy portions of your business model into packages and generate a catalog from each package. You can create several packages from the same business model, each customized for a specific audience. However, because Impromptu connects to one database at a time, you must ensure that all the tables and columns that are referenced in a single package are in the same database. When using these catalogs, Impromptu uses Access Manager to control security. You must decide whether these catalogs will be read-only or read-write when you export them. They are, by default, read-only. You cannot modify the read-only catalogs in Impromptu. To make catalogs read-write when you export them from Architect, in the Save As dialog box, clear the Export as Read-Only check box. For more information about exporting an Impromptu catalog, see the Architect online help. To modify the read-write catalogs in Impromptu, the catalog namespace must have a Creator user class and you must log on as a member of that user class.

Integrate with Impromptu Web Reports


When your reports are ready for distribution, you can deliver them together with their catalog and any required files to your Impromptu Web Reports report administrator. Your report administrator publishes the reports so that users with the appropriate permission can view them in their Web browsers.

168 IBM(R) Cognos(R) Impromptu(R)

Chapter 18: Integrating Impromptu with Other IBM Cognos Products

Preparing Your Reports for the Web


There are several things you should keep in mind when you create reports for distribution over the Web using Impromptu Web Reports. For example, Impromptu Web Reports does not support IBM CognosScript, AutoRun macros, or OLE automation.

Security Interaction With Impromptu Web Reports


If you want users to be prompted for a database signon every time they open a catalog, do not share an Access Manager namespace with Impromptu Web Reports. If you use the same namespace to store security information for both Impromptu and Impromptu Web Reports, the security information you enter for one product may have an effect on the security for the other. For example, you don't have a database signon stored in your namespace so Access Manager prompts you for one when you open an Impromptu catalog. Later, you run a report in Impromptu Web Reports that uses the same catalog, and Access Manager prompts you for a database signon again. If the option to save database signon is specified, Access Manager stores the database signon information in your namespace. The next time you open the catalog in Impromptu, Access Manager already has your database signon and doesn't prompt you for one.

Database Signon Differences Between Impromptu Web Reports and Impromptu


Impromptu Web Reports and Impromptu have similar, but different, methods for determining database signon information. When an Impromptu Web Reports report set is retrieving database signon information from Access Manager (User option button -- Report Project view of the Report Administrator), it will ignore any database signon information in the catalog user profiles. Similarly, if the report set is retrieving signons from the catalog user profiles (User Class option button -- same location), Impromptu Web Reports will ignore any signons in Access Manager. In contrast, Impromptu will use database signon information from either Access Manager (preferred) or catalog user profiles when the catalog does not contain a namespace.

Integrate with IBM Cognos Query


Impromptu Web Reports distributes Impromptu reports over the Web. Report consumers cant change the reports. They can select which reports they want to see and schedule reports to run at certain times. IBM Cognos Query is an ad hoc reporting product for the Web. Users can do many of the same things you can do using Impromptu on your computer, including creating their own queries sorting, filtering, and formatting queries You can use Impromptu to set up drill-through reporting from Impromptu Web Reports to IBM Cognos Query. When you distribute your reports using Impromptu Web Reports, users can drill through on a column that interests them and explore the information on their own. For example, you distribute a report that lists customer names, order numbers, and the total sale amount for each order. If users want to see transaction details for order number 160, they can click this value. A query, filtered to show only information for order number 160, opens in their Web browser. They can continue to sort, filter, and format the query, and follow hypertext links to related queries.

Drilling Through to IBM Cognos Query


When you save a query in IBM Cognos Query, you can create an Impromptu Query Definition file by selecting the Enable Drill Through check box. The .iqd file has the same name as the query, and contains the Structured Query Language statement the query is based on the name of the database the query attaches to a list of the columns in the query and the associated columns in the database

Administration Guide 169

Chapter 18: Integrating Impromptu with Other IBM Cognos Products You must select the Enable Drill Through check box to drill through to a query from another IBM Cognos product. For more information about .iqd files, see the IBM Cognos Query documentation.

Setting Up Drill-Through Access in Impromptu


In Impromptu, you can select which IBM Cognos Query server you want to drill through to using the Drill Through tab (Options dialog box). Then associate a column in your report with an .iqd file on that server using the Drill Through Properties dialog box. The Impromptu report and the query in IBM Cognos Query dont have to be related. You can associate a column in your report with any .iqd file on the IBM Cognos Query server and drill through to it. However, your Impromptu catalog and the IBM Cognos Query model should attach to the same database and have at least one common column for drilling through to be meaningful. To ensure your applications use the same data source, use Architect as your common modeling tool. Before you distribute the report in Impromptu Web Reports, you can test the drill-through access in Impromptu. When you click the Drill Through button, Impromptu creates the LaunchCQ.html file in your temporary folder and opens the file in your default Web browser. LaunchCQ.html contains scripts that launch IBM Cognos Query a form that automatically runs the query contained in the .iqd file filter statements so that the query shows only information about the drill-through column When you distribute your report over the Web, Impromptu Web Reports shows drill-through columns as hypertext links. For more information about drilling through to IBM Cognos Query, see the Impromptu online Help.

Importing Queries From IBM Cognos Query


If you want to distribute a query from IBM Cognos Query in a managed reporting environment, you can open it as a report in Impromptu and distribute it using Impromptu Web Reports. In IBM Cognos Query, you export the query as an Impromptu report. IBM Cognos Query creates a .cq file that contains the name of the package in Architect that the query is based on script language that tells Impromptu how to recreate the query Before you use the .cq file to create a report in Impromptu, you must create a catalog for the new report to use. In Architect, export the package that the query is based on as an Impromptu catalog. In Impromptu, you use the Import IBM Cognos Query dialog box (Tools menu) to select the .cq file and the catalog. Impromptu reads the script, runs the query, and shows the result in a list report. You can change or format the query, and then redistribute it using Impromptu Web Reports. For more information about importing queries from IBM Cognos Query, see the Impromptu online Help.

Integrate with PowerPlay


PowerPlay is the IBM Cognos BI product used for client- and Web-based OLAP reporting. You can use Impromptu to specify a set of data to use as an OLAP data source for PowerPlay. Also, if your users want to see the details behind a trend, they can drill through to an Impromptu report.

170 IBM(R) Cognos(R) Impromptu(R)

Chapter 18: Integrating Impromptu with Other IBM Cognos Products

Drilling Through from PowerPlay


PowerPlay users can select a value in a PowerPlay report and obtain more information about this value by drilling through to Impromptu. For example, a PowerPlay report shows that Camping Equipment sales in January 2004 are $40,000. PowerPlay users can drill through to Impromptu and get the order details for this $40,000 in sales.

How Does PowerPlay Drill Through Work?


PowerPlay users drill through to a saved Impromptu report. The Impromptu report is associated with a PowerPlay measure such as sales, cost, or profit margin percentage in PowerPlay Transformer. When a PowerPlay user chooses the Drill Through command, Impromptu starts, the associated report opens, and information passes from PowerPlay to Impromptu. Drill-through information is applied to the associated report when applicable. For example, a PowerPlay report shows sales for Camping Equipment in January 2004. The information passed from PowerPlay to Impromptu is Product = "Camping Equipment" and Year = "Jan04." The report associated with the sales measure appears with the filter "Product = Camping Equipment and Year = Jan04" applied to the report data in addition to any pre-existing filters. If Product and Year are not data items in the associated report, the filter cannot be applied and all the information in the report appears. If Product is a data item in the associated report and Year is not, Year = "Jan04" is dropped from the filter. Impromptu matches the filter information it receives from PowerPlay to columns in the Impromptu Data tab (Query dialog box). If the Year column has been changed in the Query Data tab to "MthYear", Year = "Jan04" is dropped from the filter (even when Year appears as a column title in the associated report). The filter information passed from PowerPlay is not visible in the Impromptu expression editor. However, it can be viewed in the Impromptu-generated SQL.

Limitations
The Impromptu report cannot be saved as a snapshot by the PowerPlay user. The Impromptu drill-through report cannot be a crosstab report. Binary Large Objects (BLOBS) are not supported in PowerPlay Transformer, and they cannot be part of the .iqd or .imr files for PowerPlay. Character or numeric values converted to date values for a PowerCube may cause Impromptu to generate invalid SQL for these columns when PowerPlay users drill through to Impromptu. To prevent this, ensure that date values for Transformer originate from date values in the underlying data source.

How Are Measures and Impromptu Reports Associated?


To enable drill-through access in PowerPlay reports, a PowerPlay measure is associated with an Impromptu report when the PowerCube is created. While all measures in a PowerCube can be associated with a single Impromptu report, each measure is typically associated with a different Impromptu report. For example, the Revenue measure can be associated with a sales report, and the Inventory measure can be associated with a stock report. The association of measures and Impromptu reports is flexible. For example, more than one Impromptu report can be associated with a measure, and not all measures in a PowerCube are associated to an Impromptu report. If there is more than one report associated with a measure, a list of reports and their corresponding descriptions appears when a PowerPlay user initially chooses the Drill Through command. When the user selects a report, it becomes the default report for the current measure.

Setting Up Drill Through Access


To enable drill-through access from PowerPlay to Impromptu, an administrator saves an Impromptu report as

Administration Guide 171

Chapter 18: Integrating Impromptu with Other IBM Cognos Products an Impromptu Query Definition (.iqd) file. PowerPlay Transformer uses the .iqd file as a data source for building PowerCubes. an Impromptu Report (.imr) file. The Transformer administrator associates a measure in the PowerCube with the report.

For more information about drilling through to Impromptu from PowerPlay, see the PowerPlay online Help.

Creating PowerCubes
Your PowerPlay administrator can use your Impromptu reports as data sources for PowerCubes. PowerCubes are OLAP data sources that you can open in PowerPlay to explore multidimensional information. To use your report as a PowerPlay data source, you must save it as an .iqd file. The .iqd file contains information about how to connect to the database and which columns are in the report. Your PowerPlay administrator opens the .iqd file in PowerPlay Transformer and models the data into a PowerCube. When you create a report as a data source for Transformer, keep the following points in mind: Create simple reports. Do not use crosstab reports. Include only those columns in the report that you want PowerPlay to use. Use filters to exclude information you do not want to view in PowerPlay.

Creating PowerCubes Automatically


You can use the Create PowerPlay PowerCube button to automatically create a PowerCube based on the currently open report. When you click the button, Impromptu runs a macro that saves your report as an .iqd file, starts Transformer, generates the PowerCube, and opens the PowerCube in PowerPlay. Transformer uses the AutoDesign command to generate the PowerCube. AutoDesign decides which columns to use as dimensions and which to use as measures. The following are tips you can follow to ensure AutoDesign works well: Use real date fields, not numeric or character fields containing date values. AutoDesign requires real date fields in order to break dates down by calendar year, quarter, and month. Give related columns similar names. AutoDesign assumes that columns with similar names are more likely to be related. Scan more data for a more accurate PowerCube. The more data PowerPlay scans, the more accurate the PowerCube data. However, creation time is longer for larger scan volumes. To change the number of records scanned, edit the following entries in the Trnsfrmr.ini file: rowCheckMax=600 sampleMax=300 The maximum sampleMax value is 1000.

Publish Reports to Upfront


You can publish reports to Upfront, the IBM Cognos Web portal, to make them available to users as NewsItems in HTML, PDF, Excel and CSV format. NewsItems are organized in NewsBoxes. For information about creating a NewsBox while publishing, see (p. 173). You can publish reports directly to Upfront, using the Impromptu Web Reports server. The computer on which Impromptu is installed must be configured to use the same security, or directory server, as the computer on which Impromptu Web Reports is installed. A report must be saved before you can publish it to Upfront.

172 IBM(R) Cognos(R) Impromptu(R)

Chapter 18: Integrating Impromptu with Other IBM Cognos Products

Steps
1. With a report open, from the File menu, click Publish to Upfront. The Publish to Upfront: Connect to IWR Server dialog box appears. 2. In the URL of IWR gateway box, enter the URL location for the IWR server. The URL has the form http://servername/web_alias/cgi-bin/gateway_connector. There are 3 gateway connectors, one for each type of web server protocol. Web server protocol CGI ISAPI NSAPI Gateway connector imrap.cgi imrapisapi.dll imrapnsapi.dll (Windows) imrapnsapi.so (Solaris, AIX) imrapnsapi.sl (HP) 3. Click OK. The Publish Report Projects1 dialog box appears. 4. Under Publish, choose whether to publish the current report or the entire report set. To publish only the current report, click Only the current report. To publish all the Impromptu application files found in the folder specified in the Publish box, click All reports at. 5. In the Report set options box, specify the report parameters for publishing. Select Update the existing report set Create a new report set named To Update a previously published report or report set Specify the folder location for a new report or report set. Impromptu creates the report files for publishing in this location. Enter the source location of the reports to publish using the IWR Server Report Set Location box. 6. Under Publish Reports to Upfront NewsBox, click Select. The Select Newsbox dialog box shows the NewsBoxes that exist in Upfront. 7. Click the Upfront NewsBox in which you want to publish the report or report set. 8. Click OK. The NewsBox location appears in the Publish reports to Upfront NewsBox box. 9. In the Publish Report Project1 dialog box, click OK. You are notified when publishing is complete. 10. To view the results, open Upfront and locate the reports in the NewsBox you specified in Impromptu. Note: Report sets are updated in the same manner as report sets are updated by IWR Report Administrator.

Create NewsBox on Publish to Upfront


You can create a NewsBox in Impromptu while publishing reports to Upfront. To successfully create a NewsBox, you must have sufficient privileges in Upfront. For information about publishing reports in Upfront, see "Publish Reports to Upfront" (p. 172).

Administration Guide 173

Chapter 18: Integrating Impromptu with Other IBM Cognos Products

Steps
1. In the Publish Report Projects dialog box, click Select, and then in the Available NewsBoxes list, click a NewsBox. If you have write permission to the selected NewsBox, you can create a NewsBox. If you have read-only permission to the selected NewsBox, even though it appears in the Available NewsBoxes list, it is not available, and you cannot create a NewsBox. If you do not have read permission to a NewsBox, the NewsBox does not show in the Available NewsBoxes list. 2. Click Create NewsBox, and then in the Name box, type a name for the NewsBox. 3. If you want, in the Description box, add a description for the NewsBox. 4. Click OK. You receive an error message if the NewsBox is not created in Upfront.

Data Formats and Locale Settings


Data formats depend on the locale configuration settings for your IBM Cognos Series 7 product. By default, IBM Cognos Series 7 server products and IBM Cognos Impromptu use a data format configuration file named cerlocale.xml. IBM Cognos Architect, IBM Cognos Visualizer, IBM Cognos PowerPlay for Windows, and IBM Cognos Transformer use Windows Regional Settings for locale settings and data format information. However, these products can also be configured to use the data format configuration file. For information about managing data formats, copying data format information, or editing the data format configuration file, see the Configuration Manager User Guide, or contact your administrator.

Creating Accessible Reports


We are committed to assisting people with disabilities, and promote initiatives that make workplaces and technologies accessible. For example, IBM Cognos Series 7 provides a report-reading solution for accessibility. This report-reading solution is currently available in English. In addition to the English report-reading solution, the Upfront Accessible theme can be read in English and French.

Enabling Accessibility Support


By default, reports created in Impromptu are not accessible to disabled users. To enable accessibility, you must specify the appropriate settings in Configuration Manager. Reports rendered with accessible tags can be read by screen readers when the reports exist in PDF format. PDF documents that support software accessibility guidelines contain additional markup information that increases the size of the PDF file produced and, as a result, may impact performance. If a report with accessible information degrades performance, render the same report twice. Render one report with accessible information and the other without accessible information. For more information about performance and accessibility, see the Planning Advanced Installations Guide.

Steps
1. 2. 3. 4. Open Configuration Manager. From the File menu, click Open the current configuration. The current configuration of your computer appears in the Configuration Manager window. From the View menu, click Advanced.

174 IBM(R) Cognos(R) Impromptu(R)

Chapter 18: Integrating Impromptu with Other IBM Cognos Products 5. In the Explorer, under IBM Cognos Impromptu, set accessibility for the appropriate component. To set accessibility for Impromptu User, under Impromptu, click the Accessibility category. To set accessibility for Impromptu Administrator, under Impromptu Administrator, click the Accessibility category. 6. Click the Accessible PDF property, and change the Value property to True. 7. From the Actions menu, click Validate Selection. 8. Click the Accessibility category, then from the Actions menu, click Apply Selection.

Design Considerations for Accessible Reports


When creating accessible reports for people with disabilities, consider the following design "do's and don'ts": Avoid using visual cues such as text bolding or color to convey important information. Avoid using pictures and OLE objects in PDF documents. These objects are tagged as artifacts and ignored by screen readers. Avoid using conditional formatting to convey important information. If using a chart, ensure that a table is included, and that the table provides the same information as the chart. In addition to these guidelines, you should be aware of report authoring features that are not supported for accessible reports in your product. The following Impromptu report authoring features are not supported for accessible reports: exception highlighting verbalization of images verbalization of the functionality of horizontal or vertical scroll bars In addition, accessibility to complex crosstab displays is limited, due to current limitations with assistive technology.

Administration Guide 175

Chapter 18: Integrating Impromptu with Other IBM Cognos Products

176 IBM(R) Cognos(R) Impromptu(R)

Chapter 19: Troubleshooting and Best Practices


Troubleshooting resources are sources of information that can help you resolve a problem that you are having with a product. Generally, sources of troubleshooting information include logs, debugging modes, documentation, and Cognos support. For information about Cognos support locations and programs, see the Cognos Software Services Web site (http://support.cognos.com). To contact Cognos support, you must have a current support agreement. Before you call, do the following: Verify that the problem is related to IBM Cognos software and results in an IBM Cognos error message. Attempt to reproduce the problem to ensure that it isnt just a simple error. Check obvious things like file locations, directories, paths, and access. Review all relevant documentation, including any release notes or readme files. Check to see if any recent changes in your computing environment might be responsible for the problem.

Unable to Identify Catalog Contents


If your catalogs are large and complicated, you may want to store information about the contents in an external data source; or your company may already store catalog information in a relational database or metadata repository. You can use that information to provide context help that describes columns, calculations, catalog filters, and catalog prompts. You create the annotation server that provides the annotations to the users. An annotation server receives the annotation request, searches your external data source for information about the item, and displays the information. You can create the annotation server in any application that can build a COM server or use the one provided as an example. For more information about COM servers, see your Microsoft documentation. An annotation request contains two pieces of information, the data item name and fully qualified folder path, and the database entity that this data item represents. The following table lists examples of what Impromptu would send to the annotation server for some data items from the Great Outdoors Sales database. Data item name and folder path

Annotated item

Actual database item \ColumnRef["GOS".COUNTRY_MULTILING UAL"."COUNTRY"] \(ColumnRef["GOS"."ORDER_DETAILS"."U NIT_SALE_PRICE"] * ColumnRef["GOS"."ORDER_DETAILS" ."QUANTITY"] ) (ColumnRef["GOS"."ORDER_DETAILS" ."QUANTITY"] * ColumnRef["GOS"."ORDER_DETAILS" ."UNIT_COST"] )

Country (Column) \Country\Country Order Income (Calculation) \Orders\Order Income

Administration Guide 177

Chapter 19: Troubleshooting and Best Practices

Annotated item Asia (Catalog Filter) Product Type Prompt (Catalog Prompt)

Data item name and folder path \Country\Conditions\ Asia \Prompts\Products\ Product Type Prompt

Actual database item \ColumnRef["GOS"."COUNTRY_MULTILIN GUAL"."COUNTRY"] in ( 'China' , 'Japan', 'Korea' , 'Taiwan' ) \PromptDef["\Prompts\Products\Product Type Prompt","Select the Product Type to use",ch,256,f,1,0,f,cp,FolderItemRef["Products "."Producttype"],FolderItemRef["Products"."P roducttype"]]

Steps to Set Up an Annotation Server Using Visual Basic


A compiled annotation server (AnnotationServer.exe) and an annotation database file (Annotate.mdb) are included in the Impromptu samples. 1. Open Visual Basic and select the ActiveX.exe project. Creating the annotation server using C++ is more work than using Visual Basic because you must create an ActiveX server that supports the interface. 2. Open the Project Explorer window. 3. Set the Project name to AnnotationServer. 4. Add new class called Annotate or rename Class1 to Annotate. 5. Add a function called AnnotateRequest to Annotate by pasting the following code in the (General) code window:
Public Sub AnnotateRequest(folder As String, dB As String) 'Configure the dialog box AnnotateResults.folder = folder AnnotateResults.dB = dB 'Show the dialog box AnnotateResults.Show End Sub

6. 7. 8. 9. 10.

Create a form to display the annotation. From the File menu, click Make AnnotationServer.exe to compile the executable file. Click Run and then click Stop. Distribute the AnnotationServer.exe to users. Have your users register AnnotationServer.exe to their computers. Tip: You could write a batch file (.bat) that registers AnnotationServer.exe for your users. After being registered, users can open Impromptu and request annotations. Users can open annotations in the Query dialog box, Folders dialog box, and any expression editor.

178 IBM(R) Cognos(R) Impromptu(R)

PART 2: Creating Reports with Impromptu

Administration Guide 179

180 IBM(R) Cognos(R) Impromptu(R)

Chapter 20: View a Report


Description
You may have created your own Impromptu reports, or someone else in your organization may have created a number of reports for you. When you view or open a report, Impromptu retrieves the data from the database.

What You Can Do


You can view an existing Impromptu report. view the report in either page or screen layout view. drill through to information behind a value in your report using a drill-through report created by you or your administrator. For example, you can view the detailed sales transactions that account for the total sales for a particular customer.

Related Topics
"Change the Page Layout View of a Report" (p. 183) "View an Existing Report" (p. 181) "View the Details of a Value in a Report" (p. 182)

View an Existing Report


Steps
1. If you are just starting Impromptu, click Open an Existing Report in the Welcome dialog box. Otherwise, from the File menu click Open. 2. Locate and select the report you want to open, and click Open. If the IBM Cognos Common Logon dialog appears, type your User ID and click Log On if you are using Access Manager for security. Otherwise, click Cancel. If you do not have a catalog open, the Catalog Logon dialog box appears where you can select a catalog, enter your user class and click OK. 3. Click OK. If the catalog or report was created with a previous version of Impromptu, see "Upgrade a Catalog or Report" (p. 203).

More Info Note


The Welcome dialog box is not available when the Show the Welcome to Impromptu dialog check box is cleared in the Start-up tab (Options dialog box, Tools menu).

Tips
To quickly locate reports in the User Workspace folder, click the FastFind button (Open dialog box). To add a shortcut to one of your folders or reports in the User Workspace, click Add to FastFind (Open dialog box). You can load the same catalog automatically every time you run Impromptu. From the Tools menu, click Options, and click the Startup tab.

Administration Guide 181

Chapter 20: View a Report

Related Topics
"View a Report" (p. 181) "View the Details of a Value in a Report" (p. 182)

View the Details of a Value in a Report


Description
You or your administrator may have created one or more drill through reports that you can open from your current report. A drill-through report shows information behind a value you select in the current report. The Drill Through command is available for list reports, crosstab reports, sub-reports, charts, and reports using HotFiles or snapshots.

Example

Steps to View the Details Using the Report Menu


1. Select a value associated with a drill-through report. Note: Do not select multiple rows and columns. Drill-through reports are available only when you select a single value. You may want to add custom formatting, such as highlighting or underlined text, to indicate which values are associated with a drill-through report. 2. From the Report menu, click Drill Through. 3. Select the report you want to view from the list, and click OK.

Step to Quickly View the Details of a Value in a Report


To open the default drill-through report, do one of the following: Select a value associated with a drill-through report and click the Drill Through toolbar button. Drill Through button Double-click a value associated with a drill-through report. Impromptu opens the default drill-through report if an association exists. If no drill-through association exists, the I beam cursor appears indicating that you can edit the text.

More Info Notes


Only one copy of a drill-through report associated with a value can be open at a time.

182 IBM(R) Cognos(R) Impromptu(R)

Chapter 20: View a Report Impromptu includes a sample drill-through report, Product Orders Drill-Through.imr

Tips
To return to the main report from a drill-through report, use the Window menu. To view all the data in a drill-through report, click the Undo button on the toolbar. Impromptu removes the drill-through filter and displays all the data in the drill-through report. To quickly open a drill-through report, double-click a value associated with a drill-through report, right-click a value and select Drill Through from the menu, or select a value and press Enter. To save a drill-through report, click the Save As command (File menu). To drill through from a chart, select the entire chart.

What if ...
The Drill Through command and the Drill Through button are not available? No drill-through report is available for the value you have selected or you have selected multiple columns or rows. Drill-through reports are available only when you select a single value. The Drill Through Properties command from the Drill Through drop-down menu is not available? The Enable Drill-Through Properties check box (Options dialog box, Tools menu) is not selected. The drill-through report contains no data? There is a conflict between the main report and the drill-through report. For more information, see your administrator.

Related Topics
"Drill Through to IBM Cognos Query" (p. 281) "Set Up Drill-Through Access to IBM Cognos Query" (p. 282) "View a Report" (p. 181) "View an Existing Report" (p. 181)

Change the Page Layout View of a Report


Description
Two different views are available when you work in Impromptu. The view you choose depends on the type of work you are doing. Use Screen Layout view for inserting graphics or comments. Screen Layout view is good for editing and formatting text, and for screen-only reports. Use Page Layout view to reduce the view so you can see the edges of your report. Use this view to see page numbers if youve included them in your report. You can also see the layout of the report page including page headers and footers. What you see in Page Layout view is how your report will look when it is printed.

Step
From the View menu, click Screen Layout or Page Layout.

More Info Notes


Page layout view is only available if a default printer is defined. The results of the Fit to Page and Repeat This Column on Every Page options are not visible in the Screen Layout view.

Administration Guide 183

Chapter 20: View a Report The results of the Fit to Page option are not visible in the Page Layout view. You can only see the scaled down columns when you preview a report before printing, or when you print the report.

Tips
To quickly move between the Screen Layout view and the Page Layout view, use the toolbar buttons. Screen Layout button Page Layout button To take a closer look at your report, click one of the Zoom buttons on the toolbar. You can also reduce the view to see the entire page and make layout decisions easier. You can continue working on the report after enlarging or reducing the view. To enlarge the view in 25% increments, click the Zoom In button. To reduce the view in 25% increments, click the Zoom Out button. To fill the whole page, click the Whole Page button. To zoom in to 100%, click the 100% button. To zoom in to fit the page width, click the Page Width button.

Related Topics
"View a Report" (p. 181) "View an Existing Report" (p. 181)

184 IBM(R) Cognos(R) Impromptu(R)

Chapter 21: View a Report with a Web Browser


Description
Anyone with a Web browser can view a report that is saved as Hypertext Markup Language (HTML). To view HTML report output, you do not require Impromptu. Depending on how the HTML report is distributed, you can view it either directly on a Web page by clicking the button set up to launch the report by downloading the required HTML files from email or from a network folder and opening the main HTML page on your computer You cannot update an HTML report with new data.

Step to View an HTML Report on a Web Page


Click the button on the Web page that launches the report.

Tip
Save the report to a folder called my report to keep all related files together.

Steps to View an HTML Report


1. Copy all the HTML report files from email or the network folder where they are located. 2. Open the main HTML page. Example: C:\Report1\index.htm You can open the file by double-clicking it in Windows Explorer using the Run command starting your Web browser first, then indicating the location and name of the main HTML page.

More Info Note


Printing capabilities for HTML reports depend on the browser you are using. You cannot print multiple pages of an HTML report and, depending on your browser, if you specify more than one page in the print range, a blank page may print. For more information about printing HTML reports from within a browser, see your browser help.

What if ...
You get a blank page when you print an HTML report? You did not select the report before sending it to print. Open the HTML report in your Web browser and click the middle of the report. Note that there is no visual indication that the report is selected.

Related Topics
"Export a Report to Other Applications" (p. 194) For information about creating HTML report output, see Mastering Impromptu Reports.

Administration Guide 185

Chapter 21: View a Report with a Web Browser

186 IBM(R) Cognos(R) Impromptu(R)

Chapter 22: Print a Report


Description
Using the Print Preview command, the Page Setup command, and the Print Setup dialog box, you can preview your report, page by page, to ensure that it looks exactly the way you want it to look when it is printed set the margins, determine where headers and footers are printed, and set where to start a new page choose the printer you want to use, the page orientation, the size and the source of paper, as well as a whole range of options for fonts, graphics, and memory temporarily override the paper size and orientation you set using the Page Setup command by clicking Setup in the Print dialog box. What you see in the Print Setup dialog box from the Print dialog box is dependent on the printer you have installed Using the Print command, you can choose to print all the pages or a range of pages in your report select the print quality of your report specify the number of copies you want printed and whether or not you want them collated

Note
In addition to printing a report, you can keep a copy of your current data by using a local snapshots, or the Save As command (File menu). You can also use the Copy and Paste commands (Edit menu) to move your data to another application.

Steps
1. From the File menu, click Print. 2. Do one of the following: To print the entire report, click OK. To print the current page only, in the From and To boxes type the current page number, and click OK. To print a range of pages, in the From box type the number of the first page you want to print, and in the To box type the number of the last page you want to click. Click OK. To print more than one copy, in the Copies box type the number of copies, and click OK. To print to a file you specify in the Print to File dialog box, click Print to File, and click OK.

More Info What if...


You want to change how the printer is set up? In the Print dialog box, click the Setup button. In the Printer box, select the printer and then click Properties. You want to change the orientation of your report? In the Print dialog box, click the Setup button. In the Orientation box (Print Setup dialog box), select Portrait or Landscape. You want to print a wide list report?

Administration Guide 187

Chapter 22: Print a Report Use the Fit To Page check box (Page Setup dialog box) or the Repeat This Column on Every Page check box (Text Properties dialog box). See "Print a List Report With Repeating Columns" (p. 190) for more information.

Related Topics
"Preview a Report" (p. 188) "Print a Wide List Report on a Single Page" (p. 189)

Preview a Report
Description
You can preview your report before you print it. Print Preview shows you all the parts of your report in their positions on the page. You can see a full report page or the actual page size and move to the next or previous page. You can also see one or two pages at a time, or zoom in and out on the report.

Steps
1. From the File menu, click Print Preview. Impromptu shows a page view of your report. You cannot edit your report while you are in print preview. 2. Do one of the following: To preview the next or previous page, click the Next Page button to go forward a page in the report. Click the Prev Page button to go backward a page in the report. The Next Page button is unavailable once you have reached the end of your report. The Prev Page button is unavailable when you are at the first page of your report. To switch from viewing a single page to viewing two pages, click the Two Pages button. The button name changes to One Page. You can click this button to switch back to one page. To switch from full page view to actual size view, click the Zoom In button on the toolbar. To zoom in closer, click the Zoom In button again. The Zoom In button is unavailable once you have clicked it twice. To return to full page view, click the Zoom Out button. You may have to click it twice to get back to full page view. The Zoom Out button is unavailable once you are in full page view. To return to your report, Click Close.

Related Topics
"Print a Report" (p. 187)

Set Up the Printer


Description
You can change the current printer or the print setup options. You can choose a different printer (if you have access to more than one printer). The Print Setup dialog box indicates the printer to which you are currently connected change the paper source for the printer you want to use. The choices you have are limited to your current printer selection temporarily override the paper size and orientation settings using the Page Setup dialog box. This will not change the default printer settings

Steps
1. From the File menu, click Print. 2. Click Setup. 3. In the Print Setup dialog box, do one or more of the following: 188 IBM(R) Cognos(R) Impromptu(R)

Chapter 22: Print a Report To select a printer from the list, select the printer name in the Name box. Note: Only installed printers appear in the list. To temporarily override the specified paper size, select the paper size in the Size box. To specify a paper source, select the paper source from the Source box. To temporarily override the specified orientation of the report, click either the Portrait or Landscape option button from the Orientation box. 4. Click OK. Impromptu saves your new printer settings (except for changes to the paper size and orientation) and returns you to the Print dialog box. 5. Do one of the following: If you want to print based on the settings in the Print Setup dialog box, click OK. If you want to save the new printer setting in the Print Setup dialog box, but you do not want to print, click Cancel.

More Info Notes


The default printer is always the printer you have selected as the default printer in the Windows Printers settings. Your report can exceed the paper size supported by your printer. To print a wide list report, see "Print a Wide List Report on a Single Page" (p. 189). List reports and crosstab reports print on multiple pages; other reports are clipped. For example, if the list report contains more columns than can fit on a single page, additional columns print on the next page unless you've set the Fit to Page option (Page Setup dialog box).

Related Topics
"Print a List Report With Repeating Columns" (p. 190) "Print a Report" (p. 187)

Print a Wide List Report on a Single Page


Description
If you have a wide list report with many columns, you can automatically scale it down to a single page. This allows you to keep information together on one page. As a result, your report is easier to understand.

Steps
1. From the File menu, click Page Setup. 2. In the List Frames box, select the Fit to Page check box. 3. Click OK.

More Info Notes


Fit To Page does not affect the Page Layout view or Screen Layout view of a report. Fit To Page scales down a wide list report while maintaining the horizontal/vertical ratio. Fit To Page should not be used with the Repeat This Column on Every Page option. Fit To Page has no affect on how Impromptu Web Reports displays your report in PDF format. For more information about preparing reports for Impromptu Web Reports, see "Prepare a Report for Impromptu Web Reports" (p. 283).

What if ...
The Fit To Page check box is unavailable?

Administration Guide 189

Chapter 22: Print a Report You are not working on a list report. The Fit To Page check box is only available for list reports. The report is difficult to read after you select the Fit To Page check box? The report is too wide for the Fit To Page check box to be useful. You may want to repeat a column on every page instead. Part of the list report is cut off when you preview or print the report? The width of the list exceeds the physical page size. Select a value in the list. From the Edit menu, click Select Parent. From the Format menu, click Properties. Ensure that the box indicating width is set to Parent or is set to a specific width that is less than the physical page width.

Related Topics
"Preview a Report" (p. 188) "Print a List Report With Repeating Columns" (p. 190) "Print a Report" (p. 187)

Print a List Report With Repeating Columns


Description
You can use the Repeat This Column on Every Page check box to repeat one or more columns in a list report on every printed page (after the page where the repeating column first appears). When a report is too wide for one page, the additional columns are placed on the next page to the right. For page 1, the next page to the right is 1b. If you make a column on page 1 the repeating column, it becomes the first column on page 1b. This can be useful if your report is too wide to fit on a single page or too wide to be readable when scaled down using the Fit To Page option. When you repeat columns, the context of the information is maintained, ensuring that every page of your printed report is easy to understand. You can resize or edit repeat columns and the changes are automatically applied to the original column on the page that it first appears, as well as to all the columns that repeat on subsequent pages.

190 IBM(R) Cognos(R) Impromptu(R)

Chapter 22: Print a Report

Example

Steps
1. 2. 3. 4. Select one or more columns in your report. From the Format menu, click Properties, and click the Printing tab. Select the Repeat This Column On Every Page check box. Click OK.

More Info Notes


The Repeat This Column on Every Page option does not affect the Screen Layout view of a report. The Repeat This Column on Every Page option can also be applied to the row area of a crosstab. It cannot be applied to either cells or columns.

What if ...
You want to see which columns repeat? Select a value or column in your report. Click the Select Parent toolbar button. From the Format menu, click Properties and click the Printing tab. Select Parent button Columns do not repeat when you preview or print a report?

Administration Guide 191

Chapter 22: Print a Report The Fit To Page option may be enabled. From the File menu, click Page Setup and click the Printing tab. In the List Frames box, ensure that the Fit To Page option is cleared.

Related Topics
"Preview a Report" (p. 188) "Print a Report" (p. 187) "Print a Wide List Report on a Single Page" (p. 189)

192 IBM(R) Cognos(R) Impromptu(R)

Chapter 23: Export a Report


One way of sharing data between an Impromptu report and another application is to save the report in the file format of the other application. Saving your data in another file format is one way to keep a permanent copy of the current data.

File Formats Available for Exporting


Save Your Report As ... HotFile (.ims) HotFiles are used to access data from several databases Impromptu Query Definition (.iqd) Transformer uses information in the .iqd file to retrieve the data directly from your database when generating data in your model. For information about creating a model to use in PowerPlay, see the documentation for PowerPlay Transformer. IBM Cognos Visualizer uses information in the .iqd file to retrieve the data directly from your database when generating a visualization. For information about creating a visualization to use in IBM Cognos Visualizer, see the documentation for IBM Cognos Visualizer. If you save an Impromptu report that contains Access Security Tokens as an .iqd, Impromptu treats these values with special rules. The Access Security Tokens are: 1) catalog-user-profile, 2) user-name, and 3) user-classes. For more information, see the Impromptu Online help. Excel with Format (.xls) Analyze your data in a spreadsheet and keep the report formatting. You can save your reports in Excel 2000 format or Excel 2002 and higher format (default). To ... Use the results of your report as database tables in another catalog Create a source file for a PowerPlay Transformer model

Administration Guide 193

Chapter 23: Export a Report Save Your Report As ... Delimited ASCII (.csv) To ...

Use an ASCII file as a source file for a PowerPlay Transformer model, when you do Dates are exported as YYYY-MM-DD hh:mm not have to connect to the database to retrieve or as YYYY-MM-DD hh:mm am/pm. The latter the data for the model format is used when <ITime> is set to 0 in the cerlocale.xml file. When you use this format for a Transformer model, Transformer automatically identifies the data items in the file, and assigns them default names. The default names are based on the data item values in the files first record. Note the data item names that you are saving so you can assign the correct names in your model later. XML (.xml) Portable Document Format (.pdf) Hypertext Markup Language (.htm) Data File (.dat) Text (.txt) Use the Impromptu report in XML applications Create a report in printable format View a report using a browser Analyze your data using PowerPlay Transfer the results of an Impromptu report to other applications that cannot import Impromptu reports directly Use the SQL (Structured Query Language) statements that created the Impromptu report Use data in your report as a dBASE database

SQL (.sql) dBASE (.dbf)

Related Topics
"Attach a Report to Email" (p. 196) "Export a Report to Other Applications" (p. 194) "CSV File Format" (p. 196)

Export a Report to Other Applications


Steps
From the File menu, click Save As. Locate the folder where you want to save the file. In the File Name box, type a name for the file. In the Save As Type box, select the file format you want. When you save a report as Excel, you can specify the version of Excel to use (p. 196). When you save as a dBase file, you save the data only. The dBase field names are based on the data items listed in the Data tab (Query dialog box). When you save as a delimited ASCII file, you save the data only. When you save as an SQL file, you save the SQL statements that Impromptu uses to retrieve the data. When you save as a text file, you save the data and the column titles. When you save as an Impromptu Query Definition file, you save the formatting and the commands required to retrieve the data from the database. 5. If you save the report as a dBASE (.dbf), Hypertext Markup Language (.htm), or Delimited ASCII file (.csv), click Options to set options on how to export the file. 194 IBM(R) Cognos(R) Impromptu(R) 1. 2. 3. 4.

Chapter 23: Export a Report 6. Click Save. Impromptu makes a copy of the existing file and stores it in the folder you selected, using the file name you typed and the extension that matches the new format. The original Impromptu version of the report or template remains open on your screen.

More Info Notes


Impromptu Query Definition (.iqd) files contain no security information. If the report contains information some users should not see, you must set up the appropriate security in the target IBM Cognos application. Hypertext Markup Language (.htm) files and Portable Document Format (.pdf) files can be rendered with a Report Navigator which adds navigation links to report output. To add a Report Navigator, use the Navigation tab of the Report Properties dialog box.

Related Topics
"Export a Report" (p. 193) "Render a Report in Excel Format" (p. 196) "CSV File Format" (p. 196) "Add Report Navigation" (p. 195)

Add Report Navigation


You can add a Report Navigator to your report output to set navigation based on one or more grouped columns. The columns serve as bookmarks in PDF report output and table of contents entries in HTML report output. For items to appear in the Report Navigator, the selected columns must be visible in the report. In addition, only grouped and associated columns are available for selection. If you do not have any grouped columns in your report, you cannot add columns to the Report Navigator. A Report Navigator is recommended for multipage reports. However, if your report fits on one page, a Report Navigator is not required.

Steps
1. With a report open, from the Report menu, click Navigation. 2. Select the Include report navigator check box. 3. In the Available columns box, select the check box next to one or more of the grouped or associated columns that you want. 4. For HTML report output, specify the following HTML navigation properties that you want. Goal Action

Include a list of page numbers in the report Select the Include page numbers check box navigator, which link to specific pages in the report body Remove duplicate entries in the report navigator caused by horizontal page breaks Select the Suppress duplicate entries check box

5. Click OK. Tip: If you later want to remove all bookmarks in your report output without changing the settings in the Available Columns box, clear the Include report navigator check box. The Bookmark tab remains in the PDF report output when you view a report in Adobe Reader. This is expected Adobe behavior.

Related Topics
"Create a Report" (p. 201)

Administration Guide 195

Chapter 23: Export a Report

Render a Report in Excel Format


When you export a report to Excel (p. 194), you can choose to render it as Excel 2000 or Excel 2002 and higher. Reports rendered as Excel 2000 have limited rendering. Reports rendered as Excel 2002 and higher have complete rendering of report objects. There are a number of best practises recommended when exporting reports to versions of Excel 2002 and higher. For information about designing reports for Excel, see Mastering Impromptu Reports.

Steps
1. Open a report. 2. From the Report menu, click Excel, and in the Version box, click the Excel version to use. 3. If you want to, you can include the following objects with the Excel 2002 and higher version by clicking the check box next to the object: images static charts text frames summary expressions 4. Click OK.

Related Topics
"Create a Report" (p. 201)

Attach a Report to Email


Description
If you use Microsoft Mail, Exchange, or Outlook, you can send a report as an attachment to an email message to users who have access to the report catalog.

Step
From the File menu, click Send. The report appears as an attachment to a new Microsoft Mail, Exchange, or Outlook message.

More Info Tip


If your users don't have access to the report catalog, save the Report as a snapshot and then send the report.

Related Topics
"Export a Report" (p. 193)

CSV File Format


You can export data as delimited text using many of the IBM Cognos products. In PowerPlay for Windows, you can export data as a delimited ASCII text file (.asc). In PowerPlay Web, IBM Cognos Query, Impromptu, and Impromptu Web Reports, you can export data as a Comma Separated Value file (.csv). Delimited text format is one of the most popular export formats, because the resulting file can be used as an import source by many applications. The updated delimited text format used in Series 7 ensures a high degree of compatibility in multi-language environments. It also ensures reliability when importing into third-party applications such as Microsoft Excel.

196 IBM(R) Cognos(R) Impromptu(R)

Chapter 23: Export a Report Each IBM Cognos product exports data to delimited text format in the same manner, as shown in the following table. List separator The list separator specifies what character separates items in a list. Its default value is derived from the locale settings. The list separator selected is not persisted between sessions or Save As operations. Note: In Impromptu, you can optionally change this character. Export of numeric data The decimal symbol for the locale is used, even if the format or pattern of the number contains an explicit decimal that differs from the locale. The digit grouping symbol (the symbol used to group large numbers such as thousands in the US locale) is not used in the CSV export. The negative sign symbol but not the format of the locale is used. This may also be different than the explicit format used for that number. The negative symbol is always leading. For example, for a German locale of DE_DE, a number that was formatted as "(765 000.45)" is exported to CSV format as "-765000,45". Export of currency data Currency values follow the same rules as numbers. The currency symbol is not exported. For example, if the locale is EN_US, and the format of the number in a PowerPlay report is "$123,456.00", then PowerPlay exports "123456.00". Export of character data Export of date and time data In some products, you can optionally allow quotes to be put around the text. This technique ensures that a text field containing the list separator (such as a comma) is not interpreted as multiple fields in the exported file. Dates are exported in ISO format, YYYY-MM-DD Time is exported as ISO format, hh:mm:ss. The hour value (hh) uses the 24-hour clock. Note: In PowerPlay, the date is defined in the Transformer model and is exported as text.

Related Topics "Export a Report" (p. 193) "Export a Report to Other Applications" (p. 194)

Administration Guide 197

Chapter 23: Export a Report

198 IBM(R) Cognos(R) Impromptu(R)

Chapter 24: Use Annotations


Description
Annotations describe catalog and report items that your company may already store in a relational database or metadata repository. Your Impromptu administrator creates the annotation server, connects it to the annotation database, and distributes the server (called AnnotationServer.exe). After you copy the server to your computer and register it, you can open the annotations that describe the columns, calculations, catalog filters, and catalog prompts you use. If you don't register your annotation server to your computer, your annotation requests will fail. You can open annotations in the Query dialog box, Folders dialog box, and any expression editor.

Steps to Register the Annotation Server


1. Copy the server (called AnnotationServer.exe) to your computer. 2. In Windows Explorer, double-click AnnotationServer.exe. Your annotation server is registered on your computer.

Steps to Request Annotations


1. Open the Impromptu catalog or report that contains annotations. 2. In the Query dialog box, Folders dialog box, or any expression editor, select a data item and press F1. The annotation server starts and shows the annotation information.

Tip
To request annotations, you can also select the What's This? arrow (in the top-right corner of the dialog box) and then click the data item.

Administration Guide 199

Chapter 24: Use Annotations

200 IBM(R) Cognos(R) Impromptu(R)

Chapter 25: Create a Report


What Is a Report?
An Impromptu report is a focused answer to a business problem. It is an organized and formatted view of the data requested from your company database.

What Is In a Report?
A report contains data Reports show data from your database. The Impromptu catalog contains all the information necessary for Impromptu to access and retrieve information from a relational database. Every time you open your report, Impromptu updates it with the most recent data. formatting You can enhance a reports appearance by rearranging and aligning parts of a report, changing the font, applying borders and patterns, setting margins, and so on. When you save a report, you save the information and instructions about what data to get from the database and how to format the report. You do not save the actual data.

How to Create a Report


You can create a report using the Report Wizard a template

Using the Welcome Dialog Box


The Welcome dialog box appears when you first start Impromptu. Click ... Create a Standard Report Create a Report Using a Template Open an Existing Report Take a Quick Tour To ... Use the Report Wizard to help you create a list or crosstab report quickly and easily. Create a new report using one of Impromptu's templates. Open a report that you previously saved. Discover the possibilities available to you with Impromptu.

Using the Report Wizard


The Report Wizard asks what type of report you want to create, a list report or a crosstab report. The wizard then prompts for the title of your report, the data you want to include, and the data items to group (if applicable), and how you want to filter the data. The Report Wizard does the rest for you.

Using Templates
A template is an incomplete report. It can contain formatting, calculations, macros, and placeholders. You add the appropriate data items to the template to create a report. For example, a template may have placeholders for a customer address.

Administration Guide 201

Chapter 25: Create a Report You can use a template as a pattern for creating a report. Alternatively, you can modify an existing template to suit your business needs or create your own template.

Related Topics
"Add Report Navigation" (p. 195) "Create a Crosstab Sub-Report" (p. 208) "Create Accessible Reports" (p. 208) "Open a Catalog" (p. 202) "Upgrade a Catalog or Report" (p. 203) "Use a Report in Another Report" (p. 207) "Use a Template to Quickly Create a Report" (p. 205) "Use the Report Wizard to Quickly Create a List Report" (p. 203) "Use the Report Wizard to Quickly Create a Crosstab Report" (p. 204) "View a Report" (p. 181)

Open a Catalog
Description
To create or run Impromptu reports, other than snapshot reports, you must first open a catalog. You can open a different catalog at any time during your Impromptu session, but you can open only one catalog at a time. When you open a different catalog, Impromptu, by default, automatically connects the catalog to the appropriate database and closes any open reports.

Example
You have a catalog called Sales Results that is attached to the sales database and a catalog called Accounts Receivable that is attached to the accounts database. When you close the Sales Results catalog and open the Accounts Receivable catalog, Impromptu automatically attaches you to the accounts database, not to the sales database.

Steps
Note: If there is no open catalog and you are opening or creating a report using the Report Wizard, or creating a report using a template, you are prompted to open a catalog. Proceed to step 2. 1. From the Catalog menu, click Open. 2. In the Open Catalog dialog box, locate the catalog and click Open. 3. If the IBM Cognos Common Logon dialog appears, type your User ID and click Log On if you are using Access Manager for security. Otherwise, click Cancel. 4. In the Catalog Logon dialog box, select your user class from the User Class box. 5. If a catalog password is required, type it in the Password box. 6. If you have a database user ID and password, type them in the Database User ID and Password boxes and click OK. If you opened the catalog from the Catalog menu, the screen is blank, but a status message indicates the name of the database to which you are connected.

More Info Notes


If you cannot open a catalog, your administrator may have it open for maintenance. The last user class chosen becomes the default user class for the catalog for that user. If you do not know your user class, see the administrator.

202 IBM(R) Cognos(R) Impromptu(R)

Chapter 25: Create a Report

Tip
To close a catalog, click Close from the Catalog menu. To obtain a better view of a long list of catalogs, resize the Open Catalog dialog box.

Related Topics
"Reporting While Disconnected From the Database" (p. 277) "Create a Report" (p. 201)

Upgrade a Catalog or Report


Description
If the catalog or report was created with a previous version of Impromptu, the Catalog Upgrade or Report Upgrade dialog box appears. When you want to use, but not modify the catalog, and also want to continue using previous versions of Impromptu, click Open this Catalog as Read-Only. If you want all previous version catalogs to open as read-only automatically, click Open this Catalog as Read-Only and then clear the Show This Dialog When Opening Previous Version Catalogs check box. When you want to view, but not modify, a report, and also want to continue using previous versions of Impromptu, click Open this Report as Read-Only. If you want all previous version reports to open as read-only automatically, click Open this Report as Read-Only and clear the Show This Dialog When Opening Previous Version Reports check box.

Steps to Upgrade a Catalog


1. To upgrade a catalog, click Upgrade this Catalog. Note: If you want to upgrade all previous version catalogs automatically, click Upgrade this Catalog and clear the Show This Dialog When Opening Previous Version Catalogs check box. 2. Click OK. Previous versions of Impromptu can no longer open this catalog.

Steps to Upgrade a Report


1. To upgrade a report, click Upgrade this Report. Note: If you want to upgrade all previous version reports automatically, click Upgrade this Report and clear the Show This Dialog When Opening Previous Version Reports check box. 2. Click OK. 3. From the File menu, click Save. Previous versions of Impromptu can no longer open this report.

More Info What if ...


You want to show the Catalog Upgrade dialog box or the Report Upgrade dialog box? From the Tools menu, click Options. Click the Show the Catalog Upgrade Dialog Box or the Show the Report Upgrade Dialog Box check box.

Related Topics
"Create a Report" (p. 201) "Open a Catalog" (p. 202)

Use the Report Wizard to Quickly Create a List Report


Description
The Report Wizard is the quickest and easiest way to create a list report. The Report Wizard prompts you for the information you need to create your report.

Administration Guide 203

Chapter 25: Create a Report

Steps
1. If you just started Impromptu and the Welcome dialog box is open, click Create a Standard Report. Otherwise from the File menu click New, select the Simple List template, and click Wizard. 2. If the catalog is not open, open and log on to the catalog you want. 3. Type a title for your report, and click Next. 4. Click the List Report option button and follow the instructions in the Report Wizard. The Report Wizard creates a list report based on the information you provide.

More Info Notes


The Report Wizard supports any template created with Impromptu (except the Blank template). If the catalog or report was created with a previous version of Impromptu, see "Upgrade a Catalog or Report" (p. 203). You can drag and drop only one data item at a time when working with folders in the Wizard.

What if ...
You want to create a new report using a different catalog? From the Catalog menu, click Close, and then create a new report. You are automatically prompted to select a catalog. You want totals inserted automatically in the list report? Click the Automatically Generate Totals check box in the Grouping page (Report Wizard). A Total summary is inserted at the lowest level of detail in the report. You want to quickly save a report to the User Workspace folder? Click the FastFind button in the Save As dialog box, and then save your report.

Related Topics
"Create a Report" (p. 201) "Open a Catalog" (p. 202) "Use the Report Wizard to Quickly Create a Crosstab Report" (p. 204)

Use the Report Wizard to Quickly Create a Crosstab Report


Steps
1. If you just started Impromptu and the Welcome dialog box is open, click Create a Standard Report. Otherwise, click New from the File menu, select the Crosstab template, and click Wizard. 2. If the catalog is not open, open and log on to the catalog you want. 3. Type a title for your report, and click Next. 4. Click Crosstab Report, and follow the instructions in the Report Wizard. The Report Wizard creates a crosstab report using the information you provide.

More Info Notes


You must enter one data item into the Rows area, one data item into the Columns area, and one data item into the Cells area of a crosstab report. When you add a data item to the Cells area, Impromptu automatically summarizes the item. For example, Sale Amount becomes Total Sale Amount, and Product becomes Count Product. If you drag the item from the Cells area back to the Rows or Columns area, it remains summarized. To return to the original data item, select the item and edit its data definition.

204 IBM(R) Cognos(R) Impromptu(R)

Chapter 25: Create a Report When you create a crosstab report using the Report Wizard, only three data items can be entered in the Cells area of the crosstab. BLOB columns do not appear in a crosstab report. You can drag and drop only one data item at a time when working with folders in the Report Wizard.

What if ...
You want to create a new report using a different catalog? From the Catalog menu, click Close, and then create a new report. You are prompted to open a catalog. You want to quickly save a report to the User Workspace folder? Click the FastFind button in the Save As dialog box, and then save your report.

Related Topics
"Create a Crosstab Sub-Report" (p. 208) "Create a Report" (p. 201) "Open a Catalog" (p. 202) "Use the Report Wizard to Quickly Create a List Report" (p. 203)

Use a Template to Quickly Create a Report


Description
Templates can save you time and effort when you create new reports. Templates are particularly useful when you frequently create the same type of reports. The template you use may contain placeholders. Four types of placeholders can appear in a template: optional single-column optional multi-column required single-column required multi-column You can skip or fill in optional placeholders. You must fill in required placeholders. You can fill in a single-column placeholder with one data item from the catalog and you can fill in a multi-column placeholder with at least one data item from the catalog.

Example
You use a template to create mailing labels. The template contains placeholders for Contact Name, Contact Title, Company, Street, City, State, and Zip Code. The Contact Title is an optional placeholder and the Street placeholder is a multi-column placeholder. You fill in the contact's name, but you don't know the title for the contact person so you skip the contact title placeholder. To include both a street address and a suite number, you fill in the placeholder Street with two data items: Street and Suite Number.

Steps
1. If you just started Impromptu and the Welcome dialog box is open, click Create a Report Using a Template. Otherwise, click New from the File menu. 2. Select the template you want to use, and click OK. If the current folder does not contain the template you want to use, select another folder. If you do not have a catalog already open, the Open Catalog dialog box appears, where you can locate and select the catalog to use. 3. In the Catalog box (Data tab), select one or more data items from the folders. Data item icon 4. Click the right arrow button to add the selected data items to the Query Data box.

Administration Guide 205

Chapter 25: Create a Report Add button 5. Repeat steps 3 and 4 until you have added all the data items you want, and click OK.

More Info Notes


All required placeholders appear in bold type and must be filled in. When you use a template to create a crosstab report, you must fill in at least one row placeholder, one column placeholder, and one cell placeholder. Placeholders only accept data items of the same data type.

If a placeholder accepts only one data item, the placeholder is unavailable once you fill it in. You can drag and drop only one data item at a time when working with folders. If the catalog was created with a previous version of Impromptu, see "Upgrade a Catalog or Report" (p. 203). You can only expand placeholders in the Data tab. Selecting the Blank template (in the New dialog box) allows a user to create a report with no template. Impromptu automatically creates the Blank entry in the New dialog box, there is no Blank template file.

Tips
To quickly add a single data item to the Query Data box, double-click the data item in the Catalog box. It is automatically added to the next available placeholder of the same data type. If there are no available placeholders of the same data type, the data item is put at the end of the list. To quickly fill in placeholders, drag a data item from the Catalog box and drop it onto a placeholder in the Query Data or Placeholders box (Report Wizard). The placeholder accepts the data item if it is of the same data type. If the placeholder is of a different data type than the data item, the data item fills the first available placeholder of the same data type. If no placeholders are of the same data type, the data item is put at the end of the list.

What if ...
You want to use the same template with a different catalog? From the Catalog menu, click Close and then create a new report. No data appears in your report after you have selected the data items in the Query dialog box? You are using the Blank template. This template is for creating customized reports. Select a different template. The data item you add to the Query Data box is appended to the end of the placeholder list instead of filling in a placeholder? There was no available placeholder of the same data type as the data item. This data item appears in the report. You want to remove a data item from a placeholder? Select the data item in the placeholder and click Remove. You want to quickly save a report to the User Workspace folder? Click the FastFind button in the Save As dialog box and then save your report.

206 IBM(R) Cognos(R) Impromptu(R)

Chapter 25: Create a Report

Related Topics
"Create a Report" (p. 201) "Apply a Template to an Existing Report" (p. 247)

Import a Query from IBM Cognos Query


Description
You can import a query from IBM Cognos Query using the default template as set in the File Locations tab of the Options dialog box. You can only import queries from IBM Cognos Query version 6.0 and above. When you import a query, a log file called CognosQueryImport.log is created. To set the location of this log file, specify a folder in the IBM Cognos Query Log File Location box in the File Locations tab of the Options dialog box.

Tips
To avoid confusion when importing IBM Cognos Query (.cq) files, select a catalog that was created from the same Architect package that the query was created with. To set the title of the report from the imported .cq file, ensure that the default template has Text Frame named "Title". To control the format of the report resulting from the imported .cq file, change the default template for Impromptu or change the primary frame for the default template. All the calculations and columns from the default template will be added to the primary frame of the default template.

Steps
1. Open Impromptu. 2. From the Tools menu, click Import IBM Cognos Query. The Import IBM Cognos Query dialog box appears. 3. In the IBM Cognos Query Filename box, specify the IBM Cognos Query file (*.cq) to import into Impromptu and click Open. 4. In the Catalog Location box, specify file name of the catalog and click Open. The file name of the catalog must match the name specified in the IBM Cognos Query file. For example, if the query file contains the entry catalog=salesdb, then the catalog file name must be salesdb.cat. 5. Click Import. When the query is successfully imported, a dialog box appears that shows the number and type of information messages generated and that prompts you to open the import log file. 6. View your Impromptu report.

Related Topics
"Drill Through to IBM Cognos Query" (p. 281)

Use a Report in Another Report


Description
Like HotFiles, columns and tables from Impromptu reports can be added as data items to another report. You can use any Impromptu report (except crosstabs) as a data source for another report as long as both reports are from the same catalog. Reusing reports was introduced to support stored procedures as a second report is required to apply formatting to the data returned from the database. However, reusing reports need not be limited to stored procedures. Note: You can only use a stored procedure report in another report if it has been run at least once and it returns a result set.

Administration Guide 207

Chapter 25: Create a Report Reusing reports saves you time when building queries, but may cost processing time because the result set of the reused report is locally cached when you execute the current query.

Steps
1. Open a new report or an existing report. 2. Open the Query dialog box and click the Data tab. 3. In the Data Source box, click HotFile and then browse to directory containing the report to reuse. 4. Click OK. The report to reuse is shown in the Report Directory box. 5. Double-click the report folder to expand it and then select the data items for the current report.

Related Topics
"Create a Report" (p. 201)

Create a Crosstab Sub-Report


Description
Impromptu supports crosstab sub-reports. You can have a main query and several crosstab sub-reports in the same report. You can convert list frame sub-reports to crosstab sub-reports the same way you convert list frames to crosstabs: pivot a column and click the Build Crosstab button in the Query dialog box. You can't drag crosstab sub-report columns into another crosstab. Other drag-and-drop actions are allowed, including dragging columns into the same crosstab sub-report or dragging columns from another frame into the crosstab sub-report. You can only link the crosstab sub-report query to the main query in the crosstab detail and crosstab summary filters.

Steps
1. Open a report that has at least one query. 2. From the Insert menu, click Sub-Report and then click Crosstab Frame to add a new crosstab sub-report.

Related Topics
"Create a Report" (p. 201) "Use the Report Wizard to Quickly Create a Crosstab Report" (p. 204)

Create Accessible Reports


We are committed to assisting people with disabilities, and promote initiatives that make workplaces and technologies accessible. For example, IBM Cognos Series 7 provides a report-reading solution for accessibility. This report-reading solution is currently available in English. In addition to the English report-reading solution, the Upfront Accessible theme can be read in English and French. To create reports accessible to disabled users, you must enable accessibility in Configuration Manager. There are also certain design considerations that you must apply when creating accessible reports. For more information, see the Impromptu Administration Guide.

Note
PDF documents that support software accessibility guidelines contain additional markup information that increases the size of the PDF file produced and, as a result, may impact performance. For more information about performance and accessibility, see the Planning Advanced Installations Guide.

208 IBM(R) Cognos(R) Impromptu(R)

Chapter 25: Create a Report

Related Topics
"Create a Report" (p. 201)

Retrieve Data from the Database


When you open a report or add data to a report, Impromptu automatically goes to the database and retrieves the data you require. You can turn automatic data retrieval off and manually retrieve data to improve performance.

Example
You are working with a large database. You want to re-order the report columns without waiting for Impromptu to retrieve the data each time you move one column. You turn the automatic data retrieval off, and re-order the columns in your report. Once you have finished, you manually retrieve the data from the database.

Steps
1. If automatic data retrieval is on, click Query from the Report menu and click the Access tab. 2. In the Query Options box, clear the Automatically Retrieve Data check box and click OK. 3. From the Report menu, click Retrieve. Impromptu updates the data.

More Info Note


Impromptu cycles through three steps when retrieving data. First, Impromptu prepares the data. Next, Impromptu scans the data for the best fit, and lastly Impromptu generates the report.

Tips
You can also turn off automatic data retrieval by clicking the Auto Retrieve button. When the button is not depressed, Auto Retrieve is turned off. To add the Auto Retrieve button to the toolbar, click Toolbars from the Tools menu. From the Categories box, select Report. Click and drag the Auto Retrieve button onto the toolbar.

What if ...
You want to cancel data retrieval? The status line reflects the processes that Impromptu cycles through when retrieving data. When canceling a query is possible, the status line includes both a button on the left that lets you cancel the query, and a message stating that you can cancel the query by pressing the Esc key.

Related Topics
"Add or Remove Data" (p. 211)

Multiple Instances and Versions of Impromptu


You can open multiple instances of Impromptu, each operating independently of each other. Each instance can open the same catalog (or a different one). To avoid conflicts between instances using the same catalog, make changes to the catalog using the first instance of Impromptu that accesses it. When you open Impromptu, it recalls custom settings, such as toolbars and file locations, from the most recently closed instance. You can also install multiple versions of Impromptu on your computer at the same time. For example, you can install Impromptu 7.4 and an earlier version of Impromptu, or Impromptu 7.4 and a current or earlier OEM version of Impromptu. Use multiple versions of Impromptu to keep your existing version and test a newer version at the same time. The following change has been made to Impromptu to handle multiple versions.

Administration Guide 209

Chapter 25: Create a Report

Configuration Settings
Impromptu stores product configuration information in Cern.ini in the Bin folder where Impromptu is installed. The exception is database connection information which remains in Cognos.ini. In previous versions, information maintained in the Cognos.ini file could be overwritten by newly installed versions.

Related Topics
"Change the Number of Instances of Impromptu" (p. 210)

Change the Number of Instances of Impromptu


Description
By default, you can open multiple instances of Impromptu. With Impromptu set to multiple instance you can have reports from two different catalogs open at once. You can also execute more than one query at a time. However, you may want to set Impromptu to single instance. For example, if you are running previous versions of macros that haven't been updated. Ensure you have closed all instances of Impromptu before changing this setting.

Steps
1. Close all instances of Impromptu. 2. From the Start menu, click Run. The Run dialog box appears. 3. To switch to single instance, in the Open box, type "<path name>\<executable>" /SI. - or To switch back to multiple instance, in the Open box, type "<path name>\<executable>" /MI. Here are two examples: "C:\Program Files\Cognos\Cer3\ImpUser.exe" /SI Switches to single instance for Impromptu User "C:\Program Files\Cognos\Cer3\ImpAdmin.exe" /MI Switches to multiple instance for Impromptu Admin Note: If you didn't install to the default location, type your path in the Open box. 4. Click OK. Now you can open the number of instances of Impromptu you want.

Related Topics
"Multiple Instances and Versions of Impromptu" (p. 209)

210 IBM(R) Cognos(R) Impromptu(R)

Chapter 26: Add or Remove Data


By default, when you add data items to a report, Impromptu adds them to the query and automatically marks them for insertion in the open report. You can add data items to a query without showing them in a report. This enables you to use data items in calculations and filters without them appearing in the report. Each time you make changes to a report, Impromptu automatically retrieves the data you require from the database. To save time when adding or removing data from a report, you can turn automatic data retrieval off. For more information, see "Retrieve Data from the Database" (p. 209).

What You Can Do


Within a report, you can add data items, calculations, and summary operations sort, group, and filter data to create concise and meaningful reports edit the names or definitions of data items, calculations, and summary operations to make them more relevant

Related Topics
"Add Data to an Existing Report" (p. 211) "Remove Data from a Report" (p. 212) "Group, Sort, or Associate Data in a Report" (p. 215)

Add Data to an Existing Report


Description
You can select data to include in a report at any time.

Example
You have a report that provides information on your customers. To include information about how they pay for their purchases, you add a data item called Payment Method.

Steps
1. From the Insert menu, click Data. 2. Click the mouse button at the position where you want to insert data. Impromptu shows the Data tab (Query dialog box). 3. In the Data Source box, do one of the following: To insert data from the catalog, click Catalog. To insert data from a HotFile or another report, click HotFile. 4. Double-click the folders to open or close them. 5. Double-click each data item you want to add. 6. Repeat steps 4 and 5 until you add all the data items you want to add to your query. By default, the new data items are marked for insertion into the report. A data item that is marked for insertion is identified by the following icon in the Query Data box: Marked Data icon 7. Click OK. Impromptu inserts the data items that are marked for insertion into the report.

Administration Guide 211

Chapter 26: Add or Remove Data

More Info Notes


If you insert data into a text frame, Impromptu adds it at the beginning of the text frame in the order the data items appear in the Query Data box. If you insert data into a form frame, Impromptu adds it a the position where you clicked the mouse button. If you insert data into a list frame, Impromptu adds it a the position indicated by the highlighting. If you insert data into chart frame, Impromptu adds it into the list of data items for the chart frame. To add the new data items, click Properties from the Format menu and click the Data tab (Format dialog box). Select a data item in the Query Data box and depending on where you want the data item to appear, click the add arrow next to the Primary Axis, Secondary Axis, or Measure(s) box. The data item appears in the Chart Data box. If the space between two adjacent columns is highlighted, or if a data cell is highlighted, then Impromptu adds the data item as a new column. If a data cell in the group header or footer is highlighted, then Impromptu adds the data item to the header or footer. If you position the pointer over a header or footer, then Impromptu adds the data item to that header or footer. If you insert a large amount of data into a text frame, set the height of the frame to size dynamically so that the text frame spans pages when the text exceeds a single page.

Tip
To quickly add data items to a report, click the Data button and click the report. Data button

Related Topics
"Add or Remove Data" (p. 211)

Remove Data from a Report


Description
You can remove data items from a report or from the report query. When you remove data items from the report, it is still available in the query. You can add the data item from the query back into the report at any time. If you remove a data item from the report query, you have to add it back into the query and retrieve the data again to show the data in the report at a later time.

Example
You remove simple calculations such as totals that become redundant once you create more complex calculations, such as totals by branch and salesperson.

Steps to Remove Data from a Report


1. Select the data item. 2. From the Edit menu, click Delete. Note: You can also use the Cut command (Edit menu) to remove a data item from a report.

Steps to Remove Data from a Report Query


1. From the Report menu, click Query, and click the Data tab. 2. Select the data item you want to remove from the Query Data box. 3. Click the Remove left-arrow button and click OK. Remove button

212 IBM(R) Cognos(R) Impromptu(R)

Chapter 26: Add or Remove Data

More Info What if ...


You change your mind and want to restore the data item to the report? Click the Undo button on the toolbar. Undo button You deleted a column from your report, but it still appears in the Query Data box of the Query dialog box? This column is retrieved from the database every time you open your report, but it is not included in the report. To include this column in your report, see "Add Data to an Existing Report" (p. 211).

Related Topics
"Add or Remove Data" (p. 211)

Administration Guide 213

Chapter 26: Add or Remove Data

214 IBM(R) Cognos(R) Impromptu(R)

Chapter 27: Group, Sort, or Associate Data in a Report


When you group data, Impromptu sorts the data item you are grouping and removes duplicate values. By associating a grouped data item to another data item, you can eliminate duplicate information from your report.

What You Can Do


You can define one or more data items in your report as grouped data items add group headers and footers change the grouping order for the grouped items generate summaries, such as subtotals, at each group level associate a grouped data item with another data item search for a specific data item

Associating Grouped Data Items


You can associate a grouped data item with any other data item that has a one-to-one relationship with that grouped data item.

Examples
You open an ungrouped report.

You group data by Customer Name so that you can easily view your data by customer. The customer names are sorted and the Customer Name appears once for all the entries in that group.

You suppress duplicate Customer Numbers by declaring Customer Number as an associated data item.

Administration Guide 215

Chapter 27: Group, Sort, or Associate Data in a Report

Grouping and Sorting


Impromptu sorts grouped data by default. You must remove grouping before you can remove sorting. You can sort on an associated data item, an ungrouped, or an unassociated data item at any time using the Sort tab (Query dialog box, Report menu).

Examples
You create a report with two data items: Customer Number and Customer Name. You group Customer Name. Impromptu sorts this grouped data by default. You then associate Customer Number to Customer Name, and sort Customer Number in descending order. Impromptu overrides the default sort on Customer Name and instead sorts on Customer Number in descending order. The default sort on Customer Name is lost.

If you group on Customer Name and you have the Order Number data item in the query, you can sort in descending order by Order Number. Impromptu sorts Order Number in descending order for each grouping of Customer Name. Customer Name, by default, is sorted alphabetically.

Note
Each time you make changes to a report, Impromptu automatically retrieves the data you require from the database.

Tip
To save time when you group or sort data in a report, you can turn automatic data retrieval off. For more information, see Retrieve Data from the Database.

Related Topics
"Associate Data to a Grouped Data Item" (p. 219) "Group Data" (p. 217) "Sort Data" (p. 218)

216 IBM(R) Cognos(R) Impromptu(R)

Chapter 27: Group, Sort, or Associate Data in a Report

Group Data
Description
You can organize your report by grouping on one or more data items.

Example

Steps
1. From the Report menu, click Query, and click the Group tab. Note: the Group tab is not available for crosstab reports. Crosstab reports are grouped automatically. 2. In the Group Order box, select the data items that you want to group. 3. Click Group. A black bar across the top of the data icon indicates a grouped data item. Grouped data item Note: The grouping priority of data is set by the order of the grouped data items in the Group Order box. 4. Click OK.

More Info Notes


When you group data, and grouping is done on your computer rather than by the database, text BLOBs disappear from the report. The Group button is unavailable if you ctrl-click more than one sub-report frame. To find out which frames in your report are sub-report frames, from the View menu click Boundary Lines. Impromptu groups crosstab reports automatically. All data items in the rows and columns are grouped, and data items in the cells are associated with the lowest-level data item in the columns.

Tips
To quickly group one or more data items, select the data items in the order that you want them grouped and click the Group button on the toolbar. Group button

Administration Guide 217

Chapter 27: Group, Sort, or Associate Data in a Report To change the group order, drag the grouped data items up or down in the Group Order box (Query dialog box) or click the Group and Associate buttons on the Group tab (Query dialog box, Report menu).

What if ...
You want to ungroup a data item in a report? Double-click the data item in the Group Order box that you want to remove from the group and click OK. You want to quickly remove all groups from a report? Press Esc to ensure nothing is selected in your report, click the Group button on the toolbar, and confirm that you want to delete all group items.

Related Topics
"Group, Sort, or Associate Data in a Report" (p. 215)

Sort Data
Description
By default, Impromptu does not sort data unless you sort or group the data item. You can sort data by characters in ascending order (a to z) or descending order (z to a) numbers in ascending order (0 to 10) or descending order (10 to 0) dates, from the earliest to the latest date (1995 to 1999) or from the latest to the earliest date (1999 to 1995)

Example
To make your report easier to understand, you sort on Customer Name in ascending order to list the customers in alphabetical order from A to Z.

Steps
1. From the Report menu, click Query and click the Sort tab. 2. Select one or more data items. 3. Click Ascending or Descending to specify the sort order. A small Ascending or Descending icon appears beside the data item you want to sort. Ascending icon Descending icon Note: The order of the data items in the Sort Order box determines the sort priority of the data items. 4. Click OK.

More Info Note


The Sort Ascending and Sort Descending buttons are unavailable if you ctrl-click more than one sub-report frame. To find out which frames in your report are sub-report frames, from the View menu click Boundary Lines.

Tips
To quickly sort data in ascending order, select a data item and click the Sort Ascending button on the toolbar. Sort Ascending button To quickly sort data in descending order, select a data item and click the Sort Descending button on the toolbar. Sort Descending button

218 IBM(R) Cognos(R) Impromptu(R)

Chapter 27: Group, Sort, or Associate Data in a Report

What if ...
You dont want to sort certain data items? From the Report menu, click Query, and click the Sort tab. In the Sort Order box, select the data items that you don't want to sort, click Dont Sort and click OK. You want to quickly clear all sorting from data items? Press Esc to ensure nothing is selected in your report, click the Sort Ascending button or the Sort Descending button, and confirm that you want to delete all sorting from items. The Sort Ascending or Sort Descending button is not on your toolbar? To add a button to the toolbar, click Toolbars from the Tools menu. From the Categories box, select Report. Click and drag the toolbar button onto the toolbar.

Related Topics
"Group, Sort, or Associate Data in a Report" (p. 215)

Associate Data to a Grouped Data Item


Description
You can associate one or more data items with a grouped data item. An associated data item should have a one-to-one relationship with the grouped data item. For example, Order No. is a grouped data item. For each order number, there is an Order Date. Order No. and Order Date have a one-to-one relationship. You can associate a data item to a grouped data item to suppress duplicate information if you know that the associated data item repeats in every row of the grouped item.

Example

Steps
1. From the Report menu, click Query and click the Group tab. 2. Select the data item you want to associate to a grouped data item. 3. Click Associate. A black and white bar across the top of the data icon indicates an associated data item. Associated data item 4. Click OK.

Administration Guide 219

Chapter 27: Group, Sort, or Associate Data in a Report

More Info Notes


When you associate a data item, the data processing takes place on your computer. You can only associate a column with the last grouped column in the Group Order box. If you want to create an association with a different column, ungroup the columns, create the association, and then group them again.

Related Topics
"Group, Sort, or Associate Data in a Report" (p. 215)

220 IBM(R) Cognos(R) Impromptu(R)

Chapter 28: Filter or Find Data


Filtering Data
A filter is a set of criteria you apply to a report to change the focus of the report. You can use a filter to emphasize information that is important to you by filtering out what is unnecessary.

Example
You focus your report on the product lines that have the highest sales in Mexico. You design a filter for the report to show the Total Sales in 1995 for Mexico ...

... so that it shows only sales over 100,000.

What You Can Do


Use filters to retrieve data based on a data item in the report or on any data item in the catalog. For example, you can create a customer mailing list that shows just mail order customers. that falls between a range. For example, you can retrieve all the sales data that was collected between January and June of last year. based on summarized information. For example, you can retrieve information about branches with total sales exceeding $3,000. based on a previously calculated data item in the report or in the catalog. For example, you can retrieve information about product sales based on a complex exchange rate calculated in the catalog. based on a prompt that asks you to select the values on which to filter the report when you open or run the report. Each time you filter data in a report, Impromptu automatically retrieves the data you require from the database. To save time when filtering data in a report, you can turn automatic data retrieval off. For more information, see "Retrieve Data from the Database" (p. 209).

Finding Specific Data


You can find the next occurrence of a specified value in your report. For example, you use a filter to find the next occurrence of "Los Angeles" in a customer address list, then the next, and so on. This is useful when you want to locate a specific value without removing data from the report.

Administration Guide 221

Chapter 28: Filter or Find Data

Related Topics
"Filter a Report Using a Filter Stored in the Catalog" (p. 224) "Filter Using Crosstab Titles" (p. 225) "Find Specific Data in a Report" (p. 226) "Quickly Filter Data Using the Filter Button" (p. 222) "Quickly Filter Data Using the Filter Drop-down Button" (p. 223)

Quickly Filter Data Using the Filter Button


Description
You can quickly filter the data in a report by selecting one or more values and clicking the Filter button on the toolbar. When you select values from the same row, such as Environmental Line and Telephone Sales, your report shows only the data that contains both of these values. When you select values from the same column, such as Telephone Sales and Mail Sales, your report shows data that contains either of these values.

Example
You have a report that lists the Product and Price. You select tent in the Product column and $500 in the Price column and click the Filter button. The report shows only tents with a price of $500.

Steps
1. Select one or more values in the report. 2. Click the Filter button. Filter button Impromptu retrieves only the data based on the values you selected.

More Info Notes


You can use the Filter button on the toolbar to eliminate rows based on values from one or more columns in the existing report the Filter drop-down button on the toolbar to define a filter a predefined catalog condition that you access from the Filter tab (Query dialog box, Report menu) the Filter tab (Query dialog box, Report menu) to create complex expressions You can also define a filter using the Report Wizard or the Filter drop-down button. For information about using the filter drop-down button, see "Quickly Filter Data Using the Filter Drop-down Button" (p. 223). The Filter button is unavailable if you Ctrl+click more than one sub-report frame. To find out which frames in your report are sub-report frames, from the View menu click Boundary Lines.

What if ...
You want to remove all filters from a report? Press Esc to ensure that nothing is selected in your report, click the Filter button on the toolbar, and confirm that you want to delete the existing filters.

Related Topics
"Filter or Find Data" (p. 221)

222 IBM(R) Cognos(R) Impromptu(R)

Chapter 28: Filter or Find Data

Quickly Filter Data Using the Filter Drop-down Button


Description
You can quickly filter the data in a report by selecting one or more values in a report and using the Filter drop-down button.

Example
You have a report that lists Customer Name, Order Date and Total Sales. You click the Filter drop-down button and select Between to filter the report so that it shows only the sales that took place within the last six months.

Steps
1. Select one or more values in a column. 2. Click the Filter drop-down button. A drop-down menu appears.

3. Select a filter operator from the drop-down menu. To filter on the selected values, click In. To filter out the selected values, click Not In. To filter the selection on a given range, click Between. To filter out the selection on a given range, click Not Between. To filter the selection based on one or more values, click an operator such as =, <, < , <=, , =. Note: The contents of the Filter drop-down menu vary depending on the selection you made in step 1. 4. Position the cursor over the arrow that appears at the right of the drop-down menu. A fly-out menu appears.

5. From the fly-out menu that lists available options, do one of the following: To filter a report on one or more data items currently highlighted, click Selection. To enter one or more numbers upon which to filter, click Number. To select from a list of values upon which to filter, click Select Values. To enter one or more text strings upon which to filter, click String. To enter one or more dates upon which to filter, click Date. To enter one or more times upon which to filter, click Time.

Administration Guide 223

Chapter 28: Filter or Find Data To enter a date and time variable upon which to filter, click Date-time. To enter one or more intervals upon which to filter, click Interval. Note: The contents of the Filter fly-out menu vary depending on the selection you made in step 1. 6. If you chose Selection, the filter is automatically applied to the report Select Values, the Select Values dialog box appears, where you can choose from all the values for the selected data item any of the other options, the Enter Values dialog box appears, where you can enter or select the required value or values and click OK

More Info Notes


You can also define a filter by using simply the Filter button. For information about using the Filter button, see "Quickly Filter Data Using the Filter Button" (p. 222). The Filter button is unavailable if you ctrl-click more than one sub-report frame. To find out which frames in your report are sub-report frames, from the View menu click Boundary Lines.

Tips
To select two or more data items not found next to each other, select one data item and Ctrl+click to select the other data items. To remove all filters from a report, press Esc to ensure that nothing is selected in the report, click the Filter button on the toolbar, and confirm that you want to delete existing filters.

What if ...
You only see Filter Definition when you click the Filter drop-down button? Nothing in your report is selected, you have selected an entire column, or you have selected values from different columns upon which to filter. You can use Filter Definition to create a custom filter. Your report data disappears when you filter between two values you have entered manually? The first number you entered in the Enter Values dialog box is greater than the second number. Ensure that the first number is less than the second number.

Related Topics
"Filter or Find Data" (p. 221)

Filter a Report Using a Filter Stored in the Catalog


Description
You can filter a report using a predefined filter in the catalog. A predefined filter is a condition created by your administrator or someone else in your company, and stored in the catalog. When you use a predefined filter, Impromptu retrieves the information that meets the criteria expressed by this filter condition. Predefined filters save you time when you filter a report, because they define frequently-used or complex expressions. Filter conditions appear with the other data items in the catalog. You can recognize a filter condition by the filter symbol in front of its name. Filter symbol

Example
You open a report called Order Details that lists Customer Name, Order Number, Order Date, and Closed Date. You want a list of all the sales that were not closed on time so that you can determine the reasons for the delays. From the catalog, select a predefined filter condition called Sales Closed Late.

224 IBM(R) Cognos(R) Impromptu(R)

Chapter 28: Filter or Find Data

Steps
1. From the Report menu, click Query and click the Filter tab. 2. In the Available Components box, double-click Catalog Columns. 3. In the Catalog dialog box, double-click the folders until you locate the required predefined filter condition. A filter symbol in front of the filter name identifies a predefined filter condition. Filter symbol 4. Select the filter condition and click OK. The selected filter condition appears in the Filter Definition box. You can use the filter condition on its own or you can add to it. 5. Click OK.

More Info Notes


You can retrieve unique rows of data by clicking the Eliminate Duplicate Rows check box in the Filter tab (Query dialog box, Report menu) to filter out repetitive information in the database. You can run a report without its filter by clicking the Suspend the Filter check box in the Filter tab (Query dialog box, Report menu) to retrieve data for your report without applying a filter.

What if ...
You want to remove all filters from a report? Press Esc to ensure that nothing is selected in your report, click the Filter button on the toolbar, and confirm that you want to delete the existing filters.

Related Topics
"Filter or Find Data" (p. 221)

Filter Using Crosstab Titles


Description
You can select a crosstab title and create a filter for it using the Filter button. If you selected a crosstab column title when you created a filter, the filter is applied as a detail filter. If you selected a crosstab cell when you created a filter, the filter is applied as a crosstab detail filter or the crosstab summary filter, depending on whether the selected cell shows detail or summary values. The Filter button is available if all of the following conditions are true: All selected titles are titles for columns that contain data from the database, not metadata. In the example below, you can use the Filter button on the Camping Chain title but not on the Product Type title, because the Camping Chain column contains data from the database (from the Customer Type table) while the Product Type column is metadata. All selected titles belong to the same layer in the column titles. In example below, you can use the Filter button on both the Fresh Air Co 1 and 2 titles together, but not on the Camping Chain and Fresh Air Co 1 titles together because they do not belong to the same layer. Only crosstab titles are selected.

Administration Guide 225

Chapter 28: Filter or Find Data

Steps
1. Open a crosstab report. 2. Select the crosstab titles you want. 3. Click the Filter button and create your filter.

Related Topics
"Create a Crosstab Sub-Report" (p. 208) "Filter or Find Data" (p. 221)

Find Specific Data in a Report


Description
You can quickly find a specific value in your report when you need to locate an individual record.

Example
You have a multi-page report that details customer names and mailing addresses. You want to locate each occurrence of "Los Angeles" without removing the rest of the data from the report. You find the first occurrence of "Los Angeles", and then move to the next occurrence using the Find Next command. If you want to search across the entire report, ensure that your report is in Screen Layout view. If your report is in Page Layout view, Impromptu searches only the current page of the report.

Steps
1. Select a value in a list. Note: If you do not see the value you want, select any value to open the Find dialog box. 2. From the Edit menu, click Find. If you are in Page Layout view, the Edit menu command is Find (on this page). 3. In the Find What box, type the value you want to find. 4. Do any of the following: If you want the value in the Find What box to match whole words only, click the Match Whole Word Only check box. If you want to match the case of the value in the Find What box, click the Match Case check box. 5. Click the Up or Down option button to determine the direction of the search. 6. Click Find Next. Each time you repeat step 6 or use the Find Next command (Edit menu), Impromptu scrolls through the report, finding the next occurrence of the specified value.

Note
To search an entire report, ensure that you are in Screen Layout view. In Page Layout view, your search is limited to the current page.

226 IBM(R) Cognos(R) Impromptu(R)

Chapter 28: Filter or Find Data

Related Topics
"Filter or Find Data" (p. 221)

Copy, Cut, and Paste in the Expression Editor


You can cut, copy, and paste expressions from one expression editor and paste them into another. This is a convenient way to generate expressions and is useful when you create filters for reports. You can copy a report filter from one source report and paste it into other reports, with changes if required. For example, you can cut a filter from the Filter Definition box of the Filter tab (Query dialog box) and paste it into the Expression box of the Calculation Definition dialog box. Select an expression and then cut, copy, and paste using the standard Windows shortcuts, or using a right-click menu. You can copy and paste text from other applications into a constant value component such as character strings or dates. However, not all expression components can be copied and pasted into various expression editors. When it is inappropriate to paste, the Paste command is unavailable. Note: If you paste a reference to a column into the data definition of another column, using a database that doesn't contain the first column, the query will fail when you execute it.

Administration Guide 227

Chapter 28: Filter or Find Data

228 IBM(R) Cognos(R) Impromptu(R)

Chapter 29: Work with Summaries


Reports frequently require a summary of the data. With Impromptu, you can add summary data items to your report. For example, you can add a Total Sales Amount or a Running Total for Orders. While it is more efficient to add a summary data item when you create the query, you can also add a summary after you run the report.

What is a Summary?
A summary is a predefined calculation that takes one or more values, performs an operation on these values, and returns a value that summarizes the data. The summary always identifies the type of summary, such as total, and the name of the data item that you want to summarize. For example, Total (Sale Amount), Average (Product Margin). Summaries are also called aggregates.

Types of Summaries
You can create both simple summaries complex summaries

Simple Summaries
You create simple summary expressions using the Summary button. Summary button When you click the Summary button (Query dialog box) or Ctrl+click the Total toolbar button, the Summary dialog box appears. From this dialog box you can create many summaries, including total average count maximum minimum percentage

Example
A summary with the definition Total (Sales) calculates the total sales for each branch if you put it in the Branch footer:

It calculates the total sales for the country if you move it to the Country footer:

Administration Guide 229

Chapter 29: Work with Summaries

Why Use Summaries?


Use summaries to see a roll-up view of the data in your report or to perform exploratory analysis on the data.

Summaries and Association


A simple summary, such as total, average, and count, is a dynamic calculation that is automatically associated with its location. When you move a simple summary, the summary changes to reflects its new location. You can explicitly associate a summary with a group so that the value does not change when you move it from one place to another in a report. This is called fixed association. For example, if Total (Sales) is associated with the Country group, you can move the Total (Sales) to the footer of the City column and the value remains as the total sales for each country. Summaries that have fixed association include running-average running-count running-maximum running-minimum running-total standard deviation Each time you summarize report data, Impromptu automatically retrieves the data you require from the database. To save time when summarizing report data, you can turn automatic data retrieval off. For more information, see "Retrieve Data from the Database" (p. 209).

Related Topics
"Add a Total to a List Report" (p. 232) "Create a Summary" (p. 230) "Move a Summary to Another Location" (p. 233) "Use a Summary Stored in the Catalog" (p. 233)

Create a Summary
Description
You can create a summary that is a dynamic calculation that performs common calculations such as total, average, count, minimum, maximum, and percent of total. This type of summary is "smart" because it has a value that changes with its location.

Example
You want to know the total sales generated by each of your branch offices. You open a report that lists the Branches and the Sales for each branch. The Branch column is grouped. You create a summary that totals the sales for each branch.

Steps
1. From the Report menu, click Query. 230 IBM(R) Cognos(R) Impromptu(R)

Chapter 29: Work with Summaries 2. From the Catalog box (Data tab), select the column that you want to summarize. 3. Click the Summary button. Summary button 4. In the Summary dialog box, do one of the following Click... To Calculate... The total for the selected data items. Total The minimum value of the selected data items. Minimum The maximum value of the selected data items. Maximum The average of the selected data items. Average The count (number) of selected data items. Count The percentage of the total that the data item represents. Percentage Note: The buttons that are available in the Summary dialog box depend on the data type of the selected column. For example, if you select a column with character data, such as Products, the Total, Average, and Percentage buttons are not available. However, the Minimum, Maximum, and Count buttons are available. 5. Click OK. The summary appears in the Query Data box of the Data tab (Query dialog box). 6. Click OK. The summary appears in the report. If a summary is in the body of a list that is grouped, the summary is calculated for the lowest group in the list. If a summary is in a list group header or footer the summary is calculated for that group. If a summary is in a form frame with the scope of the form frame set to a group, the summary is calculated for that group. If none of the above are applicable, the summary is calculated for the entire report. You can move the summary to different areas of your report. See "Move a Summary to Another Location" (p. 233).

More Info Tip


To see the type of frame, click Boundary Lines from the View menu. Refer to the table in the Steps tab if you want to know where the summary appears in the report.

Administration Guide 231

Chapter 29: Work with Summaries

Note
When you create a summary report directly, summarization takes place on the server. When you create a summary report from a detail report, summarization may take place locally on your computer. You can also set the client/server balance (Access tab, Query dialog box) to limit local processing so that the summary is done using a separate database query. This is more efficient than processing summaries on your computer.

What if ...
You don't want totals in a report you created using the Report Wizard? Clear the Automatically Generate Totals check box on the Grouping page of the Report Wizard. You want to remove a summary from the report or the query? You can remove a summary from the report or query in the same way that you remove any other data item. For more information, see "Remove Data from a Report" (p. 212).

Related Topics
"Move a Summary to Another Location" (p. 233) "Work with Summaries" (p. 229) "Use a Summary Stored in the Catalog" (p. 233)

Add a Total to a List Report


Description
Reports frequently require a summary of the data. For example, you can add the Total Sales Amount for each Product in your list report.

Steps
1. Select a column header, a column, or a value in an existing list report. 2. Click the Total button on the toolbar. Total button

More Info Note


If there is no grouping in the report, Impromptu puts the total in the list footer. If there is grouping in your report, Impromptu automatically creates footers (if they do not exist already) for every group in the report and inserts a group total into each footer.

What if...
You want to count the number of selected data items excluding blank cells? Select a column header, a column, or a value in the existing list report and click the Count button on the toolbar. Count button

Related Topics
"Work with Summaries" (p. 229)

232 IBM(R) Cognos(R) Impromptu(R)

Chapter 29: Work with Summaries

Use a Summary Stored in the Catalog


Description
You can use an existing summary that the administrator has stored in the catalog rather than creating your own summary. This saves you time and makes reporting easier. Each time you add the summary to a report, Impromptu calculates the value based on where you add the summary. If you add the same summary in three different locations (such as an overall list footer and two different levels of group footers), Impromptu automatically calculates the appropriate summary for each location. When you select a summary from the available catalog columns for a report, the icon looks like this:

You can tell that this calculation is a summary when you view the icon in the Group tab (Query dialog box, Report menu). The icon looks like this:

To insert a catalog summary into both a list footer and a group footer, add the summary data item twice to the Query data (once for each location in the report that requires the summary).

Example
You add the Average Sale Amount summary to the Query data and insert it into an overall list footer. Impromptu associates the summary with the list report and calculates an overall average. You move the Average Sale Amount summary into the Customer footer. Impromptu associates the summary with the Customer group and calculates the average Sale Amount for each customer.

Steps
1. From the Report menu, click Query and click the Data tab. 2. In the Catalog box, locate the summary calculation you want to use. 3. Double-click the summary calculation to add it to the Query Data box and click OK. The summary calculation is added to your report. The summary you inserted from the catalog is automatically associated with its location.

Related Topics
"Create a Summary" (p. 230) "Work with Summaries" (p. 229)

Move a Summary to Another Location


Description
Some types of summaries, such as total, average, count, maximum, minimum, percentage of total, percentile, and rank value, are affected by their location. When you move one of these summaries to another location, how the summary is calculated and its associated group changes.

Example
You move a data item from the Total (Sales) column to the list footer. The move changes the value from the Total (Sales) for the lowest group in the report to the Total (Sales) for the whole report.

Steps
1. Select the summary that you want to move. 2. Drag and drop the summary to the new location.

Administration Guide 233

Chapter 29: Work with Summaries Note: By default, a summary, such as total, average, count, maximum, minimum, percentage of total, percentile, or rank value, is automatically associated with its location and the value of the summary changes when it is moved to a new location. If the association of the summary is not automatic, the value of the summary does not change.

Related Topics
"Add a Total to a List Report" (p. 232) "Create a Summary" (p. 230) "Work with Summaries" (p. 229)

234 IBM(R) Cognos(R) Impromptu(R)

Chapter 30: Insert Text, Pictures, and Other Report Variables


To heighten the impact and appearance of your report, you can insert text, pictures, or other report variables into the header or footer of your report.

What You Can Do


You can add comments to an Impromptu report to clarify or stress aspects of your report. insert a picture. A picture can appear once or several times in a report and can be static or dynamic. Unlike a static picture, a dynamic picture is associated with a data item or calculation. The database must contain a data item that identifies the dynamic picture file. For example, you insert a dynamic picture of each product into your report. If the database is updated and the picture changes, your report will reflect this change. You can also insert static pictures such as a bitmap of the company logo at the top of every order. For an example of a report that contains both a static picture (the company logo) and a dynamic picture (the product picture), see the sample report Annual Product Sales supplied with Impromptu. use report variables to enhance your report. A report variable is a dynamic item such as the date, time, page number, and page count. Impromptu or your computer continually updates the report variables in your report. For example, you show the system date and time when the report is printed. Also, you include the page number and the total pages in your header or footer for quick reference.

Related Topics
"Format a Report" (p. 247) "Insert a Report Variable" (p. 239) "Insert a Static Picture" (p. 236) "Insert Text" (p. 235)

Insert Text
Description
You can add a comment or a title to your report to make it easier to understand. A comment can explain the source of the report data so that other people can easily understand your report, and a title can clarify the purpose and content of the report.

Steps
1. From the Insert menu, click Text Frame. 2. On the report, position the pointer where you want to locate the upper-left corner of the text. 3. While holding down the mouse button, drag the mouse diagonally to size the area where your text will appear, and release the mouse button. Impromptu shows a flashing I beam. I beam 4. Type or insert the text you want in your report.

Administration Guide 235

Chapter 30: Insert Text, Pictures, and Other Report Variables

More Info Tips


To quickly insert text, click the Text Frame button on the toolbar. Text Frame button To edit existing text, double-click the text until the flashing I-beam appears. Edit the text and click anywhere outside the text area. To have a text frame within a list frame span pages when the text exceeds a single page, set the height property to dynamic.

What if ...
You want to delete the text? Select the text so that the selection handles appear and press the Delete key. The text you insert repeats for every row in a list? The active report is based on a Simple List template, or the insert pointer was placed over the list when you clicked to insert text. When using the Simple List template you can only add text to the page headers or footers of the report, or you can modify existing text in the list by double-clicking the text.

Related Topics
"Insert Text, Pictures, and Other Report Variables" (p. 235)

Insert a Static Picture


Description
You can insert a picture and show any of the following image file formats that are stored in a location your computer can access: Windows bitmap file (.bmp) Joint Photographic Experts Group (JPEG or JPG) Portable Network Graphics (PNG) Device Independent Bitmap (DIB) A picture can appear once or repeatedly in a report. The picture can be static or dynamic. A dynamic picture is associated with a data item or calculation. The database must contain a data item that identifies the picture files.

236 IBM(R) Cognos(R) Impromptu(R)

Chapter 30: Insert Text, Pictures, and Other Report Variables

Example

Steps
1. From the Insert menu, click Picture Frame. 2. Position the pointer where you want to locate the upper-left corner of the picture. Your pointer changes to the following:

3. While holding down the mouse button, drag the mouse diagonally to size the picture, and then release the mouse button. The Source tab (Picture Properties dialog box) appears. 4. Click the Load From File option button. 5. In the Load From File box, locate and select the name of the image file that you want to appear in the picture frame. 6. Select the Make a Copy Within the Report check box. 7. Click OK.

More Info Notes


Use small footprint JPEG (Joint Photographic Experts Group) and PNG (Portable Network Graphics) image files for improved download performance in Web-based applications.

Tips
To paste a picture from another application, use the Copy and Paste commands. To quickly insert a picture, click the Picture Frame button on the toolbar. Administration Guide 237

Chapter 30: Insert Text, Pictures, and Other Report Variables Picture Frame button

What if ...
You want to update the picture? Clear the Make a Copy Within the Report check box (Picture Properties dialog box) You want to remove a picture from your report? Select the picture and press the Delete key. You want to resize a picture? Click the picture and, while holding down the pointer over one of the handles for the selected picture, drag to size the picture, and then release the mouse button. The static picture you insert repeats for every row in a list? The active report is based on a Simple List template, or the pointer was placed over the list when you clicked to insert the picture. When using the Simple List template, static pictures can only be added to the page header or footer, the list header or footer, or the group header or footer.

Related Topics
"Insert Text, Pictures, and Other Report Variables" (p. 235)

Insert Page Numbers


Description
Number pages in your reports to provide a point of reference when you are reviewing your printed report. You can insert page numbers into your report. For example, if you want the current page number to appear in the bottom-right corner of your report, you can insert the <Page Number> report variable into the right corner of the page footer so the page number repeats on every page. format page numbers in your report. For example, if you want the page number to be easier to read, you can make it bold, red, and 15 point size. remove page numbers from your report. For example, if you added a page number, and the final report was one page, you no longer need a page number.

Example
You set the current page number to show in the bottom-right corner of your report. You insert the <Page Number> report variable into the page footer so the page number repeats on every page.

Steps
1. From the Insert menu, click More Objects. 2. Select the Page Number report variable and click Insert. Your pointer changes to the following:

3. On the report, position the pointer where you want the upper-left corner of the page number and drag to size the area where the page number will appear.

More Info Notes


Page numbers should only be inserted in the Page Layout view. If you insert page numbers into a list, the page numbers are inserted as a column.

238 IBM(R) Cognos(R) Impromptu(R)

Chapter 30: Insert Text, Pictures, and Other Report Variables

Tips
To format page numbers, select the page number. From the Format menu, click Font, and select the font type, style, size, effects, and color. To remove the page numbers, select the page number and press the Delete key.

Related Topics
"Insert Text, Pictures, and Other Report Variables" (p. 235)

Insert a Report Variable


Description
You can insert report variables in your report to ensure that your report contains accurate dynamic information such as the date, time, page number, and page count. Report variables are continually updated in the report by your computer or by Impromptu.

Example
You are going to print a multi-page report.To ensure that all the pages are printed, and that the page sequence is clear, you include the page number and the total pages in the report footer.

Steps
1. From the Insert menu, click More Objects. 2. From the Available Objects box, select the report variable you want to insert in the report. 3. Click Insert. The pointer changes to a shape that corresponds to the report variable you are inserting. 4. On the report, position the pointer at the point where you want to locate the upper-left corner of the report variable, and drag to size the report variable. Note: When you insert a running page total, the Running Page Totals dialog box appears. Select the column you want to use in the running page total, and click OK.

More Info Notes


You can cut and paste, copy and paste, and drag and drop report variables within a single report or between different reports. If you paste a running page total variable into a text frame, the name of the running page total variable shown in the status line changes to the name of the text frame. For example, when you select the running page total variable inserted for Sales 2003, the status line shows "Running Page Total [Sales 2003]." If you paste the running page total variable into a text frame and select the variable, the status line shows the name of the text frame, not the name of the running page total variable. If you have not saved your report with a report name, then Impromptu uses the default report name (REPORT1). When you save the report and provide a name, Impromptu updates the report name. A running page total variable cannot be used in an expression or calculation. The system date variable is updated automatically each time you open or print a report. The <Date> format is based on your settings in the Data Format tab (Options dialog box, Tools menu). The system time variable updates automatically each time you open or print a report. The <Time> format is based on your settings in the Data Format tab (Options dialog box, Tools menu).

Tip
To format a report variable, right-click the variable, and click Format. In the Format dialog box, click the Font tab, select the font type, style, size, effects, and color that you want and click OK.

Administration Guide 239

Chapter 30: Insert Text, Pictures, and Other Report Variables

What if ...
You want to remove a report variable? Select it and use the Delete command (Edit menu). You remove a column with a running page total variable? The running page total variable is removed as well. You cannot see the running-total in a report? From the View menu, click Page Layout.

Related Topics
"Insert Text, Pictures, and Other Report Variables" (p. 235)

240 IBM(R) Cognos(R) Impromptu(R)

Chapter 31: Hide, Show, Group or Resize Parts of a Report


Hiding, Showing, or Unhiding Part of a Report
You can hide, show or unhide parts of a report at different times. Hiding parts of a report does not remove them from the report. The hidden parts of a report no longer show, however, you can continue to use them. For example, you can use the values for hidden data items in filters and calculations, and the data items still appear in the Data tab (Query dialog box). In a list report, you can hide, unhide or show headers and footers. This is useful when you want to concentrate on the report details and not view headings and summary information in headers and footers. individual columns. You can control the information that appears in the finished report. For example, you want the item Salary as the detail lines in an employee report, but you do not want the salaries shown when you distribute printed copies of the report to others so you hide the Salary data item.

Grouping Parts of a Report


You can group parts of a report so that they are treated as a single entity. This makes it much easier for you to show, hide, resize, or format the entire group at once without having to deal with the individual parts of a report one at a time. You can ungroup a grouped section at any time.

Resizing Part of a Report


You can resize part of a report to improve its overall appearance. There are several resize options you can use to format your report. You can use the mouse to resize areas of your reports or you can use the following resize options. Snap to Parent. You can snap a part of a report to match the size of its parent frame. For example, if you want to create a list that takes up the entire width and height of a page, use Snap to Parent. Dynamic Height. You can vary the height of part of a report based on the data using the Dynamic Height option. This option can only be used with text. Specify Width and Specify Height. You can set the exact width and height of a selected report part to meet your specific requirements. For example, you can specify a 3.5 in. x 5 in. (8.75 cm x 12.5 cm) area in the top left area for the customer address. Scan Data for Best Width and Scan Data for Best Height. You can size part of a report to fit the data using the Scan Data for Best Width or Height options.

Related Topics
"Group Parts of a Report" (p. 243) "Hide Part of a Report" (p. 242) "Resize Part of a Report" (p. 244) "Show Part of a Report" (p. 242) "Stack Parts of a Report" (p. 244) "Unhide Part of a Report" (p. 242)

Administration Guide 241

Chapter 31: Hide, Show, Group or Resize Parts of a Report

Hide Part of a Report


Description
Hiding parts of a report enables you to optimize the presentation of the report to maximize data analysis.

Example
You have many columns, in a list report but you want to compare the first and last columns. You hide all the columns in between and see the first and last columns side-by-side.

Steps
1. Select the row, column, picture, or report variable that you want to hide. 2. From the Format menu, click Hide.

More Info Note


Hiding any row in the detail lines of a list report hides all the detail rows.

Related Topics
"Hide, Show, Group or Resize Parts of a Report" (p. 241) "Show Part of a Report" (p. 242) "Unhide Part of a Report" (p. 242)

Show Part of a Report


Description
Showing hidden parts of a report makes them temporarily visible, but if you unhide parts of a report, they are shown permanently.

Example
In a list report you have several hidden columns. You show the hidden columns so that you can compare the values in the hidden columns.

Step
From the View menu, click Show Hidden. Any hidden parts of the report are now visible.

Related Topics
"Hide Part of a Report" (p. 242) "Hide, Show, Group or Resize Parts of a Report" (p. 241) "Unhide Part of a Report" (p. 242)

Unhide Part of a Report


Description
Unhiding parts of a report makes them permanently visible.

Example
In a list report you have three hidden columns, but you want to compare the first column with one of the hidden columns. You unhide the hidden column.

242 IBM(R) Cognos(R) Impromptu(R)

Chapter 31: Hide, Show, Group or Resize Parts of a Report

Steps
1. From the View menu, click Show Hidden to show all hidden parts of a report. 2. Select the hidden row, column, picture, or report variable. 3. From the Format menu, click Show. The part of the report you selected is no longer hidden.

More Info What if ...


You want to see parts of the report that are hidden? If you do not want to permanently change them from being hidden, click the Show Hidden command (View menu).

Related Topics
"Hide Part of a Report" (p. 242) "Hide, Show, Group or Resize Parts of a Report" (p. 241) "Show Part of a Report" (p. 242)

Group Parts of a Report


Description
When you group parts of a report, aligning and formatting is applied to the entire group, not just the individual parts of a report. You can align a grouped section of a report. For example, if you left-align a grouped section of a report, the entire group moves to the left of the report. The left-alignment is maintained even if you change the report page layout from landscape to portrait or vice versa. If you select parts of a report and align them without grouping them first, they align with each other, for example, Ctrl+click two text frames and then click Align Left. Apply a pattern or border to a group to emphasize important information in the report. You can maintain spacing between parts of a report by grouping them and moving the group as a single unit. You can remove one or more objects from a group or ungroup the entire group at any time. Note: Grouping parts of a report is not the same as grouping data.

Steps
1. Select the parts of the report you want to group. 2. From the Format menu, click Group Objects.

More Info Note


You cannot group two grouped sections together. However, you can add to a group by dropping a new object into the group form frame and you can remove from a group by dragging an object out of the group form frame.

Tip
To quickly select several parts of a report, such as a picture and a comment, Ctrl+click each part of the report.

What if ...
You want to ungroup one object in a group? Select that object and drag it outside the group form frame. You want to ungroup all objects in a group? Select the group form frame and, from the Format menu, click Ungroup. Administration Guide 243

Chapter 31: Hide, Show, Group or Resize Parts of a Report

Related Topics
"Hide, Show, Group or Resize Parts of a Report" (p. 241)

Resize Part of a Report


Description
You can resize parts of a report using the mouse. snap a part of the report to match the size of its parent frame. vary the height of part of a report based on the data using the Dynamic height option. This option can only be used with text. set the exact width and height of a selected report part to meet your specific requirements. size part of a report to fit the data by using the Scan Data for Best Width and Scan Data for Best Height options. align the width of the header and footer in a list report to the width of the report columns.

Steps
1. Select the part of a report you want to resize. 2. From the Format menu, click Size. 3. In the box indicating height or width, do one of the following: To match the size of the parent frame, click Snap to Parent. To vary the height of text frames depending on their content, click Dynamic Height. To set the exact height and width of part of a report, click Specify Height and Specify Width, and type the height and width you want. To size part of a report to fit the data, click Scan Data for Best Height. To align the header and footer to the width of the report column, click Snap to Columns. Note: The sizing options available depend on the type of object you select. 4. Click OK.

More Info Note


When you select a part of your report to resize, you will see a border with handles that you can drag to resize.

Related Topics
"Hide, Show, Group or Resize Parts of a Report" (p. 241)

Stack Parts of a Report


Description
Parts of a report can be stacked on top of the other.

Example
You use your company logo as the background for an existing report. You insert the bitmap and size it to fill the page and then place it behind the existing report.

Steps
1. Click the part of the report you want to stack. 2. From the Format menu, click Stacking, and click one of the following. Click Bring Forward to move on layer forward in the stack. Click Send Back to move one layer back in the stack.

244 IBM(R) Cognos(R) Impromptu(R)

Chapter 31: Hide, Show, Group or Resize Parts of a Report Click Bring to Front to move directly to the front of the stack. Click Send to Back to move directly to the back of the stack.

Related Topics
"Hide, Show, Group or Resize Parts of a Report" (p. 241)

Administration Guide 245

Chapter 31: Hide, Show, Group or Resize Parts of a Report

246 IBM(R) Cognos(R) Impromptu(R)

Chapter 32: Format a Report


There are many things you can do to enhance the format of your reports. You can assign data formats to numbers, characters, dates, times, date-times, and intervals. A data format applies pre-determined characteristics to the selected data items, that affect how they appear in your report customize data formats by editing the standard formats or by creating your own with the available format symbols. use conditional formats. change the font type, style, color, and size add colors, patterns, and borders to parts of a report resize part of a report apply a style to selected parts of a report stack text or graphics on top of each other to create special effects use the grid to position parts of a report Each time you make changes to a report, Impromptu automatically retrieves the data you require from the database. To save time when formatting a report, you can turn automatic data retrieval off. For more information, see "Retrieve Data from the Database" (p. 209).

Related Topics
"Add a Page Header or Footer" (p. 248) "Adjust Margins" (p. 249) "Align Parts of a Report" (p. 249) "Apply a Template to an Existing Report" (p. 247) "Format Data" (p. 253) "Insert Text, Pictures, and Other Report Variables" (p. 235) "Position Part of a Report Using Snap to Grid" (p. 250)

Apply a Template to an Existing Report


Description
A template contains placeholders and stores formatting information such as margin settings, page orientation, and font choices. If the template you are applying contains placeholders, Impromptu tries to match each placeholder to a data item in your report. If a match is found, Impromptu applies the data definition from the placeholder to the data item. When you apply a different template to a report, Impromptu automatically transfers all the formatting from the selected template to the report.

Example
There is a placeholder in the template with a currency format, and a data item in your report that is a number. They are both in the same position in the query (they are both the third item listed in the Query Data box in the Data tab of the Query dialog box). Impromptu applies the formatting from the placeholder to the data item. The data item in your report that is a number now appears in a currency format.

Administration Guide 247

Chapter 32: Format a Report

Steps
1. From the Report menu, click Apply Template. 2. Locate the template you want and click OK.

More Info Note


Impromptu does not apply any grouping, sorting, or filtering from the template to your report except when you apply the Grouped List template or the Grouped Crosstab template.

What if ...
You apply a template to a report that contains sub-reports? The template is only applied to the main report.

Related Topics
"Format a Report" (p. 247) "Use a Template to Quickly Create a Report" (p. 205)

Add a Page Header or Footer


Description
A page header appears at the top of every page, and a page footer appears at the bottom of every page. The page header and the page footer areas are separate parts of a report. A page header or footer can contain text pictures report variables calculations that contain summary values for the detail lines in the list

Example
You add a page header to show a company logo and a page footer to provide page numbers on every page.

Steps
1. From the File menu, click Page Setup and click the Page Setup tab. 2. Do one of the following: To insert a page header at the top of every page of the report, click Page Header. To insert a page footer at the bottom of every page of the report, click Page Footer.

3. Click OK.

More Info Note


Although you can insert page headers and footers in Screen Layout view, you can only see them in Page Layout view. When you print a report from Screen Layout view, the page headers and footers will print.

248 IBM(R) Cognos(R) Impromptu(R)

Chapter 32: Format a Report

Tips
To add data to a page header or footer, drag and drop data from the report into the header or footer. To remove a page header or footer, clear the check mark beside the Page Header or Page Footer item in the Page Setup tab (Report Properties dialog box).

Related Topics
"Format a Report" (p. 247) "Insert a Report Variable" (p. 239)

Adjust Margins
Description
Margins are the outer perimeters of your report. You can control how much space is on the top, bottom, left, and right of the report.

Example
You want to include white space on the report for writing notes. You set the left and right margins to 2 in. or 5 cm to provide space on either side of your report data.

Steps
1. From the File menu, click Page Setup. 2. Type values into the Margins boxes. 3. Click OK.

More Info Tip


To see the page margins, click Page Layout from the View menu.

Related Topics
"Format a Report" (p. 247)

Align Parts of a Report


Steps
1. Select the parts of the report that you want to align. 2. From the Format menu, click Align. 3. In the box indicating vertical alignment, do one of the following. Click Align Top Edge to align the selected report parts to the top edge and specify whether to align them to the top edge of the selection box or the top edge of the report. Click Align Center to align the selected report parts to the center and specify whether to align them to the center of the selection box or the center of the report. Click Align Bottom Edge to align the selected report parts to the bottom and specify whether to align them to the bottom edge of the selection box or the bottom edge of the report. Click Evenly Space to space the selected report parts evenly and specify whether to align them to the selection box or to the report. This option is only available when you select more than one part of a report. 4. Click the down arrow next to the box indicating horizontal alignment and do one of the following. Click Align Left Side to align the selected report parts to the left and specify whether to align them to the left edge of the selection box or the left edge of the report.

Administration Guide 249

Chapter 32: Format a Report Click Align Center to align the selected report parts to the center and specify whether to align them to the center of the selection box or the center of the report. Click Align Right Side to align the selected report parts to the right and specify whether to align them to the right edge of the selection box or the right edge of the report. Click Evenly Space to space the selected report parts evenly and specify whether to align them to the selection box or to the report. This option is only available when you select more than one part of a report. 5. Click OK.

More Info Note


You cannot align parts of a report in different group footers. For example, you cannot align a part of the report in a Product Type group footer with a part of the report in the Product Line group footer. You can, however, align parts of a report in a list header or footer to details in the report.

Tip
To quickly align selected report parts, click one of these buttons on the toolbar Align Left Align Right Align Center (Vertical) Align Center (Horizontal) Align Top Align Bottom

What if ...
You do not want to align parts of a report? Click No Alignment in the box for the vertical or horizontal alignment. None appears in the box indicating that no vertical or horizontal alignment is applied. The None option automatically appears when the selected report parts have conflicting alignment options. For example, if you select text in a list report and a rectangle, the None option appears.

Related Topics
"Format a Report" (p. 247)

Position Part of a Report Using Snap to Grid


Description
You can position parts of a report using a hidden grid. When Snap to Grid is enabled, you can move report parts in half-character jumps. This enables you to align report parts with precision. By default, Snap to Grid is enabled.

Steps
1. From the Tools menu, click Snap to Grid. Note: A check mark beside to the Snap to Grid command indicates that the option is selected. 2. Move a part of the report.

More Info Tip


To position a selected report part and maintain the current horizontal and vertical position, hold down the Shift key while positioning the selected report part. Impromptu moves the selected report part vertically or horizontally in a straight line.

250 IBM(R) Cognos(R) Impromptu(R)

Chapter 32: Format a Report

What if ...
You want to change the spacing between the grid? You can change the grid spacing by specifying the number of inches or centimeters between grid intervals. From the Tools menu, click Options, and click the General tab. Ensure that the Snap to Grid check box is selected. In the Grid Interval box, type the value for the spacing.

Related Topics
"Format a Report" (p. 247)

Administration Guide 251

Chapter 32: Format a Report

252 IBM(R) Cognos(R) Impromptu(R)

Chapter 33: Format Data


Description
The database from which Impromptu retrieves data for your reports contains several types of datanumeric, character, date, time, date-time, and interval. This data can be formatted using standard formats or custom formats you create. A data format applies pre-determined characteristics to the selected data items that affect how they appear. You can create new data formats by editing the standard formats or by creating your own formats using the available format symbols. A format symbol represents a value supplied by your database. For example, "MMM" is a format symbol that represents the month in a three-character form, such as "Jan". A variety of format settings are established when you install Windows or when you change the country selection. For example, the currency format can default to $ or depending on your default settings.

Steps
1. Select the columns or values that you want to change. When you format a value, the format is applied to all the values in that column. 2. From the Format menu, click Data. 3. Select a pre-set data format or create a custom data format using the available format symbols. To format Number data, see "Numeric Format Symbols" (p. 254). Character data, see "Character Format Symbol" (p. 255). Date data, see "Date Format Symbols" (p. 255). Time data, see "Time Format Symbols" (p. 256). Date-time data, see "Date-Time Format Symbols" (p. 257). Interval data in days or dates, see "Interval Format Symbols" (p. 258). You can specify different formats for positive and negative numeric values, zero values, and missing values. 4. Click OK. If you specify an invalid format, Impromptu shows #FORMAT# for the selected data items.

More Info Notes


If you use characters in your format other than those documented as format symbols, they must be surrounded by quotation marks or preceded with the backward slash symbol (\).

Tips
To quickly apply the currency format to numeric data, select a value or column, and then click the Currency button on the toolbar. Impromptu automatically applies the format to all values in the column in accordance with the default settings in the Data Format tab (Options dialog box, Tools menu). Currency button To quickly format columns or values, right-click the columns or values, and then click Format.

Related Topics
"Justify Data" (p. 258) Administration Guide 253

Chapter 33: Format Data "Enhance Data Display" (p. 259) "Using the Currency Symbol List" (p. 259)

Numeric Format Symbols


Format Symbols General Number Currency 0 Description Shows the numeric value in the General format. Shows the numeric value in the format set by the locale settings. For information about using the Number format, see (p. 262). Shows the numeric value with the currency symbol. For information about using the Currency format, see (p. 262). Shows the numeric value in the number of digits indicated in the format and, if necessary, adds zeros to the number to comply with the format. It rounds the number off if the data item has more significant digits to the right side of the decimal than the format specifies. For example, #.00 shows 8.9 as 8.90 and shows 8.912 as 8.91. Shows the numeric value in the number of digits indicated in the format but constrains the number of digits shown on the right of the decimal to the number of #s in the format. For example, ##.### shows 12.345678 as 12.345 and shows 123.45 as 123.45. Shows the numeric value in the number of digits indicated in the format but, if necessary, adds spaces on both sides of the decimal point so that decimal points align. For example, ?#.0? shows 1.23 (with a space before the 1) and 12.3 (with a space after the 3). Inserts a period. Inserts a comma. Inserts the currency symbol from your locale settings. For example, ## ###.##$ with "" selected as the currency symbol shows as 12345.67 as 12 345.67. Shows the number as a percentage with a percent sign. Shows the number in scientific notation. A negative sign before the exponent indicates a number less than one. The number of digits in the exponent is not constrained by the number of #s. For example, 12,500,000,000 shows 1.25E10. Skips the width of the next format character. Use this symbol to align positive numbers properly in numeric formats where negative values are indicated by parentheses. For example, the data format 0.00_) for positive numbers and (0.00) for negative numbers aligns both numbers on the decimal point as follows. (21753.00) 717.00 "" ' (apostrophe) Shows whatever is between the quotation marks. Shows the symbol as entered. When you return to the Format dialog box, you will see a backward slash to indicate that the apostrophe has significance as a format.

. (period) , (comma) $

% E-# E+# e-# e+# _ (underscore)

254 IBM(R) Cognos(R) Impromptu(R)

Chapter 33: Format Data

Format Symbols \

Description Shows the next character in the format. Use this symbol to treat a format symbol as a standard character. Enter two backward slashes to show a backward slash.

Character Format Symbol


Format symbol General - (hyphen) / : space ' Description Shows the character value in the General format. Shows the symbol as entered.

Shows the symbol as entered. When you return to the data formatting dialog box, you will see a backward slash to indicate that the apostrophe has significance as a format. Shows remaining characters in the string. Shows the next character in the format. Use this symbol to treat a format symbol as a standard character. Enter two backward slashes to show a backward slash. Skips the width of the next format character. Use this symbol to align positive numbers properly in numeric formats where negative values are indicated by parentheses. Shows a single character, uppercase. Shows a single character, lowercase. Shows one character, as is. Shows the rest of the string, as is. Skips this character. Shows whatever is between the quotation marks.

* \

_ (underscore)

A a @ @* | ""

Date Format Symbols


Format symbol General D DD DDD DDDD M MM Description Shows the date value in the format set by the locale settings. Shows the day of the week as one or two digits
(1-31).

Shows the day of the week as two digits (01-31). Shows the day of the week as a three-letter abbreviation (Mon). Shows the full name of the day of the week (Monday). Shows the month as one or two digits (1-12). Shows the month as two digits (01-12).

Administration Guide 255

Chapter 33: Format Data

Format symbol MMM MMMM YY YYYY - (hyphen) / : space '

Description Shows the month as a three-letter abbreviation (Jan). Shows the full name of the month (January). Shows the last two digits of the year (00-99). Shows all four digits of the year (1900-2100). Shows the symbol as entered.

Shows the symbol as entered. When you return to the Format dialog box, you will see a backward slash to indicate that the apostrophe has significance as a format. Shows the next character in the format. Use this symbol to treat a format symbol as a standard character. Enter two backward slashes to show a backward slash. Shows whatever is between the quotation marks.

""

Time Format Symbols


Format symbol General H Description Shows the time value in the General format. Shows the hour as one or two digits in 24-hour format (0-23). If the format includes the format symbols AM/PM, am/pm, A/P, or a/p, then H shows the hour as one or two digits in 12-hour format (1-12). HH Shows the hour as two digits in 24-hour format (00-23). If the format includes the format symbols AM/PM, am/pm, A/P, or a/p, then HH shows the hour as two digits in 12-hour format (01-12). M MM S SS SSS AM/PM am/pm A/P a/p - (hyphen) / : space Shows the minutes as one or two digits (1-59). Shows the minutes as two digits (01-59). Shows the seconds as one or two digits (1-59). Shows the seconds as two digits (01-59). Shows the milliseconds (000-999). Shows the time in 12-hour format, followed by AM (midnight to 11:59:59 AM) or PM (noon to 11:59:59 PM).

Shows the symbol as entered.

256 IBM(R) Cognos(R) Impromptu(R)

Chapter 33: Format Data Format symbol ' Description Shows the symbol as entered. When you return to the Format dialog box, you will see a backward slash to indicate that the apostrophe has significance as a format. Shows the next character in the format. Use this symbol to treat a character that has significance as a format literally. Enter two backward slashes to show a backward slash. Shows whatever is between the quotation marks.

""

Date-Time Format Symbols


Format symbol General D DD DDD DDDD M MM MMM MMMM YY YYYY H Description Shows the date-time value in the format set by the locale settings. Shows the day of the week as one or two digits (1-31). Shows the day of the week as two digits (01-31). Shows the day of the week as a three-letter abbreviation (Mon). Shows the full name of the day of the week (Monday). Shows the month as one or two digits (1-12). Shows the month as two digits (01-12). Shows the month as a three-letter abbreviation (Jan). Shows the full name of the month (January). Shows the last two digits of the year (00-99). Shows all four digits of the year (1900-2100). Shows the hour as one or two digits in 24-hour format (0-23). If the format includes the format symbols AM/PM, am/pm, A/P, or a/p, then H shows the hour as one or two digits in 12-hour format (1-12). HH Shows the hour as two digits in 24-hour format (00-23). If the format includes the format symbols AM/PM, am/pm, A/P, or a/p, then HH shows the hour as two digits in 12-hour format (01-12). M MM S SS SSS AM/PM am/pm A/P a/p Shows the minutes as one or two digits (1-59). Shows the minutes as two digits (01-59). Shows the seconds as one or two digits (1-59). Shows the seconds as two digits (01-59). Shows the milliseconds (000-999). Shows the time in 12-hour format, followed by AM (12:00AM to 11:59:59 AM), or PM (12:00 PM to 11:59:59 PM).

Administration Guide 257

Chapter 33: Format Data

Format symbol - (hyphen) / : space '

Description Shows the symbol as entered.

Shows the symbol as entered. When you return to the Format dialog box, you will see a backward slash to indicate that the apostrophe has significance as a format. Shows the next character in the format. Use this symbol to treat a format symbol as a standard character. Enter two backward slashes to show a backward slash. Shows whatever is between the quotation marks.

""

Interval Format Symbols


Format symbol D H HH M MM S SS SSS : . space "" Description Shows the number of days. Shows the hour as one or two digits in 24-hour format (0-23). Shows the hour as two digits in 24-hour format (00-23). Shows the minutes as one or two digits (1-59). Shows the minutes as two digits (01-59). Shows the seconds as one or two digits (1-59). Shows the seconds as two digits (01-59). Shows the milliseconds (000-999). Shows the symbol as entered. Shows the symbol as entered. Shows the symbol as entered. Shows whatever is between the quotation marks.

Justify Data
Description
You can enhance the appearance of your report by centering or aligning data items. By default, data items in numeric columns are right-aligned while all other data items are left-aligned. You can also specify that text wraps.

Steps
1. Select one or more data items in your report. 2. From the Format menu, click Properties and click the Layout tab. 3. Justify the data items to the left, center, or right by selecting the appropriate button in the Justification box. 4. To set how text wraps, do one of the following:

258 IBM(R) Cognos(R) Impromptu(R)

Chapter 33: Format Data To show text on a single line, click the Single Line option button. Text exceeding the width of the frame is not visible. To show text on multiple lines, click the Multi-Line option button. Text exceeding the width of the frame is not visible. To show text on multiple lines and wrap text inside the frame, click the Multi-Line with Word Wrap option button. Text wraps if it exceeds the width of the frame. 5. Click OK.

More Info Note


All values in a selected column are justified. For example, if you select a single value in a column and specify right justification, all the values in the column are right justified.

Related Topics
"Format Data" (p. 253) "Enhance Data Display" (p. 259)

Enhance Data Display


Description
You can enhance the appearance of your report by changing the font, font size, style and color of data in your report.

Steps
1. Select one or more data items in your report. 2. From the Format menu, click Font. The Format dialog box appears. 3. In the Font box, click a font. 4. In the Font Style box, click a font style. 5. In the Size box, click a font size. 6. To set text color, click Customize. 7. In the Color dialog box, click a color from the basic colors or define a custom color, then click OK. 8. In the Format dialog box, click OK.

More Info Tip


To quickly add color to data in a report, click the Color tool and set the color using the Color dialog box. Color Tool

Related Topics
"Format Data" (p. 253) "Justify Data" (p. 258)

Using the Currency Symbol List


You are provided a list of currency symbols in the Currency Symbol list to format numeric data. Currency formatting can be set independently of number formatting on a column-by-column basis. You can select an explicit currency symbol that persists with the data, or select the Default option. Default uses the currency setting defined by your locale.

Administration Guide 259

Chapter 33: Format Data You can change what currencies are listed in the Currency Symbol list. For more information see "Maintain Currency Symbols" (p. 260).

Steps to Use a Currency Symbol that Persists with the Data


1. With a report open, click a column with numeric values. 2. From the Format menu, click Data. 3. In the Positive box, click Currency. The Currency Symbol list is enabled. 4. In the Currency Symbol list, select a currency symbol, such as the euro. The data in the report shows the number values in the default number format with the currency symbol. This symbol persists with the data values when the report is distributed.

Steps to Use a Currency Symbol that Defaults to the Users Locale


1. With a report open, click a column with numeric values. 2. From the Format menu, click Data. 3. In the Positive box, click Currency. The Currency Symbol list is enabled. 4. In the Currency Symbol list, select Default. Default uses the currency setting defined by your locale. For more information about modifying locale settings, see the Configuration Manager User Guide.

Related Topics
"Format Data" (p. 253)

Maintain Currency Symbols


Description
You are provided a list of currency symbols that you can apply to numeric data. You can edit the Currency Symbol list by adding, deleting, and re-ordering currency symbols. To make changes to the Currency Symbol list, you must edit the XML file i18n_res.xml. The file is located in the directory installation_location\bin. The currency symbols that appear in the Currency Symbol list exist as elements in the i18n_res.xml file. Each currency element begins with the opening tag <currency> and ends with the closing tag </currency>. Nested within the currency element is a name element. The name element creates text that displays to the right of the currency symbol. It has the opening tag <name> and the closing tab </name>. Both the currency and name elements have attributes. To add, delete, or re-order symbols in the Currency Symbol list, you must edit these elements and attributes. Here is a sample of a currency element.
<currency code="CAD" symbol="$" ID="CAD"> <name lang="en">Canadian Dollar</name> </currency>

The list of currencies that shows in Impromptu is created as follows:


<currency_symbol> - <currency_description>

For example, $ - US Dollar The currency element attributes are: Attribute Code Description Standard ISO three letter currency code. It is recommended that you do not edit this value.

260 IBM(R) Cognos(R) Impromptu(R)

Chapter 33: Format Data

Attribute Symbol

Description Symbol displayed at the start of the list (on the left-hand side). This symbol can have multiple values, for example, $ and US$. However, each symbol value must have a unique identifier such as "USD" for $ and "USD1" for US$. Internal identifier. The ID value must be unique in the file.

ID

The name element has a single attribute. Attribute Lang Description Identifies the two letter ISO code for the language of the text. You can define multiple names for a single currency symbol. For example,
<name lang="en"> South Korea, won</name> <name lang="de"> Korea (Sd-Korea), Won</name> <name lang="fr"> Core du Sud, won</name>

Steps to Add a Currency Symbol


1. Open the i18n_res.xml file in Notepad. 2. Add a currency element using the following structure:
<currency code="currency_code" symbol="currency_symbol" ID="currency_id"> <name lang="language_code">Currency_description</name> </currency>

3. Define the currency element by adding values to the currency and name elements: in the name-value pairs, code="currency_code", symbol="currency_symbol", and ID="currency_id", replace placeholder text in quotation marks with specific values add a currency description For example,
<currency code="SGD" symbol="S$" ID="SGD"> <name lang="en">Singapore Dollar</name> </currency>

Most currencies are listed in the file but commented out. To display them, remove the "<!--" on the left-hand side. 4. From the File menu, click Save. To view the changes to the Currency Symbol list, restart the product.

Steps to Remove a Currency Symbol


1. Open the i18n_res.xml file in Notepad. 2. To delete a currency element, delete the currency opening tag <currency> and the closing currency tab </currency> tag and all the content framed by these tags. Note: To suppress the display of a currency element, without removing the entry from the file, insert the comment tag <!-- before the currency opening tag, and the comment tag --> after the currency closing tag. For example,
<!-- <currency code="ALL" symbol="Lek" ID="ALL"> <name lang="en">Lek</name> -->

3. From the File menu, click Save. To view the changes to the Currency Symbol list, restart the product.

Steps to Change the Order of Currency Symbols


1. Open the i18n_res.xml file in Notepad. 2. Select the currency element to move. Be sure to select the opening and closing currency tags <currency> and </currency>. 3. Cut the currency element and paste it in the new location in the currency symbol list. 4. From the File menu, click Save.

Administration Guide 261

Chapter 33: Format Data To view the changes to the Currency Symbol list, restart the product.

Notes
XML syntax is case-sensitive. the i18n_res.xml file is encoded in UTF-8. Ensure that you use an appropriate editor.

Tip
To avoid the loss of existing information, backup the currency symbol file before modifying the XML tags.

Related Topics
"Using the Currency Symbol List" (p. 259) "Format Data" (p. 253) "Justify Data" (p. 258) "Enhance Data Display" (p. 259)

Data Formats and Locale Settings


Data formats depend on the locale configuration settings for your IBM Cognos Series 7 product. By default, IBM Cognos Series 7 server products and IBM Cognos Impromptu use a data format configuration file named cerlocale.xml. IBM Cognos Architect, IBM Cognos Visualizer, IBM Cognos PowerPlay for Windows, and IBM Cognos Transformer use Windows Regional Settings for locale settings and data format information. However, these products can also be configured to use the data format configuration file. For information about managing data formats, copying data format information, or editing the data format configuration file, see the Configuration Manager User Guide, or contact your administrator.

Number and Currency Data Type Formatting


When you format numeric data, you can apply a custom format explicitly, or you can choose to format data with the Number or Currency options. If you use Number or Currency, the data format is set to the values retrieved from the cerlocale.xml file. For example, if you specify Number, the data items are formatted using the elements such as SDecimal, SThousand, and so on. If you use Currency, the data items are formatted using the elements such as SCurrency, SMonCurrencySep, SMonThousandSep, and so on. If you want, you can edit the cerlocale.xml file and change the default data formats. For information about managing data formats, copying data format information, or editing the data format configuration file, see the Configuration Manager User Guide, or contact your administrator. For information about the impact of using the cerlocale.xml file with existing reports, see "Data Formats and Locale Settings" (p. 262). When Number and Currency are used, some rules apply. If the data type is float or double, the number of decimal places will be set to the value of IDigits (for number format) or ICurrDigits (for currency format) set in your cerlocale.xml file. If the data type is integer, small integer, packed decimal, or quad, the number of decimal places will be set to the column scale value set during database creation. If the scale is less than 0, the number of decimal places is 0. The maximum number of decimal places is 8. If the scale is greater than 8, the value is changed to 8. Number format is not rendered in scientific notation. Tip: To find the data type and scale of a number, in Impromptu Administrator version, from the Report menu, click Query, and then in the Profile tab, click Query columns.

262 IBM(R) Cognos(R) Impromptu(R)

Chapter 34: Add a Border Around Part of a Report


Description
You can add borders around part of a report to emphasize it, to create structure, or to improve the overall report appearance.

Example
You borders to part of a report and you specify colors for your borders.

Steps
1. 2. 3. 4. 5. 6. Select the part of a report you want to put a border around. From the Format menu, click Borders. From the Style box, select the type of line. Select the border lines for your border. To add color to the border, click Customize. In the Color dialog box, select the border color and click OK. The border color displays in the Color box. 7. Click OK.

More Info Note


For information about adding borders to list reports, see "Hide or Show Grid Lines" (p. 267).

Tips
To quickly add a single-line border around a selected part of a report, click the Borders button on the toolbar. Borders button To remove a border from a selected part of a report, click the Borders button on the toolbar. To quickly select several parts of a report, such as a picture and a comment, Ctrl+click each part of the report.

Related Topics
"Add Color or a Pattern to Part of a Report" (p. 263) "Change the Font" (p. 264) "Apply a Style to Part of a Report" (p. 265)

Add Color or a Pattern to Part of a Report


Description
You can enhance the appearance of a report by changing the background color of part of the report. You can also add patterns to selected parts of a report to emphasize important data. By mixing the foreground and background colors, you can create a range of patterns to use in your report.

Administration Guide 263

Chapter 34: Add a Border Around Part of a Report

Example

To make one column in your report stand out from the rest, you give it a pattern.

Steps
1. 2. 3. 4. 5. 6. 7. Select the part of the report that you want to change. From the Format menu, click Patterns. From the Pattern box, select a pattern. To select a foreground color, under Foreground:, click Customize. In the Color Dialog Box, select a color and click OK. To select a background color, under Background:, click Customize. In the Color dialog box, select a color and click OK.

More Info Tips


To quickly change the color of a selected part of a report, click the Pattern button on the toolbar. Pattern button Impromptu adds a 25% gray shading to the selected part of a report. To quickly remove patterns from selected parts of a report, click the Pattern button on the toolbar. To remove patterns from selected parts of a report, use the Patterns command (Format menu), and then click Transparent in the Patterns box. To print your report in black and white, use patterns instead of colors.

Related Topics
"Add a Border Around Part of a Report" (p. 263) "Apply a Style to Part of a Report" (p. 265) For information about conditional formatting, see Mastering Impromptu Reports.

Change the Font


Description
When you create a new report, Impromptu uses default font attributes for text. You can override these defaults and change the type, size, style, and color of the font.

Example
You show selected data items in boldface and increase the font size of selected text in a header.

264 IBM(R) Cognos(R) Impromptu(R)

Chapter 34: Add a Border Around Part of a Report

Steps
1. Select the text you want to format. 2. Click the appropriate formatting button on the toolbar to make the change. You can choose a font type, size, color, and any or all of three styles: bold, italic, and underline.

More Info Notes


If you are creating reports for others, use standard fonts available to all users. Impromptus minimum font size is 6. If you type in a lesser value and click OK, the text size remains unchanged.

Tips
To take advantage of additional font attributes or to make several changes at one time, use the Font command (Format menu). To change the default font for all new reports, use the Object Format tab (Options dialog box, Tools menu).

Related Topics
"Apply a Style to Part of a Report" (p. 265)

Apply a Style to Part of a Report


Description
You can apply a style to a selected part of a report. Use the convenience of styles to apply several pre-defined formats to your report in one step.

Example
You apply a style called "Sales Up" to summary data that represents an increase in sales for a given month. This style applies a specific font, font size, and color to the selected report part.

Steps
1. Select the part of the report to which you want to apply a style. 2. From the Format menu, click Styles. 3. From the Style box, select a style. The Style box contains several styles that come with Impromptu and any styles you have created. 4. Click Apply and then click Close.

More Info Note


You can apply more than one style to part of a report.

What if ...
You change your mind after applying a style? From the Style box, select None.

Related Topics
"Add a Border Around Part of a Report" (p. 263) "Add Color or a Pattern to Part of a Report" (p. 263) "Change the Font" (p. 264)

Administration Guide 265

Chapter 34: Add a Border Around Part of a Report

266 IBM(R) Cognos(R) Impromptu(R)

Chapter 35: Format a List or Crosstab Report


There are many ways to format a list report: "Hide or Show Grid Lines" (p. 267) "Select Parts of a List Report" (p. 268) "Move a Column" (p. 269) "Change a Column Title" (p. 270) "Change the Width of a Column" (p. 270) "Change the Height of a Row" (p. 271) "Add a Group or List Header or Footer" (p. 272) "Change the Height or Width of a List Header or Footer" (p. 273) "Keep Details and Group Headers (or Footers) Together" (p. 273) "Insert a Page Break in a List Report" (p. 274) There are several ways to format a crosstab report: "Select and Format Parts of a Nested Crosstab Report" (p. 274) "Set the Default Format for Crosstab Columns" (p. 276)

Hide or Show Grid Lines


Description
You can enhance the appearance of a list report by adding grid lines. Grid lines visually separate different areas in a report. You can show or hide grid lines around the outside edge of the detail area to show or hide the detail boundaries around the individual columns to show or hide the column boundaries around the individual rows to set the detail lines apart clearly from any grouped columns above and below group data items to show where group data values change in any combination of the preceding four grid line settings

Steps
1. 2. 3. 4. Select a cell, row, or column in the list. From the Edit menu, click Select Parent. Right-click the list, and select Format. Click the Grid tab and do one of the following: Click ... To add or remove ... An outline grid from the selected list frame. Outline The border above and below each group. Group

Administration Guide 267

Chapter 35: Format a List or Crosstab Report

Click ...

To add or remove ... Column grid lines. Impromptu adds a border around each column except the left-most and right-most columns. To add an outside border around the left-most and right-most columns, add an outline border in addition to the column border. Row grid lines.

Columns

Rows 5. 6. 7. 8. If you want to change the line style for the grid, select a new line style from the Style box. If you want to change the line color for the grid, click Customize. In the Color dialog box, select a new color, and click OK. In the Format dialog box, click OK.

Related Topics
"Format a List or Crosstab Report" (p. 267)

Select Parts of a List Report


Description
You can select a value, row, column, or entire list to perform actions such as changing format or properties applying a style adjusting size or position of items inserting a new data item copying items to the Clipboard moving items by dragging them to a new location sorting adding a summary operation

Step
Do one of the following: To select ... A single value Do the following: Select the value that you want within the list.

A row

Position the pointer over the left edge of the row that you want to select and click the mouse button.Your pointer changes to the following:

Select Row pointer

268 IBM(R) Cognos(R) Impromptu(R)

Chapter 35: Format a List or Crosstab Report To select ... A column Do the following: Position the pointer over the top edge of the column that you want to select and click the mouse button. Your pointer changes to the following:

Select Column pointer An entire list Headers and footers Click the mouse to the right of the right-most column. Click any part of the header or footer that is empty.

More Info Tips


To select a range of adjacent columns, select the first column you want in the range by positioning the pointer over the selected column title header. The pointer changes to a down arrow. Click to select the first column. Shift+click to select the last column you want in the range. Impromptu selects all the columns in between the two columns you selected. To select non-adjacent columns, select the first column by positioning and clicking the pointer over the column title header. Ctrl+click each additional column you want to select.

Related Topics
"Change the Height of a Row" (p. 271) "Change the Width of a Column" (p. 270) "Format a List or Crosstab Report" (p. 267) "Move a Column" (p. 269)

Move a Column
Steps
1. Position and click the pointer over the selected column title header. Your pointer changes to the following:

2. Drag the selection to the right or left. As you drag the column, Impromptu uses highlighting to indicate the columns new position. If two vertical lines appear between adjacent columns, then the column is inserted between the adjacent columns. If two vertical lines appear on the outer border of the first column, the column is inserted to the left of the first column. If two vertical lines appear on the outer border of the last column, the column is inserted to the right of the last column. 3. Release the mouse button when the column is in the correct position.

More Info Notes


You can also move a column by selecting a single data value in the column that you want to move and dragging the selection to the right or left. If you move a column to the top of the list, you create a crosstab.

What if ...
The pointer changes to the following when you move it over the column headers.

Administration Guide 269

Chapter 35: Format a List or Crosstab Report Column pointer You will create a crosstab report if you drop columns in the column headers.

Related Topics
"Change a Column Title" (p. 270) "Change the Width of a Column" (p. 270) "Format a List or Crosstab Report" (p. 267) "Select Parts of a List Report" (p. 268)

Change a Column Title


Description
You can change a column title so that it is more descriptive and meaningful.

Steps
1. Double-click the column title you want to change. 2. Change the text in the title. 3. When you finish editing the text, click anywhere outside the column title.

Related Topics
"Change the Width of a Column" (p. 270) "Format a List or Crosstab Report" (p. 267) "Move a Column" (p. 269) "Select Parts of a List Report" (p. 268)

Change the Width of a Column


Description
Impromptu sets the column width to the best fit based on the data in the column. You can also change the width of columns in a list to meet specific reporting requirements by using the mouse to drag-size the width of a column changing the column width using precise specifications

Example
To fit a list exactly within the boundaries of a specific paper size, you set the size of each column in the list to a specific value, such as 1 inch and 2.5 cm.

Steps to Change the Width of a Column


1. 2. 3. 4. Select any cell in the column that you want to resize. Position the pointer over one of the handles that controls the horizontal size of the cell. While holding down the mouse button, drag the handle until the cell is the size you want. Release the mouse button.

Steps to Change Column Width Using Precise Specifications


1. Select any cell in the column that you want to resize. 2. From the Format menu, click Size. 3. In the box indicating the width, do one of the following. To show the Width Measurement box, click Specify Width. You can enter a specific value for the column width. The unit of measurement depends on your current settings.

270 IBM(R) Cognos(R) Impromptu(R)

Chapter 35: Format a List or Crosstab Report To determine the best fit for the column based on a specified number of rows, click Scan Data for Best Width. In the Rows box, type the number of rows you want Impromptu to scan. 4. Click OK.

More Info Note


When you resize a cell to show multiple lines of text, the text in the cell does not wrap unless you set its properties appropriately. For information about setting properties, see "Justify Data" (p. 258).

Related Topics
"Change a Column Title" (p. 270) "Format a List or Crosstab Report" (p. 267) "Move a Column" (p. 269) "Select Parts of a List Report" (p. 268)

Change the Height of a Row


Description
By default, Impromptu sets the row height to the height of the largest text string, picture, or report variable in the detail lines. When you change the cell font, Impromptu automatically adjusts the row height. You can change the height of a row by sizing it with your mouse using precise specifications You cannot change the height of a single row in a list. When you change the height of one row, all rows in the report are changed to the same height.

Example
To fit a list exactly within the boundaries of a specific paper size, you set the height of each row in the list to a specific value such as 1.25 cm or 0.5 inch.

Steps to Change the Height of a Row


1. Select the largest vertical text string, picture, or report variable from the row. 2. Position the pointer over one of the handles that control the vertical size of the row. 3. While holding down the mouse button, drag the handle vertically until the text string, picture, or report variable is the height you want. 4. Release the mouse button.

Steps to Change the Height of Rows Using Precise Specifications


1. Select the largest vertical text string, picture, or report variable from the detail lines of the list. 2. From the Format menu, click Size. 3. In the box indicating the height, do one of the following. To show the Height Measurement box, select Specify Height. You can enter a specific value for the row height. The unit of measurement depends on your current settings. To determine the best fit for the row based on a specified number of rows, click Scan Data for Best Height. In the Rows box, type the number of rows you want Impromptu to scan. To set the height of each row based on the contents of the cell you selected in step 1, select Dynamic. 4. Click OK.

Administration Guide 271

Chapter 35: Format a List or Crosstab Report

More Info Note


When you resize a cell to show multiple lines of text, the text in the cell does not wrap unless you set its properties appropriately. For information about setting the text properties, see "Justify Data" (p. 258).

Related Topics
"Change the Width of a Column" (p. 270) "Format a List or Crosstab Report" (p. 267) "Select Parts of a List Report" (p. 268)

Add a Group or List Header or Footer


Description
You can enhance the appearance of a list as well as highlight grouped data by adding headers and footers to a list. You can add or remove the following headers or footers at any time: List header and footer. They appear at the top and bottom of a list, and have a default height of one row (about 1 cm or .39 inches). You can change this height. Group header and footer (if you have grouped items). You can add a group header and group footer for each distinct group within the list. You can also insert calculations that show summary values such as totals, averages, or maximums in the group header or footer.

Example
You add a group header to your report to show the number of sales made by each sales representative in your organization. To clarify the report data, you also add a list header to your report and insert a title and the date.

Steps to Add a Group Header or Footer


1. Select one or more data items for which you want to create a group header or group footer. 2. On the toolbar, click the Header or Footer button. Header button Footer button If the selected data items are not grouped, Impromptu groups them, sorts them and adds a group header or footer for each. In addition, Impromptu automatically inserts the data items that you selected in step 1 into the group headers (but not into the group footers). Note: Impromptu does not cancel any groups that have already been set. The new group items are added to any existing group items.

Steps to Add a List Header or Footer


1. 2. 3. 4. 5. Select a cell in the list to which you want to add a list header or footer. From the Edit menu, click Select Parent. From the Format menu, click Properties and click the Layout tab. Click List Header or List Footer check box to add it to the list. Click OK.

More Info Tip


To delete a header or footer, select it and press the Delete key.

What if...
You want to add a title to the list header?

272 IBM(R) Cognos(R) Impromptu(R)

Chapter 35: Format a List or Crosstab Report From the Insert menu, click Text Frame. While holding down the mouse button, drag the mouse diagonally to size the area within the list header where your text will appear and release the mouse button.

Related Topics
"Change the Height or Width of a List Header or Footer" (p. 273) "Format a List or Crosstab Report" (p. 267) "Keep Details and Group Headers (or Footers) Together" (p. 273)

Change the Height or Width of a List Header or Footer


Description
The default height of list headers and footers is two row heights (about 3/4 inches or 2 cm). The default width of the list headers and footers corresponds to the width of the list columns. You can change both the height and the width of a list header or footer to accommodate another text string, value, picture, or report variable.

Example
You change the height and width of the list header to add your company logo.

Steps
1. Select the list header or footer whose height you want to change. 2. Position the pointer over one of the handles until it changes to a two-headed arrow. 3. While holding down the mouse button, drag the handle until the header or footer is the size you want and release the mouse button.

More Info Tip


To align the header and footer in a list report to the width of the report columns, select Snap to Columns in the Size tab (Properties dialog box, Format menu).

Related Topics
"Add a Group or List Header or Footer" (p. 272) "Format a List or Crosstab Report" (p. 267) "Keep Details and Group Headers (or Footers) Together" (p. 273)

Keep Details and Group Headers (or Footers) Together


Description
For any list report that appears in Page Layout view, you can increase report readability by preventing a group header or footer from appearing on a page by itself. Use the Keep Details and Headers Together button to specify that no group header should appear at the bottom of a page by itself. Use the Keep Details and Footers Together button to specify that no group footer should appear at the top of page without at least one row of data above it.

Steps
1. 2. 3. 4. Click a cell in the list report. From the Edit menu, click Select Parent. From the Format menu, click Properties and click the Layout tab. To keep details with the group headers, click the Keep Details and Headers Together button. Otherwise, to keep details with the group footers, click the Keep Details and Footers Together button. 5. Click OK. Administration Guide 273

Chapter 35: Format a List or Crosstab Report

Related Topics
"Add a Group or List Header or Footer" (p. 272) "Change the Height or Width of a List Header or Footer" (p. 273) "Format a List or Crosstab Report" (p. 267)

Insert a Page Break in a List Report


Description
You can insert a page break in your list report before or after a group or groups of data. You can also reset the page number to 1 for each group or after several groups of data. If the report has only a few rows of information on each page, you can remove the page breaks before you print to save paper.

Example
You have a long report based on sales in different cities. You start a new page each time your report shows information for a new city, and you start each city with the number 1.

Steps
1. 2. 3. 4. Click a cell in the list report. From the Edit menu, click Select Parent. From the Format menu, click Properties and click the Layout tab. To set a page break before or after a grouped data item, click the Page Break Before or Page Break After buttons that appear beside the group item. 5. To reset page numbers for one or more groups, click the group you want to reset page numbering for from the Reset the Page Number On box. There is nothing to select from this list if there are no groups in the report. 6. Click OK.

More Info What if ...


You want to remove page breaks before you print the report? In the Layout tab (List Properties dialog box), clear the Page Break Before or Page Break After buttons.

Related Topics
"Format a List or Crosstab Report" (p. 267)

Select and Format Parts of a Nested Crosstab Report


Description
You can select a value, row, column, or you can select all the columns or column headings at a particular nesting level to perform actions such as changing format or properties applying a style adjusting size or position of items copying items to the Clipboard moving items by dragging to a new location sorting adding a summary operation

Example
You select the Sales Amount column for every sales channel in order to apply formatting. 274 IBM(R) Cognos(R) Impromptu(R)

Chapter 35: Format a List or Crosstab Report

Step
Do one of the following: To select ... A single value Do the following: Select the value that you want within the crosstab.

A row

Position the pointer over the left edge of the row that you want to select and click the mouse button. Your pointer changes to the following:

A column

Position the pointer over the top edge of the column that you want to select and click the mouse button. Your pointer changes to the following:

Select Column pointer All the column titles at a specific nesting level All the columns at a specific nesting level Click the selection pointer twice in the top half of the column title. Position your pointer over a column at the nesting level you want to select and click the mouse button. Your pointer changes to the following:

Select Column pointer Click the mouse button a second time to select all the columns. An entire crosstab Headers and footers Click the point at which the horizontal and vertical scroll bars intersect in the lower-right corner of the crosstab. Click any part of the header or footer that is empty.

More Info Notes


You cannot edit the generated column titles in a crosstab report. When you apply formatting to all the column titles or all the columns at a particular nesting level, you set the default for all formatting at that nesting level. If new columns are added, Impromptu applies the default formatting.

Tip
To format a nested crosstab, select the parts of the crosstab you want to format and apply formatting (Format menu). For information about formatting reports, see "Format a Report" (p. 247).

Related Topics
"Create a Crosstab Sub-Report" (p. 208) "Set the Default Format for Crosstab Columns" (p. 276) "Use the Report Wizard to Quickly Create a Crosstab Report" (p. 204)

Administration Guide 275

Chapter 35: Format a List or Crosstab Report

Set the Default Format for Crosstab Columns


Description
The number of columns in a crosstab report can change when you retrieve the data, apply a new filter, or change prompt values. Therefore, a crosstab report can have multiple columns. You can specify whether you want to change the default column formatting or the formatting for only one column. If you don't set a default column format, then the report uses the formats set in the Data Format tab of the Options dialog box. You can use conditional formatting to format crosstab rows. Any conditional formatting set on a row supersedes the default column formatting for the columns cells in that row.

Steps
1. Select the column item you want to set the default formatting for. To select a column title, click the bottom half of the title. To select a column, click the top half of the column title. Your pointer changes to the following: Select Column pointer To select a column total, click the total. 2. Set the default formatting for that column item (at that particular level). Column titles and totals can have many levels in a crosstab report.

Note
If you select a single column title, cell, or total and change the format, that change only applies to that column item and only for as long as that column item exists in the report.

Related Topics
"Create a Crosstab Sub-Report" (p. 208) "Filter Using Crosstab Titles" (p. 225) "Select and Format Parts of a Nested Crosstab Report" (p. 274) "Use the Report Wizard to Quickly Create a Crosstab Report" (p. 204)

276 IBM(R) Cognos(R) Impromptu(R)

Chapter 36: Reporting While Disconnected From the Database


When you are disconnected from the database, you can use a snapshot to work with reports. A snapshot is a permanent local copy of the data in your report. Like a photograph, a snapshot captures a picture of the data as it existed when you created the snapshot.

Snapshots
When you open a snapshot report, the report accesses data stored in a snapshot located on your personal computer.

Why Use Snapshots?


Snapshots let you save historical data that otherwise would be updated or lost access and manipulate data when you are unable to attach to the database minimize data processing when the network traffic for the database is heavy e-mail a report and its data to someone as a file attachment You can also save a snapshot as another file format. For more information about the file formats available see, "Export a Report" (p. 193). Used properly, snapshots can improve the efficiency of your report. Because each snapshot is its own independent, static data source, certain restrictions apply to snapshots.

What You Can Do


You can drag and drop to move parts of a report within the snapshot report Ctrl+drag to make copies of parts of a report

What You Cannot Do


You cannot add new data to a snapshot such as new tables or new filters create new calculations that are based on data items that are not part of the snapshot cut and paste or drag and drop data between snapshot reports save a report that contains sub-reports as a snapshot When you save a snapshot with your report, the data and the report are saved as one file, and the data in the report is static. If the database for your report is updated after a snapshot is taken, the data in the snapshot does not change to reflect the updates. If you want to use the updated data, you must refresh the snapshot.

Note
Do not use snapshots to send highly sensitive or confidential information. No security measures are included in a snapshot. As a result, snapshots can be accessed by anyone with Impromptu.

Administration Guide 277

Chapter 36: Reporting While Disconnected From the Database

Comparing Snapshots to HotFiles


When you use a snapshot, you separate the report from its original data source. Other Impromptu users can access a snapshot report without having to connect to the original source database or catalog. All you need is Impromptu to run the report. A HotFile is a table of data. You need a catalog to bridge the report and the HotFile it accesses. You need Impromptu and the catalog to view a report that uses a HotFile. You can save historical data using either a snapshot or a HotFile. The following table compares snapshots to HotFiles: Snapshots HotFiles

Are integrated with the report. You cannot add Are separate, local data tables. A HotFile that is new data to the report. included in the catalog enables you to add additional data to the report. Have many cut and paste restrictions. Cannot be added to your catalog. Cannot be used to create a new report with data. Stand alone. Do not require catalog access. You cannot apply filters or calculations that use data not included in the snapshot. Have no cut and paste restrictions. Can be added to your catalog. Can be used to create a new report with data. Do not stand alone. Require catalog access. You can add filters and calculations.

What You Can Do with a Snapshot but Not with a HotFile


With a snapshot, you can have all the data you need for your report in one file e-mail your report to someone as a single file attachment open a report without accessing a catalog

Related Topics
"Retrieve Data from the Database" (p. 209) "Create a Local Copy of the Report Data" (p. 278) "Refresh a Local Copy of the Report Data" (p. 279) "Remove a Local Copy of the Report Data" (p. 280)

Create a Local Copy of the Report Data


Description
A snapshot is a permanent local copy of the data in your report. Like a photograph, it captures the data as it existed when you created the snapshot.

Example
You create and save a snapshot of the current monthly sales report to compare it to future monthly sales reports.

Steps
1. From the Report menu, click Query and click the Access tab. 2. In the Data Source box, click the Local Snapshot option button and click OK. The indicator on the lower-right corner of the Impromptu window shows the Snapshot icon.

278 IBM(R) Cognos(R) Impromptu(R)

Chapter 36: Reporting While Disconnected From the Database Snapshot icon

More Info Notes


You cannot save a report that contains sub-reports as a snapshot. You can save a snapshot as another file format. The file formats available in Impromptu include Delimited ASCII, Excel with Format, HotFile, PDF, XML, Hypertext Markup Language and text. The Show SQL box (Profile tab, Query dialog box) shows the SQL required to create the snapshot. If you add filters or calculations to the snapshot, the SQL box doesn't change.

Tips
To quickly create a snapshot, click the Snapshot button on the toolbar. Snapshot button To save your report as a snapshot, from the File menu, click the Save As command and select the Save a Snapshot with the Report check box.

What if...
The Save a Snapshot With the Report option (Save As dialog box) and the Snapshot button are not available? The report is already a snapshot or the report contains sub-reports. You cannot save a report that contains sub-reports as a snapshot. You do not have an Access tab? From the Tools menu, click Options, and click the General tab. Select the Show Advanced Tabs in the Query Dialog Box check box.

Related Topics
"Reporting While Disconnected From the Database" (p. 277)

Refresh a Local Copy of the Report Data


Description
You can refresh a snapshot with the current data to reflect the most recent changes in the database. When you refresh a snapshot, the data from the original snapshot is lost.

Example
The latest sales data for the last quarter has been updated in the database. Before you go away on business, you add the new sales data by refreshing your snapshot.

Steps
1. From the Report menu, click Query and click the Access tab. 2. In the Data Source box, click the Database option button and click OK to reconnect to the database. 3. Repeat step 1 to show the Access tab (Query dialog box). 4. Click the Local Snapshot option button and click OK to capture the new database information. Impromptu refreshes your snapshot with the new data from the database.

More Info Tip


To quickly refresh a snapshot with the current data, click the Snapshot button on the toolbar. In the Report Snapshot dialog box, click Refresh the Snapshot and click OK.

Administration Guide 279

Chapter 36: Reporting While Disconnected From the Database

What if ...
You do not have an Access tab? From the Tools menu, click Options, and click the General tab. Select the Show Advanced Tabs in the Query Dialog Box check box.

Related Topics
"Reporting While Disconnected From the Database" (p. 277)

Remove a Local Copy of the Report Data


Description
When you need more data than is in the snapshot, you can remove a snapshot from a report and retrieve data from the database instead.

Example
The snapshot you created last month for your accounts payable report only contains the data from the San Diego office. Since you now need data from the entire west coast, you remove the snapshot from the report and redirect your query to the database.

Steps
1. From the Report menu, click Query and click the Access tab. 2. In the Data Source box, click Database, and then click OK. Your query retrieves the data from the database. The indicator on the lower-right corner of the Impromptu window now shows the database icon.

More Info Tip


To quickly remove a snapshot from a report, click the Snapshot button on the toolbar. In the Report Snapshot dialog box, click Remove the Snapshot and then click OK.

What if ...
You do not have an Access tab? From the Tools menu, click Options, and click the General tab. Select the Show Advanced Tabs in the Query Dialog Box check box.

Related Topics
"Reporting While Disconnected From the Database" (p. 277)

280 IBM(R) Cognos(R) Impromptu(R)

Chapter 37: Drill Through to IBM Cognos Query


Description
If you use Impromptu Web Reports to distribute your reports over the Web, you can set up drill-through access to IBM Cognos Query. Impromptu Web Report users can view your Impromptu reports in PDF format, drill through to IBM Cognos Query, and then explore the data in their Web browsers. Before you publish the report in Impromptu Web Reports, you can test drill-through access by drilling through from the Impromptu report.

Steps
1. Open the report to drill through to IBM Cognos Query. 2. Select a report item that has drill-through access set up. 3. From the Report menu, click Drill Through and then click IBM Cognos Query. The Drill Through URLs to IBM Cognos Query dialog box appears. 4. Click the query that users will drill to and then click Execute URL.

Related Topics
"Import a Query from IBM Cognos Query" (p. 207) "Select the IBM Cognos Query Server" (p. 281) "Set Up Drill-Through Access to IBM Cognos Query" (p. 282) "View the Details of a Value in a Report" (p. 182)

Select the IBM Cognos Query Server


Description
Specify an IBM Cognos Query server before you test drill-through access from the Impromptu report.

Steps
1. Open Impromptu. 2. From the Tools menu, click Options and then click the Drill Through tab. 3. In the IBM Cognos Query Server box, for a simple install, type your Web server name (for example, wotalaventus1). for a distributed install, type the location and name of the IBM Cognos Query gateway. 4. Click OK.

More Info Note


The default protocol for drill through to IBM Cognos Query is /cognos/cgi-bin/cqcgi.exe.

Related Topics
"Drill Through to IBM Cognos Query" (p. 281)

Administration Guide 281

Chapter 37: Drill Through to IBM Cognos Query

Set Up Drill-Through Access to IBM Cognos Query


Description
You can use Impromptu Query Definition files (*.iqd) to set up drill-through access to IBM Cognos Query. However, before you save a query in IBM Cognos Query, click the Enable Drill Through Properties check box to store information about the query in an Impromptu Query Definitions file (*.iqd).

Steps
1. Open Impromptu. 2. Open the parent report (the one that users will drill from) and click any data item. 3. From the Report menu, click Drill Through and then click Properties. The Drill Through Properties dialog box appears. Note: If the Drill Through Properties command (Report menu) is unavailable, click Options (Tools menu), select the Drill Through tab, and then select the Enable Drill Through Properties check box. 4. Select the column you want to drill through to a query from IBM Cognos Query and click Add. The Add Drill Through Query/Report dialog box appears. 5. Select any additional columns that you want to include in the drill-through report filter. 6. Type file name for the drill-through query (*.iqd), or click Browse to find it. 7. Click OK twice. Impromptu validates the file name for the query report, but does not verify whether the selected columns exist in the query from IBM Cognos Query.

Related Topics
"Drill Through to IBM Cognos Query" (p. 281) "Import a Query from IBM Cognos Query" (p. 207)

282 IBM(R) Cognos(R) Impromptu(R)

Chapter 38: Prepare a Report for Impromptu Web Reports


Prepare a Report for Impromptu Web Reports
You can deliver Impromptu reports to the Web either by using Impromptu Web Reports or by publishing them directly to Upfront via the IWR server. When you change Impromptu reports to package them for Impromptu Web Reports, be aware of the report characteristics described in this chapter. For information about publishing reports directly to Upfront, see the Impromptu Administration Guide.

Bookmark with Undefined Destination


If you use a data item to group the data in a report, but do not include it in the report, then Impromptu Web Reports generates a bookmark that has no destination in the PDF report.

IBM CognosScript and Macros


Impromptu Web Reports does not support IBM CognosScript or AutoRun macros. If your report uses these features, your report administrator can automate the reports using events. The report administrator may also need to create HotFiles for dependent reports, because these reports are usually executed in Impromptu by using macros.

Connection String and Multiple Servers


Work with the report administrator to determine a strategy for providing all report servers with the same database connection string. If the current database connection string in the catalog cannot be used by the report servers, you may have to modify the string before the catalog is published to the Web. For more information, see your report administrator.

Database Userid and Password


If you are using your Impromptu catalog for security, ensure that the Impromptu catalog you package contains a database userid and password in each user profile. If you are using Access Manager for database security, you don't need to do this. Note: Catalogs generated in Architect always use Access Manager for database security.

Distributed Catalogs
You should disconnect personal catalogs used in Impromptu Web Reports from the master catalog. Any changes to the master catalog are not reflected in your personal catalogs. If you package reports that access an Impromptu distributed catalog and the master catalog is updated, you must repackage your reports with the updated personal catalog. Ensure that you dont include the master catalog with your repackaged reports and personal catalog.

Drill-Through Access to More Than One Report or Query


You can set up drill-through access to more than one report or query from the same report column. After you publish the report in Impromptu Web Reports, drill-through access is available to PDF and HTML report formats. With this access, report consumers can drill through to any of the reports or queries you set up. For more information about setting up drill-through in Impromptu Web Reports, see the IBM Cognos Web Portal User Guide.

Administration Guide 283

Chapter 38: Prepare a Report for Impromptu Web Reports

Failure to Publish From Impromptu to Impromptu Web Reports with Anonymous Access Configured in Access Manager
If anonymous access is enabled in Access Manager, you cannot publish from Impromptu to Impromptu Web Reports. Instead, you will receive an error saying that there was a failure to obtain a ticket. To publish from Impromptu to IWR disable anonymous access in Access Manager.

Fit to Page
The Fit to Page feature only affects how Impromptu prints your report; it does not affect how Impromptu Web Reports displays your report in PDF format.

OLE automation and OLE Objects


If some reports contain links to OLE objects, you need to copy those objects manually to the Impromptu Web Reports server. Note: OLE objects may not always behave as expected in the Web environment, and are valid only under Windows. In Web reporting applications, you should consider other alternatives.

Prepare HotFiles
If the report set contains HotFiles, you must know which operating systems the report set is going to be published on. For example, the format of HotFiles is different for UNIX and Windows. HotFiles for use on an Impromptu Web Reports server running on UNIX must be generated in UNIX. If your report set is being published to Impromptu Report Servers that run only in Windows, include the HotFile in the report set both Windows and UNIX, you must repackage the HotFile each time you update the report set only in UNIX, the report administrator must create the HotFile in UNIX for you to include in the final report set For more information, see "Package HotFiles" (p. 285).

Repeated Bookmarks in PDF Reports


When you create reports in Impromptu, do not insert a data item into the page header. If you do, Impromptu Web Reports generates the report with repeated bookmarks that link only to the page where the page header changes.

Restriction on Using Equals Sign in Prompt Names


Report authors and administrators who publish to Impromptu Web Reports should be aware of the following restriction when creating report prompts: if the prompt name contains an Equals sign (=), users will be unable to run a report based on that prompt. Only by deleting the non-supported character from the prompt name and republishing the report can the user successfully select a prompt and run the requested report.

Screen Layout View


You must change all reports in Screen Layout view to Page Layout view because Impromptu Web Reports shows all reports in Page Layout view.

Using a Locked Catalog


Impromptu administrators can add a lock to a catalog. In Impromptu Web Reports, the catalog Creator user class cannot run reports using a locked catalog. If a user attempts to run a report using the catalog Creator user class, they receive an error message. To run the report successfully, use a non-Creator user class.

View Reports in Excel


Some limitations apply when exporting reports to Excel. For more information, see Mastering Impromptu Reports. 284 IBM(R) Cognos(R) Impromptu(R)

Chapter 38: Prepare a Report for Impromptu Web Reports

Related Topics
"Create Burst Reports" (p. 285) "Notify the Report Administrator" (p. 286)

Create Burst Reports


Description
You have to add some user classes and filters when creating a report that will be a burst report in Impromptu Web Reports. In the Impromptu Administrator, set up the catalog then

Steps
In the Impromptu Administrator, set up the catalog. 1. Open Impromptu. 2. Open the catalog from which you want to generate reports. 3. From the Catalog menu, click User Profiles. 4. Click the User Classes tab and add the user classes you want for your burst report. For more information on adding user classes, see the Mastering Impromptu Reports book. 5. Click the Filter tab. 6. In the User Class list, click one of your user classes and create a specific filter for it. 7. Repeat step 6 for each user class for which you want to apply a filter. Using either the Impromptu User or Impromptu Administrator, 8. Create a new report as the Creator user class and add the required columns (the columns that have a filter or prompt on them). 9. From the Catalog menu, click User Class and click one of your user classes. 10. From the Report menu, click Retrieve to verify that this user class displays a unique report. 11. Repeat steps 9 and 10 for each user class. For more information on setting up a burst report in Impromptu Web Reports, see the Report Administrator's Guide.

Package HotFiles
Description Package HotFiles for Both Windows and UNIX
To ensure that a report set can be published to Impromptu Web Reports servers running in either Windows or UNIX, you must package both the original report and the HotFile that it creates in the same directory. This ensures that the directory can be used to publish the report set to either operating system. After the report set is published, the instructions that you give to the report administrator depends on the operating system that the Impromptu Web Reports server runs on: If the report set is published to an Impromptu Web Reports server running in Windows, you only need to tell the report administrator to hide the original report from report consumers. Reports that source Hotfiles published to UNIX must be run at least once before other IWR reports can access them. You must tell the report administrator to perform this procedure every time you publish or update this report set.

Package HotFiles for UNIX


The format of HotFiles is different for UNIX and Windows. HotFiles for use on an Impromptu Web Reports server running on UNIX must be generated in UNIX.

Administration Guide 285

Chapter 38: Prepare a Report for Impromptu Web Reports

Steps for UNIX only


1. Find the report that creates the HotFile from the report set and package it in the same directory. 2. Tell the report administrator to publish that report set to an Impromptu Web Reports server running on UNIX, run the report (.imr), and save the results in a HotFile using the same name as the original HotFile. 3. Have the report administrator FTP that HotFile back to you. 4. Add the new HotFile to the same directory containing all the reports in the report set. 5. Tell the report administrator to publish the report set to UNIX. This ensures that the directory always contains a HotFile that works in UNIX.

Notify the Report Administrator


After you package reports sets, you need to tell the report administrator the location of the database and any connection parameters the amount of disk space the report set uses if the catalog contains a database ID and password if the report set is new or updated if the report set has been updated, any changes to user profiles which reports should be generated as HotFiles which reports read or write which HotFiles which reports are used as a data source for other reports which reports contain links to OLE objects which reports use stored procedures or prompts which reports use PowerPrompts applications or user-defined functions (UDFs) which reports need to be scheduled to run and when which reports are dependent on other reports or events if any reports contain access to drill-through reports who needs to see the reports For more information about what the report administrator needs to know after the report sets are packaged, see the Impromptu Web Reports Administrator Guide.

286 IBM(R) Cognos(R) Impromptu(R)

Chapter 39: PowerPrompts Developer Studio


A PowerPrompts application guides report consumers through a series of HTML pages where they select the information that they want in a report. The report consumer then sees the report that is generated based on the selections. For example, using a PowerPrompts application report consumers can modify columns in a report column formatting a report template conditional formatting filters prompts and prompt values Use PowerPrompts Developer Studio to create these Web-based applications for Impromptu Web Reports; it is available with both the Administrator and the User versions of Impromptu. PowerPrompts applications do not interfere with the use of report or catalog prompts. For more information about PowerPrompts, see the PowerPrompts online help.

Administration Guide 287

Chapter 39: PowerPrompts Developer Studio

288 IBM(R) Cognos(R) Impromptu(R)

Chapter 40: Report Specifications

Attribute bitmap size Column width Number of group headers and footers Height of headers and footers Height of report Largest allowed negative number Largest allowed positive number Number of characters in a column name Number of colors available Number of report columns Number of tables in query Number of fonts per report Number of open reports Number of sub-reports in report Number of Toolbar buttons per Toolbar Number of parameters in a stored procedure call Number precision Number of printed pages Row height Smallest allowed negative number Smallest allowed positive number SQL character length Report width

Maximum Limited only by available memory Limited only by available memory 10 Limited only by available memory Limited only by available memory Database dependent Database dependent No known limit Limited by the number of colors supported by your monitor or printer Limited only by available memory. However, your database may impose a lower limit. 128 Limited only by available memory Limited only by available memory Limited only by available memory. 100 15 Database dependent Limited only by available memory Limited only by available memory Database dependent Database dependent 32,766 characters Limited only by available memory.

Administration Guide 289

Chapter 40: Report Specifications

File Searching
Impromptu catalogs and reports use other files. For example, a catalog may use a HotFile contain a prompt that is a report picklist be a distributed catalog pointing to the master distributed catalog A report includes a reference to a catalog file and can also include references to picklist reports bitmaps HotFiles other files The fully qualified paths for these associated files are stored in the catalog or report. For users to easily share catalogs and reports, Impromptu incorporates file searching capabilities to locate the associated files when a catalog or report is opened. When a user wants to share a catalog or report, the paths to at least some of the associated files may be different on the other user's computer.

Example
For example, you receive the following from another user: a report containing a reference to a .bmp file on the LAN a catalog When you save these files and open the report, Impromptu recognizes that the paths in the report are not current and attempts to find the associated files.

How the Search Works


If you create a catalog or report using an associated file on a network, the path of the associated file is stored in Universal Naming Convention (UNC) format. Paths for local files are stored using local drive letters (LDLs). When an associated file cannot be found using the LDL or UNC path stored in the catalog or report, Impromptu searches for the file in this order: 1. In the current folder. 2. Using the stored path, but replacing the drive letter with the letter of the drive where the catalog or report file currently resides. For example, the stored path is D:\1998\Reports. The report is opened on C:. Impromptu searches for C:\1998\Reports. 3. By deriving a relative path from the stored paths. For example, the report was in C:\1998\Reports, and the associated file was in C:\1998\Reports\Bitmaps, then Impromptu searches for a \Bitmaps folder where the report file currently resides. 4. Using the actual catalog or report path. 5. Using the workspace path specified in Preferences. 6. Using the catalog path specified in Preferences (if Impromptu is looking for a catalog). 7. Using the report path specified in Preferences (if Impromptu is looking for a report). 8. Using a standard Windows search. This includes a search of Impromptus main folder, the Windows folders and the path variable. If the search is unsuccessful, Impromptu asks you to help locate the file.

Notes
You can store both LDL and UNC paths for a file on a network. Impromptu does not use the search capability when you attempt to open a file from the most recent file list in the File menu. Enhanced file searching is not available through OLE automation.

290 IBM(R) Cognos(R) Impromptu(R)

Chapter 40: Report Specifications

Command Line Switches


Description
You can use command line options when you start Impromptu to execute a macro open a specific report The complete command line syntax is as follows:
IMPADMIN.EXE [-m macro-filename] [report-name]

or
IMPUSER.EXE [-m macro-filename] [report-name]

Notes
You can also execute a macro from within Impromptu or using the IBM Cognos Scheduler. Use double quotes to define a file name or pathname containing a space.

Related Topics
"-m macro-filename" (p. 291) "macro-filename" (p. 291) "report-name" (p. 291)

-m macro-filename
Opens the macro text file and runs the commands within the file.

Discussion
Use the -m command line option for macros written using the Impromptu Macro Editor.

Example
This command starts Impromptu and specifies the macro to execute:
C:\Program Files\Cognos\cer3\bin\IMPADMIN.EXE -m monthly.mac

Limit
127 is the maximum number of characters for commands entered on the command line.

Related Topics
"Command Line Switches" (p. 291)

macro-filename
Specifies the name of the macro file. You can also specify the path for the macro file. By default, Impromptu looks first in the catalog directory and then in the current directory.

Related Topics
"Command Line Switches" (p. 291)

report-name
Opens the specified report

Administration Guide 291

Chapter 40: Report Specifications

Discussion
Impromptu retrieves data depending on the settings in the Access tab (Query dialog box) that you access from the Report menu the preferences you set using the Options command (Tools menu)

Example
This command starts Impromptu and opens a report named summary:
C:\Program Files\Cognos\cer3\bin\IMPADMIN.EXE summary.imr

Limit
127 is the maximum number of characters for commands entered on the command line.

Related Topics
"Command Line Switches" (p. 291)

292 IBM(R) Cognos(R) Impromptu(R)

Chapter 41: Configuration Files


When you install Impromptu, the setup program automatically creates several .ini (configuration) files. Some of the initialization files created are Cognos.ini Cern.ini Impromptu.ini If you upgrade from an earlier version of Impromptu, the setup program automatically updates your .ini files with new information and maintains the settings that still apply from the earlier version. Setup ignores settings that no longer apply. When you start Impromptu, it reads the .ini files and uses the settings that were used at the end of the last Impromptu session. Impromptu uses the .ini files to define your Impromptu environment and configure it to match your preferences. The .ini files store preferences for environmental settings, such as formats and styles for report objects toolbar buttons data access options file locations for catalogs and reports

Warning
Normally, Impromptu or the setup program updates initialization files automatically. If you edit .ini files manually, use caution. Always back up an .ini file before you change it so you can restore the original file if necessary.

Related Topics
"Cern.ini" (p. 294) "Cognos.ini" (p. 294) "Function Definition Table (FDT) Files" (p. 294) "Impromptu.ini" (p. 295) "ini File Format" (p. 293) "Use Type Libraries" (p. 307)

ini File Format


.ini files contain several sections of related settings. Each section is in the following format:
[section name] keyname=value

[section name]
The name of a section. The starting square bracket must be in the left-most column of the line.

keyname=value
Defines and names the value of a setting. A keyname can consist of any combination of uppercase or lowercase letters, digits, and spaces. The keyname must be followed immediately by an equal sign. The value can be an integer, a string, or a string enclosed in quotation marks. You can include comments in the .ini files by starting a line with a semicolon (;). Blank lines are ignored.

Administration Guide 293

Chapter 41: Configuration Files

Related Topics
"Configuration Files" (p. 293)

Function Definition Table (FDT) Files


FDT files mirror the information in the database function initialization files (.ini) and are created by Impromptu to improve its performance. FDT files are created for a new or modified .ini file the first time the .ini file is read while opening the catalog. Updating the FDT files requires write privileges in the working directory. Your LAN users may not have the required privileges to create and modify the FDT files. To provide these users with FDT files, open a catalog that accesses the database supported by your enterprise when you first copy the Impromptu setup files to the LAN each time you modify the .ini file for the supported database

Related Topics
"Configuration Files" (p. 293)

Cognos.ini
Previous versions of Impromptu created this file in your Windows folder to store configuration information. Impromptu stores that information in Cern.ini in the Bin folder where Impromptu is installed. The exception is database connection information which remains in the Cognos.ini file. Cognos.ini includes [Databases] preferences. Each user must have a Cognos.ini file that contains the appropriate database connection strings.

Related Topics
"Configuration Files" (p. 293)

Cern.ini
Configuration Manager is the user interface for maintaining your rendition settings. For information about these settings, see the Configuration Manager documentation. The Impromptu state file location setting is Impromptu-specific and must be added explicitly to the rendition file. For a description of this setting, see [IBM Cognos Locations].

Related Topics
"Configuration Files" (p. 293)

[IBM Cognos Locations]


Specifies other locations of IBM Cognos applications and components.

294 IBM(R) Cognos(R) Impromptu(R)

Chapter 41: Configuration Files

Impromptu state file location=<path>


Default The Impromptu state file location setting is not enabled by default. It must be explicitly added to the cern.ini file, where n represents the product rendition number. Identifies where to create or find the Impromptu.ini file for an Impromptu User, Administrator, or workstation installation. When an Impromptu state file location is specified, Impromptu searches for the Impromptu.ini file in the state file location rather than in the default location. If the Impromptu.ini file does not exist in this location, it is created. Use an Impromptu state file location when you want to maintain one Impromptu.ini file for several users. In a workstation installation, the cern.ini file in the shared LAN location must contain the Impromptu state file location. Users specify this location in the Application Destination Folder dialog box during installation. The Impromptu state file location must be the same for each workstation installation. Example To change Impromptu state file location=C:\Program Files\State Edit the Impromptu state file location entry added to the cern.ini file, where n represents the product rendition number.

Description

Related Topics
"Cern.ini" (p. 294) "Configuration Files" (p. 293)

Impromptu.ini
Specifies Impromptu preferences. This file is created or updated when you start Impromptu. Some entries in this file can be updated in Configuration Manager. Impromptu.ini includes the following preferences: [Data Attributes] [Default Directories] [Startup Options] [Query Options] [Object Attributes] [Styles] [Graph Default Colors] [Query Statistics] [MRU Files]

Note
If you are distributing reports to users, ensure that the Impromptu.ini settings are consistent for all the users. For example, if you define styles in Impromptu.ini, use those styles in standard reports, and then distribute the reports to users without those styles in their Impromptu.ini files, the reports won't display properly for those users. You must modify their Impromptu.ini files to include the same styles included in your Impromptu.ini file.

Related Topics
"Configuration Files" (p. 293)

Administration Guide 295

Chapter 41: Configuration Files

[Data Attributes]
Stores application-wide data format settings. By default, data is formatted using the General option which uses the users locale settings.

numeric format=<setting>
Default Description To change No default. Shows the format of numeric data. From the Tools menu, click Options and then click the Data Format tab.

date format=<setting>
Default Description To change No default. Shows the format of date data. From the Tools menu, click Options and then click the Data Format tab.

date time format=<setting>


Default Description To change No default. Shows the format of date-time data. From the Tools menu, click Options and then click the Data Format tab.

time format=<setting>
Default Description To change No default. Shows the format used for time. From the Tools menu, click Options and then click the Data Format tab.

interval format=<setting>
Default Description To change No default. Shows the format of intervals. From the Tools menu, click Options and then click the Data Format tab.

string format=<setting>
Default No default.

296 IBM(R) Cognos(R) Impromptu(R)

Chapter 41: Configuration Files

Description To change

Shows the format of string expressions. From the Tools menu, click Options and then click the Data Format tab.

[Default Directories]
Defines the default directories for storing and locating the following files: Impromptu catalogs Impromptu reports temporary files (used for sorting and grouping)

temporary data path=<path>


Default Description To change temporary data path=C:\TEMP Sets where Impromptu creates temporary files. From the Tools menu, click Options and then click the File Locations tab or edit the parameter in Configuration Manager.

catalog path=<path>
Default Description To change catalog path=C:\Program Files\ Cognos\cern\Samples\Impromptu\Reports Sets where Impromptu looks for catalogs. From the Tools menu, click Options and then click the File Locations tab or edit the parameter in Configuration Manager.

report path=<path>
Default Description To change report path=C:\Program Files\ Cognos\cern\Samples\Impromptu\Reports Sets where Impromptu looks for reports. From the Tools menu, click Options and then click the File Locations tab or edit the parameter in Configuration Manager.

user template path=<path>


Default Description To change user templates path=C:\Program Files\ Cognos\cern\Samples\Impromptu\Templates Sets the location of user template files. User template files provide users with consistent access to templates across the entire application. From the Tools menu, click Options and then click the File Locations tab or edit the parameter in Configuration Manager.

Administration Guide 297

Chapter 41: Configuration Files

workgroup templates path=<path>


Default Description To change workgroup templates path=C:\Program Files\Cognos\cern\Samples\Impromptu\Templates Sets the location of workgroup templates. Workgroup templates provide uses with consistent access to templates across the entire application. From the Tools menu, click Options and then click the File Locations tab or edit the parameter in Configuration Manager.

default template=<path>
Default default template=C:\Program Files\ Cognos\cern\Samples\Impromptu\templates\ standard\simple list.imt Sets the location of the default template to use when creating a new report. From the Tools menu, click Options and then click the File Locations tab or edit the parameter in Configuration Manager.

Description To change

Related Topics
"Impromptu.ini" (p. 295) "Configuration Files" (p. 293)

[Startup Options]
Sets Impromptu's startup attributes.

show QuickHelp=<setting>
Default Description To change show QuickHelp=1 Sets whether Impromptu shows QuickHelp as the mouse pointer moves over buttons on the toolbars. From the Tools menu, click Toolbars, and then clear the Show the Toolbar QuickHelp check box.

connect to database=<setting>
Default Description To change connect to database=1 Sets whether Impromptu automatically connects to the database when opening a catalog. From the Tools menu, click Options, click the Start-up tab, and then clear the Auto Attach to Database When Catalog is Opened check box.

298 IBM(R) Cognos(R) Impromptu(R)

Chapter 41: Configuration Files

ruler displayed=<setting>
Default Description To change ruler displayed=0 Sets whether to show the ruler. From the View menu, click Ruler.

last used catalog=<CatalogName>


Default Description To change Determined when a new catalog is opened. Sets the name of the last catalog opened. Not applicable. This option resets each time a new catalog is opened.

ruler in centimeters=<n>
Default ruler in centimeters=1 Ruler displays measurements in centimeters. Description To change Sets whether the rulers displays measurements in centimeters or inches. To display measurements in inches set the value to 0. Open a report and then under View, click Ruler.

catalog defrag threshold=<n>


Default Description catalog defrag threshold=66 Sets a threshold for the percentage of useful information. If a catalog becomes fragmented and falls below this threshold, the catalog defragments when explicitly closed. Click Close from the Catalog menu to explicitly close a catalog. Defragmenting a catalog makes it smaller by removing wasted space in the catalog. Defragmentation does not happen if the catalog is read-only there is insufficient disk space to perform defragmentation To change Use a text editor to edit the Impromptu.ini file. You can set the following values: 0 = Do not defragment the catalog. 100 = always defragments the catalog. 66 = value not set.

Administration Guide 299

Chapter 41: Configuration Files

report defrag threshold=<n>


Default Description report defrag threshold=66 Sets a threshold for the percentage of useful information. If a report becomes fragmented and falls below this threshold, the report defragments when file is closed. If you set Report Defrag Threshold to any value other than 0, the value is read as a percentage of the amount of accessible data in the report before the report is defragmented. If the percentage of accessible data falls below the threshold value you set, the report is defragmented and the unused data in the report is removed. To change Use a text editor to edit the Impromptu.ini file. You can set the following values: 0 = Do not defragment the reports. 100 = Always defragments the reports. 66 = The default value.

windows maximized=<setting>
Default Description To change window maximized=0 Sets whether Impromptu maximizes on startup. Maximize the Impromptu window.

window size=<setting>
Default Description Example To change Determines when the Impromptu window is resized. Defines the size of the Impromptu window. window size=0, 0, 1020, 690 Close Impromptu after resizing the Impromptu window.

show invocation dialog=<n>


Default Description To change Show invocation dialog=1 Determines whether to show the Welcome dialog box. Use the Show this dialog in future check box in the Welcome dialog box or use the Show the Welcome to Impromptu dialog box check box in the Options dialog box.

300 IBM(R) Cognos(R) Impromptu(R)

Chapter 41: Configuration Files

Always show catalog logon dialog=<setting>


Default Description To change Always show catalog logon dialog=1 Determines whether the Catalog Login dialog box appears when Access Manager can provide all the required logon information. Use the Always Show this Dialog check box in the Catalog Logon dialog box or the Always Show Catalog Logon Dialog check box in the Options dialog box.

maximize document=<setting>
Default Description To change maximize document=1 Sets whether to show Impromptu reports as maximized. Maximize or restore a report.

file picklist delimiter=<c>


Default Description To change No default entry. When there is no entry, the value is a , (comma). Specifies the picklist file separator. Use a text editor to add and then edit this entry in the Impromptu.ini file.

export HTML metadata=<n>


Default Description To change No default. You must add this entry. Specifies that HTML metadata is included in a report you save as HTML. The metadata describes report contents and individual values. Use a text editor to add the following to the Impromptu.ini file: [Startup Options] Export HTML Metadata=1

open lock warning message=<n>


Default Description To change No default. You must add this entry. Specifies that a warning message doesn't appear when you try to open a report that another user has open or that is read-only. Use a text editor to add the following to the Impromptu.ini file: [Startup Options] Open Lock Warning Message=0

Administration Guide 301

Chapter 41: Configuration Files

OverrideDistributed = <n>
Default Description No default. You must add this entry. Specifies that you can continue to use the Tables and Joins commands when you edit personal distributed catalogs. In Impromptu 6.0, these commands are unavailable unless you add this entry. In earlier versions of Impromptu Administrator, when using personal distributed catalogs the Tables and Joins commands (from the Catalog menu) were available. They shouldn't have been available and using them resulted in a loss of information. Use a text editor to add the following to the Impromptu.ini file: [Startup Options] OverrideDistributed=1

To change

Allow Lazy Path Matching=<setting>


Default Description No default. You must add this entry. Add this setting when you are updating a report with a modified or different catalog than the one it was created with, and you want to enable matching on the first folder item with the same name as the report item. By default, matching on the first folder item is disabled, because if all folder items in the new catalog dont have unique names, then matching on the first folder item can generate SQL queries improperly. To change Use a text editor to add the following to the Impromptu.ini file: [Startup Options] Allow Lazy Path Matching=T

Related Topics
"Impromptu.ini" (p. 295) "Configuration Files" (p. 293)

[Query Options]
Sets query options, such as minimum free disk space and the number of rows to bulk fetch. Impromptu can retrieve more than one row of data in a single fetch call. Since none of the entries in this section appear in the Impromptu.ini by default, you may have to add this section before you add one its entries.

minFreeDiskSpace=<n>
Default Description No default entry. When there is no entry, the value is 0 (meaning unlimited diskspace). Sets the size of the internal swap file (in bytes) that Impromptu uses to cache query results. Defaults to unlimited disk space. If you want to reserve free disk space for other applications, set this entry to the desired level, for example, 100000 (approx. 100 KB). When the swap file reaches maximum size, performance may slow down if you scroll repeatedly across a large number of pages in a report. Use a text editor to edit the Impromptu.ini file.

To change

302 IBM(R) Cognos(R) Impromptu(R)

Chapter 41: Configuration Files

bulk fetch rows=<n>


Default Description No default entry. When there is no entry, the value is 100. Specifies how many rows Impromptu retrieves in one fetch call if your database supports bulk fetch. Note: A limit may have been placed on the number of rows Impromptu can retrieve. If that limit is lower than the bulk fetch rows value, Impromptu uses that limit instead. For more information on limiting the number of rows retrieved, see your Impromptu administrator. Use a text editor to edit the Impromptu.ini file.

To change

use parameterized query=<n>


Default Description No default entry. When there is no entry, the value is 0 (meaning that parameterized queries are not used). Specifies whether SQL parameters are used for prompt values in query statement. In large queries with prompt values, use parameters in queries to increase performance. To use parameterized queries, add this entry and set the value to 1. Use a text editor to edit the Impromptu.ini file.

To change

use automatic ORACLE Decode=<n>


Default Description No default entry. When there is no entry, the value is 1 (meaning that automatic ORACLE Decode is turned on). Specifies whether to automatically generate Decode statements when running queries against an ORACLE database. If an Impromptu query contains If statements, then a Case When statement is written into the SQL query for the database. However, ORACLE databases cannot process Case When statements, which must be processed locally. For queries against ORACLE databases, use the automatic ORACLE Decode statements to increase performance. However, if these queries return the wrong results (possibly because of null or floating point numbers), turn off the automatic ORACLE Decode setting by adding this entry and set the value to 0. Use a text editor to edit the Impromptu.ini file.

To change

generate isnull join=<n>


Default Description To change No default entry. When there is no entry, the value is 1. Specifies whether isnull joins are created during SQLGroup transformation. To turn off isnull join creation, create this entry and set it equal to 0. Use a text editor to edit the Impromptu.ini file.

Administration Guide 303

Chapter 41: Configuration Files

Related Topics
"Impromptu.ini" (p. 295) "Configuration Files" (p. 293)

[Object Attributes]
Sets default formatting attributes, such as patterns or borders, for Impromptu report objects.

<ObjectAttribute>=<setting>, <setting>...
Default Form Border=1,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0 Report Border=1,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0 List Border=1,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0 Crosstab Border=1,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0 OLE Border=1,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0 Graph Border=1,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0 Bitmap Border=1,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0 ColumnTitle Border=1,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0 Rectangle Border=1,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0 Text Pattern=0,255,255,255,0,0,0 ColumnTitle Pattern=0,255,255,255,0,0,0 Form Pattern=1,255,255,255,0,0,0 Report Pattern=1,255,255,255,0,0,0 List Pattern=0,255,255,255,0,0,0 Rectangle Pattern=0,255,255,255,0,0,0 Sets the default format for Impromptu report objects. From the Tools menu, click Options and then click the Object Format tab.

Description To change

Related Topics
"Impromptu.ini" (p. 295) "Configuration Files" (p. 293)

[Styles]
Stores defined style names used in reports and templates.

Note
If you deploy reports to other users, ensure that the [Styles] section of their Impromptu.ini files contains <Stylename=> entries for the styles used in your reports, and that there is a [Style - <Stylename>] entry for each style defined in the [Styles] section.

304 IBM(R) Cognos(R) Impromptu(R)

Chapter 41: Configuration Files

<StyleName>=
Default Light Emboss= Dark Emboss= Column Title Emboss= Light Etch= Dark Etch= Transparent= Heading 1= Heading 2= Heading 3= Heading 4= Heading 5= Poor (Color)= Normal (Color)= Good (Color)= Poor (Mono)= Normal (Mono)= Good (Mono)= Blue Sky 1= Blue Sky 2= Blue Sky 3= Blue Sky 4= Sea Blues 1= Sea Blues 2= Sea Blues 3= Sea Blues 4= Seeing Red 1= Seeing Red 2= Seeing Red 3= Seeing Red 4= Mellow Yellow 1= Mellow Yellow 2= Mellow Yellow 3= Mellow Yellow 4= Grass Green 1= Grass Green 2= Grass Green 3= Grass Green 4= Stores names of Impromptu report styles. [Styles] Raised Button= Lowered Button= High Risk= Add new styles or modify existing ones, use the Styles dialog box. To access the Styles dialog box, with a report open, under the Format menu, click Styles.

Description Example

To change

Each style listed in the [Styles] section, is followed by a separate [Style - <Stylename>] entry that looks like this:
[Style - Light Emboss] Border=1,255,255,255,1,128,128,128,1,128,128,128,1,255,255,255 Pattern=1,192,192,192,0,0,0

The Style entries define borders, a pattern, a font, and a color for each Impromptu default style as well as any styles you have defined.

Administration Guide 305

Chapter 41: Configuration Files

Related Topics
"Impromptu.ini" (p. 295) "Configuration Files" (p. 293)

[Graph Default Colors]


Specifies the default colors for color palettes and patterns.

<ObjectAttribute>=<setting>, <setting>...
Default Custom Colors=65793,8388608,32768,8421376, 128,8388736,32896,12632256,8421504,16711680,65280, 16776960,255,16711935,65535,16777215 Custom Pattern IDs=1,2,3,4,5,6,7,8,9,10,11, 12,13,14,15,16 Description Specifies the default colors for color palettes and patterns.

Related Topics
"Cern.ini" (p. 294) "Configuration Files" (p. 293)

[Query Statistics]
Stores statistics for Impromptu queries.

<ReportName> = <statistic>, <statistic>...


Default Description Created or updated automatically when a report is run. Stores statistical information about Impromptu queries. Impromptu uses the entries in the Query Statistics section to provide query feedback. This information is shown in the Profile tab (Query dialog box) as the average number of seconds to execute the query and the average number of rows the query returns. Impromptu updates the Query Statistic entry each time a report is run, resulting in increasingly accurate statistics as reports are used. C:\Program Files\Cognos\cer3\Samples\Impromptu\Reports\Ppview.imr=793994733,0, 0.000000,0.000000,2,54.000000,1458.000000 Do not change these entries. If you delete this information, you will lose the query performance information shown in the Profile tab (Query dialog box). Note: Impromptu automatically deletes these entries based on file existence. If a query statistics entry is more than 60 days old, Impromptu checks for the existence of the file containing the associated report. If the file no longer exists, Impromptu deletes the Query Statistic entry.

Example

To change

Related Topics
"Impromptu.ini" (p. 295) "Configuration Files" (p. 293)

306 IBM(R) Cognos(R) Impromptu(R)

Chapter 41: Configuration Files

[MRU Files]
Stores a list of the most recently used reports and templates.

MRUF<n>=FileName
Default Description Example Not applicable. Determined when you work with reports and templates. Stores the names of the most recently used reports and templates. Impromptu shows the names in the recent file list in the File menu. [MRU Files] MRUF1=C:\Program Files\Cognos\cer3\Samples\Impromptu\Reports\Report1.imr MRUF12=C:\Program Files\Cognos\cer3\Samples\Impromptu\Reports\Xform01.imr Changes when you work with a new report or template.

To change

Related Topics
"Impromptu.ini" (p. 295) "Configuration Files" (p. 293)

Use Type Libraries


Description
Type libraries contain the available components of the OLE automation server, including information about those components and how to use them. The type library can show arguments and return types of the methods properties for objects defined by the server application definitions for custom data types such as enumerations, unions, data structures, and non-interface functions that can be called from a .dll be used with C++ If you use macros for Impromptu, you can use the type library file, ImpClient.tlb, that comes with Impromptu. ImpClient.tlb contains information about automation objects and collections, along with their properties and methods. Instead of using the IBM Cognos Script Editor, you can use the information in ImpClient.tlb to build macro scripts in Visual Basic or create header files and implementation files in Visual C++. You can also use other applications, such as, Word or Excel, to open the type library (through a Visual Basic-compatible editor).

Notes
The use of the Impromptu type library with Visual Basic is not supported. Type libraries and OLE automation only work in Windows deployment environments. They do not work in other environments, such as, UNIX.

Steps
1. 2. 3. 4. 5. Open Developer's Studio. Open a project. From the View menu, click Class Wizard. Click Add Class and then click From a Type Library. Select ImpClient.tlb. Administration Guide 307

Chapter 41: Configuration Files 6. In the Confirm Classes box, click the classes you want and click OK. 7. In the Workspace, click Class View to show the selected classes and their objects. Note: Only methods are shown for objects, not properties. 8. In the Workspace, click File Viewer to view the object definitions in the ImpClient.h file. You can now create objects in implementation files (*.cpp). 9. Use both types of files in the application you are writing or editing.

Note
Always refer to the Macro online help if there is a discrepancy in object and collection names.

308 IBM(R) Cognos(R) Impromptu(R)

Chapter 42: Get Help on Basic and Advanced Topics


This Help File
The Impromptu online Help is structured to meet the needs of its primary audiences: the report viewer and report creator. Report viewers view, print, or export information found in existing reports. Report creators create reports using the Report Wizard or a template, and apply essential skills, such as sorting, grouping, formatting, and basic filtering. All the information needed to perform essential tasks in Impromptu is in the online Help.

Mastering Impromptu Reports


If you are an advanced report author (you create complex reports for others), see the topic in the Mastering Impromptu Reports online help file that is provided with Impromptu.

Comprehensive Index
A comprehensive index for the online Help contains keywords for topics within both the online Help files.

Administration Guide 309

Chapter 42: Get Help on Basic and Advanced Topics

310 IBM(R) Cognos(R) Impromptu(R)

Chapter 43: Troubleshooting


For information about errors during the installation, see the readme file. The following error messages may be resolved by following the suggestions in the solution section. Problem Cannot Access the Datasource Cannot Open a Catalog Created with Architect Cannot Open a Catalog with the Current User Class or Version of Impromptu Cannot Connect to the SQLServer Database Description Occurs when you attempt to open a catalog or when you connect to the database through Impromptu. Occurs when you attempt to open a catalog created with Architect. Occurs when you attempt to open a catalog using the User version of Impromptu or if your User Class does not exist in the catalog security. Occurs when you attempt to connect to a catalog or an SQLServer database.

Cannot Connect to the MS SQL Occurs when you attempt to connect to a MS SQL Server. Server Cannot Find the Report or One Occurs when you attempt to open a report by double-clicking of Its Components on the file within Windows Explorer. Unable to Connect to the Database Occurs when you attempt to execute a report or query immediately after installing and setting up a connection to DB2, Sybase Adaptive Server Enterprise, or Teradata

Cannot Access the Datasource


Error Message
DMS-E-DBACCESS, It was not possible to access <logical database name> database. [Microsoft][ODBC DLL] datasource name not found and no default driver specified.

Information
Occurs when you attempt to open a catalog or when you connect to the database using Impromptu. Impromptu cannot open the target datasource.

Solution
Check the following information That the ODBC driver has been installed and configured correctly through the Microsoft ODBC Administrator. Verify that the entry for your data source is in the Odbc.ini file. That the Impromptu logical database definition is correct, confirm that the correct ODBC data source is specified. Check that the database definition is in the [Databases] section of the Cognos.ini. That you are using a 32-bit ODBC driver. That you have the latest version of the ODBC driver, including all available patches. That the Odbc.dll and Odbcint.dll are version 2.10 or later. That the AS/400 ptf must be sf34548, if you are using IBM's Client Access. Administration Guide 311

Chapter 43: Troubleshooting That you verify the path with the SQL Lib IBM ACE. Run an ODBC Trace to help identify the problem. Compare the ODBC driver settings with a successful connection from another PC.

If the above is verified, then the database definition for this catalog may be incorrect. Try creating a database definition.

Steps
1. From the Impromptu Help menu, select Contents and Index. 2. In the Help Topics dialog box, select the Contents tab and double click Database Definition Manager. 3. Double click Setup Up Database Access and double click Create a Database Definition. Note: This topic is available only in the Impromptu Administrator online help.

Cannot Open a Catalog Created with Architect


Error Message
The catalog's available user classes do no correspond to any defined by the Common Logon Server.

Information
This error occurs when you attempt to open a catalog created with Architect. The catalog contains security information stored as authentication data in Access Manager. The current user ID does not have permission to access the data in the catalog.

Solution
You must log on to this catalog as the Creator.

Steps
1. In Access Manager, add a user class called Creator and associate the user logging on to the Common Logon Server, to it. 2. Shut down the Common Logon Server and reconnect to the catalog. 3. Use the Creator User Class at the Catalog Logon dialog box. Note: By default every catalog has a Creator User Class.

Cannot Open a Catalog with Current User Class or Version of Impromptu


Error Message
Catalog has no User Class that is valid with this edition. Contact the catalog administrator. Or when using the Impromptu User edition. Cannot open a catalog nor query a report, because an Impromptu warning message is displayed: Catalog has no user class that is valid with this edition. Contact the catalog administrator.

Information
This error occurs when you attempt to open a catalog using the User version of Impromptu or if your User Class does not exist in the catalog security.

Solution
The current user ID does not have permission to access the data in this catalog with the User version of Impromptu. Either the current user class does not exist in the catalog or there are no user classes defined in the catalog. An Impromptu administrator must create and define additional user classes for this catalog. For information about creating user classes, see the Impromptu Administrator online help or the Impromptu Administration Guide.

312 IBM(R) Cognos(R) Impromptu(R)

Chapter 43: Troubleshooting If setting the user classes in the catalog does not fix the problem, than ensure that the report has the correct path to a valid catalog which has user classes defined in its User Profiles: 1. Open the report. 2. From the Report menu, click General and review the Catalog path. If necessary, click Browse to find the correct catalog location and file. 3. Upgrade the catalog and all reports to the same version of Impromptu. You should also synchronize the versions between the Administrator and User editions. Note: The above suggestions do not apply if the catalog was created using Architect.

Cannot Connect to the SQL Server Database


Error Message
Error 53 dms-e-yv_systemerr, an unexpected Windows error (1157) occurred while attempting to load the gateway.

Information
This error occurs when you try to connect to a catalog or a SQLServer database. Note: If you are using Windows authentication for SQL Server login you can connect to SQL Server without logging in again.

Solution
Check the following information The 32-bit MS SQL client software is properly installed and configured on your PC. The Path environment variable contains the path to the \MSSQL\bin directory You can successfully connect to the database outside Impromptu. The files Dbnmpntw.dll and Ntwdblib.dll are in the \MSSQL\bin and \WinNT\System32 directories.

Cannot Connect to the MS SQL Server


Error Message
Unexpected Windows error (1157) occurred while attempting to load the gateway 'msdbak.dll'.

Information
This error occurs when you attempt to connect to a MicroSoft SQL Server. The MS SQL Server Client software does not appear to be installed or is not properly configured.

Solution
If the MS SQL Sever Client software appears to be configured properly, than verify that the following DLLs exist under <drive>:\MSSQLl\bin directory Dbnmpntw.dll Ntwdblib.dll If you have a server without SQL Server or SQL Enterprise Manager, you must verify that these DLLs also exist under <drive>:\WinNT. If the MS SQL Sever Client software does not appear to be configured properly, install or reinstall the MS SQL Server Client software.

Cannot Find the Report or One of Its Components


Error Message
Cannot find the file'<path>\<report>.imr' or one of its components.

Administration Guide 313

Chapter 43: Troubleshooting

Information
This error occurs when you attempt to open a report by double-clicking on the file within Windows Explorer. The Impromptu report does not have a valid application associated with it.

Solution
Impromptu must be identified as the associated application. To do this 1. In Windows Explorer, highlight the .imr file by selecting it. 2. Hold the shift key down, right click the .imr file and select Open With. 3. In the Open With dialog box navigate to either ImpAdmin, if the Administrator version is installed, or ImpUser, if the User version is installed. 4. Select the Always use this program to open this type of file check box. 5. Click OK.

Unable to Connect to the Database


Error Message
Unable to connect to database.

Information
When you try to execute reports or queries immediately after installing and setting up a connection to DB2, Sybase Adaptive Server Enterprise, or Teradata, you may receive an error message that there is a problem connecting to the database or executing the report.

Solution
You must reboot your system to solve this problem.

314 IBM(R) Cognos(R) Impromptu(R)

PART 3: Mastering Impromptu Reports

Administration Guide 315

316 IBM(R) Cognos(R) Impromptu(R)

Chapter 44: Report Data


You use Impromptus powerful tools to create effective reports. You can shape your report by customizing the data source data that appears in the report security features

Getting the Results You Want


You use Impromptu to answer business questions, such as Which sales representative sold the most products? How do sales representatives rank in terms of their total sales? Which product sells best? To get the results you want, you need to understand how Impromptu generates what you see in your reports. Your administrator develops and implements a data model by defining information in the database creating a catalog that presents a business view of the data and defines what information from the database you see and how the information in the database is structured You then use the catalog to access the database and create the reports you need. You can adjust the information that appears in your report by creating groups defining filters defining prompts creating summary fields adding calculated fields highlighting data

Specify the Catalog for Your Reports


You can specify, change or clear the catalog to which a report is attached. This enables you to create and test a new report while attached to a small catalog, and then move the report to a production catalog once your testing is complete. You can also create and test a report at one location, then ship the report to another site with a similar catalog and database.

Steps
1. Select the report. 2. From the Report menu, click General. 3. In the Catalog box, type the path and name of the new catalog to which you want to attach the report. You can also click Browse to locate and select the new catalog. 4. Click OK.

Administration Guide 317

Chapter 44: Report Data

Tip
You can also disconnect the report from the catalog to which it is attached by saving the report with a snapshot of the data. However, you must reconnect to the catalog if you want to refresh the data.

Group Automatically
If a report does not include a grouped data item and you add a summary data item, Impromptu automatically groups all data items in the report. This is called Auto-Grouping. Use this default to quickly produce a summary report. When auto-grouping is enabled, Impromptu assumes full control of grouping and association: the Group and Associate buttons are unavailable (unless you select a data item) any previously grouped data items become ungrouped data items are grouped in the order in which they appear in the Group tab (Query dialog box) summaries are automatically associated with the last group listed in the Group Order box of the Group tab (Query dialog box) For example, you create a report that consists of Branch, Rep Name, and the Total Sale Amount summary. Impromptu automatically groups Branch and Rep Name, and associates the summary with Rep Name, the lowest-level grouped data item.

Steps
1. From the Report menu, click Query, and click the Group tab. 2. Select the Auto-Group check box and click OK. If you include a summary data item in the query and click the Auto-Group check box, then the data items are grouped in the order that they appear in the Group Order box of the Group tab (Query dialog box).

Notes
Selecting the Auto-Group check box has no effect until a summary data item is included in the query data. By default, the auto-group checkbox is selected whenever you create a new report. The Auto-Group check box is cleared if you select and group a data item or if you change the automatic association of a summary data item.

Define Filters
You use filters to focus a report and minimize processing time by excluding any data that is irrelevant to the report. For example, you can filter a report to show only the customers who placed orders with a total sales amount greater than $500 during the past year. You can create detail and summary filters. Note: You cannot use text binary objects in filters.

Detail and Summary Filters


Your report can contain a combination of detail and summary filters. A detail filter applies one or more specified conditions to each row of data. If the conditions are true for a row, the row is retrieved and appears in the report; if the conditions are not true, the row is not retrieved and does not appear in the report. For example, here is a report with a detail filter that includes only branches that start with the letter M.

318 IBM(R) Cognos(R) Impromptu(R)

Chapter 44: Report Data

You can filter summary data items that you select from a report query or the catalog. For example, here is the same report listing branches and total sale amounts. Instead of a detail filter, this report uses a summary filter that retrieves only the rows where total sale amount is greater than $100,000.

Unlike a detail filter, which can include only detail data items, a summary filter can include both summary and detail data items. If youre familiar with SQL, you can think of a detail filter as having a predicate in the WHERE clause and a summary filter as having a predicate in the HAVING clause. The WHERE clause is processed first, followed by any grouping and summarization, and then the HAVING clause is processed. For information about creating summaries, see "Summaries" (p. 336).

Create Filters
You can create filters by using filter definitions in the Filter tab (Query dialog box, Report menu).

Steps
From the Report menu, click Query. Click the Filter tab. Select either Detail or Summary in the Filter Type box. From the Available Components box, insert the components into the Filter Definition box to build your filter. 5. Click OK. Note: You can only include crosstab filters in crosstab reports. For information about crosstab filters, see "Filter Data in Crosstab Reports" (p. 389). 1. 2. 3. 4.

Use Filter Expressions


Use the OR operator and the AND operator to create the filter expressions you need. Follow these guidelines when using filter expressions. Use the OR operator to indicate that a row must meet at least one of the conditions on either side of the OR operator. Use the AND operator to indicate that a row must meet both of the conditions on either side of the AND operator. For example, retrieve only the rows of data where the product price is less than $10.00 or the product margin is less than or equal $5.00, use this expression.
Product Price < 10 OR Product Margin <= 5

To retrieve only the rows of data where the product price is less than $10.00 and the product margin is less than or equal to $5.00, use this expression:

Administration Guide 319

Chapter 44: Report Data


Product Price < 10 AND Product Margin <= 5

Tip
To enhance performance, use limited local processing (Client/Server tab, Query dialog box) instead of flexible processing.

For information about performance issues, see "Optimize Performance in Impromptu" (p. 435).

For Example
You want to filter a report to show only those products from the GO Sport Line. Of the rows that meet this condition, you want to retrieve only the rows in which the product price is less than or equal to $10.00 or the product margin is less than or equal to $5.00. Because expressions that use the AND operator are processed before expressions that use the OR operator, the following filter returns results that you do not expect:
Product Type = GO Sport Line AND Product Price <= 10 OR Product Margin <= 5

Impromptu retrieves rows that meet the condition "Product Type = GO Sport Line AND Product Price < 10." Impromptu then retrieves rows that meet the condition "Product Margin <= 5", regardless of their Product Type. Instead, you use parentheses to indicate which expressions to evaluate first. The following expression returns the correct results:
Product Type = GO Sport Line AND (Product Price < 10 OR Product Margin <=5)

Because parentheses are processed before other operators, Impromptu first evaluates the expression in the parentheses and retrieves all the products with a product price less than $10.00 and a product margin less than or equal to $5.00. Impromptu then checks these products for those that are from the GO Sport Line. There is often more than one way to filter data and get the same results. Depending on how your database processes requests, one method may be more efficient than another.

For Example
You want to retrieve only the rows for three product lines: Recycled Products, Sport Wear, and Back Packs. You define this filter:
Product Line = 'Recycled Products' OR Product Line = 'Sport Wear' OR Product Line = 'Back Packs'

Because the values in the example are from the same column of data, you can use the IN operator to achieve the same results:
Product Line IN ('Recycled Products', 'Sport Wear', 'Back Packs')

Filter Without Changing Your Summaries


You can filter values from your report without affecting the summaries that are based on those values. For example, a summary in your report shows that the total number of orders is 1,122. When you filter to show only orders with a total sale amount over $25,000, the total number of orders is reduced to 39. You can calculate the summary first, then filter, so that the total number remains at 1,122.

320 IBM(R) Cognos(R) Impromptu(R)

Chapter 44: Report Data To specify that a summary is calculated before the summary filter is applied, do one of the following: Click the Calculate Before the Summary Filter Is Applied check box in the Data Definition dialog box of the summary data item. The summary calculation is prefiltered in this instance, but not if you use it elsewhere. Add a Prefilter component to the summary expression. The calculation is always automatically applied before the summary filter. You can add the Prefilter component to a summary expression even when there is no summary filter in the report. When you add or delete a summary filter, you do not change the summary expression.

Steps
1. From the Report menu, click Query, and click the Data tab. 2. In the Query Data box, select the summary data item that you want to calculate before the summary filter is applied. 3. Click Edit Definition. 4. In the Data Definition dialog box, select the Calculate Before the Summary Filter Is Applied check box or double-click Prefilter in the Available Components box to add it to the Expression box. If you add the Prefilter component to the Expression box, the data definition in the Expression box becomes: "<summary data item> prefilter". 5. Click OK to return to the Query dialog box.

What You Can Do Using Filters


This section covers some of the things you can do using filters. You can retrieve data that contains missing values that starts with or contains a specific value using another report based on a rolling time period that matches a pattern of characters

Retrieving Data that Contains Missing Values


You can limit your report to retrieve just those rows of data that contain missing values for a specified data item. Missing values can be a blank, a variable length character field with a length of 0, or a null value (a cell that contains nothing and is marked with a flag in the database). For example, you want to determine which customers have not paid their invoices. You create the following filter:
Payment is missing

Steps
1. In the Available Components box (Filter tab, Query dialog box), add the data item from the Report column or the Catalog column. 2. In the Available Components box, double-click Is Missing and click OK.

Note
If no rows appear in the report, there are no missing values.

Tip
To show null values when you filter on another condition, you must include the null value condition in the filter expression. For example, the following filter retrieves all product types except Outdoor Products.
Product Type not in (Outdoor Products) OR Product Type is missing

If the product type is a null value, the filter retrieves the row.

Administration Guide 321

Chapter 44: Report Data

Retrieve Data that Contains a Specific String or Value


You can retrieve data that begins with or contains a specified string or value. For example, the following filter retrieves only the rows in which the postal code or zip code begins with 3 specific characters:
Postal Code Starts With 'K2G'

You can also filter a report to retrieve only the product numbers that contain a specific value. The filter expression looks like this:
Product Number Contains '60'

Steps
1. In the Available Components box (Filter tab, Query dialog box), add the data item from the Report Columns or the Catalog Columns. 2. In the Available Components box, double-click Starts With or Contains. 3. Double-click String or Value. 4. In the Filter Definition box, type the string or value in the highlighted location and click OK.

Retrieve Data Using Another Report or Snapshot


You can filter a report using the data from another report. Impromptu re-runs the report that stores the dataset to ensure that it contains the most current information. a snapshot. Impromptu filters on a fixed dataset and does not query the database. This ensures that users working with the same report filter the same dataset. For example, you have a report that contains customer details for your customers from Mexico. You want to create a new report that contains only the order information for those customers, so you create your new report, and then filter it using the customer details report. This restricts the data available for your new report to orders made by customers in the customer details report. Filters that rely on another report or snapshot always end with the filter expressions In, All, or Any.

Steps
1. In the Available Components box (Filter tab, Query dialog box), add the data item from the Report Columns or the Catalog Columns. 2. Create a filter expression ending with In, All or Any. 3. Double-click Dataset. 4. Click the report that contains the dataset and select the column on which you want to base your filter. 5. Click Open. 6. Click OK.

Filter Using a Rolling Time Period


You can retrieve data for a time period that has a fixed range, where both dates continuously move (a rolling time period). To create an expression for a rolling time period, you set the current date from either: the database using the Now function your computer using the Today function. Impromptus date functions, such as Add-years, work with date formats. If your database uses DateTime formats, you must precede a date function in the filter with the DateTime-To-Date function to convert the format.

For Example
You filter a report to retrieve the information for orders placed in the last year. Instead of including the dates in the filter and changing them each time you run the report, you use the following functions in the filter definition:

322 IBM(R) Cognos(R) Impromptu(R)

Chapter 44: Report Data


Order Date >= add-years ((now ( )), -1) and Order Date < now ( )

The first part of the expression restricts the data to records dated one year earlier than the current date according to your PC, while the second part restricts the data to records from the previous day or earlier. When you apply the filter, Impromptu captures current information for use in the expression. For example, if the now function returns a date of September 7, 1998, this expression will return all records dated between September 7, 1997 and September 6, 1998.

Steps
1. In the Available Components box (Filter tab, Query dialog box), add the data item from the Report Columns or the Catalog Columns. 2. In the Available Components box, double-click a comparative operator (>,>=,<,<=,=, and so on) Functions and Add-years( ) Functions and Today( ) the minus sign Number 3. Do the following in the Filter Definition box: Type 1 in the highlighted area between quotation marks. Double-click the ellipse (...). 4. In the Available Components box, double-click AND the report or catalog column a comparative operator (>,>=,<,<=,=, and so on) Functions and double-click Today( ) 5. Click OK.

Retrieve Data that Matches a Pattern of Characters


You can create an expression that retrieves data that matches a specific pattern. The pattern can include wildcard characters as follows: the percent sign (%) represents any number of characters the underscore (_) represents one character For example, you want to mail out flyers to specific regions of the city. You filter a report to retrieve customer addresses that match a postal code or zip code pattern.
Postal Code Like 'H_Y%'

Impromptu retrieves only the codes that begin with "H", followed by any single character, a "Y", and any number of characters to complete the sequence. For example, Impromptu retrieves "H2Y 2W2", "H8Y 2R5", and so on. When you use the Like function to retrieve data that ends with a specific value, use the Trim-Trailing function to remove blanks at the end of the data. For example, the following expression removes blanks at the end of each Customer Name value and retrieves rows where the last character of the customer name is n: TRIM-TRAILING (Customer Name) LIKE %n

Steps
1. In the Available Components box (Filter tab, Query dialog box), add the data item from the Report Columns or the Catalog Columns. 2. In the Available Components box, double-click Like String, then type the string including any wildcard characters 3. Click OK.

Administration Guide 323

Chapter 44: Report Data

Note
Impromptu is case-sensitive. Be sure the case of the characters you enter is correct.

Creating Filters Using the Like, Contains, and Starts With Operators
You can use the Like, Contains, and Starts With operators to create complex filter expressions for reports and catalogs. Any function, prompt, or component that evaluates to a string can be used with these operators. When the filter contains Report Columns or Catalog Columns, text blobs can be included in the filter (p. 324). The following components are available: Report Columns Functions Access Security Catalog Columns string Prompt Manager If The following example creates a filter that can search a column based on case insensitive prompt values:
upper (columnname) Contains upper (?Type in Prompt?)

This example uses the Starts With operator to search a column based on a conditional expression:
Product Line Starts With if (Product no. <156) then (A) else (B))

Search Text Blob Data Using the Like, Contains, and Starts With Operators
You can create report and catalog filters that use the Like, Contains, and Starts With operators to search text blob data. If you are using the Like operator, the pattern can include wildcards such as the percent sign (%) and underscores (_).

Steps
1. In the Available components box (Filter tab, Query dialog box), create the filter as follows: Double-click the Report Columns to create a report filter or the Catalog Columns to create a catalog filter. Double-click the text blob data item. Double-click the Like, Contains, or Starts With operator. Double-click string. Type a string value. 2. Click OK.

Sort Returned Values in Impromptu Selection Lists


When selecting values in a report filter or catalog condition, you can specify either an ascending or descending sort. This is an alternative to viewing the values in the default sort order set by the database.

Steps
1. On the Filter tab, in the Filter definition box, place your cursor in the condition or filter so that select values appears in the Available components box. 2. Double-click select values, and in the Select values for <data_item> box, select the values you want retrieved. The limit of the values that are retrieved and appear in the list box is set by the Picklist Limit property in Configuration Manager. 3. Click the Sort List button, and in the resulting list, do one of the following: to use the default sort order set by the database, click the No sort (As source) button to sort the values in ascending order, click the Ascending button to sort the values in descending order, click the Descending button

324 IBM(R) Cognos(R) Impromptu(R)

Chapter 44: Report Data The values appear in the Select values for <data_item> box in the specified order. 4. Click OK.

Tips for Filters


To filter out repetitive information in the database and retrieve only unique rows of data, select the Eliminate Duplicate Rows check box on the Filter tab (Query dialog box). To remove all filters from a report, press Esc to ensure that nothing is selected in your report, click the Filter button, and confirm that you want to delete the existing filter. To provide the report user with a description of the report content, you can include filter definitions or values in a report title or text frame. For example, a report is filtered to show only the rows for North America. In the report title, you include the filter expression "Country = 'North America'". You insert filter definitions using the More Objects dialog box.

Use Prompts to Select Report Data


You can use prompts to filter data when you open a report. The types of prompts are type-in picklist catalog Each prompt type appears when you open a report. The report uses your response to filter the data. When you open a report that contains more than one prompt, Impromptu presents the prompts in the order they are listed in the Available Prompts list (Prompt Manager dialog box, from the Report menu, Prompt Manager). Drag the prompts in this list to change their order. Only prompts that are used in the report appear in the Available Prompts list in the Prompt Manager box. If the prompt is used in a filter, calculation, or condition, its uses are also listed in the reference box.

Prompt Sort Order


The sort order of data returned by a prompt is locale sensitive. Locale sensitive sorting ignores the "-" character and is not case-sensitive. For example, the order of a picklist prompt appears as follows: Enviro-Kit Envirosafe EnviroSak Enviro-T

Tips
Impromptu runs prompts for sub-reports once at the same time as the parent query. To include the prompt data in a report, click More Objects (Insert menu) and select the Prompt Variables item.

Type-in Prompts
A type-in prompt captures information that you enter into the prompt. You can define either a single value or multiple values in a type-in prompt. Type-in prompts are best suited for capturing dates or numeric values that do not require familiarity with the contents of the database. For example, a report on order information uses a type-in prompt to capture two dates. Impromptu filters the report to show only the orders placed within a specific time period.

Administration Guide 325

Chapter 44: Report Data

In the following example, a sales report uses two type-in prompts, filtering on the country and product name, where each prompt accepts multiple values. Note that each prompt value is entered on a separate line and formatted according to the users locale settings..

Tip Text
Impromptu provides tip text for type-in prompts. Tip text shows users the expected formats when entering data values for dates, time, date-time, and intervals. Except for intervals and time, which use the ISO format and English text, tip text is localized. The localized version is set by the users locale. For information about changing locale settings in Configuration Manager, see the Configuration Manager User Guide.

Ensure Case Compatibility


If you want your report to include a type-in prompt that requires text, you can control the text case entered by the user. To do so, you add a filter that converts the text to all upper case (LIKE THIS), or all lower case (like this). This expression in the Filter tab of the Query dialog box converts the user-entered response to the Customer Status prompt to upper case:
Customer Status in ( upper ( ?What type? ) )

You can also force the text to lower case by replacing the "upper" function with "lower".

Picklist Prompts
A picklist prompt presents you with a list of data items from which you select one or more values, so you need not be familiar with the database. The values listed in picklist prompts can be retrieved from a database via a catalog when you want to select information that often changes. a column in another saved Impromptu report, a snapshot, or a HotFile, when you want to select values from a subset of those available in the database. For example, a report picklist prompt based on the Customer Name data item in another report lists only the customer names included in the referenced report. When you open the new report, you are prompted to select one of the customer names.

326 IBM(R) Cognos(R) Impromptu(R)

Chapter 44: Report Data a text file saved in a comma delimited ASCII format when you want to base a prompt on information from another application. If the text file has a single column of values, the value in the Prompts dialog box is the filter value. If the text file has two columns, the value in the Prompts dialog box comes from the second column and the corresponding value from the first column is the filter value. Use two columns in the text file to provide descriptive text for the filter values.

For example, a report can include a prompt that asks you to select a product type from a list of those available in the database. Only the products belonging to the product type you select are retrieved and displayed in your report.

Tips
By default, the maximum number of items in a picklist is 100 items. Although you should avoid using large picklists because they can be confusing to users, you can change this limit using the Picklist Limit property in Configuration Manager. Increasing the limit may have a negative impact on performance. You can sort the data values in picklist prompts in ascending or descending order, or you can use the order that exists at source. If you sort values in ascending or descending order, values are sorted alphabetically or numerically with the exception of date, time, and date-time values. These values are sorted chronologically. To change the prompt separator for a file picklist, modify the Impromptu.ini file. For information, see the Impromptu Administrator online help. In the Index tab, type startup options For information about performance issues, see "Optimize Performance in Impromptu" (p. 435).

Picklist Prompts that Allow Multiple Selections


To create picklist prompts that let you select more than one value, use the In operator and put the prompt in parentheses. For example, the filter expression
Product Type in (?Product Type?)

brings up the following prompt dialog box:

This prompt enables you to select multiple items from the list using Ctrl+click.

Add the Select All Option to Picklist Prompts


To make prompt selection more convenient, you may want to use the select all option with multi-select prompts. The select all option allows users to generate a report using all the values that are valid for the prompt. For example, if the prompt filters on product name, then all the product name values are used when the report is generated. So, if you have 5000 product names, then the report is generated with 5000 product names.

Administration Guide 327

Chapter 44: Report Data Note that if you have a picklist that prompts the user to choose ProductA, ProductB, or ProductC, but there are 5000 products in the database, then if select all is enabled and the user chooses this option, all 5000 products are included in the report. A picklist prompt does not provide data access security. If you want to control access to data, then you must have a catalog or report filter that restricts user access to data. Then, when there is a filter and a user chooses to select all, the data will still be filtered and only the allowed products will be included in the report. When you use the select all option, the picklist limit is ignored. The select all option is available in file, report and catalog picklists specified in either catalogs or reports. By default, the option is selected for new prompts. For upgraded prompts, you must edit the prompt and specify the select all option.

Steps to Add the Select All Option to a Prompt in a Catalog


1. In Impromptu Administrator, under the Catalog menu, click Folders. 2. In the Catalog Folders list, find and click the multi-select prompt you want to edit. Click the Edit button. The select all option applies to prompts used in filters that use the In operator. For example,
Country IN (?CountryPrompt?)

3. In the Prompt Definition dialog box, select the Allow the user to select all values option, click OK, and then in the Folders dialog box, click OK again. 4. Repeat steps 2 and 3 to edit any other prompts in the catalog. 5. Run a report with the updated prompt. The <All> option appears in the picklist.

Steps to Add the Select All Option to a Prompt in a Report


1. In Impromptu Administrator, open a report that contains a multi-select prompt. 2. From the Report menu, click Prompt Manager. 3. In the Prompt Manager dialog box, select the prompt you want to change, and click Edit. The select all option applies to prompts used in filters that use the In operator. For example,
Country IN (?CountryPrompt?)

4. In the Prompt Definition dialog box, select the Allow the user to select all values option and click OK. Click OK again in the Prompt Manager dialog box. When you run the report, the <All> option appears in the picklist.

Catalog Prompts
The administrator can create catalog prompts stored in a folder within the catalog. Users can also create their own catalog prompts if they have the access rights or are working with a personal distributed copy of the catalog (Folders in the Catalog menu). Because the catalog prompts reside in the catalog, they are available to any report that attaches to the catalog. You can access catalog prompts from the Filter tab (Query dialog box). A folder for catalog prompts appears under the Catalog Columns in the Available Components box. The catalog prompt symbol identifies a catalog prompt. You can move, copy or delete catalog prompts just as you can any other catalog folder item using OLE automation. 328 IBM(R) Cognos(R) Impromptu(R)

Chapter 44: Report Data For information on OLE automation, see the Macro Online Help (IBM CognosScript Editor).

When to Use the Types of Prompts


The type of prompt you create depends on factors such as the function of the prompt, the amount of processing required, and the nature of the data (static or dynamic). Follow the guidelines listed below to choose the appropriate type of prompt for your reports. Use If

A catalog picklist prompt. This type of prompt Your report consists of a simple list of dynamic values. does not require a detailed knowledge of the database. A report picklist with a snapshot or a HotFile report as the data source. Because the report has already been generated and saved with the required data, when you run the prompt you do not have to query the database. This can save time. A type-in prompt. This type of prompt can speed up processing time because the report does not need to reference the catalog. A cascading report prompt. For information about cascading prompts, see "Calculating Data Items" (p. 334). Additional processing is required for filtering or calculations.

Your audience has a detailed knowledge of the database or you want the report to be filtered on a range of values. Your reports consist of a hierarchy of values.

Using the Prompt Manager


The Prompt Manager (Report menu) allows you to easily manage prompts in the current report. You can create prompts edit prompts remove prompts store prompts The Prompt Manager verifies links between prompts. If you attempt to create a circular link between two reports in which Report A has a report picklist prompt that references Report B and you attempt to set up a prompt for Report B that references Report A, the OK button (Prompt Definition dialog box) becomes unavailable.

Creating Prompts Using the Prompt Manager


You can create your own prompts using the Prompt Manager, or you can use prompts from the catalog. For catalog and report picklists, you can use one data item as the source for the prompt, and display a different data item in the prompt. For example, you can prompt users for a data item such as Productname, but use Productnumber in the query that generates the report. This may affect performance.

Administration Guide 329

Chapter 44: Report Data

For information about performance issues, see "Optimize Performance in Impromptu" (p. 435). You can create prompts for single values and multiple values, and you can create cascading prompts.

Steps to Create a Prompt for a Single Value


1. From the Report menu, click Prompt Manager. 2. Click New. The Prompt Definition dialog box appears.

3. In the Name box, type a prompt name. 4. In the Type box, select the type of prompt. 5. In the Message box, type the instructions users see in the Prompts dialog box when you open the report.

330 IBM(R) Cognos(R) Impromptu(R)

Chapter 44: Report Data 6. Do one of the following: To create this type of prompt Type-in

Do this In the Data Type box, select the type of data you will enter. Depending on the expression, Impromptu may select a default data type. Date, Time and DateTime values are initialized to zeros in the ISO date-time format. If you accept the initial values, then at run time, the default prompt value is set to the current date and time and formatted according to the users locale. If you want a default value to appear in the Type-in Prompt box when the report is opened, type a default value in the Default Value box. The value must use standard ISO format. Locate and select the desired file, and click OK. In the Data Type box, select the appropriate data type. Depending on the expression, Impromptu may select a default data type. Locate and select the desired report, and click OK. In the Report Data box, select the data item you want to use to filter your report and click Use. If you want the Report Picklist to show a different data item in the prompt, select a data item and click Display. In the Catalog Columns box, select the data item you want to use to filter your report and click Use. If you want the Catalog Picklist to show a different data item in the prompt, select a data item and click Display.

File Picklist

Report Picklist

Catalog Picklist

7. Click OK. If more than one prompt is defined, the new prompt appears highlighted in the Available Prompts box.

Steps to Create a Filter With Multiple Prompts


1. 2. 3. 4. 5. 6. 7. 8. 9. Create more than one prompt. From the Report menu, click Query. Click the Filter tab. In the Available Components box, add the required data item from the Report Columns or Catalog Columns folder. In the Available Components box, click the desired operator and then double-click Prompt Manager Click the prompt you want to appear as the first prompt, and click OK. In the Available Components box, click the operator you want to use (either And or Or). Repeat steps 4 to 7 until all the prompts you want to use are included. Click OK.

Notes
Prompted values appear between question marks. For example, Country = ?Country? and Product in (?Product?) and Sale Amount >= ?Amount? You can use any combination of prompt types.

Administration Guide 331

Chapter 44: Report Data

Create a Type-in Prompt With the In Operator that Accepts Multiple Values
Report filters or conditions that contain the In operator allow report authors to specify type-in prompts that accept multiple values. By allowing multiple prompt values, report consumers can refine reports more easily.

Steps
1. With a report open, from the Report menu click Query. 2. Click the Filter tab. 3. In the Available Components box, complete the following steps to add a filter definition: double-click the Report Columns or Catalog Columns folder, and double-click the data item to filter on double-click the in operator double-click the opening parenthesis double-click Prompt Manager, and in the Available prompts box, click the prompt you want to appear as the first prompt, and click OK. double-click the closing parenthesis double-click the And or Or operator 4. Repeat step 3 to add additional prompts until you reach the last prompt. After the last prompt, omit the And or Or operator. The following is an example of a prompt filter using the In operator that accepts multiple values:
Country in (?Prompt1?) and Productname in (?Prompt2?)

5. Click OK. When the user runs the report, they can type multiple prompt values in the Prompts dialog. Each prompt value must be entered on a separate line and formatted according to the users locale settings.

Creating and Using Cascading Prompts


You can create a series of prompts that show only the values that correspond to the value selected for the previous prompt. These are called cascading prompts. To do so, you create a series of linked reports, each of which contains a filter prompt. Because Impromptu runs each report, the size of the reports affects performance. If you use a large report as the source for a prompt, Impromptu must run the report and read through the dataset to apply the filter. If the information contained in the database does not change very often, it is more efficient to create a HotFile with the data that you want in your picklist, and then use the HotFile in your Query. For example, you open a report, and a prompt appears asking you to select a product type from a list of product types. You select the Environmental Line. The next prompt asks you to select a product line from a list showing only the product lines belonging to the Environmental Line. You select the Sun Block product line, and the report appears showing only the data for the Sun Block products.

332 IBM(R) Cognos(R) Impromptu(R)

Chapter 44: Report Data

Steps
1. Create the report that you want the user to open. 2. Save, but do not close, the report. For each cascading prompt you require, save the report again with a different name for each. 3. Go back to the first report you created. 4. From the Report menu, click Query, and click the Filter tab. 5. In the Available Components box, double click the Report Columns folder to open it. 6. Double-click the data item you want to appear in the filter expression. 7. In the Available Components box, click "In" or "=", and click the left parenthesis. For example, Product in ( 8. Double-click Prompt Manager in the Available Filter Components box. 9. Click New to create a prompt. 10. In the Prompt Definition dialog box, type a Name and a Message for the prompt. 11. In the Type box, click Report Picklist. 12. Locate and select one of the reports you saved in step 2. 13. In the Report Data box, select the data item that the current report prompts for, click Use, click Display and click OK. 14. Click OK to close the Prompt Manager. 15. Complete the filter definition by double-clicking ")" in the Available Components box, and click OK. For example, Product in (?Product Name?) 16. Open each of the reports you saved (other than the first report you created in step 1), and edit each report so it contains the required data items, and the appropriate filter definition containing the desired prompt. 17. Open the last report and edit it so it is a simple list containing the data item for which the user is prompted. 18. Save the report. When you open the report you created for users, you are presented with the series of prompts and lists of filtered values.

Notes
If a prompt in the current report is based on a report that also contains a prompt, you must respond to the prompt in the referenced report before you can respond to the prompt in your current report.

What You Can Do Using Prompts


You can use prompts to filter reports calculate data items format prompts format data

Filter Reports
Prompts are often used to filter reports. For example, a filter retrieves product information based on the product line captured by the prompt:
Product Line = ?Product Line Prompt?

Each time you open the report, you can enter a different product line, but the filter itself stays the same. Filters that use prompts are more efficient than other filtering methods. A prompt filter is applied when data is retrieved from the database on the first query. Other types of filters apply to existing queries, so Impromptu must access the database again.

Administration Guide 333

Chapter 44: Report Data For information about performance issues, see "Optimize Performance in Impromptu" (p. 435).

Steps
1. From the Report menu, click Query, then click the Filter tab. 2. Create a filter expression up to the point where you want to include the prompt. For information about creating filter expressions, see (p. 319). 3. Do one of the following: To use an existing prompt or create a new prompt, double-click Prompt Manager, select or create the prompt, and then click OK. To use a prompt stored in the catalog, double-click Catalog Columns, select the prompt, and then click OK. The path for the prompt location and the prompt name appears in the Filter Definition box. For example, a prompt called Sales Over the Catalog Prompts folder would look like this:
Sale Amount >= ?\Catalog Prompts\Sales Over?

4. Complete the filter expression, if necessary. 5. Click OK.

Calculating Data Items


Prompts can capture values that are used in calculations. For example, a calculation determines new product prices based on a markup value captured by the prompt:
New Product Price = Product Price + (Product Price * ?Markup?)

Each time you open or run the report, you can enter a different markup value without modifying the calculation itself.

Steps
1. From the Report menu, click Query, and click the Data tab. 2. Click the Calculate button. 3. In the Calculation Definition dialog box, create a calculation expression up to the point where you want to include the prompt. For information about creating calculation expressions, see "Create Calculated Fields" (p. 344). 4. Do one of the following: To use an existing prompt or create a new prompt, double-click Prompt Manager, select or create the prompt, and then click OK. To use a prompt stored in the catalog, double-click Catalog Columns, select the prompt, and then click OK. 5. Click OK to close the Prompt Manager dialog box. Your prompt name appears in the Expression box. For example, a prompt called Sales Over looks like this:
Sale Amount >= ?Sales Over?

6. Complete the calculation expression, if necessary. 7. Click OK. Impromptu shows the Prompts dialog box where you can select a value.

Format Report and Catalog Prompts


To achieve consistency in formatting, the users locale settings in Configuration Manager are used to set the default format of report and catalog prompts that use date and date-time values. The prompt types affected are type-in file picklist report picklist catalog picklist 334 IBM(R) Cognos(R) Impromptu(R)

Chapter 44: Report Data Report authors can override the formats globally or set the format of specific data values. For information about changing locale settings in Configuration Manager, see the Configuration Manager User Guide.

Steps to Format Prompts Globally


1. Start Impromptu, and from the Tools menu, click Options. 2. In the Data Type box, click a date or date-time date type. 3. In the Normal box, click the format to use as the default, and click OK. If you select the General option, the format is set to your locale settings. When you specify global settings, the settings only apply to new reports. The settings for existing reports are not changed.

Steps to Format Selected Data Values


1. Click a date or date-time data item in the report. 2. From the Format menu, click Data. 3. In the Normal box, click the format to use as the default, and click OK. If you select the General option, the format is set to your locale settings. Although the General format for interval and time values cannot be changed, the separator characters can be changed. The format for interval values is d hh:mm:ss.sss; the format for time values is hh:mm AM/PM. Locale settings do not affect the prompt format in automated reports. Automated reports still use the ISO format so that report macros remain portable.

Format Data
Prompts can capture values used in conditions that format data. Every time you run a report, you can change the condition description without modifying the condition itself. For example, you create a condition that applies a green background color to all sales amounts greater than the number entered in a prompt. You could enter "500" in the prompt as follows:

The resulting list would have all sale amounts greater than $500 conditionally formatted.

Administration Guide 335

Chapter 44: Report Data

All sale amounts over $500 are highlighted.

Steps
1. 2. 3. 4. 5. 6. Select a data item in the report to which you want to add conditional formatting. From the Format menu, click Conditional Formats. From the Conditional Formats dialog box, click Conditions. From the Conditions dialog box, click Add Custom Condition. Create a condition expression up to the point where you want to include the prompt. For information about conditional text, see "Conditionally Format Data" (p. 354). Double-click Prompt Manager and do one of the following: If the prompt already exists, select it from the Prompt Manager dialog box. If the prompt doesnt exist, click New and create it. Click OK to close the Prompt Manager dialog box. Your prompt name appears in the Expressions box. For example: Sale Amount >= ?Sales Over? Complete the condition expression, if necessary. Click OK. Click Close. In the Change Style To box, select the style you want to apply. Click OK. Impromptu shows the Prompts dialog box where you can select a value.

7. 8. 9. 10. 11.

Summaries
Summaries, like functions, are predefined calculations that perform an operation on one or more values and return a value such as total, count, or average, that summarizes the data. You can use summaries on their own or as part of a larger expression. You can create summaries based on either the report data or the catalog to which the report is attached. If your report contains grouping, and you want your summary to take into account the groups, create the summary based on the report. This ensures that the results returned by the summary reflect the report organization. The key difference between these summary types is that summaries based on a report include an appropriate function (for example the "distinct" clause in SQL) to ensure that only one instance of each value is counted for grouped items.

336 IBM(R) Cognos(R) Impromptu(R)

Chapter 44: Report Data For example, you have a list report of your customers addresses that is grouped by Country, City, and Customer. You want a count of the number of customers supported by each of your distribution centers, which are organized by Country. You create a Count summary of Customers based on your report. The result is an accurate count of the customers supported by your distribution centers in each country. Note: If you had created the Count summary based on the catalog, the summary would have returned a count of how often the Customer field was not empty, including all recurrences of the same customer name. For information about creating simple summaries, see the Impromptu online Help. In the Index tab, type summaries You can create more complex summaries using the summaries listed in the Available Components box. All the summaries are available in the Calculation Definition dialog box. You can access this dialog box with the Calculate button (Query dialog box) or the Calculation command (Insert menu).

Summarize Data
Some types of summaries calculate a value for each row in the report. By default, individual row summaries appear in a column of their own. For example, you create the following summary:
Running-total (Total Sale Amount)

The Running-total summary takes the value of a row in the report, adds it to the total of all of the previous rows in the group, and creates a new total in the new calculated column.

Running summaries produce a sorted result that relies on the report sorting. You shouldnt apply further sorting on running summary columns on a report. Some types of summaries calculate a single value for a group of rows. By default, these summaries appear in a group footer. For example, you calculate the average quota for all sales reps within a country. The summary looks like
average (Quota 95) for [Country]

The summary values appear in a separate column, but you move the result into the group footer.

Administration Guide 337

Chapter 44: Report Data You can also place summary values in the group header, however, this can slow down Impromptus performance. For information about performance issues, see "Optimize Performance in Impromptu" (p. 435). Each summary is associated with one of the following: its location in the report, called automatic association a specific data item, called fixed association

Automatic Association
The value of a summary with automatic association changes with the summarys current location in the report. When you add a summary to a report, the summary has automatic association by default. You can tell that a summary has automatic association by its icon in the Group tab (Query dialog box).

For Example
This report displays sales amounts for Canada and Sweden and shows the totals that Impromptu automatically calculates when you add Total (Sale Amount) to your report using the Summary button on the toolbar.

Total (Sale Amount) [for Customer No.]

Total (Sale Amount) [for Customer No.] Total (Sale Amount) [for Country] Total (Sale Amount) [for Report]

If you drag and drop a summary to a different location in the same report, the summarys value changes. For example, if you move Total (Sale Amount) [for Country] to the page header area, the summary becomes Total (Sale Amount) [for Report] and the report no longer contains a Total (Sale Amount) for [Country].

338 IBM(R) Cognos(R) Impromptu(R)

Chapter 44: Report Data

Total (Sale Amount) [for Report]

Total (Sale Amount) [for Customer No.]

Total (Sale Amount) [for Customer No.] Total (Sale Amount) [for Report]

Fixed Association
When you add a summary to a query, you can associate the summary to a specific data item in the report or catalog, or to the entire report. If you move the summary, the value does not change. You can tell that a summary has fixed association by its icon in the Group tab (Query dialog box). The lower portion of a fixed summarys icon is blank.

For Example
You include a summary to calculate the Total Sale Amount and you manually specify that the summary is for the customer name. This for clause is hard-coded or fixed in the summary expression, so the summary does not change when you change its location in the report.
The value of this summary does not change when you copy or move it here from its original location.

The summarys association is fixed with Customer Name, regardless of where you copy or move the summary.

Different Summary Results for Grouped Columns


In a grouped report, summary results can be different if the user selects a column from the catalog, when the same column is available in the report. If the catalog column is selected, the summary is applied against all rows in the table disregarding some grouping at the report level.

Administration Guide 339

Chapter 44: Report Data In the first example, the grouping makes the summary results between the two columns different. The first count (Product No.) column is selected from Report Columns and is returning the count of Product No. from the report which is 35. (The screen capture only shows the first four rows). The second count (Product No.) column is selected from Catalog Columns and is returning the count of all Product No. from the catalog which isn't affected by the grouping.

In the second example, the grouping has been removed and both results are the same.

Create a Summary
Steps
1. From the Report menu, click Query, and click the Data tab. 2. Click the Calculate button. 3. In the Calculation Definition dialog box, type a name for the summary in the Name box. This name appears in the Data tab. 4. In the Available Components box double-click Summaries double-click the appropriate summary option add the required data item from the Report Columns or Catalog Columns folder 5. To create an automatic association, skip to Step 7. To create a fixed association, double-click For. 6. Do one of the following: Double-click To associate the summary to

Report Columns, and double-click the data item. A data item that is in your report. Catalog Columns to locate and select the data item, and click OK. Report. A data item that is not in your report. The entire report.

7. Continue to add the necessary expression components, and when the summary is complete, click OK.

Tip
To add a summary directly into your report, click Calculation (Insert menu), position the pointer where you want to insert the calculation, and click the mouse button. The Calculation Definition dialog box appears and you can create a summary.

Choose a Group Level for a Fixed Summary


The group level associated with a fixed summary determines whether one or multiple summary values appear for a group.

340 IBM(R) Cognos(R) Impromptu(R)

Chapter 44: Report Data

For Example
The following report has an Average Product Price for Product Line. There is one summary per Product Line. Because there are multiple Product Lines per Product Type, there are multiple Average Product Price summaries per Product Type.

If you want only one Average Product Price summary per Product Type, you can change the association of Average Product Price so that it is fixed with Product Type. There is now only one summary per Product Type and the value reflects the Average Product Price for Product Type

Changing a Summarys Association


You can change a summarys association at any time from fixed to automatic and vice versa. You can also change a summary that has fixed association so that it is associated with a different group. When you change its association, you are changing how the summary column appears in the list report. In list frames, the summary appears once for each occurrence of its associated data item. the summarization results. The summary is calculated for its current associated data item. calculations performed on the associated data item. A summary operation, such as count, ignores data repeated within that group. Only one summary for each group of the associated data item is counted. the association of the summary in the Group tab (Query dialog box). the association in the Association box of the Data Definition dialog box. the order of the report data. The sort order in your report varies depending on the associations you set for the data items in your report. When you sort on An associated data item The report is sorted By the grouped data item with which it is associated For example, if Product Line is a grouped data item and Product is associated to Product Line, Impromptu sorts Product first and Product Line second.

Administration Guide 341

Chapter 44: Report Data When you sort on The report is sorted

By the detail data item A detail data item that is not associated with the grouped data For example, if Product Type is a grouped data item and item Product Price is a detail data item, the details within Product Type are sorted in the order of Product Price. The order of the groups, however, remains unchanged. You can change a summarys association by selecting the summary in the Query Data box (Query dialog box) and clicking Edit Definition.

Note
You can only change the association of a summary that is predefined in the catalog if you have the necessary permissions.

Steps
1. Select a value in the reports summary column, right-click, and click Data Definition. 2. In the Association box (Data Definition dialog box), do one of the following: Select Automatic Report A data item 3. Click OK. To calculate the summary Based on its location in the report For the entire report For a specific data item

Tip
To view the association of a selected summary in your report, look in the status line. For example, Total (Sale Amount) [for Product Type].

Create or Copy a Summary


There is an important difference between making copies of a summary and creating a summary. When a summary has automatic association (its value reflects its location in the report), you get a different result depending on whether you copy the summary or create a new summary. For information about automatic association, see (p. 338).

Copy Summaries
When you copy a summary that has automatic association, and you paste it in another location in your report, you actually copy the text frame within the report. If there is a conflict between the copied summarys group levels, Impromptu calculates the summary for the highest group level. For example, you have a summary, Total Sale Amount, in the City group footer. You make a copy of Total Sale Amount and paste it in the Country group footer (which is higher than the City group). The summary calculates Total Sale Amount for the Country, and both text frames show the Total Sale amount, for the Country. Therefore, the wrong summary value appears in each City group footer.

Create Summaries
When you create a summary, Impromptu inserts a discrete calculation in the query. You must create a new summary for each discrete summary in your report.

342 IBM(R) Cognos(R) Impromptu(R)

Chapter 44: Report Data For example, you have a summary, Total Sale Amount, in the City group footer. You want the Country group footer to have a Total Sale Amount, so you create a new summary data item and you associate it with Country. Two summaries appear in your query; each one calculated for a discrete group in your report. The labels following the summary name in the Query Data box (Query dialog box) and the Group Order box (Group tab, Query dialog box) identify these two discrete groups.

Change a Detailed Data Item into a Summary


You may require a summary of a data item in your report rather than the details. Instead of adding a new, summarized data item to the query, you can change the definition of a data item that is already in the report. For example, a report contains the Sale Amount for each Product in an order. You create the summary Total (Sale Amount). This summary shows the total sale amount for each order, rather than the sale amount for each item in an order.
The Sale Amount column contains details.

If you add a summary, the report contains both details and a summary for Sale Amount and the report takes longer to process.

If you change Sale Amount from a detailed data item to a summary, Impromptu does not have to retrieve the details from the database.

Steps
1. In the report, select the data item you want to change into a Summary. 2. Right-click and click Data Definition. The data item you selected in the report appears in the Expression box. 3. In the Expression box, select the data item to highlight it.

Administration Guide 343

Chapter 44: Report Data 4. In the Available Components box, double-click the Summaries folder. 5. Double-click the type of summary you want to create and click OK. Impromptu changes the original definition of the data item into a summary based on the type of summary you chose. By default, the summary has automatic association.

Tips
To insert a catalog summary that has an automatic association into a list footer and a group footer, add the summary data item twice to the Query data (once for each location in the report). To re-use a calculated data item that contains a summary in another report, or to enable other users to use a calculated data item that contains a summary, you can add the calculated data item to the catalog. For information about adding calculated data items to a catalog, see your administrator.

Calculated Fields
A calculated field is a new data item based on a formula that you define. You can use calculated fields created by the administrator or you can create calculated fields of your own You can create simple calculated fields with simple mathematical calculations, such as Product Price * Quantity = Total Cost complex calculations, which may combine existing columns with summaries, functions, and value constants The number and complexity of the calculated fields in your report may affect performance. For information about performance issues, see "Optimize Performance in Impromptu" (p. 435). For example, you are creating an invoice report that contains the order number, the product names, and the quantity of each product ordered. You add some simple calculated fields: Total Sale Amount multiplies the product price by the quantity ordered. Total Profit subtracts the Product Cost column from the Total Sale Amount.

You also create a calculation called Profit Margin Ranges that uses a conditional expression and a data item as follows:
if (Profit < 500) then ('Low') else if (Profit > 500 and Profit < 1000) then (Medium) else ( 'High).

Create Calculated Fields


Use calculated fields to include information in your report that is based on a formula. A calculated field can include any combination of the following: data from your report functions summaries values that you enter

344 IBM(R) Cognos(R) Impromptu(R)

Chapter 44: Report Data data from the catalog mathematical operations

Calculated fields are identified by their icon. For information about summaries, see "Summaries" (p. 336). To create a calculated field, you build an expression using the available components in the Calculation Definition dialog box.

Note: You can add calculated fields to the catalog for use in other reports or by other users of the catalog. For information about adding calculations to a catalog, see "Store Calculated Data Items and Summaries in Catalogs" (p. 431).

Steps to Create a Calculated Field


1. Do one of the following to access the Calculation Definition dialog box: Do this If

From the Insert menu, click Calculation, then You ran the report and you know where you click the mouse pointer in the report where want to place the calculated field in the report you want to insert the calculated field. From the Report menu, click Query, click the You do not know where you want to place Data tab, and click the Calculate button. the calculated field in the report, or you just want to add the calculated field to the query Click the Data tab and click the Calculate button. You are in the Query dialog box

2. Type a name for the new calculation in the Name box (Calculation Definition dialog box). 3. From the Available Components box, double-click the components to add them to the Expression box and build your calculation. 4. Click OK to return to the Query dialog box. Note: The types of components that appear at any given time in the Available Components box depend on the previous selection.

Steps to Insert a Predefined Calculated Field from a Catalog


1. 2. 3. 4. Open a report or template. From the Report menu, click Query, and click the Data tab. In the Catalog box, select the calculated field you want to use. Click the Add button to add the calculated field to the Query Data box, and click OK.

Administration Guide 345

Chapter 44: Report Data

What You Can Do Using Calculations


You can use calculations to compare or combine values, or to summarize information. The following examples begin with creating a calculation. For detailed steps, see (p. 345).

Calculating the Interval Between Two Dates


You can calculate the interval between two dates by subtracting one date from the other. For example, you calculate the number of days between the closed date and the order date in order to track the average number of days it takes to close a sale.

Steps
1. Do one of the following to add the first date to the expression: Double-click Report Columns, and double-click a date. If You want to use a date from your report

Catalog Columns, double-click the date from You want to use a date that is not in your the Catalog Folders box, and click OK. report 2. From the Available Components box, double-click "-". 3. Do one of the following to add the second date to the expression: Double-click If

Report Columns, and then double-click the a The date is in your report date. Catalog Columns, double-click a date from the Catalog Folders box, and click OK. The expression looks something like this:
Closed Date - Order Date

The date is not in your report

4. Click OK to close the Calculation Definition dialog box and if necessary, click OK to close the Data tab (Query dialog box).

Find the Rank and Percentile of Calculated Fields


You can calculate the rank and percentile of calculated fields in order. For example, you find the rank and percentile of branches based on their total sales. You then sort the report on the rank column to see the branches with the best sales performance.

Steps
1. Double-click Summaries and double-click Rank. 346 IBM(R) Cognos(R) Impromptu(R)

Chapter 44: Report Data 2. Double-click Report Columns and select the calculated field you want to rank. For example: rank (Total Sale Amount) Note: If youre ranking a summarized data item, you must do the summarization before you rank the data item. For information about summaries, see "Summaries" (p. 336). 3. Click OK. 4. In the Data tab (Query dialog box), click Calculate. 5. In the Name box (Calculation Definition dialog box), type a name for the new calculated field. 6. Double-click Summaries and double-click Percentile. 7. Double-click Report Columns and select the calculated field. For example: percentile (Total Sales) 8. Change the data format of the percentile column if necessary: Select the column and click the right mouse button. Click Format and specify the required format. Click OK 9. Click OK to close the Calculation Definition dialog box and click OK to close the Data tab (Query dialog box).

Tip
You can perform these operations directly in your report by selecting the column and clicking the appropriate button on the toolbar. If the required button is not on the toolbar, you can customize the toolbar. For information about customizing toolbars, see (p. 449).

Find the Average of Totals for Groups


You can calculate a summary on a summarized data item. For example, you find the total quantity of sales per product as well as the average total quantity of sales per product type. The average total quantity of sales per product type is an example of a summary within a summary.

Steps
1. Double-click Summaries and double-click Average. 2. Double-click Summaries and double-click Total.

Administration Guide 347

Chapter 44: Report Data 3. In the Available Components box, add the required data item from the Report Columns or Catalog Columns folder. 4. Delete the text <numeric column or calculation>. The calculated field looks like this:
average (total(Qty))

5. Position the pointer outside the parenthesis and double-click "for" (Available Components box). 6. Double-click "report" (Available Components box). The calculated field looks something like this:
average (total(Qty)) for product type

7. Click OK to close the Calculation Definition dialog box and click OK to close the Data tab (Query dialog box).

Extract Years, Months, or Days from a Date


When you want to display only the year, month or day portion of a date, you can extract the information you need. For example, this function shows only the month portion of order dates
month (order date)

Steps
1. In the report, select the date column from which you want to extract the years, months, and/or days. 2. Right-click and then click Data Definition. The Data Definition dialog box appears with the selected column in the Expression box. 3. In the Expression box, click the column to highlight it. 4. In the Available Components box, double click Functions, and select one of the following: Day to show the day portion of a date Month to show the month portion of a date Year to show the year portion of a date 5. Click OK to close the Data Definition dialog box.

Extract Years, Months, or Days from an Interval


In order to make information easier to interpret, you can round the year, month or day portion of an interval. For example, you can convert a shipping time of 62 days into 2 months using this function:
month-of-ymd-interval(ymdint-between(Date Shipped, Date Received))

Steps
1. In the Available Components box, double click Functions, and select one of the following: Day-of-ymd-interval to show the day portion of the interval Month-of-ymd-interval to show the month portion of a date Year-of-ymd-interval to show the year portion of a date Note: The ymd interval expression only shows the interval in date-time format. 2. To change the interval from a date-time format into the year/month/date format, double-click Functions, and then double-click ymdint-between. 3. In the Available Components box, replace the first date with the required date item from the Report Columns or Catalog Columns folder. 4. In the Available Components box, replace the second date with the required date item from the Report Columns or Catalog Columns folder. 5. Click OK to close the Calculation Definition dialog box and click OK to close the Data tab (Query dialog box).

348 IBM(R) Cognos(R) Impromptu(R)

Chapter 44: Report Data

Find the Average Interval Between Two Dates


You can calculate the average interval between two dates by subtracting one date from the other and applying the average summary. To make the information easier to interpret, you can use the year, month or day function. For example, you can calculate the average time it takes to collect payments on invoices using the following function:
average (day (InvSent - Payment))

Steps
1. In the Available Components box, double-click Summaries and double-click Average. 2. In the Available Components box, double click Functions, and select one of the following: Day to show the day portion of a date Month to show the month portion of a date Year to show the year portion of a date 3. Position the pointer after the first date. 4. In the Available Components box, double-click "-". 5. In the Available Components box, add the required data item from the Report Columns or Catalog Columns folder. 6. Click OK to close the Calculation Definition dialog box and click OK to close the Data tab (Query dialog box).

Create a Date from a Number


You can create a date from a number. For example, you calculate a date by combining numbers signifying year, month, and date in order to determine the number of outstanding orders to your year end. You calculate the number of days from the order date until year end, which is your anticipated final billing date for all outstanding invoices.

Steps
1. Double-click Functions and double-click Make-datetime. 2. Double-click Number and type the year into the expression. 3. Select <integer_exp2>, double-click Number in the Components box, and type the month into the expression. 4. Select <integer_exp3>, double-click Number in the Components box, and type the day into the expression. 5. Position the pointer outside the parenthesis. 6. In the Available Components box, double-click "-". 7. Double-click Report Columns and double-click Order Date. The expression now looks something like this:
make-datetime (1995,12,31) - Order Date

8. Click OK to close the Calculation Definition dialog box and click OK to close the Data tab (Query dialog box).

Use the Current Date in a Calculation


You can use the current date in calculations. You can capture the current date to use in calculations from either the database (Now function) your computer (Today function). For example, you calculate the number of days between the due date for current invoices and todays date in order to determine how many days payment is overdue.

Steps
1. Double-click Functions and double-click Now or Today. 2. In the Available Components box, double-click "-". 3. Double-click Report Columns and double-click the required column. Administration Guide 349

Chapter 44: Report Data The expression looks something like this
now ( ) - Closed Date

4. Click OK to close the Calculation Definition dialog box and click OK to close the Data tab (Query dialog box).

Find the Number of Days to the End of the Month


You can determine the number of days left in a specific time period. For example, to establish how many days remain in the current sales period, you calculate the number of days remaining to the end of the current month.

Steps
1. Double-click Functions and double-click Last-of-month. 2. Select <date_exp> and double-click Value in the Available Components box. 3. Double-click Date, and overwrite the default date with the date representing the end of the current month. 4. In the Available Components box, double-click "-". 5. Double-click Functions and double-click Now. The expression now looks something like this
last-of-month (1998-12-01) - now ( )

6. Click OK to close the Calculation Definition dialog box and click OK to close the Data tab (Query dialog box).

Combine Data Items


You can combine two data items into a single data item. This procedure is called concatenation. For example, to create a report that lists both the current address and the mailing address for each customer, you combine two strings, CurrentAddress1 with MailingAddress2, into a single string called All Addresses.

Steps
1. In the Available Components box, add the first required string from the Report Columns or Catalog Columns folder. 2. From the Available Components box, double-click "+". 3. In the Available Components box, add the next required string from the Report Columns or Catalog Columns folder. 4. Click OK to close the Calculation Definition dialog box and click OK to close the Data tab (Query dialog box).

Note
When Impromptu performs string concatenation locally, the result of the operation is an empty cell (or null value) if any of the strings involved contain null values. This occurs because Impromptu requires any expression involving a null value to return a null value. Many databases ignore any null string when performing concatenation. For example, if you are concatenating string A, string B, and string C, and string B is a null value, the database may concatenate only string A and string C.

Create a Character Data Item from a Number Using If/Then/Else Statement


You can create a character data item from a numeric value using an If/Then/Else statement. For example, you convert a coded number into the days of the week or into the applicable department name. 1. From the Available Components box, double-click If. 2. In the Available Components box, add the first required data item from the Report Columns or Catalog Columns folder. 3. In the Available Components box, double-click "=". 4. Double-click Number. 5. Type the applicable number value into the Expression box and press Enter. 350 IBM(R) Cognos(R) Impromptu(R)

Chapter 44: Report Data 6. 7. 8. 9. In the Available Components box, double-click ")". Double-click Value and double-click String. Type the applicable string into the Expression box and press Enter. In the Available Components box, double-click ")". The expression now looks something like this
if (Dept = 02) then (Marketing) else

10. Double-click NULL. 11. Click OK to close the Calculation Definition dialog box and click OK to close the Data tab (Query dialog box).

Use a Predefined Filter Condition with an If/Then Statement


You can use an if/then statement to set a specific criterion for filtering. For example, you create a calculation to convert prices to Canadian currency without changing the original American prices:
if Country=Canada then price *1.43 else price

"Country=Canada" is a filter condition, because the action (multiply price by 1.43) is only performed if the country is Canada.

Steps
1. In the Available Components box, double-click Catalog Columns. 2. In the Catalog Folders box, select a condition. Conditions have this icon 3. Build the rest of the expression and click OK.

Create a Character Data Item from a Number Using Lookup


You can create a character data item from a number when you need to make report information more meaningful. For example, you need to indicate gender type on the personnel forms used within your company. Gender types are coded as: 1 (female), 2 (male), and 3 (unknown). You convert the gender code to the appropriate gender type using the following calculation:
lookup (Gender Code) in (1 --> female, 2 --> male) default (unknown )

Steps
1. From the Available Components box, double-click Lookup. 2. In the Available Components box, add the required data item from the Report Columns or Catalog Columns folder. 3. In the Available Components box, double-click ")". 4. Double-click Number. 5. Type a number to overwrite the default 0 value and press Enter. 6. From the Available Components box, double-click -->. 7. Double-click Value and double-click String. 8. Type a string between the quotation marks and press Enter. 9. In the Available Components box, double-click ")". Impromptu adds default to the end of your expression. 10. Double-click NULL. The expression now looks something like this
lookup (Line No) in (4 ->Naturals)default NULL

11. Click OK to close the Calculation Definition dialog box and click OK to close the Data tab (Query dialog box).

Create a Character Data Item from a Number Using Number-to-String


You can convert a number to a character data item. For example, you convert a telephone number into a string.

Administration Guide 351

Chapter 44: Report Data

Steps
1. From the Available Components box, double-click Functions and double-click Number-to-string. 2. In the Available Components box, add the required data item from the Report Columns or Catalog Columns folder. The expression now looks something like this
number-to-string (Phone Number)

3. Click OK to close the Calculation Definition dialog box and click OK to close the Data tab (Query dialog box).

Highlight Data
You can format your report to highlight interesting data: Define conditions for formatting that is unique to your report. Create styles that you can use to format data. Assign a style to a condition. Apply a conditional format. Enhance the appearance of your report with 3-dimensional formatting techniques. Use predefined conditions from the catalog. Change the order of conditions. Conditionally show and hide headers, footers and rows.

Create Styles
A style is a defined set of formatting characteristics that you can apply to report objects such as font, size, color, borders, patterns, and data formatting. For example, you want to set up a style that formats numeric values with a dollar sign and two decimal places. You want the column titles to be Arial font, size 14, bold, and have a pattern. Your report now looks like this.

Once you create a style, you can apply it to objects in any of your reports. Styles are not saved with a report but are saved in the Impromptu.ini file.

Tip
To distribute a report containing custom styles, send users the Impromptu.ini file along with the report. For users to see the custom styles, they must replace the Impromptu.ini file on their computer with the Impromptu.ini file sent with the report.

Steps
1. From the Format menu, click Styles. 2. In the Styles dialog box, click Add to add a new style. 3. In the Style Definition dialog box, type a new name in the Style Name box.

352 IBM(R) Cognos(R) Impromptu(R)

Chapter 44: Report Data 4. Select the style features you want to set up: Data, Font, Borders, Patterns. Note: The tabs for Data, Font, Borders, and Patterns are only available if you select the corresponding check box on the Content tab. 5. When you finish selecting the formats in the tabs, click OK. 6. To apply this style to selected report objects, click Apply. Otherwise, click Close. You can apply one or more styles to a report object. For information about applying styles, see the Impromptu online Help. In the Index tab, type styles

Applying 3-Dimensional Formatting Techniques


You can combine patterns and borders for report objects to give a three-dimensional appearance. For example, in the following report the frame appears raised because its borders are dark on the right and bottom, and light on the left and top, and it is filled with a light color the text frames appear recessed because their borders are light on the right and bottom, and dark border on the left and top, and they are filled with a dark color

Steps to Make an Object Appear Raised


Select the object you want to format. Right-click and click Format. Click the Patterns tab. In the Pattern box, select the solid pattern. Under Foreground or Background, click Customize, and then, in the Color dialog box, select a light color. 6. Click the Borders tab. 7. In the Border box, click the right line in the border. 1. 2. 3. 4. 5.

8. In the Line box, select a style, such as a thick line, and then click Customize. 9. In the Color dialog box, select a dark color, such as gray or black, and click OK. 10. Click the lower line in the Border box and select the same style and color.

Administration Guide 353

Chapter 44: Report Data 11. Click the left line in the Border box and select a thin style and a light color in the Line box. Repeat the steps for the top line in the Border box. 12. Click OK.

Steps to Make an Object Appear Recessed


1. 2. 3. 4. 5. 6. 7. 8. Click Customize for either the Foreground or the Background box. In the Color dialog box, select a color and click OK. Click the Borders tab. In the Border box, click the right line in the border. In the Line box, select a style, such as a thin line, and then click Customize. In the Color dialog box, select a light color, such as white, and click OK. Click the lower line in the Border box and select the same style and color. Click the left line in the Border box and select a thick style and a dark color, such as gray or black, in the Line box. Repeat these steps for the top line in the Border box. 9. Click OK.

Conditionally Format Data


You can use conditional formatting to identify exceptional data in your report. You can use predefined conditions or create your own conditions. Once you have a condition, you need to assign a style to the condition. Impromptu then formats selected report objects that meet the conditions criteria.

For Example
You want to identify sales representatives who have not met their quota. You create a condition that checks whether each representatives sales for the year is less than their quota for the year: Sales 95 < Quota 95. If the representatives sales are less than the representatives quota, you want the representatives name automatically bolded and highlighted with a border.

Create a Condition
You can create and apply a style to data that meets certain conditions.

Steps
1. 2. 3. 4. 5. 6. 7. 8. Select one or more report objects that you want to format conditionally. From the Format menu, click Conditional Formats. Click Conditions. In the Conditions dialog box, click Add Custom Condition to show the Condition Definition dialog box. In the Name box, type a name for the condition. Use the options in the Available Components box to build an expression. Click OK to close the Condition Definition dialog box. Click Close to close the Conditions dialog box.

354 IBM(R) Cognos(R) Impromptu(R)

Chapter 44: Report Data The custom condition appears in the Condition box. The None standard style is assigned to the condition by default. 9. In the Change Style To box, select the style you want for this condition. Note: If the style you want does not exist, you can create it. For information about creating styles, see (p. 352). 10. Click OK.

Change a Condition
You can modify existing conditions in your reports. If you do not have the appropriate privileges to change a predefined condition, you can make a copy and modify the copy.

Steps
Select one or more report objects. From the Format menu, click Conditional Formats. Click Conditions. In the Conditions dialog box, do one of the following: To create and modify a copy of a catalog condition, click Add Catalog Condition, select a condition, and then click OK. To modify a condition in the report, select the required condition. 5. Click Edit in the Conditions dialog box. The Condition Definition dialog box appears. 6. If you are creating a new condition, type a name for the new condition. Then define the condition and click OK. 1. 2. 3. 4.

Assign a Style to a Condition


You can assign a style to a catalog condition or to a custom condition. When you apply the condition, any data that meets the condition is automatically formatted with the style you assigned so that the results stand out. For example, you assign a style to a condition called "Low Margin". It formats low sales with a large green font. You also assign a style to a condition called "High Margin" to format high sales with a large red font.

Steps
1. 2. 3. 4. Select one or more report objects. From the Format menu, click Conditional Formats. Select the condition to which you want to assign a style. In the Change Style To box, select the style, and click OK.

Tips
To remove a style from a condition, select the condition you want to remove. In the Change Style To box, select the None style and click OK. Impromptu applies the None style to the selected report objects. To remove all styles assigned to conditions, click Clear (Conditional Formats dialog box) and click OK. The None style appears in the Style box beside the conditions.

Applying a Conditional Format


You can apply a conditional format to one or more report objects after you create a condition and assign a style to it. For example, you want to highlight high sales for the month of December. You select the Sale Amount column in the report, and create the condition: Sale Amount > 500. You then assign a style to this condition that makes all Sale Amounts greater than 500 display in a red font.

Step
Select one or more report objects and then select the condition to apply from the Condition dialog box (Format menu, Conditional formats).

Administration Guide 355

Chapter 44: Report Data

Change the Order of Conditions


When more than one conditional format is applied to a report object, the formatting assigned to the first condition in the list takes precedence over the formats assigned to subsequent conditions in the list. The order of your conditions can be important, especially if you have conditions with similar expressions. For example, the Qty data item in your report has two conditions: "Greater than Two" has the style Blue Font "Greater Than Three" has the style Red Font If "Greater than Two" is at the top of the Conditions box, then all the Qty data is formatted with the style "Blue Font" because "Greater than Two" takes precedence. You change the order of the conditions so that "Greater than Three" becomes the top condition in the list. The effect of the change is that all quantities that are greater than three are formatted with the style "Red Font", and all the quantities that are greater than two are formatted with the style "Blue Font".

Step
Move the required conditions in the Condition dialog box (Format menu, Conditional Formats).

Conditionally Hide and Show Report Objects


For reports that include sensitive or irrelevant data, you can hide report objects and show them when you want. This is useful when you distribute printed reports. However, when you distribute reports electronically, the users can show any objects youve hidden. Therefore, do not electronically distribute sensitive information as hidden. For information about hiding, showing, and unhiding report objects, see the Impromptu online Help. In the Index tab, type hiding, part of a report showing, part of a report You can define conditional formats that automatically hide headers, footers, or entire rows.

For Example
You have a grouped report that contains details and a summary for each group. For some groups with only one row of details, the summary in the group footer is the same value as the value in the detail row. You set up conditional formatting that hides the group footer if there is only one row in a group. The Total Sale Amount and the total in the group footer are the same when there is only one order number for a customer, so you conditionally hide the group footer when there is only one row in the group. The expression for this condition is
(count (Order No.) for Customer No.)=1

356 IBM(R) Cognos(R) Impromptu(R)

Chapter 44: Report Data

The row and group footer display the same totals.

The conditionally hiding the group footer eliminates the repetition.

Steps
1. 2. 3. 4. Select the header, footer, or any rows that you want to hide based on a condition. Right-click and click Conditional Formats. In the Conditional Formats dialog box, click Conditions. Do one of the following: Do This Click the condition and click Close Add Catalog Condition. Click the predefined condition, click OK, and Click Close In the Change Style To box, click the Hidden style, and click OK Add Custom Condition Create the expression, click OK, and click Close In the Change Style To box, click the Hidden style, and click OK. The condition you want to apply to the selection does not exist If The condition you want to apply to the selection is in the Conditions box The condition you want to apply to the selection exists in the catalog

Administration Guide 357

Chapter 44: Report Data

358 IBM(R) Cognos(R) Impromptu(R)

Chapter 45: Report Formats


This chapter discusses some of the advanced formatting techniques you can use to make your reports more readable highlight important findings

Formatting Techniques
There are several ways to add formatting to your reports to enhance their readability and their general appearance. You can customize data and object formats apply templates add frames to your reports

Data Formats and Locale Settings


Data formats depend on the locale configuration settings for your IBM Cognos Series 7 product. By default, IBM Cognos Series 7 server products and IBM Cognos Impromptu use a data format configuration file named cerlocale.xml. IBM Cognos Architect, IBM Cognos Visualizer, IBM Cognos PowerPlay for Windows, and IBM Cognos Transformer use Windows Regional Settings for locale settings and data format information. However, these products can also be configured to use the data format configuration file. For information about managing data formats, copying data format information, or editing the data format configuration file, see the Configuration Manager User Guide, or contact your administrator.

Customize Data and Objects


The default format applied to report data is based on the format the data has in the database and your locale settings. For more information about locale settings, see "Data Formats and Locale Settings" (p. 359). You can also customize the data formats for your reports. Formats can be applied globally to all reports or to specific data items. Use This Data type Positive Negative Zero Missing Currency Symbol To Set A data type to format. A format to apply to positive numbers. A format to apply to negative numbers and intervals. A format to apply to numbers and intervals that are zero. A format to apply to numbers, characters, dates, times, date-times, and intervals that are missing. An explicit currency symbol for numeric values that persist with the data or set the currency symbol to default to the users locale setting. For information about modifying locale settings, see the Configuration Manager documentation.

Administration Guide 359

Chapter 45: Report Formats You can: set a default format for numeric values. For example, use the format "0,000", to show the data "1234.56" as "1,235". set numeric values to default to the users locale using the Number option in the Positive list. The Number option applies to the following data types: integer, short integer, decimal, float, double and quad. Tip: To determine the data type of a number, in Impromptu Administrator version, from the Report menu, click Query, and then in the Profile tab, click Query columns. set a default currency format for numeric values. For example, use the symbol, , to show numeric values as 250,00 or 250.00. Or, set the currency symbol to default to the users the locale using the Default option in the Currency Symbol list. set a default format for character values. For example, use the format ""Today is" DDDD, MMMM, D" to show the date as "Today is Wednesday, January 1". set a default format for date values. For example, use the format "D.MMM.YY DDDD" to show the date as "15.Jan.98 Wednesday". set a default format for time values. For example, use the format "HH.MM.SS am/pm" to show the time as "01.23.45 PM". set a default format for date-time values. For example, use the format "DDD, HH:MM am/pm" to show the date as "Wednesday, 11:30 am". set a default format for interval values. For example, use the format "DD "Days" HH:MM:SS" to show the date as "123 Days 04:30:28".

Steps to Customize Data Globally


1. From the Tools menu, click Options. 2. Click the Data Format tab, and in the Data type box, click a data type. The options available for the data type appear. 3. Set the format to use as the global default, and click OK. When you specify global settings, the settings only apply to new reports. The settings for existing reports are not changed.

Steps to Customize Selected Data Values


1. Click a data item in the report. 2. From the Format menu, click Data. The options available depend on the data item selected. 3. In the Data tab, specify a data format. Use Number to format numbers using the locale settings. Currency and click a currency format in the Currency Symbol list. Using Default in the Currency Symbol list sets the format to the users locale. 4. Click OK.

Default Object Formats


To customize objects in your report, you can set a default font so that text in a text frame is always formatted the same way. set a default border for report objects. By default, all objects (except text frames) have a border. You can set a different border, or have no border by default. set a default pattern for report objects. You cannot add a pattern to chart frames, OLE objects, or picture frames. Use This Object types Font To Set The object type to use as the default format The type, style, size, effects, and color of the font

360 IBM(R) Cognos(R) Impromptu(R)

Chapter 45: Report Formats Use This Borders Patterns To Set The location, line style and color or a border The pattern, foreground, and background colors

Define Report Layouts with Templates


A template is a pattern you can use to build reports. It is like a report without any actual data. Using templates to create new reports can save time and effort, particularly when you or other template users frequently need the same type of report. A template can contain any or all of the following report objects: formatting placeholders text pictures frames macros report variables, such as the date or time that the report was created calculations summaries OLE (Object Linking and Embedding) objects You cannot include the following items in a template: sub-reports calculated data items that are stored in the catalog filter conditions that are stored in the catalog any prompts (picklist or type-in), whether or not they are stored in the catalog Templates can increase productivity for the users because the design work is already done facilitate standardized reporting by applying pre-defined formatting enable users to create sophisticated reports that might otherwise be beyond their skill level For information about using templates to create reports, see the Impromptu online Help. In the Index tab, type creating, reports with templates

What are Placeholders?


Templates use placeholders to represent the data items that should appear in the report. For example, a mailing labels template can contain placeholders for name and address. This helps those who use a template to understand how to complete the report. You can group and sort placeholders in a template, just like data items in a report. Placeholders are data independent and allow you to assign a specific data type to each placeholder. As a result, they are useful when you use one template to create different reports based on data from different catalogs. Placeholders can accept data items of any data type or of a particular data type. Placeholders can be defined as no specific type numeric character date time Administration Guide 361

Chapter 45: Report Formats date-time interval text-blob required (they must be filled), or optional accepting only one data item, or accepting one or more data items

You can also define a placeholder so that it does not appear in a report but remains in the query.

Required placeholder

For information about adding placeholders to a template, see (p. 365). For information about filling placeholders in templates, see the Impromptu online Help. In the Index tab, type templates, creating reports with

Set a Default Template


You can select the template that you use most often and click the Set as Default button (New dialog box). Then when you click the New toolbar button or create a new report using the Report Wizard, this template automatically appears.

Customize the Templates Preview Image


In the Open dialog box, by default, Impromptu generates a preview image based on what the selected template looks like. You can customize the preview image, to more easily distinguish templates.

For Example
Each preview image includes an icon that shows the data source, such as a database or a snapshot. The following preview image shows a list style report that uses a snapshot (as indicated by the snapshot icon in the lower right corner) as its data source:

data source

The following preview image shows a list style report that uses a database (as indicated by the database icon in the lower right corner) as its data source:

362 IBM(R) Cognos(R) Impromptu(R)

Chapter 45: Report Formats

data source

You can customize the preview image so it shows a different image, such as the report title:

Steps
1. 2. 3. 4. Open the template (or report) for which you want to customize the preview image. From the Report menu, click Preview. Clear the Automatic Image Generation check box. Do one of the following: Do this To

In the Preview tab, click Copy and click OK. Paste the Modify the existing preview image image into a graphics application and edit it. In a graphics application, create a new image. Create a new preview image

5. Select and copy the new image to the Clipboard (Ctrl+C). 6. In Impromptu (Report Properties dialog box), click Paste, and click OK. Save the report and close it. Impromptu now uses the new preview image for this report in the Open dialog box.

Notes
You can use a graphics program to customize a preview image. You can either alter the default image or create a new image. You can follow the same steps to customize a reports preview image.

Set the View for Templates


You can specify the default view for a template (page layout or screen layout). Use screen layout for screen-only reports. The advantages of the screen layout view are that you can move a column from one page to the next if your report is too wide to fit on one page (which cannot be done in page layout view) and that there are no margins to reduce the visibility of the report. Use page layout view for reports that are destined for the printer.

Create Effective Templates


You can create a template for a list report a chart report forms, such as form letters and mailing labels a crosstab report

Administration Guide 363

Chapter 45: Report Formats A crosstab template contains placeholders for the rows, columns, and cells. When you fill in the placeholders, Impromptu groups the data items in the rows and columns, and summarizes the data items in the cells. You can create a nested crosstab report by allowing each placeholder to accept more than one data item. For a step-by-step tutorial on creating a nested crosstab, see Discovering Impromptu. Template file names end with the extension .imt rather than the .imr extension that Impromptu uses for reports. Impromptu automatically adds the .imt extension when you create and name a template. There are different ways to create a template. You can create a template from scratch save a report as a template

Create a New Template


When you create a new template, you begin with an existing template or the Blank template. You can then add placeholders, frames, objects, and formatting. If the template upon which you base the new template contains placeholders, objects, or formatting, you can edit or delete them as necessary.

Steps
1. From the File menu, click New. 2. Click the Template option button in the Create New box. 3. Select a template, and then click OK. If the template you select contains placeholders, they appear on the screen. 4. Customize your template. Add, calculate, edit, remove, or insert placeholders. For information about creating placeholders, see (p. 365). Add frames, format frames, or remove frames in a template. For information about frames, see "Create Complex Layouts with Frames" (p. 369). Format the template. Set the layout of the template. 5. From the File menu, click Save to save the template with the same name, or click Save As to save the template with a different name.

Tip
To save time when you create a template, begin by selecting an existing template that closely resembles the template you want to create. For example, to create a mailing labels template, you can start with an existing mailing labels template and modify it to meet your needs. This is faster than starting with the Blank template.

Save Reports as Templates


As well as creating a template from scratch, you can turn any report into a template. All the data items in the report automatically become placeholders and the template has the same formatting, grouping, sorting, and filtering that the report had.

Steps to Save Reports as Templates


1. Open a report. 2. From the File menu, click Save As. The File Name box shows a default file name. 3. If you do not want to use the default file name, type a new name in the File Name box. 4. Select Templates (*.imt) from the Save as Type box, and click Save. You can edit a list template (.imt) and change it into a crosstab template. This can save you time if you already have a template that contains all or most of the placeholders and formatting you require.

364 IBM(R) Cognos(R) Impromptu(R)

Chapter 45: Report Formats When you create a crosstab template, you can specify the placeholder locations on the Template tab by selecting each placeholder and clicking the Rows, Columns, or Cells button.

Steps to Change a List into a Crosstab Template


1. 2. 3. 4. 5. From the File menu, click Open. In the Files of Type box (Open dialog box), select Templates (*.imt). Select the list template you want to change and click Open. From the Report menu, click Query. Click the Crosstab Template button. Note: All the placeholders from the list template appear in the crosstab rows, columns and cells. 6. The following steps are optional: Do this Ensure that the Summaries check box is selected for the columns Ensure that the Summaries check box is selected for rows To Include column summaries Include row summaries

Click Placeholder in the Select a Type box Create a new placeholder and move it into the row, column or cells box Click Calculation in the Select a Type box Create a calculated placeholder. and move it into the row, column or cells box For information about creating calculated placeholders, see (p. 367). 7. Click OK.

Notes
You cannot use either multi-column or optional placeholders in filters. You can only use one multi-column placeholder in calculations. You can drag and drop a placeholder from the Select a Type box to the Rows, Columns, or Cells box. You must have at least one required placeholder in the Columns box and the Cells box. All required placeholders appear in bold. To check the properties of a placeholder, select it and click Edit. Ensure that the Optional Placeholder check box (Placeholder Definition dialog box) is cleared for all required placeholders.

Create Placeholders
Placeholders are markers in a template that tell users what data items they should add to the report. A placeholder can show which data item the user should fill it with. It can also perform a calculation using the data item the user fills it with, and show the result in the report. You can set up a placeholder to be optional or required accept only one data item, or one or more The user can fill the placeholders in any order and skip optional placeholders altogether. If you do not want the data item that a placeholder contains to appear in the final report (because, for example, you need the item for a calculation, but it is otherwise irrelevant to the report) you can choose not to generate the placeholder in the report.

Administration Guide 365

Chapter 45: Report Formats

Steps
1. Open the template. 2. From the Report menu, click Query. The following Template tab appears.

3. Click Add. The Placeholder Definition dialog box appears.

4. Type a label in the Label box. The label appears in the Query Data box (Data tab, Query dialog box) or the Rows, Columns, or Cells boxes (Crosstab tab, Query dialog box). The Label box is required when you create a filter or calculation that uses the placeholder. 5. Type the prompt text in the Prompt box. When you create a report using this template, Impromptu shows the prompt in the Data tab (Query dialog box) to indicate which data item should replace the placeholder. The Prompt box is optional. If you leave it blank, Impromptu shows the text you entered in the Label box. 6. Select a data type from the Data Type box. Note: You cannot use placeholders with the No Specific Type data type in calculated data items or filters. 7. Define the placeholder as required: If you want the placeholder to be optional, select the Optional Placeholder check box. If you want the placeholder to accept more than one data item, select the Can Be Filled By More Than One Column check box. If you dont want the data item that the placeholder contains to be displayed in the report nor added to the query, select the For Calculations Only check box. 366 IBM(R) Cognos(R) Impromptu(R)

Chapter 45: Report Formats 8. Click OK. 9. Repeat steps 3 to 9 to add more placeholders to your template. 10. Click OK.

Notes
You cannot use either multi-column or optional placeholders in filters. You can only use one multi-column placeholder in calculations.

Placement of Multi-Column Placeholders and Associated Summaries


How Impromptu inserts multi-column placeholders depends on the type of frame. If you insert a multi-column placeholder into a Text frame contained in a form frame

Impromptu Duplicates the text frame for each data item contained in the placeholder. If the form frame is scoped on a grouped data item, then only the data item used to scope the data will be inserted. Inserts each data item contained in the placeholder as a column to the right of the original. Duplicates the header or footer and all formatting associated with it for each data item contained in the placeholder. Note: If the placeholder is aligned with a list column, all the inserted columns will have the same alignment.

List frame Group header or footer in a list frame

Chart frame

Displays each column contained in the placeholder. Note: Data items that cannot be displayed in a chart are not added to the chart data.

Picture frame

Duplicates the picture frame for each data item contained in the placeholder.

When you insert a multi-column placeholder and its associated summary into a report, a summary is created for each data item contained in the placeholder. Each summary is aligned with its respective data item.

Modifying Existing Placeholders


You can change a placeholder in a template. For example, you change the prompt text that appears in the Data tab (Query dialog box) by changing the prompt you specified for the placeholder.

Steps
1. From the Report menu, click Query, and click the Template tab. 2. Select the placeholder you want to change, and click Edit. 3. Make the changes you want in the Placeholder Definition dialog box, and click OK. For information about the Placeholder Definition dialog box, see (p. 365). 4. Click OK.

Create Calculated Placeholders


Calculated placeholders enable you to include standardized calculations in your reports. You can create placeholders for numeric data and complete a calculation using these values. The results appear in the report. The template user cannot fill in calculated placeholders with data items. Administration Guide 367

Chapter 45: Report Formats For example, a Margin by Product report contains the following placeholders: product cost price margin, which is the calculation: "price - cost" % margin, which is the calculation: "((price - cost) / price) When report creators use this template, they only have to replace the following placeholders with data items: product cost price Impromptu automatically adds the margin and % margin calculations to the query.

Steps
1. 2. 3. 4. 5. 6. 7. Open a template. From the Report menu, click Query. In the Template tab, click Calculate to show the Calculation Definition dialog box. Type a name for the calculated placeholder in the Name box. Build a calculation expression. Click OK to close the Calculation Definition dialog box. Click OK to close the Query dialog box.

Notes
You cannot use placeholders of the No Specific Type data type in calculations. Calculations can only reference one multi-column placeholder (a placeholder with the Can Be Filled By More Than One Column check box selected in the Placeholder Definition dialog box). For information about building calculated data items, see "Create Calculated Fields" (p. 344).

Insert Placeholders
Once you create a placeholder, you can insert it on the report where you want the real data to appear.

Steps
1. From the Insert menu, click Data. Your pointer changes. 2. On the template, position the pointer where you want the upper-left corner of the placeholder. 3. Click and drag the mouse diagonally until the placeholder is the size you want. Release the mouse button to show the Template tab (Query dialog box). 4. Click the placeholder. A placeholder is identified by a placeholder icon. 5. Click Mark for Insertion. A placeholder that is marked for insertion is identified by an insertion icon. 6. Click OK. Impromptu shows the placeholder in the location you specified. Note: By default, the label in the Label box appears as the column header in list reports. The prompt in the Prompt box appears in the template's Query Data box.

368 IBM(R) Cognos(R) Impromptu(R)

Chapter 45: Report Formats

Link Column Titles to the Name of Query Data Items


When you create a placeholder, the name you give that placeholder appears in the report column title. You can also set up the placeholder so the name of the query data item appears in the report column title. For example, you create placeholders called Name and Description. Each user of this template fills the placeholders with different data items. For example, if a user fills the Name placeholder with Customer Name, and the Description placeholder with Customer Note, the report column titles are Customer Name and Customer Note. When you link the column title to the name of the data items, the column title is automatically updated if the name of the data changes. When you enter a name for the column, the title remains the same until you change it.

Steps
1. 2. 3. 4. 5. Select the column title. From the Format menu, click Properties. Click the Column Title tab. Select the Link the Column Title Text to the Name of the Query Data Item check box. Click OK.

Create Complex Layouts with Frames


Frames are containers for report objects such as data, text, pictures, and charts. You can use frames in your reports to organize complex data into a more readable form. You can use the following types of frames to create reports: This type of frame List frame Form frame For more information See (p. 374) See (p. 375)

Contains Data items and other report objects in a tabular row and column format. Other report objects, including other frames. You can create a form frame report or insert a form frame in another frame. A visual representation of data such as a pie chart.

Chart frame Text frame

See (p. 378)

Data items or text that you enter. You can edit the text See (p. 379) that you enter into a text frame but you cannot edit a text frame that contains a data item. A static graphic (such as a company logo that doesnt change) or a dynamic graphic (such as a unique product photo for each product number). See (p. 380)

Picture frame

Object Linking and Embedding (OLE) frame

An object such as data, pictures, charts, and so on from See (p. 401) an OLE-compliant application. If the OLE frame is linked to the source application then the information in the frame automatically reflects changes made in the source application. Impromptu treats an OLE object as a default frame.

Sub-report frame

The results of several reports combined into one report. See (p. 390)

The following report includes several types of frames.

Administration Guide 369

Chapter 45: Report Formats

Form Frame Text Frame Picture Frame List Frames Chart Frame

Frame Properties
The properties of a frame determine the format, size, alignment of data within the frame, location of the frame, and how much data is displayed in each frame. Refer to the table below for a description of each frame property available in the Properties dialog box (Format menu). Use the Align tab Size tab Layout tab To Set the vertical and horizontal position of the frame. Set the vertical and horizontal size of the frame. Set the scope of data in a form frame and position the frame on the page. Set the justification and the line control for a text frame. Add or remove headers and footers, set page breaks, control page numbering, and show or hide scroll bars for a list frame. Printing tab Hide frames on the printed page. You can also use the Printing tab to see which columns in a list frame are repeated on every printed page. Data tab Format tab Source tab Crosstab tab Determine which data is displayed and how it is displayed. Select a chart style and format the appearance of a chart. Select a source for a picture frame, or load picture files using file names from your database. Sort crosstab rows and columns in the order specified in the Query dialog box.

The Parent/Child Relationship


When you insert frames into a report or into other frames, Impromptu keeps track of which frames belong to which frame. A frame that contains another frame is the parent frame. The child frame only uses the data available to the parent frame. You can use this relationship to control the data that is available to subordinate frames and report objects. For example, you create a chart frame, picture frame and a list frame that are contained within a form frame. The form frame is the parent and the chart, picture and list frames are each child frames.

370 IBM(R) Cognos(R) Impromptu(R)

Chapter 45: Report Formats

Parent Frame

Child Frames

This is useful for building reports like invoices or orders where data in one section of the report depends on the values in other sections of the report.

Designate a Primary Frame


Impromptu automatically inserts data into the primary frame if no other frame is selected. By default, the first form frame, list frame, or text frame that you insert into a report is designated as the primary frame. When you work with templates the primary frame is the default container for any placeholders. For information about templates, see (p. 361). If you set a report to have no primary frame, Impromptu disassociates the report from the database query. That is, when you create a query, Impromptu does not automatically insert the data items in the query into your report. Instead, you must select the frame into which you want to insert data items. This can be useful when you want total control over where data is placed when you insert it into the report from the query, or when you do not know which frame should contain the data. A list frame should be the primary frame for a crosstab report.

Steps
1. From the Report menu, click General. 2. In the Primary Frame box on the General tab (Report Properties dialog box), select a frame as the primary frame and click OK. To set a report to have no primary frame, select (none) in the Primary Frame box.

Insert a Frame
Inserting one or more frames is the first step to create a template or new report.

Where Impromptu Inserts the Data in Frames


The following table describes how Impromptu inserts data items into frames: If you insert data into a Form frame

Impromptu adds the data At the position where you clicked the mouse button.

Administration Guide 371

Chapter 45: Report Formats If you insert data into a List frame

Impromptu adds the data At the highlighted position. If the space between two adjacent columns is highlighted then Impromptu adds the data item as a new column. If the group header or footer is highlighted, then Impromptu adds the data item to the group header or footer. If you position the pointer over a page header or footer, then Impromptu adds the data item to that page header or footer. Into the list of data items for the chart frame. Note: To add new data items, from the Format menu, click Properties. In the Chart Data box (Query tab), add the new data items.

Chart frame

Text frame

At the beginning of the text frame.

Tip
To identify a frame type, click Boundary Lines (View menu). You can insert frames or report variables such as Date and Time, into form frames list frames Not all frames can contain other frames. You cannot insert frames into chart frames picture frames text frames Although you cannot insert frames and report objects into text frames, you can combine text frames with one another. For information, see "Combining Text Frames" (p. 380). Note: For information on modifying the different SQL queries that can appear in frames, see "Edit Sub-Report Queries" (p. 392).

Steps
1. From the Insert menu, click a frame type. 2. On the report, position the pointer where you want to locate the upper-left corner of the frame. Your pointer changes according to the frame type you selected. 3. While holding down the mouse button, drag the mouse diagonally until the frame is the size you want, and then release the mouse button. One of the following occurs: Icon Inserts Form frame This happens An empty form frame appears.

List frame

An empty list frame appears.

Text frame

The flashing I-beam appears where you can begin inserting text.

372 IBM(R) Cognos(R) Impromptu(R)

Chapter 45: Report Formats Icon Inserts Picture frame This happens The Source tab (Picture Properties dialog box) appears. You can use this tab to select the image (.bmp,.dib) to include in the frame. The Data tab (Chart Properties dialog box) appears. You can use this tab to select the data item to include in the chart. For information about using this tab, see (p. 378). The Insert Object dialog box appears where you can locate and select the file you want to insert, or you can create a new object using the software listed in the Object Type box.

Chart frame

OLE Object

Select a Frame
You may want to select a frame so that you can move or resize it add a border or pattern to it insert data items or placeholders change its basic properties (such as its name) change its stacking order within the current report control the vertical and horizontal alignment and position set printing characteristics that hide the frame on specific pages in a multi-page report Note: Page header and footer frames are always hidden in Screen Layout view view the query for a sub-report For information about sub-report queries, see (p. 392).

Step to Select an Individual Frame


Click anywhere in the frame. Handles appear indicating that the frame is selected.

Steps to Select Multiple Frames


1. Position the pointer on the frames you want to select. While holding down the left mouse button, drag the mouse until all the frames you want to select are partially crossed by the selection rectangle. 2. Release the mouse button. All the report objects whose borders were touched by the selection rectangle are now selected.

Step to Select All the Frames and Objects in a Report


From the Edit menu, click Select All. Impromptu selects all of the frames and report objects.

Tips
To select a parent list frame or a form frame that is completely filled with subordinate report objects, click anywhere within the parent object. Then click Select Parent (Edit menu), or click the Select Parent button.

Assign Names to Frames


Reports and templates can contain a large number of frames and other report objects. At any time, you can view the names of the frames in your current report.

Administration Guide 373

Chapter 45: Report Formats When you insert new frames into a report, Impromptu assigns names based on the frame type such as "List Frame", "Text Frame", and so on. For example, you insert the first chart frame into a report and Impromptu assigns the name "Chart Frame". When you insert a second chart frame Impromptu assigns the name "Chart Frame 1". You can view the names of the frames in your current report at any time. You can also give each frame in your report a more meaningful name.

Step to Show Frame Names for all Frames in a Report


From the View menu, click Boundary Lines. Impromptu shows the frame name in the upper-left corner of each frame in your report.

Steps to Change the Name of a Frame


1. Select the frame whose name you want to change. 2. From the Format menu, click Properties. 3. In the Name box, enter a meaningful name for the frame and click OK.

List Frames
Using list frames, you can create many different types of reports. For example, you can use list frames to create detailed reports such as Product Inventory or to create summary reports such as Total Sales Per Product Line. A list frame can make up the entire report. To see an example, open the sample report named Singlepage.imr. be inserted into other frames. To see an example, open the "Annual Product Sales" sample report. be inserted as a sub-report. For information about sub-report list frames, see "Link Sub-Reports" (p. 393). List frames can be resized, moved, and formatted. You can sort, filter, group, or perform calculations on the data in a list frame. You can also specify custom formatting for all report objects in the list insert other frames (such as form frames, chart frames, text frames, or picture frames) and report objects into a list frame link column titles in a list frame to the names of query data items perform summary operations on the columns in a list frame

Insert Data
You can insert data items into a list frame to present your report data in rows and columns.

Steps
1. From the Insert menu, click Data. Your pointer changes. 2. Click the mouse button anywhere in the list frame. The Data tab (Query dialog box) appears. 3. In the Query Data box, select the data items that you want to add to the list frame. 4. Click the Mark for Insertion button. Data items marked for insertion are identified by an insertion icon. 5. Click OK.

Insert Report Objects


You can insert any type of report object into a list frame.

Step to Insert a Report Object in a List Frame


Drag and drop the existing report object onto the list frame.

374 IBM(R) Cognos(R) Impromptu(R)

Chapter 45: Report Formats

Steps to Insert a New Report Object in a List Frame


1. From the Insert menu, click the report object that you want to add to the list frame. The pointer changes depending on the type of report object you chose. 2. Within the boundaries of the parent list frame, but not over any existing cells, position the pointer where you want the upper-left corner of the report object you are inserting. 3. Hold down the mouse button and drag the mouse diagonally within the boundaries of the parent frame until the new report object is the size you want and release the mouse button.

Notes
If you want Impromptu to set the size of the new report object, click the mouse button where you want the upper-left corner of the report object. Impromptu inserts the new report object at the point where you click the mouse. Avoid inserting a frame or report object into the detail area of a list frame because the frame or report object is repeated for each row in the list.

Form Frames
Form frames are the basic building blocks for many common reports such as invoices, order forms, checks, mailing labels, and packing slips. A form frame can also be inserted into a report as a sub-report. With a form frame, you can insert any type of data item or report object, including placeholders and other frames (child report objects) align child report objects with one another and with the boundaries of the form frame limit the scope of data logically group related data items such as customer address, product descriptions and product codes repeat the form frame horizontally and vertically to show or print multiple copies of the form frame format the form frame with borders and patterns hide form frames on specific pages of a report For information about hiding frames on specific pages of a printed report, see "Conditionally Hide and Show Report Objects" (p. 356).

Notes
The Blank template consists of one form frame called the Report Body. Impromptu uses form frames for the headers and footers it automatically creates.

Insert Data
You can insert data into a form frame when you want to limit the scope of data, or logically group related data.

Steps
1. From the Insert menu, click Data. Your pointer changes. 2. Click the mouse button anywhere in the frame. The Data tab (Query dialog box) appears. 3. In the Query Data box, select the data items that you want to add to the form frame. 4. Click the Mark for Insertion button. Data items marked for insertion are identified by an insertion icon. 5. Click OK. Note: By default, you see only the first data item in the form frame.

Administration Guide 375

Chapter 45: Report Formats

Tip
To make the form scrollable, set the scope of the form frame to Single Row of Data or Data in a Group (Layout tab, Form Properties dialog box). For information about setting the scope of a form frame, see (p. 376).

Insert Report Objects


You can insert any type of report object into a form frame. You can also use a form frame to group existing report objects. To do this, drag and drop the selected report objects into the form frame. Impromptu makes the existing form frame the parent frame of the selected report objects.

Step to Insert a Report Object into a Form Frame


Drag and drop the existing report object into the form frame.

Steps to Insert a New Frame into a Form Frame


1. From the Insert menu, click a frame type. The pointer changes to reflect the type of frame or report object you chose. 2. Within the boundaries of the form frame, position the pointer where you want the upper-left corner of the report object. 3. Hold down the mouse button, and drag the mouse diagonally until the form frame is the size you want and then release the mouse button.

Notes
You can align report objects to one another or to the boundaries of the parent frame. When you group report objects, a form frame is inserted around the grouped report objects. For information on aligning and grouping report objects, see the online Help. In the Index tab, type aligning, parts of a report grouping, parts of a report

Set the Scope of the Data for a Form Frame


The scope of data determines what data appears in a form frame. Scope of data is a powerful property that you can use to create form frames that automatically show specific subsets of data. By scoping the data, the child frames within the parent form frame can access only the data specified in the properties of the parent form frame. For example, when you put a list frame inside a form frame, you can limit data values in the list to the current row of data in the query.

You can also restrict data items in a form frame to the values for a specific grouped data item such as Customer Name. Setting the scope of data to a specific grouped data item limits the data that appears in the form frame to just the grouped data items.

376 IBM(R) Cognos(R) Impromptu(R)

Chapter 45: Report Formats

If you do not want to establish any special relationship between the form frame and the values it shows, you can set the scope to All Data.

Steps
1. Select the form frame for which you want to set the scope of data. 2. From the Format menu, click Properties, and click the Layout tab. 3. In the Scope of Data box, do one of the following Click Single Row of Data To Show one row of data at a time in each form as you scroll through the report.

Data in the Group and select a grouped data Show all rows that are associated with the item from the Data in the Group box grouped data item, such as a Product. All Data Show all the data that the form frame can access.

4. Click OK.

Repeated Form Frames


You can repeat a form frame horizontally and vertically across the screen or page to view or print multiple copies of a form frame. This is useful when you create a report where a specific number of form frames must fit within the boundaries of the report body. For example, you create a single form for address labels. The single form occupies the entire height and width of the report body, and you have Impromptu partition it into a 3 x 4 matrix of identically sized form images that fit exactly within the boundaries of the form. You can automatically generate multiple, identical form frames within the selected form boundary.

Note
You cannot repeat a form frame that has been scoped to All Data.

Steps
1. 2. 3. 4. 5. 6. 7. 8. Create a form frame in the report within which you want to show multiple form images. Select the form frame that you created in step 1. From the Format menu, click Size. In the Width box, select Snap to Parent. In the Height box, select Snap to Parent. Click the Layout tab (Form Properties dialog box). In the Scope of Data box, click Single Row of Data. In the Tile box, do one of the following: Indicate the number of times that you want to repeat the form by clicking the form image buttons. Type the number of horizontal and vertical forms underneath the form image buttons. Administration Guide 377

Chapter 45: Report Formats For example, if you click the button in the fourth row, third column, or enter 4 by 3, then the form repeats 12 times in a 4 by 3 matrix. You can repeat a form up to 4 times horizontally and 4 times vertically for a maximum of 16 form images using the form image buttons.

Note: The number you type for the horizontal and vertical forms can exceed the number of form image buttons. For example, you can type 6 by 6. 9. Click OK. Impromptu automatically tiles the form frame to repeat the number of times you specified and fit exactly within the boundaries of the parent frame.

Chart Frames
A chart is a visual representation of data that you can use to quickly and easily evaluate information. Use charts to uncover trends, correlations, and exceptions. The chart changes automatically when the data changes. For instructions about inserting a chart frame, see Impromptu User Reference.

Assign Data
Using the Data tab, you pick the available data from the Query Data box that you want to appear in the chart. You can also customize the chart by pivoting the data in the chart or changing the data mode to present a different perspective of your data. For example, you create a chart to report your companys sales over the last four years.

Steps
1. From the Insert menu, click Chart Frame. 2. Place the pointer where you want to locate the upper-left corner of the frame and drag the mouse diagonally until the frame is the size you want. The Chart Properties dialog appears. 3. In the Chart Type box, click the chart type. The chart type sets whether you can plot one or more data values. 4. On the Data tab, use the right arrow to move data items from the Query Data box to the Primary Axis, Secondary Axis, and Measure(s) boxes, as required. Only numeric data items appear in the Query data box. Tip: To remove a data item, click the left arrow. 5. On the Data tab, do one or more of the following. Goal Action

Show in a chart the first row in a grouped In the Mode box, click By Row. data item. Show in a chart the first column in a grouped data item. Swap rows and columns. You must have at least one grouped data item. In the Mode box, click By Column. Click Pivot Data. If you swap rows and columns in a chart that is grouped by rows, it becomes grouped by columns.

378 IBM(R) Cognos(R) Impromptu(R)

Chapter 45: Report Formats 6. Click OK.

Formatting a Chart
You can format a chart to improve readability and presentation by changing the chart style, background color, and adding grid lines. You can also add and remove labels for the data in a chart, and specify the format for the labels, such as bold, font type, and size. For information about these topics, see the online Help. In the Index tab, type formatting, charts formatting, chart legends

Text Frames
You use text frames to add text or data items to a report. A list frame is made up of rows of text frames. For information about inserting text into your report, refer to the online Help. In the Index tab, type adding, text

Sorting or Grouping on Binary Large Objects (BLOBs)


When you put BLOBs in text frames you cannot view the text when you sort or group on your computer rather than in the database. When this occurs, the words "Text not available" appear in the text frame for the BLOB. For information about grouping locally and on the server, see "Client/Server Balancing" (p. 436).

Format the Contents of a Text Frame


You can make text in a text frame either appear on a single line on more than one line You can also truncate the text to the size of the text frame, or automatically wrap the text in a text frame.

Steps
1. Select the text frame. 2. From the Format menu, click Properties, and click the Layout tab. 3. In the Layout tab, do one of the following: Click the Single Line option button Multi-Line option button Multi-Line with Word Wrap option button To Show text on a single line, truncating the text to the width of the text frame Show text on more than one line, but truncate it to the width of the text frame Automatically wrap text in the text frame. Tip: To have large amounts of text span multiple pages, in the Size tab, set the height to dynamic. 4. Click OK.

Tip
To quickly make text in a text frame appear on a single line, select and drag one of the sizing handles to size the frame.

Administration Guide 379

Chapter 45: Report Formats

Combining Text Frames


You cannot insert other frames into a text frame. However, you can combine two text frames into one text frame (Impromptu removes all trailing blank spaces in the data before showing the data in text frames) copy and paste one text frame into another (when you paste a text frame into a list frame, the text is pasted as a new column and is repeated for each row)

Steps
1. Select one of the text frames. 2. While holding down the mouse button, drag the frame into the other text frame. Your pointer changes to the following 3. Release the mouse button. Impromptu combines the two text frames.

Picture Frames
You use picture frames to add bitmap graphics, such as company logos and product pictures, to your reports. With picture frames, you can insert any Windows bitmap (.bmp), Joint Photographic Experts Group (.jpeg or .jpg), Portable Network Graphics (.png) or Device Independent Bitmap (.dib). scale the image to fit within a specific area in the report, or use the images original size and crop it to meet your needs. insert pictures in list frames. When you insert a picture in the detail area of a list frame, the picture repeats once for every row in the list frame. When you insert a picture in a header or footer in a list frame, the picture appears in that header or footer. insert pictures into form frames. You can use scope of data to control how the pictures are displayed. For information about scope of data, see (p. 376). You cannot insert a picture frame in a text frame, a chart frame, or another picture frame.

Note
You can create a static graphic by inserting an OLE Object containing a bitmap that you create using Microsoft Paint. For information about inserting report objects, see the Impromptu online Help. In the Index tab, type inserting, report variables

By default, Impromptu inserts pictures linked to their source so that if the source picture changes, the picture in the report changes. You can also have Impromptu make a copy of the picture in the report so that changes to the original bitmap file are not reflected in the report. For information about inserting a picture frame, see the Impromptu online Help. In the Index tab, type inserting, pictures You can add a picture that changes based on the values for a data item or a calculation called a dynamic picture. For an example of a report that contains a dynamic picture based on a data item, see sample report "Annual Product Sales"

Steps to Insert a Dynamic Picture


1. From the Insert menu, click Picture Frame. 2. Position the pointer where you want to locate the upper-left corner of the frame. 3. While holding down the mouse button, drag the mouse diagonally until the frame is the size you want and then release the mouse button. 380 IBM(R) Cognos(R) Impromptu(R)

Chapter 45: Report Formats 4. Click the Load Using File Name in Column option button (Picture Properties dialog box). 5. Select the name of the column that contains the names of the picture files from the Load Using File Name in Column box. Note: The column must contain only the names of the pictures. For example, the Product Picture data item has "Tent-A" as the value in the first record. Impromptu looks for a file name such as Tent-A.bmp or Tent-A.png and shows the picture for the first record. 6. Select the Prefix with Path check box, and enter the location of the picture files. 7. In the Select the Default Image Type list, click the default file type of your picture files. 8. Click OK.

Note
When creating a picture frame by referencing an image stored in a database column, the name of the image can include the file extension, such as .jpg. If the extension is missing, Impromptu defaults to the format selected in the Source tab of the Picture Properties dialog box.

Scale and Crop a Picture


By default, Impromptu adjusts the size of a picture to a best fit within a picture frame, while maintaining the proportions of the picture.

Steps
1. Select the picture frame that contains the picture you want to scale or crop. 2. From the Format menu, click Size. 3. Do one of the following: Do this Select the Scale Image to Fit check box. Impromptu resizes the picture to the same size as the picture frame. Clear the Scale Image to Fit check box. Impromptu returns the picture to its original size and crops the picture using the frames dimensions. Select the Scale Image to Fit and the Maintain Height/Width Ratio check boxes if they are not already selected. Impromptu adjusts the size of the picture in the picture frame so that the ratio matches that of the original picture size. Generally, the picture does not fit exactly within the picture frame. 4. Click OK. 5. While holding down the pointer over one of the handles for the selected picture frame, drag to size the picture frame and then release the mouse button. Note: You can scale or re-shape a picture to fit a picture frame even if the dimensions of the picture differ from those of the picture frame. You can squash or stretch the picture to produce a desired effect, or to fit it within the boundaries of a picture frame. Maintain the aspect ratio when you resize a picture To Scale a picture to fit within a picture frame

Crop a picture

Administration Guide 381

Chapter 45: Report Formats

382 IBM(R) Cognos(R) Impromptu(R)

Chapter 46: Complex Reports


This chapter discusses techniques for presenting complex data in a report.

Present Complex Data


You can present complex data in several ways, including crosstab reports sub-reports and drill-through reports

Crosstab Reports
A crosstab report is a compact table of rows and columns that shows the value for the combination of each row and column. In a typical crosstab report, the rows and columns are grouped, and the cells are summarized. You can use crosstab reports to summarize and present complex data. Both the crosstab report and the list report contain rows, columns, cells and summaries. However, in the crosstab report, the rows, columns, and cells are interrelated. For example, in the first report the data is presented in a list while in the second report the data is presented in a crosstab.
List report

Crosstab report

You cannot edit the SQL (Structured Query Language) for a crosstab report. For more information about creating crosstabs, see the Impromptu online Help. In the index tab, type crosstabs, creating templates, creating reports with

Administration Guide 383

Chapter 46: Complex Reports

Quickly Change a List Report into a Crosstab Report


You can quickly change a list report into a crosstab report by dragging one or more columns into the row titles area. However, you should be aware of the following: Because all the columns in the list report must appear in the crosstab, you have less control over the contents of the column headers and cells of the crosstab than you do when you use other crosstab creation methods Any detail data items in the list report query, even if they are not in the list report, will appear in the crosstab You can also create a crosstab from a chart or form frame if the frame is the primary frame in your report. The crosstab retains all the properties of the primary frame. For information about designating a frame as the primary frame, see (p. 371). To restore the list report use the Undo command (Edit menu) or the Undo button pivot the data again use the Build List Report button (Query dialog box)

Steps
1. Select one or more columns or column values in the list report. You must summarize the data item you use for the cells, or the crosstab shows only the first occurrence of a value. 2. Drag the selected item(s) into the column titles area. The pointer changes to indicate valid drop locations. Note: The selected items are inserted at the position indicated by the highlighting. 3. Drop the selected item(s). The report becomes a crosstab. 4. Repeat steps 1 to 3 to create a nested crosstab. Note: You determine the order of nesting with the drop position of the selected item(s).

Tip
To reduce the number of empty cells in the crosstab, select a data item for the columns with a many-to-many relationship with the data item in the rows. For example, Customer and Product, Sales Rep and Product, Year and Product, Region and Product all have a many-to-many relationship. A one-to-one relationship, such as Customer and Customer Number, results in a crosstab with many empty cells.

Build Crosstabs from a List Query


You can create a crosstab report directly or build a crosstab after you added data items to a list query or list report. This method requires a more in-depth understanding of crosstabs. Use the Build Crosstab button (Query dialog box) to view the Crosstab tab. This tab contains all the options you need to create a sophisticated crosstab report. When you add a data item to the Cells box (Crosstab tab, Query dialog box), Impromptu adds the default summary. For example, Sale Amount becomes Total Sale Amount when you add it to the Cells box (if Total is the default). If you drag Total Sale Amount from the Cells box back to the Rows box or the Columns box, the default summary is retained. You can create simple crosstabs or nested crosstabs. A simple crosstab has one data item in the rows and one data item in the columns. A nested crosstab has more than one data item in rows and/or columns. When you create crosstabs, you specify where you want summaries in the crosstab and what types of summaries you want. Turning a list report into a crosstab report works best if the data items you want as rows and columns in the crosstab are already grouped. Impromptu uses the grouping to decide where to put columns, and if there is no grouping you may end up with a crosstab that doesn't make sense. Here is an example of a simple crosstab report with both a row summary and a column summary.

384 IBM(R) Cognos(R) Impromptu(R)

Chapter 46: Complex Reports

Here is an example of a nested crosstab. Again, the report has both a row summary and a column summary.

When you build a crosstab, you can include calculations using the columns generated by the crosstab. If you decide to build a crosstab after you have created a list query, you can include any columns from the existing list query in the crosstab query.

Steps
1. From the Report menu, click Query. 2. In the Query dialog box, click the Build Crosstab button. The Crosstab tab appears.

Row Summary checkbox Column Summary checkbox

3. Add data items to the crosstab and include summaries as required. 4. Click OK.

Notes
For a step-by-step tutorial on how to add data items to a crosstab and how to include summaries, see Discovering Impromptu. When you select the summary check box in the Crosstab tab (Query dialog box) to include the row or column summaries, the default summary type matches the summary type of the cell data. For example, if the cell data is averaged, then the row and column summaries will be average. Once you run the query, you can modify the data definition for any row or column summaries to show a different summary type than the cell data summary. You cannot edit the generated crosstab titles. Administration Guide 385

Chapter 46: Complex Reports

Add Summaries to Crosstabs


In a crosstab report, you can add summaries to rows columns footers For example, the following report contains summaries in the rows, columns, and footers.

You add row and column summaries by selecting one of the summary check boxes. A summary check box can be cleared, selected, or shaded (it contains a grayed check mark).

This check box is selected. Summarization exists at all grouping levels. This check box is shaded. Summarization exists at some but not all grouping levels.

You can clear or select a shaded checkbox to change the summarization.

Change Summarization Types for Crosstab Cells


Each cell data item has a default summarization type that depends on the data type of the cell data item. If the data type is Number, the default summarization type is Total. For all other data types, the summarization type is Count. You can change the summarization type.

Steps
1. From the Report menu, click Query and ensure that the Crosstab tab is selected. 2. Select a summarized data item in the Cells box and click Edit. The Data Definition dialog box appears. The summarized data item you selected appears in the Expression box.

386 IBM(R) Cognos(R) Impromptu(R)

Chapter 46: Complex Reports

3. Edit the summarized data item in the Expression box and Click OK.

Summarization for Crosstab Columns and Footers


The default type of summarization for numeric values in crosstab columns and footers is Total. You can change the type of summarization using the Summarization dialog box and specify the levels of grouping to summarize in the columns and footers.

Steps
1. From the Report menu, click Query and ensure that the Crosstab tab is selected. 2. Select a summarized data item in the Cells box and click Summarize. The Crosstab Summarization dialog box appears.

3. In the Summary Type list box, select the type of summarization you want to apply. 4. In the Column <summary> box, select one or more data items to which you want to apply the summary. 5. In the Footer <summary> box, select one or more data items to which you want to apply the summary. 6. Click OK.

Tips
To apply more than one summary to column totals, add the column you want to summarize once for each summary you want.

Administration Guide 387

Chapter 46: Complex Reports For example, if you want both the Total Sale Amount and the Average Sale amount, add the Sale Amount data item to your report twice. Apply the summary you want to each column and delete the unwanted columns from your report.

Create Calculated Columns


You create calculated columns in a crosstab report the same way you create them in a list report.

Steps
1. 2. 3. 4. From the Report menu, click Query. In the Crosstab tab (Query dialog box), click the Calculate button. In the Calculation Definition dialog box, create the calculation you want and click OK. In the Calculation Placement dialog box, specify whether you want the calculation you created to appear in the rows, columns, or cells, and click OK. For information about defining calculations, see "Create Calculated Fields" (p. 344).

Use Columns Generated by the Crosstab


You can create calculated columns using columns generated by the crosstab. You can do this only after the crosstab query runs, since Impromptu must know which columns are generated. For example, you create a new sales quota for each sales representative by calculating an amount that is 25% over the sales each representative made last year. Then, you calculate the net change between the total sale amount and the sale quota for each representative. To do this, you create a calculation using columns generated by the crosstab.
Total Net Change = total (Sales Quota - Total Sales)

Steps
1. From the Report menu, click Query. 2. In the Crosstab tab (Query dialog box), click the Advanced button. Note: If you have not run the crosstab query when you click the Advanced button, you are prompted to run the query. This ensures that the crosstab columns are generated and available for use. 3. Do one of the following: Do this To

Select the Show All Crosstab Columns check See all the crosstab columns (not just the box. calculated columns) Click New. Add a new calculation

388 IBM(R) Cognos(R) Impromptu(R)

Chapter 46: Complex Reports Do this Select the calculation and click Edit. Select the calculation and click Remove. To Edit a calculation Delete a calculation

4. In the Calculation Definition dialog box, create your calculation and click OK. New calculations are added as columns at the end of the report.

Filter Data in Crosstab Reports


You can filter data in a crosstab report by applying one or more of the following types of filters: detail summary crosstab detail crosstab summary For information about detail and summary filters, see (p. 318). If you're familiar with SQL, you can think of a crosstab filter as having a predicate in the WHERE clause on the second SQL pass. Crosstab filters are used with only crosstab reports. If you change the crosstab back to a list report, the crosstab filters are removed from the list report.

For Example
You create a crosstab report that displays the sales totals across the Great Outdoors line of products for all customers.

You apply the following four filters to the report. You apply The detail filter That looks like this (Product Line =Alert Devices and (Customer Type = Camping Chain and Customer Name starts with F)) or (Product Line = Alert Devices and (Customer Type = Sports Chain and Customer Name starts with A)) Total Sale Amount < 5000 Alert Devices Microwave Detective > 200 Total < 10000

The summary filter The crosstab detail filter The crosstab summary filter The report now looks like this.

Administration Guide 389

Chapter 46: Complex Reports

Steps
1. 2. 3. 4. 5. Create the crosstab report. From the Report menu, click Query and then click the Filter tab. In the Filter Type box, select either the Crosstab Detail filter or the Crosstab Summary filter. Create a filter expression using the components in the Available Components box. Click OK.

Tip
To quickly apply a filter to a crosstab report, use the Filter button on the toolbar. For example, if the cells in your crosstab report are values of Average Margin and you select a cell value of 25 and click the Filter button, the crosstab filter is Average Margin = 25.

Swap Rows and Columns


You can swap rows and columns in the Crosstab tab or you can swap them directly on the crosstab report by dragging one or more columns to the row titles area. For example, if the rows are products, and the columns are countries, you can swap them to change the rows to countries and the columns to products.

Change a Crosstab to a List Report


You can change any crosstab report to a list report. When you do so, you lose the crosstab filters. Any data items you added to the crosstab now appear in the list report.

Steps
1. Position the pointer over a column. The pointer looks like this. 2. Click the mouse once to select the column. Click the mouse a second time to select all the columns. 3. Drag the selection into the row titles area. The pointer looks like this. The crosstab becomes a list report.

Tip
You can also change a crosstab to a list report by clicking Build List Report in the Crosstab tab (Query dialog box).

Work With Sub-Reports


Sub-reports are multiple Impromptu queries contained in a single report, so that you can deliver information that would otherwise only be available with two or more reports. Sub-reports offer more flexibility for grouping and sorting data than a regular report. Sub-reports use the same catalog, but you can group each sub-report on different columns; with a regular report, you can only group data in different frames on the same columns. You can also apply different sort and filter conditions to each sub-report.

390 IBM(R) Cognos(R) Impromptu(R)

Chapter 46: Complex Reports For example, you create a report that compares annual sales. You want to see the total sale amount for each year by both product and by product type. You use sub-reports and display them side by side.

You can also create reports that display information in a vertical list. For example, you create a report that lists sales information. In order to sort, group, and filter on different data items, you use sub-reports.

sub-reports

The creation of sub-reports is best suited to report authors who have a good understanding of the database that the catalog uses, and who are creating standard reports for use without modification by the user community.

What You Can Do With Sub-Reports


You can schedule sub-reports with Scheduler and print the results export the main sub-report query data to other applications using the Save As command

Administration Guide 391

Chapter 46: Complex Reports drill through to a sub-report from PowerPlay or Impromptu; however, the filters that are automatically applied from the source report to the drill-through report are always applied to the main query but never applied to the sub-report queries For information on setting up drill-through reports, see (p. 394). publish a report with multiple queries as HTML (HyperText Markup Language) and view it with a Web browser

For information about publishing reports for use with Web browsers, see "Using HTML to Create Reports on the Web" (p. 405).

What You Cant Do With Sub-Reports


You cannot save a sub-report as a local snapshot insert a sub-report into a list frame sort, group, or filter two different queries simultaneously

Create Reports Containing Sub-Reports


A new report automatically has a main query. When you add a sub-report, you must define its query as well. You can add a sub-report to a report by adding a new frame as a sub-report changing an empty frame into a sub-report A frame can be changed to a sub-report or added to the report as a sub-report as long as it can be associated with a query. This excludes only OLE objects and picture frames.

Steps to Change an Empty Frame into a Sub-Report


1. Select the empty frame that you want to change into a sub-report. 2. From the Report menu, click Change to Sub-Report.

Note
If the Change to Sub-Report command (Report menu) is unavailable, ensure you selected a frame, that the selected frame is not already a sub-report, and that the frame is not an OLE object or a picture frame.

Steps to Insert a New Frame as a Sub-Report


1. Select the frame into which you want to insert a sub-report, such as a form frame. 2. From the Insert menu, click Sub-Report, then click the type of frame you want to insert (Chart, Form, List, Crosstab, or Text Frame). 3. Position the pointer where you want the upper-left corner of the frame. 4. Hold down the mouse button and drag the mouse diagonally until the frame is the size you want and then release the mouse button. The Query dialog box appears. 5. Add the data items you want in this sub-report and click OK. If you add a chart sub-report, the Chart Properties dialog box appears.

Edit Sub-Report Queries


When you add a sub-report, the Query dialog box appears. You can define a query for the sub-report that is completely independent of the main query, with its own sorting, grouping, and filtering. When a report contains more than one query, the Report menu changes to enable you to select a specific query from a flyout menu.

392 IBM(R) Cognos(R) Impromptu(R)

Chapter 46: Complex Reports

Step to Select a Query to Edit


From the Report menu, click Query, and select the query you want to edit. If No frame is selected A frame is selected Then The Main Query appears first on the list, followed by the name of each sub-report. The frames sub-report appears at the top of the list, followed by any parent queries the sub-report may have, then the Main Query.

Tip
To see all the queries in the report in a hierarchical structure, from the Report menu click Query, then All Queries.

Link Sub-Reports
By default, the main query and sub-report queries are independent of each other. However, you can link them by including data items from the main query in the sub-report filter expression.

For Example
You filter a sub-report query so that it shows only order information for the current customer name in the main query.

main report sub-report

The filter expression that links a sub-report to a main report looks like this:
<column name>=Main Query.<column name>

<Column name> is the data item you use to link the queries. The example above uses the Customer Name column to link the queries. When the sub-report query runs, it checks for the first row in the Customer Name column and shows only information for that customer. If you want a sub-report to show information for another row in the column, place the main report in a form frame that shows only one row at a time. When you insert the sub-report into the form frame as well, it changes as you click through the rows in the main report. For example, the main and sub-reports above are both in a form frame that shows only one row of the Customer Name column at a time. Each time you scroll to another customer name, the sub-report shows only information for that customer.

Administration Guide 393

Chapter 46: Complex Reports

Steps to Create the Main Report


1. Create a new report using the Blank template. The Blank template uses a form frame to create a report. 2. In the Data tab (Query dialog box), double-click the data items you want to include in the main query. To recreate the example above, open the Customers folder, double-click Customer Name, and click OK. 3. Click the empty report. 4. From the Format menu, click Properties, and click the Layout tab. 5. In the Scope of Data box, click Single Row of Data, and click OK. 6. From the Report menu, click Query. 7. In the Query Data box, click the Data items, and click Mark for Insertion. Click OK.

Steps to Add a Linked Sub-report


1. From the Insert menu, click Sub-Report, and click List Frame. The cursor shows a List Frame icon. Use to drag and size a list frame anywhere in the report. 2. In the Data tab (Query dialog box), double-click the data items you want to include in the sub-report query. To recreate the example above, open the Orders folder, and double-click Order Date and Closed Date. 3. Click the Filter tab, and use data items from the main query to create a filter expression. To recreate the example above double-click Catalog Columns, open the Customers folder, and double-click Customer Name double-click = double-click Report Columns, Main Query, and Customer Name 4. Click OK. Use the scroll buttons on the top right of the report to scroll through the data items in the main query. Each time you scroll, the report frame is recreated, and the sub-report query runs. The sub-report then shows information for the current row in the main query. For more information about creating filter expressions, see (p. 319).

Use Drill-Through Reports


You can use drill-through reports to create a report that better meets the needs of its primary audience while still providing an easy to access link to related information. A report user who wants to see related or more detailed information selects a value in the report and drills through to an associated report. For example, you have a report that lists customer names, order numbers, and the total sale amount for each order. You want to see the transaction details for order number 160. You select this value and click the Drill-Through button. The associated drill-through report opens and is filtered on order number 160.

394 IBM(R) Cognos(R) Impromptu(R)

Chapter 46: Complex Reports

Parent Report

Child Report

You can set up drill-through associations for the following types of reports: list reports crosstab reports reports containing multiple queries (sub-reports) reports using snapshots or outflows reports including chart frames You can also drill through to IBM Cognos Query. For more information, see the Impromptu online Help. In the index tab, type IBM Cognos Query

Notes
You can only drill through from a value in the parents main query to a main query in the child report. To drill through from a chart, the chart must contain summary values for one data item (for example, a bar chart that shows the total sale amount for each country). Both reports must be from the same catalog. When a parent report drills down to a child report containing a prompt, the prompt value you enter for the child report is used as part of the filter for the child report. In the child report, if you select Prompt from the Report menu and enter a new value, the original prompt value is still used as the filter, and the new prompt value is appended to the filter.

Associate Reports for Drill-Through


To set up a drill-through report association, you select the report from which you want users to start. This is called the parent report select a report that you want users to drill to. This is called the child report specify the parent report column(s) from which a child report can be accessed specify the columns from the parent report that are to be included in the filter expression of the child report When you select a value in one of the specified columns in the parent report and click the Drill-Through button, the following occurs: Filter information for this value is passed to the filter expression of the child report.

Administration Guide 395

Chapter 46: Complex Reports Any other columns that you selected for inclusion in the child filter are passed to the filter expression of the child report. The child reports query runs and the report appears. Both the parent and child reports must be from the same catalog.

Notes
To have a column value included in the filter of the drill-through report, the column must exist in both the parent and the child query, but not necessarily in the child report. You can include more than one column in a drill-through filter. You can verify the drill-through filter using the Drill-Through Filters command (Report menu) when you are viewing the child report.

Steps
Before you begin, ensure that you have a parent report, and at least one report that is going to be the drill-through or child report. 1. Open the parent report (the one from which users will drill), and click any data item. 2. From the Report menu, click Drill Through, and then click Properties. The Drill Through Properties dialog box appears.

Note: If the Drill Through Properties command (Report menu) is unavailable, click Options (Tools menu), select the Drill Through tab, and then select the Enable Drill Through Properties check box. 3. Select a column for which you want to add a drill-through report and click Add. The Add Drill Through Query/Report dialog box appears.

396 IBM(R) Cognos(R) Impromptu(R)

Chapter 46: Complex Reports 4. Select the column(s) to be included in the drill-through filter. Clear the column(s) you do not want included in the drill-through filter. For example, if you select Product for the drill-through column Product Cost, then when the user drills through on a value of Product Cost, the filter information passed to the child report includes the value of Product that is in the same row as the selected value of Product Cost. For example, the filter passed to the child report could be Product Cost = 500 AND Product = Star Lite. Note: The column you add a drill-through report for is included by default in the drill-through filter, along with any grouped columns. You can clear the check box for these columns if you do not want them in the filter of the child report. 5. Type the drill-through report name and path, or click Browse to find it. While browsing, select Enable Filter by Catalog to see only reports that use the same catalog as the parent report. Select Enable Filter by Columns to see only reports that contain columns you are using in the drill-through filter. 6. Click OK. Impromptu validates the child reports path and file name, and verifies whether the selected columns exist in the child report. Note: If one or more selected columns do not exist in the child report, Impromptu grays them and shows you a message. You can then choose whether you want to leave the columns in the drill-through filter or clear the selection from the columns and remove them from the drill-through filter. However, if you do not add the missing columns to the child report, the user will be unable to drill through from the parent to the child report. 7. In the Drill-Through Properties dialog box, click OK to set the drill- through association and close the dialog box.

Notes
If there is a conflict between the parent and the child filters, the drill-through (child) report may contain no data. For example, if the selected value in the parent report results in the filter Country = Canada being passed to the child report, and the child report already has a filter Country = Germany, the filter becomes Country =Canada AND Country = Germany. The result is that no rows meet these filter conditions and no data is shown in the drill-through report. If you remove or rename a column in the parent or child report, or if the data type of a column changes in the database, when you drill through an error message appears and the drill-through operation fails.

Tips
To set a drill-through report as the default report that opens when a user selects a value and clicks the Drill Through button, drag the report name to the top of the list under its associated column in the Drill-Through Properties dialog box. To provide the report users with added flexibility, you can include a prompt in the drill-through report. When the user drills through from the parent report, a prompt appears. The values the user enters or selects are added to the filter expression in the drill-through report. For information about creating prompts, see (p. 325).

Test Drill-Through Reports


Before you deploy drill-through reports, test the associations you created to ensure that the drill-through works and the expected result appears the default drill-through report is the first report under the data item if more than one report is associated with a data item. The default report is the report that appears when the user selects a value and clicks the Drill-Through button without selecting the drill-through report from the Drill-Through button drop-down list.

Steps
1. Open the parent report. 2. Press Esc to clear any selections in the report. Administration Guide 397

Chapter 46: Complex Reports 3. Click and hold down the Drill-Through button on the toolbar to highlight all the report hotspots from which you can drill through. (When you release the Drill-Through button, the highlighting disappears).

4. Select a value in the report that was highlighted in step 3. 5. Click the Drill Through drop-down button on the toolbar. 6. Verify whether the correct report or reports appear in the drop-down list. Select a report or click the Drill-Through button to open the child report. 7. From the Drill-Through button drop-down list, click Filters. 8. Verify that the filter expression shows the filter conditions you want passed from the parent report. Note: The Impromptu Drill-Through Filters dialog box displays only valid drill-through filter expressions. The final filter expression applied to the child report is a combination of valid drill-through filters and both the detail and summary filters (or crosstab filters) in the child report. 9. If you associated more than one report with the parent reports column, verify that the drill-through report that appears is the report you want as the default report. If not, drag the report you want as the default to the top of the list for the column in the Drill-Through Properties dialog box. If you are satisfied with the test results, you are ready to deploy the report and its associated drill-through reports. For information about deploying reports, see "Present Results with Other Applications" (p. 398). Note: The drill-through filter is not saved when you exit the child report.

Present Results with Other Applications


You can present the results of your Impromptu reports outside of Impromptu using OLE (object linking and embedding) HTML (web-based report publishing) You can also use OLE to embed objects from other applications into Impromptu reports.

Using OLE to Present Impromptu Reports


Information created in one application and linked or embedded in another application is called an OLE object. When you link and embed objects from one application to another, you maintain a link to the original application so you can take advantage of its features. The primary difference between linking and embedding is where the OLE object is stored: A linked object is like a pointer from one application to information stored in another application.

398 IBM(R) Cognos(R) Impromptu(R)

Chapter 46: Complex Reports An embedded OLE object is a copy of the information from one application inserted and stored in another application.

Note: If you regularly copy report objects to another application, you can set up a Launch button on the toolbar. When you click the Launch button, Impromptu automatically copies information from the active report to the Clipboard before running the application. For information about Launch buttons, see (p. 449).

Link Information From Another Application to Impromptu Reports


You can create a link to include information from other applications in an Impromptu report. This information can appear in the Impromptu report either as data or as an icon. When the information in the source application changes, the Impromptu report is automatically updated with the changed information. For example, you prepare an Impromptu report that shows target sales quotas. Next, you link the company sales figures that are in an OLE spreadsheet application to the report, and distribute the report to your sales force. This ensures that the sales figures are automatically kept as current as the information in the spreadsheet.

Steps to Link Information From Another Application


1. In the source application, select the information that you want to appear in the Impromptu report. 2. Copy the selected information to the Clipboard. 3. From the Impromptu Edit menu, click Paste Special to show the Paste Special dialog box. 4. Click the Paste Link option button. Note: If the Paste Link option button is unavailable, save the source file. 5. If you want the linked information to appear as an icon rather than as data, select the Display as Icon check box. Note: When you select the Display as Icon check box, Impromptu inserts a shortcut that points to the location of the source file. 6. Click OK. Your pointer changes. 7. Position the pointer where you want the upper-left corner of the linked object.

Steps to Link to Another Application Without Leaving Impromptu


1. From the Insert menu, click OLE Object. Your pointer changes. 2. Position the pointer where you want the upper-left corner of the new OLE object. 3. Click the mouse button. 4. Click the Create from File option button. 5. In the File box, type the name of the file to link to your report. If you are not sure of the name or the location of the file to which you want to link, click Browse to locate and select the file. 6. Select the Link check box to link the selected file to your report. 7. If you want the linked information to appear as an icon rather than as data, select the Display as Icon check box. Note: When you select the Display as Icon check box, Impromptu inserts a shortcut that points to the location of the source file. 8. Click OK. Impromptu creates a link between the file you specified and the current report. Whenever the information in the linked file changes, the Impromptu report is updated with the changed information. Note: Deleting a linked object does not delete the information in the source document. It merely removes the link to that object from the Impromptu report.

Administration Guide 399

Chapter 46: Complex Reports

Edit Linked Report Objects


When an Impromptu report includes a linked object, you can open the objects source application.

Steps
1. 2. 3. 4. Double-click the linked object to open the source application. In the source application, make the required editing changes. In the source application, save the changes. Exit the source application and return to Impromptu.

Update Links
By default, Impromptu sets links to be updated automatically when the information in the source document changes. If you do not want changes in linked objects automatically reflected in your Impromptu reports, you can turn off automatic updating, complete manual updates, and then turn automatic updating back on again. You can also change a link to retrieve information from a different file. For example, you link an Impromptu report to a very large and complex spreadsheet that was created in an OLE compliant application. This spreadsheet frequently performs a forecasting calculation using the last periods sales data. You want to manually update the link monthly so that performance is not affected by frequent link updates.

Steps
1. Select the linked object you want to change. 2. From the Edit menu, click Links. In the Links box, the linked object that you selected in step 1 is highlighted. 3. Do one of the following: Click The Manual option button Update Now The Automatic option button Change Source Open Source Break Link To Turn off automatic updating Update the link now Update the link whenever the source document changes To show the Change Source dialog box. Use to select a new file to base the OLE object on To edit the object using the application in which it was created To change the object into a Windows Metafile that can no longer be edited

You can click Cancel until you change the objects link settings. When you change the link settings, the Cancel button changes to a Close button. 4. Click Close.

Note
When you link objects that frequently change, there may be an impact on performance. For information about performance issues, see "Optimize Performance in Impromptu" (p. 435).

Convert Linked Objects


Windows automatically tracks all the OLE objects that are available for use in your system. You can convert an OLE object to a different format. Impromptu cannot perform conversions on some types of linked objects. 400 IBM(R) Cognos(R) Impromptu(R)

Chapter 46: Complex Reports When you convert OLE objects, you must perform conversions completely within a source application before you create the link in your report. For example, you linked an object created with an OLE compliant drawing application to your report. To speed up the report, you now eliminate the link and store the object in the report as a picture so you can edit it using another software package. You convert the object in the Impromptu report to a new type.

Steps
1. Select the object that you want to convert. 2. From the Edit menu, click Linked Document Object, and then click Convert. 3. From the Object Type box, click the type you want the object converted to and then click OK.

Embed Objects In Impromptu


You can embed all or part of the information from another application in your Impromptu reports so that the information appears as part of the report. You can embed information in a report by copying the information from the source embed an object in a report embed a newly created object in a report

Embed Objects By Copying


When you embed information, you make a copy, so that changes in the source do not appear in the report, and changes you make do not appear in the source file. When you create a new object or edit an object and the application youre embedding supports in-place editing, the application menus and toolbars temporarily replace Impromptus menus and toolbars. When it does not support in-place editing, Impromptu opens the other application.

Steps
1. In the source application, select the information you want to embed and then copy it to the Clipboard. 2. To insert the OLE objects into a frame other than the primary frame, select the appropriate form or list frame in Impromptu. 3. From the Edit menu, click Paste Special. 4. In the As box, select the object type that corresponds to the application in which the object was created. 5. If you want the embedded information to appear as an icon rather than as data, click the Display as Icon check box. Note: When you select the Display as Icon check box, Impromptu inserts a shortcut that points to the location of the source file. 6. Click OK. Impromptu inserts an OLE object containing the data from the other application into the frame you selected in Step 2.

Embed Existing Objects in Reports


You can embed entire files, as either data or as an icon, that you created in an OLE-compliant application into an Impromptu report. For example, you have a spreadsheet that outlines major sales campaign expenditures during the past year. You embed the spreadsheet in a sales report so you can correlate sales costs with revenues.

Steps
1. From the Insert menu, click OLE Object. 2. Position the pointer where you want the upper-left corner of the new OLE object. Your pointer changes.

Administration Guide 401

Chapter 46: Complex Reports Click the mouse button to show the Insert Object dialog box. Click the Create From File option button. In the File box, type the name of the file to embed in your report. If you want the embedded information to appear as an icon rather than as data, click the Display as Icon check box. Note: When you select the Display as Icon check box, Impromptu inserts a shortcut that points to the location of the source file. 7. Click OK. Impromptu embeds the file you specified into the current report. 3. 4. 5. 6.

Create Embedded Objects in Reports


You can create new OLE objects in an Impromptu report. For example, you want to embed a spreadsheet that was created in an OLE compliant application in an Impromptu report. You insert an OLE object, select the type, and then edit the new objectall without leaving Impromptu.

Steps
1. From the Insert menu, click OLE Object. 2. Position the pointer where you want the upper-left corner of the new OLE object. Your pointer changes. 3. Click the mouse button to show the Insert Object dialog box. 4. Click the Create New option button. 5. If you want the embedded information to appear as an icon rather than as data, select the Display as Icon check box. 6. In the Object Type box, double-click the type of object to insert. 7. Work within the application as you would normally to create the new object. 8. Do one of the following: If the embedded object was created in Impromptu, click the mouse button anywhere outside of the embedded object to return control to Impromptu. If the embedded object was created in another application that was launched from Impromptu, click Exit from the File menu. If you are prompted to save the changes you made, click Yes.

Edit Embedded Objects


You can edit an embedded object by editing the object within Impromptu or by launching the source application. Many applications support in-place editing of embedded OLE objects. If an application does not support in-place editing, Impromptu automatically launches the application when you edit the OLE object.

Steps
1. In Impromptu, select the embedded object that you want to edit. 2. From the Edit menu, select the embedded object. 3. Do one of the following: If the source application supports in-place editing, click Edit from the cascading menu. Impromptus menus are replaced by the menus of the application in which the OLE object was created. If the source application does not support in-place editing, click Open from the cascading menu. Impromptu launches the application in which the OLE object was created. 4. Make the changes to the embedded object. 5. Do one of the following: If the source application supports in-place editing, click the mouse button anywhere outside the embedded object to return control to Impromptu. If the source application does not support in-place editing, click Exit from the File menu.

402 IBM(R) Cognos(R) Impromptu(R)

Chapter 46: Complex Reports 6. If you are prompted to save the changes you made, click Yes.

Format Linked or Embedded Objects


Once you have linked or embedded an OLE object in a report, you can change the properties of the object and format it as you would any other report object. A linked or embedded object has many of the same physical properties as frames. For example, you can change the size of an embedded object or add a border to a linked object. For information about changing the format and properties of a report object, see the Impromptu online Help. In the Index tab, type borders patterns styles, applying resizing parts of a report

Embed Impromptu Objects in Other Applications


You can embed Impromptu report data in other applications that support OLE. For example, your department uses a programming application to manage an order tracking system. You embed Impromptu reports in the order forms to create order reports.

Steps
1. From the Impromptu Edit menu, click Select All, and click Copy. Note: You can also click Copy Special from the Edit menu. When the Copy Special dialog box appears, click the Copy Report Image option button and then click Copy. 2. From the Edit menu in the target application, click Paste Special. 3. Click the Paste option button. 4. In the As box, ensure that the Impromptu Report Object type is selected. 5. If you want the Impromptu report to appear as an icon rather than as data, select the Display as Icon check box. Note: When you select the Display as Icon check box, Impromptu inserts a shortcut that points to the location of the source file. 6. Click OK. The Impromptu report is embedded in the current application. You can edit the report by double-clicking the report or the report icon. Note: It is not possible to document all the methods for embedding an Impromptu report in all other applications here. Generally, applications that support OLE do so through commands such as the Paste Special command in the Edit menu (copy either the Impromptu report image or report data using the Copy Special command) the Object command in the Insert menu the Insert Object in the Edit menu

Copy Subsets of Data to Other Applications


You can use the Copy Special command to paste or link information in another application or to copy data to another application.

For Example
You use the Copy Special command to copy the first 40 rows for 5 specific data items in the query to the Clipboard. You can either select the data values that you want to copy, or you can specify which columns and rows to copy as part of the Copy Special command.

Steps
1. Select the data that you want to copy. 2. From the Edit menu, click Copy Special. Administration Guide 403

Chapter 46: Complex Reports Because you selected a range of data values to copy, the Copy Special dialog box is set to Copy Query Data rather than Copy Report Image. 3. Make any changes to the data you have selected for the copy operation as follows: Do this Click to add or remove data items. Select either The Copy All Rows option button to copy all data values the Copy Rows option button to copy a specific number of rows In the Copy Rows boxes, type the numbers for the first and last row that you want to copy. Select or clear the Include Data Labels check Include or exclude the labels for each data box. item in the copy operation 4. Click Copy. Impromptu copies the data values to the Clipboard based on the settings you chose. 5. Launch the application into which you want to copy the data, and position the cursor where you want to insert the copied data. 6. From the Edit menu, click either the Paste or Paste Special option button. Note: If you click Paste, the data values are pasted into the target application as unformatted text. If you click Paste Special, the Paste Special dialog box appears, and you can choose whether to paste or paste and link the data into the target application. If you want to Change the data items copied Change the number of rows used in the copy operation

Link Impromptu Reports in Other Applications


You can link Impromptu reports in other applications so that whenever the report is run in Impromptu, the information in the other application is updated. For example, you include an Impromptu report that shows the most recent sales data in a sales analysis document. You create a link to the Impromptu report, and the linked report appears in the sales document exactly as it appears in Impromptu.

Steps
1. Within Impromptu, select the data items whose values you want to link to another application. 2. From the Edit menu, click Copy Special. 3. Click the Copy the Report Image option button. 4. Click Copy. 5. Within the target application, click Paste Special from the Edit menu. 6. Click the Paste Link option button. 7. In the As box, ensure that Impromptu Report Object type is selected and click OK. The Impromptu report data is linked to the target application, so that the information in the target application changes with the report.

Notes
It is not possible to fully document all of the methods for linking. Generally, applications that support OLE do so through commands such as the Paste Special command in the Edit menu (copy either the Impromptu report image or report data using the Copy Special command) the Object command in the Insert menu the Insert Object command in the Edit menu

404 IBM(R) Cognos(R) Impromptu(R)

Chapter 46: Complex Reports

Tip
To quickly select the Impromptu report data you want to link, use the Select All command (Edit menu) before you copy the report data to the Clipboard.

Using HTML to Create Reports on the Web


A HyperText Markup Language (HTML) report is a read-only report that users can view in a Web browser. You can save and distribute Impromptu reports in HTML format, such as from your intranet or Internet Web site or by email. You can view and run Impromptu HTML report output in Impromptu Web Reports. HTML report output contains a Report Navigator, which means you can jump to a grouped column value or a specific page number in the HTML report. In the following HTML report, values in the Report Navigator appear as pictures. You click a picture to jump to a page in the report.

Designing HTML Report Output


When you create reports in HTML format, there are important design considerations to remember. Well-designed reports consider such elements as report navigation object alignment overlapping objects unnecessary scrollbars performance

Add Report Navigation


You can add a Report Navigator to your report output to set navigation based on one or more grouped columns. The columns serve as bookmarks or table of contents entries in both HTML and PDF report output.

Administration Guide 405

Chapter 46: Complex Reports For items to appear in the Report Navigator, the selected columns must be visible in the report. In addition, only grouped and associated columns are available for selection. If you do not have any grouped columns in your report, you cannot add columns to the Report Navigator. For information about grouping columns, see Impromptu User Reference. A Report Navigator is recommended for multipage reports. However, if your report fits on one page, a Report Navigator is not required.

Steps
1. With a report open, from the Report menu, click Navigation. 2. Select the Include report navigator check box. 3. In the Available columns box, select the check box next to one or more of the grouped or associated columns that you want. 4. Specify the navigation properties that you want. Goal Include a list of page numbers in the report navigator, which link to specific pages in the report body Remove duplicate entries in the report navigator caused by horizontal page breaks Action Select the Include page numbers check box

Select the Suppress duplicate entries check box

5. Click OK. Tip: If you later want to remove all bookmarks in your report output without changing the settings in the Available Columns box, clear the Include report navigator check box. The Bookmark tab remains in the PDF report output when you view a report in Adobe Reader. This is expected Adobe behavior.

Align Report Objects in Impromptu


A report may look fine in Impromptu, but the report objects may not align properly in the HTML output. You cannot specify the absolute position of an object in HTML. To maintain the relative position of objects, all objects are placed in cells of one or more HTML tables, laid out relative to the report image. To design reports that render properly in HTML, align the report objects in Impromptu before rendering. To align objects horizontally, have objects use the same y coordinate.
Horizontal Alignment

(3.25, .25)

(5.5, .25)

To align objects vertically, have objects use the same x coordinate.

406 IBM(R) Cognos(R) Impromptu(R)

Chapter 46: Complex Reports


Vertical Alignment

(0.3, 0)

(0.3, 1.1)

The bolded values indicate values in the report that must be identical to ensure correct alignment. The coordinates are visible in the status bar when an object is selected.

Steps
1. Shift+click the objects you want to align, right-click, click Properties, and click the Align tab. 2. If you want to align objects horizontally, click the arrow next to the box in the horizontal line, and select an alignment option. Depending on the alignment option you choose, you may need to specify a box, such as the Selection box, to which objects are aligned. 3. If you want to align objects vertically, click the arrow next to the box in the vertical line, and select an alignment option. Depending on the alignment option you choose, you may need to specify a box, such as the Selection box, to which objects are aligned. 4. Click OK. Tip: The easiest way to align objects is to align one side to the parent (top, bottom, left, right).

Eliminate Overlapping Objects in a Report


You cannot layer objects in HTML report output. When one object overlaps another, even only partly, the object that appears behind another object does not export to HTML.
Impromptu report An Impromptu report contains objects arranged like this. A C D B B HTML output The resulting HTML output shows only two of the four objects. C

If you create HTML reports and warnings appear or, you discover that some objects are missing, check your Impromptu reports for overlapping objects. Tip: To see the object outline, from the View menu, click Boundary Lines. You can also check the HTML log file to see if anything was discarded. Tip: A log file is generated in the same folder as the HTML output. If the report name MyReport, the log file name is MyReport.txt.

Steps
1. Open a report. 2. Resize or move objects so that none overlap. 3. If the text frame for a label overlaps the related data, do the following:

Administration Guide 407

Chapter 46: Complex Reports Use string conversion functions, such as the Number-to-String () function, to convert numeric, date, or time values to string values. Eliminate the text frame by creating a calculated item that concatenates the label with the data, such as
'Customer Name: ' + customer_name

Avoid Multiple Scrollbars in HTML Report Output


When viewing HTML report output, horizontal and vertical scrollbars may appear in the report and in the brows