getting started with logi info .net applicationsgetting started with logi info 1 introduction this...

168
Getting Started with Logi Info .NET Applications For Windows 7 & 8 and Windows Server, with the .NET Framework March 2016

Upload: others

Post on 27-Mar-2020

23 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Getting Started with Logi Info .NET ApplicationsGetting Started with Logi Info 1 Introduction This publication introduces developers to Logi Info v12.1, in the .NET environment. Logi

Getting Started with Logi Info .NET Applications For Windows 7 & 8 and Windows Server, with the .NET Framework

March 2016

Page 2: Getting Started with Logi Info .NET ApplicationsGetting Started with Logi Info 1 Introduction This publication introduces developers to Logi Info v12.1, in the .NET environment. Logi

This document has been formatted for double-sided printing, hole-punching, and placement in a ring-binder. Author: Lee Hausman

Logi Analytics is a trademark of Logi Analytics, Inc. Microsoft, Microsoft Word, Microsoft Excel, Windows, Windows XP, Windows Server, Windows Vista, and Visual Basic are registered trademarks or trademarks of Microsoft Corporation in the United States and/or other countries. Other products and company names mentioned in this book may be trademarks of their respective owners.

Logi Analytics, Inc. 7900 Westpark Drive, Suite A200

McLean, Virginia 22101 703-752-9700

Copyright © 2009-2016 Logi Analytics, Inc. All rights reserved.

Page 3: Getting Started with Logi Info .NET ApplicationsGetting Started with Logi Info 1 Introduction This publication introduces developers to Logi Info v12.1, in the .NET environment. Logi

iii

Table of Contents Introduction ............................................................................................................................................................ 1

System Requirements ............................................................................................................................................. 2

General Requirements ........................................................................................................................................ 2

How Should Your Server Be Configured? ............................................................................................................ 3

How Many Servers Do You Need? ...................................................................................................................... 3

Server Virtualization ........................................................................................................................................... 4

Product Licenses ................................................................................................................................................. 4

Installing Logi Studio ............................................................................................................................................... 6

Preparing to Install .............................................................................................................................................. 6

Installing the Software ...................................................................................................................................... 11

Configuring IIS ................................................................................................................................................... 18

Modifying or Repairing the Installation ............................................................................................................ 20

Product Licensing .................................................................................................................................................. 21

Built-in Trial License .......................................................................................................................................... 21

License Keys and License Files .......................................................................................................................... 21

License Management ........................................................................................................................................ 23

When a License Expires ..................................................................................................................................... 25

Licenses and Server Virtualization .................................................................................................................... 26

Upgrading Logi Info and Logi Applications ............................................................................................................ 27

General Requirements ...................................................................................................................................... 27

Upgrade Impacts ............................................................................................................................................... 27

Changing the Version of Your Logi Applications ............................................................................................... 28

Creating Application Pools in IIS ....................................................................................................................... 31

Logi Application Overview .................................................................................................................................... 33

Understanding Logi Applications ...................................................................................................................... 33

Introducing Elemental Development ................................................................................................................ 34

Standard Logi Application Folders .................................................................................................................... 35

Standard Logi Application Files ......................................................................................................................... 35

Using Support Files with a Logi Application ...................................................................................................... 40

Application Deployment ................................................................................................................................... 40

Additional Helpful Information ......................................................................................................................... 40

Introducing Logi Studio ......................................................................................................................................... 41

Logi Studio Geography ...................................................................................................................................... 41

Panel Arrangement ........................................................................................................................................... 45

General Features ............................................................................................................................................... 46

Page 4: Getting Started with Logi Info .NET ApplicationsGetting Started with Logi Info 1 Introduction This publication introduces developers to Logi Info v12.1, in the .NET environment. Logi

iv

Using Logi Studio ................................................................................................................................................... 48

Getting Started .................................................................................................................................................. 48

The Welcome Panel ........................................................................................................................................... 49

Application Folders and Files ............................................................................................................................. 50

Working with Elements ..................................................................................................................................... 56

Setting Element Attributes ................................................................................................................................ 59

Intelligent Token Completion ............................................................................................................................ 65

Studio Wizards ................................................................................................................................................... 68

Assigning Themes and Style Sheet Classes ........................................................................................................ 72

Testing and Debugging Applications ................................................................................................................. 75

Deploying Logi Applications .............................................................................................................................. 81

Ribbon Menu, Shortcuts, and Search ................................................................................................................ 87

Studio Options ................................................................................................................................................... 92

The Database Browser ...................................................................................................................................... 95

The SQL Query Builder ...................................................................................................................................... 97

The MDX Query Builder ..................................................................................................................................... 99

Working with Studio Panels ............................................................................................................................ 100

Changing Logi Application Versions ................................................................................................................ 103

Team Development Features .......................................................................................................................... 104

Obfuscating Definitions ................................................................................................................................... 108

Deleting a Logi Application .............................................................................................................................. 110

Granting File Access Permissions ........................................................................................................................ 111

Let the New App Wizard Do It ......................................................................................................................... 111

Which Accounts? ............................................................................................................................................. 111

Which Application Sub-Folders? ..................................................................................................................... 112

Granting File Access Permissions .................................................................................................................... 112

No Security Tab Visible? .................................................................................................................................. 117

Managing Support Files ....................................................................................................................................... 118

Using Themes and Style Sheets ........................................................................................................................... 121

About Themes ................................................................................................................................................. 121

Selecting a Theme in Studio’s Wizard ............................................................................................................. 122

Adding Themes Manually ................................................................................................................................ 122

Creating Your Own Themes ............................................................................................................................. 124

About Cascading Style Sheets ......................................................................................................................... 126

Create an Example Style Sheet ........................................................................................................................ 127

Including a Style Sheet in Your Application ..................................................................................................... 128

Editing a Style Sheet in the Workspace ........................................................................................................... 129

Editing in the Style Sheet Class Selector ......................................................................................................... 129

Editing a Style Sheet Using the External Style Sheet Editor ............................................................................ 131

Page 5: Getting Started with Logi Info .NET ApplicationsGetting Started with Logi Info 1 Introduction This publication introduces developers to Logi Info v12.1, in the .NET environment. Logi

v

Applying a Style Sheet to Your Definition ....................................................................................................... 131

Assigning Style Classes to Elements ................................................................................................................ 133

Development Best Practices ............................................................................................................................... 137

Debugging Applications ...................................................................................................................................... 139

Previewing and Browsing ................................................................................................................................ 139

Using Comments, Remarks, and Application Notes ....................................................................................... 142

Using the Test Parameters Panel .................................................................................................................... 144

Using the Debugging Features ........................................................................................................................ 145

Logging Errors ................................................................................................................................................. 149

Hello World! Tutorial .......................................................................................................................................... 151

Glossary ............................................................................................................................................................... 158

Resources and Support ....................................................................................................................................... 162

Page 6: Getting Started with Logi Info .NET ApplicationsGetting Started with Logi Info 1 Introduction This publication introduces developers to Logi Info v12.1, in the .NET environment. Logi
Page 7: Getting Started with Logi Info .NET ApplicationsGetting Started with Logi Info 1 Introduction This publication introduces developers to Logi Info v12.1, in the .NET environment. Logi

Getting Started with Logi Info 1

Introduction This publication introduces developers to Logi Info v12.1, in the .NET environment. Logi Info is a tool that allows developers to create and run comprehensive reporting solutions and web applica-tions, using a full range of business analytics features and components. Developers working with Java classes on Windows or Linux platforms are directed to our companion Getting Started with Logi Info Java Applications. The general purpose of this publication is to assist developers in installing Logi Info, in making it functional, and in gaining a basic understanding of how Logi reports and web applications work. Other publications in this se-ries are available that focus on specific aspects of Logi applications, such as displaying data in tables or in charts. Documentation on our Developer Network web site will always present the most up-to-date information. Spe-cifically, you can look there for the newest features; publications like this one are by their nature more difficult to keep current. The technique of “elemental development”, the creation of report pages by combining pre-defined objects (or elements) from a toolbox into a hierarchical tree that mirrors the top-to-bottom layout of an HTML page, makes for speedy report development. New Logi developers are often surprised at how quickly they can pro-duce meaningful reports. In addition, because report designs can be made dynamic at runtime, developers also often find the number of report definitions they must manage reduced, often by as much as 50%. The DevNet web site includes numerous free sample applications that can be quickly downloaded and they provide a great learning opportunity for new developers. Frequently the sample apps mirror the examples in the documents on DevNet. Logi developers are urged to take advantage of these sample apps. What should the Logi developer already know? A Logi developer should already have a good understanding of general web technologies, such as HTML and style sheets, and be familiar with their data sources and the techniques, such as SQL, needed to access that data. Experience with JavaScript is useful but not required. What information is not presented here? General web server, database server, and network management techniques touch on the successful deploy-ment of Logi applications but are beyond the scope of this publication. The assumption is made that develop-ers have these skills themselves, or have access to others within their organizations with them, and the specif-ics of these topics are not included here. We hope you enjoy working with these products and quickly become productive and successful with them. Comments about this publication are welcomed and can be addressed to [email protected].

Page 8: Getting Started with Logi Info .NET ApplicationsGetting Started with Logi Info 1 Introduction This publication introduces developers to Logi Info v12.1, in the .NET environment. Logi

2 Getting Started with Logi Info

System Requirements The following general hardware and software components are required for Logi Info:

General Requirements

Browsers: - Internet Explorer: 11 (Certified) ; see note below about earlier versions. - Microsoft Edge (Certified) - Firefox, Chrome: all current public versions (Supported) - Opera, Safari: all current public versions (Supported)

Hardware: - 1 GHz or higher processor recommended; 400 MHz minimum, and - 1 GB or higher RAM recommended; 512 MB of RAM minimum, and - 1 GB of available hard disk space (with .NET already installed)

Operating Systems:

- Windows Server 2012 R2, 2008, 2003 - Windows 10 (with Logi Info v12+ only) - Windows 8 (all editions except RT) - Windows 7 (all editions)

Web Servers: - Microsoft Internet Information Server (IIS) 7.x, 8.x, or - Apache-Tomcat 5.5, 6.0, 7.0 (without Tomcat FHS)

Software: Microsoft .NET Framework 4.x

Data Sources: Logi Info applications can interact with the following data sources/services:

- Amazon SimpleDB - MySQL database server - DB2 database server - ODBC-compliant database servers - Files: Excel, CSV, XML, JSON - OLEDB-compliant database servers - Google Maps, Google Docs - Oracle database server - HP Vertica - PostgreSQL database server - JDBC-compliant database servers - Salesforce.com - Microsoft Access - SMTP email servers - Microsoft SQL Server - Sybase database server - Microsoft SQL Server Analysis Services - Twitter.com - MongoDB - Web Services (REST and SOAP)

Notes: Microsoft Internet Information Server (IIS) must be installed before installing Logi Info. The .NET 4.x frame-work is required. If not already in place, with your consent, .NET will be installed when Logi Info is installed.

Page 9: Getting Started with Logi Info .NET ApplicationsGetting Started with Logi Info 1 Introduction This publication introduces developers to Logi Info v12.1, in the .NET environment. Logi

Getting Started with Logi Info 3

Internet Explorer (IE) 7, 8, 9, and 10 are certified to work with Logi Info v12.0 and may work with earlier ver-sions. Microsoft ended support for these older IE versions on January 12, 2016 and does not recommend that they be used going forward. We recommend that you use IE 11 or Microsoft Edge for viewing applications built with Logi Info v12.1. and later. Microsoft ended support for .NET Framework 4.0 and 4.5 on January 12th, 2016. We recommend use of 4.6.

How Should Your Server Be Configured? In a typical scenario with an average data size per report (less 10MB of data per report), you should be able serve 50-100 concurrent users per multi-core CPU on a production server, assuming a good amount of RAM (2GB+) and a fast hard drive (12K RPM+). Here are three representative configuration levels for the web server. A low-performance hardware configuration:

1 multi-core CPU, 1-2GB RAM, 12K RPM HD, 32-bit OS A better performance configuration (for more users or more data):

Quad-Core CPU, 2-4GB+ RAM, 15K RPM HD, 32-bit OS The best performance configuration begins with the previous configuration and adds:

Additional CPUs (2 or more Quad-Core CPUs), more RAM (8GB+), 64-bit OS, or move to a clustered environment.

Here are a few general "rules of thumb" when considering server configuration options:

More Data and Data Complexity = More RAM More Reports, Larger Reports, Complex Reports = Faster hard disk, more available hard disk space More Traffic and Concurrent Visitors = More CPUs/Cores

How Many Servers Do You Need? You should think of your "reporting server" as a computer that has a web server and the Logi server engine software installed on it. Ideally, this computer should be dedicated to this task alone. However, other configurations are possible and quite feasible, including those in which the web server also serves other functions (i.e. is not dedicated to reporting alone) and/or the database server is also on the re-porting server computer. Which configuration should you use? We do not have guidelines based on specific numbers of users or reports to share with you; each deployment situation is different. Whether you choose to combine functions (web, Logi application, and database servers) on one computer is, ultimately, your decision. Numerous factors can affect this decision, including the amount of web server traffic, the number of concurrent database users, the size of the databases, the complexity of the database queries, the frequency of report access, and, not least, cost.

Page 10: Getting Started with Logi Info .NET ApplicationsGetting Started with Logi Info 1 Introduction This publication introduces developers to Logi Info v12.1, in the .NET environment. Logi

4 Getting Started with Logi Info

You may care to begin with a combined configuration and, as your report usage grows, change to a dedicated configuration. The nature of Logi Info allows you to do this easily and without additional cost (if per-server CPU counts remain constant). Recent studies concerning server virtualization suggest that database servers are frequently under-utilized. On the other hand, many database vendors recommend that their products be run on a dedicated server. You may wish to check with your database vendor for their recommendations concerning database servers.

Server Virtualization Many organizations are using server virtualization to maximize hardware usage and reduce costs. Server virtualization products allow the assignment of CPU resources to processes. This may take the form of a maximum percentage of combined CPU utilization, or as specific allocation of logical CPUs, to a virtual machine (VM). The server administrator is responsible for making these configuration decisions. Logi Info product licenses treat a VM just like a regular, non-virtualized server and have no difficulties in this environment. In order to ensure good performance in any virtualized server environment, administrators must be careful to allocate appropriate resources to VMs. It's not uncommon to relocate a VM from one hardware platform to another, for example, for hardware maintenance. The Logi license will "move" with the VM, as long as the ma-chine name remains unchanged.

Product Licenses Current Logi Info versions come with a built-in 15-day trial license. You don't need to do anything but install the product and you can begin using it immediately. A clearly-visible display above the Logi Studio main menu, shown below, counts down the days remaining in the trial period.

Clicking the counter display will take you to a web page that offers information about purchasing a Logi Info license.

After the trial period expires, you won’t be able to use Logi Studio and any Logi applications you may have

developed will no longer run without a real license. Logi Analytics licenses are server-based rather than individual-user or concurrent-access licenses, so an unlim-ited number of end-users can access Logi reports through a single web server. Our licensing scheme allows you to deploy our product on one development machine and on one production server. As mentioned earlier, addi-tional separate licenses for Studio, for additional developers, are also available.

Page 11: Getting Started with Logi Info .NET ApplicationsGetting Started with Logi Info 1 Introduction This publication introduces developers to Logi Info v12.1, in the .NET environment. Logi

Getting Started with Logi Info 5

Licenses are keyed to you or your organization; they take the physical form of license files, which are assigned to a specific computer. DevNet includes a License Management page where you can manage your licenses, including reviewing them, assigning and un-assigning them to machines, and generating license files, at any time, without any interaction with our staff. For more detailed information about licenses, see our document Product Licensing. You may not use our products for redistribution with, or embed them in, other products without an OEM li-cense; contact our Sales group for more information if you need OEM licenses.

Page 12: Getting Started with Logi Info .NET ApplicationsGetting Started with Logi Info 1 Introduction This publication introduces developers to Logi Info v12.1, in the .NET environment. Logi

6 Getting Started with Logi Info

Installing Logi Studio There are two major parts to the Logi product in the installation file you downloaded: Logi Studio, our development environment, is a Windows application that's typically installed on a Windows development machine and interacts with the local IIS web server for Logi application development and testing. The Logi Server Engine is a set of files in each Logi application that extends the IIS web server at runtime. When you build a Logi application, Studio adds the Engine files to the application. A stand-alone Windows utili-ty application, Logi Server Manager, comes with the Engine and allows you to perform basic configuration of Logi applications without using Studio. A very typical installation scenario is to install Studio and the Server Engine on a development machine, and then install only the Server Engine (including Server Manager) on the production web server. This "develop-ment and production" dual installation is allowed by our licensing scheme. Additional copies of Studio may be licensed and installed on additional development machines. There are a number of ways to deploy your Logi applications to production, including Studio's built-in Applica-tion Deployment tool. Other installation scenarios, involving shared network drives and team development, are feasible and can be used. This document covers installation of Studio and the Server Engine on a development machine, but you'll also see what's needed to install the Server Engine on a production server. 32- or 64-bit? Logi Info is available for 32-bit and 64-bit systems. There are different Logi product distribution files for 32-bit and 64-bit versions, so be sure you download the right one for your system.

Preparing to Install Logi Info works with Windows 7 and 8, and with Windows Server. The examples that follow show installation and configuration for Windows 7 but the process for other Windows OS versions is similar. Use the Administrator Account Windows 7 includes a number of security enhancements that impact software installation and it is critical that installation and configuration occur while using the software with the built-in "Administrator" account.

Page 13: Getting Started with Logi Info .NET ApplicationsGetting Started with Logi Info 1 Introduction This publication introduces developers to Logi Info v12.1, in the .NET environment. Logi

Getting Started with Logi Info 7

Even if your personal account has been added to the local Ad-ministrators Group, it may not have sufficient privileges, so don't rely on it. As shown at left, the correct practice when running the Logi in-stallation program or using the Command Line to make configu-ration adjustments is to start the tool by right-clicking its icon and selecting "Run as administrator" from the menu to start the program. This ensures that appropriate permissions are provided for the installed components.

Don't see a "Run as administrator" option? If the system is in a network domain, your network admin may have created security policies that don't allow you to see this option, in which case you need to consult your IT staff for assistance. If you’re working with Windows Server, ensure that you have logged into the machine using an account that’s included in the machine’s local Administrator group. .NET Framework Logi Studio requires the .NET Framework components. When Windows 7 is installed, multiple versions of the framework are typically included. Before doing anything else, ensure that you have .NET installed by using File Explorer to browse to:

C:\Windows\Microsoft.NET\Framework (or Framework64)

where you should see several folders, such as v4.0.30319, one for each version of .NET installed. Logi Info v12 requires .NET 4.x. If not already in place, with your consent, appropriate versions of the .NET framework are installed when Logi Info is installed. Installing/Enabling the IIS Web Server When Windows 7 is installed, the components for the IIS web server are also installed, but they’re usually not enabled. You must do this manually, before you install your Logi product.

Page 14: Getting Started with Logi Info .NET ApplicationsGetting Started with Logi Info 1 Introduction This publication introduces developers to Logi Info v12.1, in the .NET environment. Logi

8 Getting Started with Logi Info

Page 15: Getting Started with Logi Info .NET ApplicationsGetting Started with Logi Info 1 Introduction This publication introduces developers to Logi Info v12.1, in the .NET environment. Logi

Getting Started with Logi Info 9

This is accomplished in Control Panel, under Programs → Turn Windows features on or off, as shown above. For Windows Server 2012 R2, you need to install Server Roles, which are very similar to the features shown above. For the older versions of Windows Server, you will need to use the Control Panel utility to actually install IIS:

The example above shows how to navigate within Control Panel to install IIS. Finally, back in Windows 7, you need to configure IIS. First, ensure that the ASP.NET web service extension can run:

Page 16: Getting Started with Logi Info .NET ApplicationsGetting Started with Logi Info 1 Introduction This publication introduces developers to Logi Info v12.1, in the .NET environment. Logi

10 Getting Started with Logi Info

In Windows 7, this is done in the IIS Manager tool, as shown above, by selecting the Home item at the left, then double-clicking the ISAPI and CGI Restrictions items. If the ASP.NET entry (or entries) is marked Not Al-lowed, edit its settings and check the Allow extension... checkbox.

For older Windows operating systems, this is done in the IIS Manager tool, by selecting the Web Service Exten-sions item in the left hand tree list, as shown above.

Page 17: Getting Started with Logi Info .NET ApplicationsGetting Started with Logi Info 1 Introduction This publication introduces developers to Logi Info v12.1, in the .NET environment. Logi

Getting Started with Logi Info 11

Then ensure that the Web Service Extension for the latest ASP.NET version you have installed (or a different version, if you prefer) has been set to Allowed. Select the item and click the Allow button if necessary to assign this status (if using the Standard view, right-click the entry and select Allow from the popup menu).| The IIS "Default Web Site" When it's enabled, IIS creates a "Default Web Site" and the New Application wizard in Logi Studio expects to create all new Logi applications as virtual directories of that web site. If you have renamed, replaced, or disa-bled the "Default Web Site", or have installed another web server that handles HTTP requests on Port 80, the wizard will fail during its application registration phase. Under these circumstances, you can continue to use Logi Studio to develop Logi applications but you will need to manually register them. This process is described in our document Windows IIS Configuration.

Installing the Software

As usual, you can click Back at any time before the physical installation begins to go back to the previous screen.

1. For Windows 7, start the installation by right-clicking the Logi product installation program icon and select-ing "Run as administrator" to launch the installer. For older Windows operating systems just double-click the Logi product file icon. Allow it to complete the installation preparation.

Page 18: Getting Started with Logi Info .NET ApplicationsGetting Started with Logi Info 1 Introduction This publication introduces developers to Logi Info v12.1, in the .NET environment. Logi

12 Getting Started with Logi Info

2. When the Welcome Screen appears, click Next.

Page 19: Getting Started with Logi Info .NET ApplicationsGetting Started with Logi Info 1 Introduction This publication introduces developers to Logi Info v12.1, in the .NET environment. Logi

Getting Started with Logi Info 13

3. License Agreement: Select the "I accept the terms..." radiobutton after reading the license agreement and click Next to continue.

4. Destination Folder: Click Next to accept the default installation location and continue. Optional - click Change to specify an alternative installation location if you don't like the default location. Multiple versions may be installed on the same machine and will co-exist smoothly using the default value here.

Page 20: Getting Started with Logi Info .NET ApplicationsGetting Started with Logi Info 1 Introduction This publication introduces developers to Logi Info v12.1, in the .NET environment. Logi

14 Getting Started with Logi Info

5. Setup Type: Select the Typical or Custom radiobutton (see Custom information below) and click Next to continue.

If you selected a "Typical" setup, skip ahead to Step 6.

If you selected a "Custom" setup, the dialog box shown above appears. The following components are available during a Custom setup: Studio - The integrated development environment used by developers to create applications and re-

port definitions.

Server - The Logi Server Engine that processes XML data in report definitions and outputs HTML.

LogiXML Scheduler Service for .NET- The Logi Windows Service that manages scheduled events; re-quired if you want to have scheduled report generation and distribution.

LogiXML Scheduler Service for Java- The Logi Java daemon that manages scheduled events; not appli-cable when using the .NET version of Logi Info.

Left-click any of the components shown and make a selection from the popup menu to include them in the installation. If desired, click Space to review the disk space requirements for the Custom setup you've se-lected. Click Next to proceed without the review.

Page 21: Getting Started with Logi Info .NET ApplicationsGetting Started with Logi Info 1 Introduction This publication introduces developers to Logi Info v12.1, in the .NET environment. Logi

Getting Started with Logi Info 15

The Disk Space Requirements display gives you information about available storage space and warns you if there isn’t enough space for the installation. You can repeatedly adjust the components in the Custom setup and see the effect on storage here, if necessary. Click OK to return to the previous dialog box.

6. Ready to Install: Review the installation summary and click Install.

Page 22: Getting Started with Logi Info .NET ApplicationsGetting Started with Logi Info 1 Introduction This publication introduces developers to Logi Info v12.1, in the .NET environment. Logi

16 Getting Started with Logi Info

7. The physical installation will begin and you'll see several progress indicators for different tasks.

8. Installation Complete: If you’re using Windows 7 and have User Account Control (UAC) turned off, or if you’re using another Windows OS, you can click Finish to exit the installer and launch Studio, and skip the next two steps.

Page 23: Getting Started with Logi Info .NET ApplicationsGetting Started with Logi Info 1 Introduction This publication introduces developers to Logi Info v12.1, in the .NET environment. Logi

Getting Started with Logi Info 17

If UAC is not turned off, uncheck the "Launch Logi Studio" checkbox, then click Finish and proceed to the next two steps.

9. Use the Computer browser to navigate to C:\Program Files. Right-click the LogiXML IES Dev folder and se-lect Properties. In the Security tab, add NETWORK SERVICE to the list of user names and grant it Full Con-trol. Repeat the process, granting Full Control to your own account (and to any other Logi developers who will work on this computer).

Page 24: Getting Started with Logi Info .NET ApplicationsGetting Started with Logi Info 1 Introduction This publication introduces developers to Logi Info v12.1, in the .NET environment. Logi

18 Getting Started with Logi Info

10. You may now launch your Logi product and you should see a splash screen like the one shown above. Studio installation is complete. However, go on to the next section to complete the IIS configuration.

Configuring IIS First, using the IIS Manager tool provided with the OS, ensure that the ASP.NET extension is allowed to exe-cute:

This is done, as shown above, by selecting the Home item at the left, then double-clicking the ISAPI and CGI Restrictions item. If the ASP.NET entry (or entries) is marked Not Allowed, edit its settings and check the Allow extension... checkbox. Next, you must ensure that either your Default Web Site, or your individual Logi application virtual directories (when you create them), have the correct .NET Trust Levels assigned:

Page 25: Getting Started with Logi Info .NET ApplicationsGetting Started with Logi Info 1 Introduction This publication introduces developers to Logi Info v12.1, in the .NET environment. Logi

Getting Started with Logi Info 19

In order to be able to cache data, interact with handlers, and perform other required operations, the .NET Trust Levels must be set to Full (Internal), as shown above. Finally, here's a "best practices" tip for configuring IIS for use with Logi applications:

We recommend that you create a new Application Pool specifically for your Logi applications, as shown above, left. Then you will need to assign your Logi app virtual directories to it by editing their Basic Settings and select-ing the new pool, as shown above, right. This allows you to manage and restart the pool independently of any other non-Logi applications that are also using IIS. Beginning in v10.0.385, Logi apps can use the default Inte-grated pipeline mode in application pools, resulting in better performance; Logi apps built using earlier ver-sions must use Classic mode.

Page 26: Getting Started with Logi Info .NET ApplicationsGetting Started with Logi Info 1 Introduction This publication introduces developers to Logi Info v12.1, in the .NET environment. Logi

20 Getting Started with Logi Info

Modifying or Repairing the Installation Suppose you installed Logi Info but didn't initially install the Scheduler, and now you find you want to schedule reports. Or you suspect a Logi Studio .DLL file is missing or is corrupted and you want to fix it.

These kinds of situations can be addressed by either modifying or repairing the installation, which you should do by re-running the installation program file (don't forget to right-click it and use "Run as administrator" to start it). Do not use Control Panel → Programs to do this; it will request an .msi file, which is not retained after the orig-inal installation.

Page 27: Getting Started with Logi Info .NET ApplicationsGetting Started with Logi Info 1 Introduction This publication introduces developers to Logi Info v12.1, in the .NET environment. Logi

Getting Started with Logi Info 21

Product Licensing Logi Analytics licenses are server-based, rather than individual-user or concurrent-access, licenses, so an un-limited number of end-users can access Logi reports through a single web server. Our Logi Info licensing scheme allows you to install our product on one development machine and one production server. A license is required for both our development tool, Studio, and for our Server Engine. Your development sys-tem will likely require both but production web servers generally do not need Studio installed on them. So, we offer both a "Studio and Development Server" combination license and a standalone Server license, and this two-license approach allows flexibility in different situations. Major Version Compatibility If you upgrade an existing installation of one of our products, or an existing Logi application, from one major version to another major version, for example v11 to v12, you will need a new license for the new prod-uct/application. Contact Customer Service if you want to upgrade and need a new license.

Built-in Trial License Logi Info comes with a built-in 15-day trial license. You need do nothing but install the product and you can begin using it. A clearly-visible display in the Studio toolbar, shown below, counts down the days remaining in the trial period.

Clicking the Studio counter display will take you to a web page that offers information about purchasing a product license.

After the trial period expires, Studio and any Logi applications you may have developed will no longer run without a real license.

License Keys and License Files When you purchase a Logi product, here's what happens in the licensing process:

Page 28: Getting Started with Logi Info .NET ApplicationsGetting Started with Logi Info 1 Introduction This publication introduces developers to Logi Info v12.1, in the .NET environment. Logi

22 Getting Started with Logi Info

1. A license key, specific to you or your organization, is created for you by our staff and stored in our li-censing database.

2. You visit our DevNet web site, login, and go to its License Manager page to create a license file. You do this by assigning your license key to a specific computer, by Computer Name. DevNet then generates a license file.

3. You then download this file and use it to license each Logi Info application you develop. A typical license file name is lgx100201.lic and licenses are product-specific. This licensing scheme is the same for both .NET and Java deployments. When you download your license file, you save it in C:\Program Files\LogiXML IES DEV\LogiStudio to license any new apps, and in the application folder of any existing Logi application that you've created with a trial license or that you'll be updating to v12. If you need to move an application to another machine, or re-install your Logi product on a different machine, you can "un-assign" the license from one machine, assign it to another, and generate a new license file. OEM licenses operate in a similar fashion, but can be assigned to multiple machines. Centralized License File If you have a large number of Logi apps on the same web server, you may care to use a single, centralized li-cense file rather than manage multiple copies of it. In Login Info v12, the General element in the _Settings definition includes a License File Location attribute where the location of the license file is specified. This value is a fully-qualified web server file system path to the folder where the file is stored. For example, C:\myProjects\License.

You must ensure that all web applications that will use this license run under an account that has file ac-cess permissions to the files in the folder you specify in License File Location. With this centralized license approach, if you use the exact same file path to your license file on both your de-velopment machine and your production server, you can deploy Logi applications by copying them, without having to replace the license file or adjust your _Settings definition attributes each time. OEM License File Customers with OEM licenses can embed the entire license inside their Logi application. In the _Settings defi-nition, the General element has an OEM Distribution License attribute which allows Logi applications to run on a server that does not otherwise have a license key installed. This is especially useful for XCOPY-type deploy-ments: the Logi installation program does not have to be run on the web server. To use this attribute, double-click the attribute name to open its Zoom window and then copy the entire XML contents of your OEM license file into it. This attribute only works with OEM licenses; other types of licenses copied into here will be ignored.

Page 29: Getting Started with Logi Info .NET ApplicationsGetting Started with Logi Info 1 Introduction This publication introduces developers to Logi Info v12.1, in the .NET environment. Logi

Getting Started with Logi Info 23

License Management Our DevNet web site includes a License Management page where you can manage your licenses. In order to manage your licenses, you must be a DevNet member and login first.

The details of the License Management page are shown above and here's an explanation: 1. Product - This select list displays the names all products licensed to you; select a product to display its li-

censes. Filtering and search capabilities are available to refine the list, too.

2. License Key Name - The license "key" created for you when you purchased the product appears here.

3. Type & Expires - The license version and type and any expiration date appear here.

4. License - Click the "Create" link in this column to assign your license to a specific machine. Once done, the machine name will appear in the next column and the link will change to "Download". Click the link again to download and save your license file. You may download the file as many times as necessary but it's only valid on the assigned machine.

5. Assigned To - This column displays the name of the machine a license has been assigned to. The icon allows you to "un-assign" the license - when this is done, the License link will revert back to "Create", and you may assign the license to another machine.

6. Note - This column displays optional text you enter to help you more easily identify the computer. Click the

icon to add or edit this text.

7. Log – Click the icon to display the history of assignments for this license. Here are the details of the process of creating and downloading a license file:

Page 30: Getting Started with Logi Info .NET ApplicationsGetting Started with Logi Info 1 Introduction This publication introduces developers to Logi Info v12.1, in the .NET environment. Logi

24 Getting Started with Logi Info

If the link in the Licenses column of the table shown earlier says "Create", clicking it will display the Create Li-cense File pop-up panel, shown above. You use it to assign the license to a specific machine, by entering the computer name. The Optional Note input is for your use if you want to further identify the machine and its text appears in the table of licenses shown earlier. If the computer on which this license is to be used runs a Windows OS, then the computer name value is what's known in Windows parlance as the "machine name". You can open a Command Prompt window on the machine and enter "hostname", then press Enter to have the name displayed. If a multi-part name is dis-played, such as "myPC.myCompany.local", use just the first part, "myPC". If the computer on which this license is to be used runs a Linux or other UNIX-derivative OS, then the "com-puter name" value is the computer's "hostname". You can go to a command line and enter "#hostname", then press Enter to have the name displayed. Use the full hostname value, exactly as it's displayed, for your com-puter name value entry. Click OK to generate the license file for the designated computer.

Page 31: Getting Started with Logi Info .NET ApplicationsGetting Started with Logi Info 1 Introduction This publication introduces developers to Logi Info v12.1, in the .NET environment. Logi

Getting Started with Logi Info 25

Once the license file has been generated, the link in the Licenses column will change to "Download". Click this link to display the Download License File pop-up panel, shown above. Click the Download button to download and save the license file.

Some browsers may add an .xml file extension to the downloaded file, which is wrong. A typical license

filename looks like lgx110201.lic so don't let your browser add anything to it. If the computer on which this license is to be used runs a Windows OS, then save the license file to

C:\Program Files\LogiXML IES Dev\LogiStudio

This will provide licensing for development work using Logi Studio, as well as for new Logi applications that are developed on the machine and run there using any web server. If you're upgrading any older Logi applications, you'll also need to copy the license file into their application folder.

When a License Expires After the 15-day trial license period expires, Studio won’t start up and any Logi reports you've developed will no longer run unless you have a real license.

Page 32: Getting Started with Logi Info .NET ApplicationsGetting Started with Logi Info 1 Introduction This publication introduces developers to Logi Info v12.1, in the .NET environment. Logi

26 Getting Started with Logi Info

Instead a banner, similar to the one shown above, will be displayed at the top of each report. If you've pur-chased a regular license and for some reason it expires, a 7-day grace period will start. At the end of the grace period, reports will no longer run and the banner will be displayed. The banner will also appear if the license file can't be found. For example, failing to place a copy of the license file in the application folder after a major version upgrade or a deployment will cause the banner to be dis-played. In all cases, providing a valid license in the correct location will remove the banner and let the application run.

Licenses and Server Virtualization Many organizations are using server virtualization to maximize hardware usage and reduce costs. Server virtualization products allow the assignment of CPU resources to processes. This may take the form of a maximum percentage of combined CPU utilization, or as specific allocation of logical CPUs, to a virtual machine (VM). The server administrator is responsible for making these configuration decisions. Logi Info v12 licenses treat a VM just like a regular, non-virtualized server and run just fine in this environment. In order to ensure good performance in any virtualized server environment, administrators must be careful to allocate appropriate resources to VMs. It's not uncommon to relocate a VM from one hardware platform to another, for example, for hardware maintenance. The Logi license will "move" with the VM, as long as its machine name doesn't change.

Page 33: Getting Started with Logi Info .NET ApplicationsGetting Started with Logi Info 1 Introduction This publication introduces developers to Logi Info v12.1, in the .NET environment. Logi

Getting Started with Logi Info 27

Upgrading Logi Info and Logi Applications Each new release of Logi Info provides feature enhancements and improvements. Customers are encouraged to take advantage of these improvements by upgrading to the latest releases when they become available. These instructions provide guidance for the process of upgrading, uninstalling, or modifying your Logi product installations and managing the related versions of your Logi applications. The Logi Info installation tool, InstallShield, does not remove any files or folders created or modified after the initial installation, including Sample Applications that you may have modified, so your report definitions are safe during an upgrade.

General Requirements Logi Info for the Windows environment, including Logi Studio, requires the .NET Framework 4.x. If not al-

ready in place, with your consent, appropriate versions of the .NET framework are installed when Logi products are installed.

Separate installations of different versions of Logi Info can co-exist as long as they are installed in different directories.

IIS 6 users may need to implement Application Pools to isolate Logi applications using different .NET framework versions. This is an IIS configuration task and is explained later in this document. Application Pools are a standard feature of IIS 7+.

Upgrade Impacts

Logi Info v12 includes several changes you should know about before upgrading:

Logi Info v12 includes stylistic and appearance improvements in charts, Super Elements, Themes, etc. which are noticeably different. You may care to do a test upgrade before committing to a comprehen-sive upgrade.

You must use Application Pools that use .NET 4.x. If such an application pool doesn't exist, Studio will generate a warning when you upgrade an existing Logi application. When you create a new applica-tion, Studio will create a new application pool, named "Logi Info .Net v4.x", and will assign the applica-tion to it.

Logi Info includes a free, 15-day trial license but, when it expires, you will need a paid, regular license. If you're a customer in good standing, Logi Customer Service will assign that license to you in advance, but you will need to go to our DevNet web site and download the license file.

You are urged to visit the DevNet Release Notes page for your product to understand the technical changes in new versions, before upgrading.

Page 34: Getting Started with Logi Info .NET ApplicationsGetting Started with Logi Info 1 Introduction This publication introduces developers to Logi Info v12.1, in the .NET environment. Logi

28 Getting Started with Logi Info

Upgrading Logi Info How do you get an upgrade? Customers who have purchased a maintenance plan for Logi Info, or are using it under an OEM agreement, may be able to download new product releases directly from our DevNet web site. See Support Download Products. If the DevNet download links are not available to you, contact Logi Customer Service via email or telephone (703-752-9700) for alternate instructions for downloading upgrades. Customer Service can also answer ques-tions you may have about purchasing or renewing a maintenance plan. To upgrade your Logi product, run the downloaded installation program and install the new version into the same location as the previous version, or to a different location if you wish to have both versions installed. No un-installation of the original version is required, and existing definitions or data will not be overwritten. The upgrade installation will take 2-3 minutes to complete. Evaluations If you wish to install an upgrade for evaluation purposes, we recommend that you install it into a different folder than any previous version, such as C:\Program Files\LogiXML IES Dev Test. This will preserve the previous version of Studio. If you install an update into the same folder as a previous version, Studio will be updated and you will not be able to roll it back without uninstalling and re-installing the previous version en-tirely. Backup Scheduler Data

If you have previously installed and used the Logi Scheduler service, we recommend that you make a safe-

ty copy of your existing schedule data, before upgrading:

C:\Program Files\LogiXML IES Dev\LogiXML Scheduler Service\Schedules.vdb3

and then proceed with the upgrade installation. Your existing data file should be upgraded in place without any difficulty.

Changing the Version of Your Logi Applications Logi applications are individually tagged with a version identifier for, and contain files specific to, the product version used to create them. When a new version of a Logi product is installed, your applications are not au-tomatically upgraded. This allows you continue to use both versions of the product and upgrade your applica-tions on your timetable. In order to use all of the features in the latest Logi release, you will need to change application versions on any machines, development or production, where you upgrade your Logi product.

Page 35: Getting Started with Logi Info .NET ApplicationsGetting Started with Logi Info 1 Introduction This publication introduces developers to Logi Info v12.1, in the .NET environment. Logi

Getting Started with Logi Info 29

When you open an application, Logi Studio displays a warning in its Application tab, as shown above, if the ap-plication's version does not match the version of Studio being used. This is important in Studio because the rules governing the use of elements will be out of sync. Clicking the Change Version... link will cause the application's version-specific binary files to be replaced with the files for a version you select from a list of installed versions. This will not affect any definitions or support files.

A progress indicator, like the one shown above, will be displayed.

Page 36: Getting Started with Logi Info .NET ApplicationsGetting Started with Logi Info 1 Introduction This publication introduces developers to Logi Info v12.1, in the .NET environment. Logi

30 Getting Started with Logi Info

Changing an application version will also trigger some web server diagnostics to run after the upgrade and you'll see some information about that process. Once the tests end, you'll the results, as shown above.

The failure of any test indicates that something is wrong with your web server environment's ability to

run the upgraded application. This could be caused by a number of things, such as failing to install the new Logi version as an Administrator, or having incorrect file permissions on the application folder, or failing to have the correct version of .NET installed. Contact Logi Support for assistance. Changing Versions with Server Manager Another method of changing an application's version is by using Server Manager, which is installed with Studio and is available via Studio's Tools menu or the Start Menu. It's a tool that allows you to examine all of the Logi applications on the web server and manage them individually or in a batch.

Server Manager, shown above, only works with .NET applications, using the IIS or Cassini web servers; if nei-ther of these servers is installed, Server Manager will prompt you to install them. The Server Manager dialog box displays a table showing each application installed on the local web server and a list of all the Logi product versions installed on the machine. To change an application's version, check one or more applications, select the version desired, and click Change Version. The process usually takes less than a minute for each application selected. Versions can be upgraded or downgraded.

Page 37: Getting Started with Logi Info .NET ApplicationsGetting Started with Logi Info 1 Introduction This publication introduces developers to Logi Info v12.1, in the .NET environment. Logi

Getting Started with Logi Info 31

Creating Application Pools in IIS The Application Pool is a method of isolating different .NET applications within the web server, in order to provide improved reliability. The default application pool, "DefaultAppPool" is created at installation and all virtual directory applications, when created, are assigned to this default pool. However, applications using different .NET versions can't be run at the same time in the same pool. If they are, error messages will appear for whichever application is started last. The recommended practice is to create a new application pool and assign all applications that use the same .NET version to it.

To create a new application pool:

1. Open the IIS Manager (see All Programs → Administrative Tools ) 2. Select and right-click the Applications Pools item in the list on the left. Select Add Application Pool...

from the pop-up menu. 3. Enter the new name of your choice as the Application Pool ID and leave the default pool settings se-

lected. Click OK 4. Right-click the Application Pools item in the list on the left and click Refresh to see your new pool.

Page 38: Getting Started with Logi Info .NET ApplicationsGetting Started with Logi Info 1 Introduction This publication introduces developers to Logi Info v12.1, in the .NET environment. Logi

32 Getting Started with Logi Info

To assign an application to the new Application Pool:

1. Expand the Sites item in the list on the left, and then expand the Default Web Site item below it. 2. Find and select your application in the list. 3. In the right-hand Actions Panel, click Basic Settings... 4. A dialog box like the one shown above will appear. Click Select... and choose your new Application

Pool from the list. 5. Click OK.

Your application is now assigned to your new Application Pool.

Page 39: Getting Started with Logi Info .NET ApplicationsGetting Started with Logi Info 1 Introduction This publication introduces developers to Logi Info v12.1, in the .NET environment. Logi

Getting Started with Logi Info 33

Logi Application Overview This chapter introduces Logi Analytics' application architecture. A key concept, Elemental Development, is in-troduced, along with report definition files, elements and attributes. Elemental Development is the foundation of Logi applications. In this overview, you'll learn how Logi applications deliver content to the web and how to include external files such as images, scripts, and XML data files.

Understanding Logi Applications A Logi application generally consists of one or more reports. A “report” is really a web page so, while Logi Info is most frequently used as an analysis and reporting tool, it can also be used to create rich, web-based applica-tions. The Logi Analytics DevNet web site, for example, is built entirely with Logi Info. Logi reports deliver data in a presentable and accessible manner as web pages. They use Internet technologies and browser software to distribute rich, interactive reports and applications. Logi reporting tools bring leading-edge Internet technologies together, allowing developers to quickly deliver results efficiently. The framework underlying this consists of:

An integrated development environment (Logi Studio) An XML-based language, coded in text-based definition files A runtime server (the Logi Server Engine)

Logi reporting tools separate the report development, data access, and presentation processes:

1. Report Definitions are text files that contain the information describing report layout and contents, stored as XML documents. While it is possible to write definitions with any text editor, Logi Studio provides an integrated development environment with lots of tools and helpful wizards that do much

Page 40: Getting Started with Logi Info .NET ApplicationsGetting Started with Logi Info 1 Introduction This publication introduces developers to Logi Info v12.1, in the .NET environment. Logi

34 Getting Started with Logi Info

of the coding for you and reduce development time.

2. When a report is requested by a user, the Logi Server Engine on the web server processes the report definitions and accesses data sources as required. A wide variety of data sources are supported.

3. The Logi Server Engine formats the retrieved data and presentation details based on the definition and accompanying style sheets; generates HTML and JavaScript, and returns the report page to the user's browser for viewing.

This arrangement allows the Logi Server Engine to operate as a stand-alone entity that's completely inde-pendent of systems that call upon it for reports. Separate applications, regardless of their host OS, environ-ment, or development language, that wish to embed or access Logi reports, for example, need only include a standard hyperlink to do so. The Windows version of the Logi Server Engine is an ASP.NET application, so Logi report applications can also be integrated directly into other ASP.NET applications.

Introducing Elemental Development Elemental Development is the process of creating flexible reporting applications using predefined, XML-based objects or "elements". The advantages of Elemental Development are:

XML elements are reusable and encapsulate specific functionality common to most web applications

A hierarchical layout of elements makes it easy to manage the presentation and functionality of large web-based reports

Studio's drag-and-drop user interface shields developers from repetitive coding and shortens devel-opment time

Elements and their properties (or "attributes") can be easily added, deleted, moved, and modified to create almost any type of report

Rules governing the parent-child associations that can be made between elements are embedded in our Studio development tool. Developing reports using elements makes the process quick and intuitive, and saves the developer the work of creating lower-level functionality. For more about Elemental Development, see this White Paper: http://devnet.logianalytics.com/downloads/ED_WhitePaper.pdf

Page 41: Getting Started with Logi Info .NET ApplicationsGetting Started with Logi Info 1 Introduction This publication introduces developers to Logi Info v12.1, in the .NET environment. Logi

Getting Started with Logi Info 35

Standard Logi Application Folders A Logi application is comprised of Logi engine files, definition files, and support files, stored in specific folders. The developer is primarily engaged in creating definition files and adding support files. Here are the standard application folders: Developers must not modify the names or contents of these standard folders:

bin - The Logi Server Engine files for a .NET application. assemblies - Files that map .NET modules into Java servlets (Java application only). rdTemplate - Component definitions, style, and scripting files used by the Logi Server Engine. rdDataCache - Temporary data cache files (this folder is created automatically when the application

runs). rdDownload - Temporary files created by the application (also created automatically). WEB-INF - The Logi Server Engine files for a Java application.

Developers can create and modify files in these standard folders, but should not modify the folder names:

_Data - Appears when a special Logi definition is created that makes an application a JSON data pro-vider.

_Definitions - (Required) Report, process, and settings files that are created by the developer. Stand-ard subfolders include _Processes and _Reports, which are part of every application.

_Metadata - Used when the Metadata Builder Wizard creates metadata files. _MobileReports - Appears when special mobile report definitions are created by the developer. _SupportFiles - (Required) Image, style sheet, HTML, and XML data files created by the developer. _Templates - Appears when special definitions are created by the developer for use with Word, Excel,

and PDF templates. _Themes - Used when custom Themes are added to the application. _Plugins - Used when plug-in .DLLs and/or Java files are part of the application. _Scripts - Recommended location for VBScript and JavaScript files. _Widgets - Appears when special Logi Widget definitions are created by the developer.

Standard Logi Application Files Developers will find these standard files in their application root folder; do not remove or alter them.

rdChart.aspx - Builds and displays charts rdPage.aspx - Displays report definitions rdProcess.aspx - Processes tasks contained in process definitions rdErrorLog - Error logs (only present if Error Logging has been turned on)

Each Logi application also includes several standard files that can be customized by developers, described be-low: Default.aspx The default web page registered with the web server is Default.aspx:

Page 42: Getting Started with Logi Info .NET ApplicationsGetting Started with Logi Info 1 Introduction This publication introduces developers to Logi Info v12.1, in the .NET environment. Logi

36 Getting Started with Logi Info

The code above redirects users to rdPage.aspx; the main web page for displaying report definitions. Develop-ers can replace the contents of Default.aspx with their own HTML. Any query string parameters submitted with the URL are also passed to rdPage.aspx. For example, the following links take viewers to the same location: http://www.Logiapps.com/LogiReportSamples/WebService/Default.aspx?ZipCode=90210&Miles=25

http://www.Logiapps.com/LogiReportSamples/WebService/rdPage.aspx?ZipCode=90210&Miles=25

Global.asax Developers can create their own Global.asax files for integrated Logi applications. The Application_Start and Session_Start event handlers are customizable but must be present and, at a mini-mum, contain the code shown above. rdLogon.aspx All Logi applications are provided with a basic login screen, in case security is enabled:

<%@ Page Language="vb" %>

<%

Dim sQueryText as String

If Request.RawUrl.indexof("?") <> -1 Then

sQueryText = Request.RawUrl.substring(Request.RawUrl.indexof("?"))

End If

Response.Redirect("rdPage.aspx" & sQueryText)

%>

Sub Application_Start(ByVal sender As Object, ByVal e As EventArgs)

Dim rdMaint As New rdMaint.Maintenance()

rdMaint.AppStart()

End Sub

Sub Session_Start(ByVal sender As Object, ByVal e As EventArgs)

Dim rdServer As New rdServer.rdSession()

Call rdServer.SessionStart()

End Sub

Page 43: Getting Started with Logi Info .NET ApplicationsGetting Started with Logi Info 1 Introduction This publication introduces developers to Logi Info v12.1, in the .NET environment. Logi

Getting Started with Logi Info 37

However, developers can completely customize the rdLogon.aspx page and rename the file. The following tags for the login form are required to be present:

<form id=frmLogon action='<%=Session("rdLogonReturnUrl") %>' method=post>

<input id="rdUsername" type="text" size="20" name="rdUsername">

<input id="rdFormLogon" type="hidden" name="rdFormLogon" value="True">

<input id="rdPassword" type="password" size="20" name="rdPassword">

<%=Session("rdLogonFailMessage") %> Assuming that Logi Security is being used, to use a different logon page filename:

1. Click the _Settings definition to view its elements. 2. Click the Security element. 3. Click the Logon Page attribute and type the filename of the new logon page.

Page 44: Getting Started with Logi Info .NET ApplicationsGetting Started with Logi Info 1 Introduction This publication introduces developers to Logi Info v12.1, in the .NET environment. Logi

38 Getting Started with Logi Info

Web.config The Web.config file contains many useful settings for the entire Logi application. However, the Web.config file for a Logi application is not the standard version found in most ASP.NET applications and replacing it with a standard file will produce unpredictable results. Therefore, integrating a Logi application with another ASP.NET application has to be done in such a way that their Web.config files do not interact with or supercede each other. Generally speaking, we do not recommend that such an integration be accomplished by physically merg-ing the application files and folders. Having said that, the Web.config file is an XML file that developers can modify to customize authentication, impersonation, globalization, session-state settings, error messages, and more. Some configuration settings made directly in the IIS web server are also found in Web.config, and the settings in Web.config always over-ride similar settings in IIS. More information about the Web.config file is available at this Microsoft web page. Definition Files In Elemental Development, elements are combined in definitions to build web-based applications. One report definition is equivalent to one dynamic web page. Every Logi application contains at least one report definition and can include multiple definitions as the application grows.

The example above shows Logi Studio's Application Panel and the seven major types of definition files found in Logi applications, which are described below:

Definitions Description

_Settings (Required) The one _Settings definition in every Logi application contains global configu-ration values for the entire application. It contains elements that define the application's virtual path, debugging capabilities, database connections, security information, and more.

Reports This folder contains report definitions built with elements that define dynamic web pag-es. A report definition typically contains report header and footer elements and a body element. The main body of the report can include any combination of text, charts, dash-boards, data tables, user input controls, etc.

Mobile Reports This folder contains report definitions that are used exclusively to deliver content to mo-bile devices, built with a combination of common and special-purpose elements.

Widgets This folder contains definitions for a special class of Logi reports that can be independent-

Page 45: Getting Started with Logi Info .NET ApplicationsGetting Started with Logi Info 1 Introduction This publication introduces developers to Logi Info v12.1, in the .NET environment. Logi

Getting Started with Logi Info 39

ly embedded into external HTML pages.

Templates This folder contains definitions that allow Logi Info developers to use forms-based report-ing, using Word, Excel, and PDF forms. Template definitions model the "fill-able" form fields contained within the source template file.

Processes This folder contains definitions that provide a level of automation and contain the logic needed to perform specific tasks within an application. Process tasks can be used to per-form scheduled operations, such as exporting a report to PDF format or then emailing it to a group of recipients.

Data This folder contains Data definitions that retrieve data and provide it as a JSON stream, for use by a variety of consumers, including non-Logi applications.

From XML to HTML... Every definition file created with Logi Studio is an XML document, which describes multiple objects we call el-ements and their attributes. Elements encapsulate different types of functionality and presentation; attributes enable developers to customize element properties and behavior. For example, a DataLayer element retrieves data from a data source and a Chart.Pie element creates a pie chart from the data. The Chart.Pie element contains attributes to specify the height, width, color, border, and more..

Here's an example of a simple report that illustrates elements work: The image above left shows an example report definition, named "newReport", in Logi Studio. The report con-tains Style and Body elements. The Body element has a "child" element beneath it: a Label element, which has a Caption attribute. The middle image shows the underlying XML source code represented by this collection of elements, as seen in Logi Studio's Source tab. You can edit this source code directly but we don't recommend it. The Logi Server Engine processes the XML source code, generating the HTML needed to present the page in Studio's Preview tab, which is shown in the right image.

Page 46: Getting Started with Logi Info .NET ApplicationsGetting Started with Logi Info 1 Introduction This publication introduces developers to Logi Info v12.1, in the .NET environment. Logi

40 Getting Started with Logi Info

Using Support Files with a Logi Application Studio's Application Panel also includes a folder for Support Files. These are files that are part of the applica-tion but are not definitions built using elements:

Logi applications may include the following types of Support files:

Images - GIF, JPG, PNG and other types of image files Stylesheets- Cascading Style Sheet (CSS) files for presentation and formatting control Scripts - Javascript or VBScript files Templates - Word, Excel and PDF form template files XML Data - XML data files as a data source for report definitions HTML - Custom HTML web content to be included within the application

Application Deployment All of the files that typically make up a Logi application reside under one folder, the application folder. This folder is registered with the web server as a "virtual directory" and though most often located on the web server, can be located on any network-connected server. Distributing Logi applications, such as deploying them from a developer server to a production server, is a sim-ple matter of copying the application folder to the production server. Studio includes a convenient Application Deployment Tool that deploys applications using a variety of techniques.

Additional Helpful Information If you're a developer who's just getting started with Logi Info you may not be aware of all of the features avail-able in our products. If you'd like a visual introduction to the elements, see our Element Gallery. DevNet also includes a number of free sample applications that you can download and run in Studio to see the techniques used to produce a variety of reporting applications

Page 47: Getting Started with Logi Info .NET ApplicationsGetting Started with Logi Info 1 Introduction This publication introduces developers to Logi Info v12.1, in the .NET environment. Logi

Getting Started with Logi Info 41

Introducing Logi Studio Logi Info includes our primary development tool, Logi Studio. This integrated development environment is the recommended tool for use by developers in creating their Logi applications. This chapter provides introduces the features of Logi Studio. Logi Studio is a tool designed to let developers create Logi applications as efficiently and easily as possible. The definition files that form the "source code" of a Logi application are simple text files and can be edited with any text editor; however, Logi Studio makes the development and testing process typical of programming much easier. Logi Studio is not a web application; it’s a Windows client application. A licensed copy must be installed on the desktop computer of each developer. Studio is a .NET application and must be installed on a Windows platform, and is available in 32- and 64-bit versions. Studio allows you to create either .NET or Java-based web applications and reports. All of the files that make up an application, including definitions, images, style sheets, scripts, XML data, and HTML pages, can be managed within Studio. All, with the exception of images, can be created and edited with-in Studio. Files can also be managed directly in the Windows file system. Studio includes a number of wizards and other tools that automate many standard development tasks, incor-porates a set of "rules" that prevent you from combining incompatible objects, and Intellisense-like features that provide code completion options to speed development. Its element-based technique of adding and ar-ranging objects in a hierarchical tree eliminates most tedious coding. Welcome to Logi Studio. We hope you will enjoy working with it.

Logi Studio Geography Logi Studio has a simple layout that makes it easy to develop applications and provides an array of features and tools. Learning "what's where" is the first thing you should do when beginning to work with Studio. The Getting Started Dialog Box The first time you launch Studio, you'll see the Getting Started dialog box.

Page 48: Getting Started with Logi Info .NET ApplicationsGetting Started with Logi Info 1 Introduction This publication introduces developers to Logi Info v12.1, in the .NET environment. Logi

42 Getting Started with Logi Info

The dialog box, shown above, contains everything you need to quickly become familiar and productive with Studio. You should definitely explore all of its contents if you're a Logi Info newbie. You can hide it when you no longer need it. The Welcome Panel With the Getting Started dialog box hidden, you'll see the Welcome panel when you start Studio and whenev-er there's no application open.

Page 49: Getting Started with Logi Info .NET ApplicationsGetting Started with Logi Info 1 Introduction This publication introduces developers to Logi Info v12.1, in the .NET environment. Logi

Getting Started with Logi Info 43

The Welcome panel provides quick links to recently-opened applications, links that open applications using a variety of methods, and a link to DevNet, our online community. In addition, you'll see some useful content, from DevNet, displayed in a scrolling area. Working on an Application When you open an application in Studio and begin editing a report definition, it looks like this:

Logi Studio uses six standard panels, shown above, which can be resized to suit your needs:

Page 50: Getting Started with Logi Info .NET ApplicationsGetting Started with Logi Info 1 Introduction This publication introduces developers to Logi Info v12.1, in the .NET environment. Logi

44 Getting Started with Logi Info

1. The Application panel groups all of the files that make up a Logi application together into one file management tree.

2. The Workspace panel is where files are edited. Tabs at the top are displayed for each file that's opened, as well as the Welcome and Application pages. Different editors are displayed within the tab pages depending on the file type being edited (report definition, style sheet, XML data, etc.). Report definitions (shown) display the elements that make up a report, in a hierarchical Element Tree. When editing report definitions, tabs at the bottom are displayed for switching between views of the Element Tree (the Definition), the underlying XML source code (Source), and a mini-browser preview of your work (Preview). When the Preview or Source tab is selected, the Element Toolbox, Attributes, and Test Parameters panels are automatically hidden, allowing the full width of the Workspace panel to be used.

3. The Attributes panel is where developers enter element attribute values. Attributes can be sorted al-phabetically or by Category and the Attribute Spy feature can be invoked. Attribute names can be double-clicked to open a "zoom" window for easier data entry. For some attributes, valid choices, in a selection list, can be summoned by clicking a down-arrow or mini-browse button in their value field.

Page 51: Getting Started with Logi Info .NET ApplicationsGetting Started with Logi Info 1 Introduction This publication introduces developers to Logi Info v12.1, in the .NET environment. Logi

Getting Started with Logi Info 45

4. The Test Parameters panel allows you to insert values as for parameters that are normally passed to the page. This panel is only visible if the report expects parameters and is not displayed until a report has been run or previewed once.

5. When an element is selected in the Element Tree in the Workspace panel, the Element Toolbox panel provides a list of context-appropriate child elements that can be added to the Element Tree. Tabs at the bottom filter the element selection between child and sibling elements.

6. The Information panel includes quick help text; the element or topic name is a link to more infor-mation on DevNet.

Panel Arrangement The Attribute and Element Toolbox panels can be re-arranged to suit individual developer tastes:

Page 52: Getting Started with Logi Info .NET ApplicationsGetting Started with Logi Info 1 Introduction This publication introduces developers to Logi Info v12.1, in the .NET environment. Logi

46 Getting Started with Logi Info

| The Attribute and Element Toolbox panels can be re-arranged to suit individual developer tastes, using the

Tools View menu options:

Panels can also be arranged side-by-side, as shown above.

General Features Logi Studio provides convenience and efficiency for developers. It includes many features added in direct re-sponse to requests from our developer community. General features include:

Multiple-Document Editor - The Workspace Panel allows multiple files of different file types to be opened simultaneously, including report and process definitions, style sheets, script files, and XML da-ta files. Elements and attribute values can be easily copied between definitions.

Support File Editing - Studio's internal support file editor provides improved editing and intelligent formatting of the source material based on file type. Features include line numbering, collapsible code regions, and syntax-specific highlighting.

Global Search and Replace - The editor's Find and Replace feature supports current document and cross-document searching using a variety of criteria.

Attribute Spy - This feature displays in the element tree, next to all relevant elements, their values for a selected attribute. For example, this feature allows you to quickly see which style class has been as-signed to each element.

Tree-based Element Selection - Child elements can be selected and added to the element tree either from the Element Toolbox Panel or by right-clicking a parent element and selecting from the popup menu that appears.

Page 53: Getting Started with Logi Info .NET ApplicationsGetting Started with Logi Info 1 Introduction This publication introduces developers to Logi Info v12.1, in the .NET environment. Logi

Getting Started with Logi Info 47

Intelligent Code and Token Completion - The task of entering tokens in attribute values is simplified by this feature, which dynamically presents selection lists for token types and appropriate identifiers in a drop-down list.

Attribute Value Selection Lists - Values can be selected from drop-down lists for attributes with dis-crete sets of value options, such as True/False, Percent/Pixels, etc.

Color Picker Tool - Attribute color values can be selected from a "color picker" tool, which can be opened from the attribute value.

Test Parameters Panel - Parameters used in previews and tests remain accessible for easy use in the Test Parameters panel.

Element Copy/Paste and Drag/Drop - Multiple elements can be selected at once in the element tree and copied, moved, or deleted.

Query Tools - The Query Builder is a separate dialog box that allows queries to be created from graphic table representations, using drag-and-drop techniques. SQL statements can be extended across multi-ple lines, allowing more complex statements. In addition, statements can be tested by selecting them and pressing F5; the operation will be limited to just the selected portions of the query state-ment.

Attribute Display Order - Element attributes can be viewed listed either in functional groups or sorted alphabetically.

Database Browser - This handy utility launches from the toolbar and allows browsing of the structure and data in connected databases. It's also a non-modal window, so it can be kept open and referred to it while working with elements and attributes.

Style Class Selector - This utility, shown as the first option in a the drop-down list of available classes for any Class attribute, appears as a dialog box and displays available classes and previews their effects as each is selected. Classes can also be edited right in place in the dialog box.

Page 54: Getting Started with Logi Info .NET ApplicationsGetting Started with Logi Info 1 Introduction This publication introduces developers to Logi Info v12.1, in the .NET environment. Logi

48 Getting Started with Logi Info

Using Logi Studio Logi Studio is a standalone Windows .NET application that provides a comprehensive development environ-ment for creating Logi web applications. It's capable of producing applications that run in .NET and Java environments. A typical scenario for Java de-velopers is to use Studio on a Windows system to develop and test their applications, and then deploy them to their Linux or Windows servers to be run under the Java libraries. Studio provides a number of features that make development easy and fast. The panels that make up Studio can be arranged, docked, or hidden, so that developers can tailor the environment as they desire. Studio manages your project files and includes editors for every type of file that might be included in a web application except images. Intelligent-completion features reduce the number of keystrokes necessary (and, hence, typos made). You can develop and test your application right inside Studio.

Getting Started When Logi Studio starts, it presents a Getting Started dialog box:

Page 55: Getting Started with Logi Info .NET ApplicationsGetting Started with Logi Info 1 Introduction This publication introduces developers to Logi Info v12.1, in the .NET environment. Logi

Getting Started with Logi Info 49

A number of features are available to introduce you to Logi Info, including: Sample Apps Sample applications built with Logi Info can be launched using the View button.

They'll open in your default browser and provide some interesting examples of the possibilities available.

Welcome Video This short video gives you an introduction to the technology behind a Logi Info ap-plication, and shows you how they're constructed. Key concepts and features are explained.

Studio Tour An interactive image of Studio helps you discover its geography, terminology, and features. Hover your cursor over the numbers in the images for descriptive text.

Create Your Own This step-by-step tutorial, in conjunction with an included tutorial application, guides you through creating your first reports, including a Data Table, a Bar Chart, an Analysis Grid, and a Dashboard.

Discover DevNet Links are provided into useful documents and features in our Developer Network website.

You can disable the dialog box, so that it no longer appears when Studio starts, by unchecking the checkbox at the bottom.

You can always redisplay it by clicking the Getting Started button, shown above, at the top-right of the Studio's main menu. Its state can also be set directly in Tools → Options.

The Welcome Panel When the Getting Started dialog box is hidden or moved aside, you'll see the Welcome panel when you start Studio and whenever there's no application open.

Page 56: Getting Started with Logi Info .NET ApplicationsGetting Started with Logi Info 1 Introduction This publication introduces developers to Logi Info v12.1, in the .NET environment. Logi

50 Getting Started with Logi Info

The Welcome panel provides quick links to recently-opened applications, links that open applications using a variety of methods, and a link to DevNet, our online community. In addition, you'll see some useful content, from DevNet, displayed in a scrolling area.

Application Folders and Files A Logi application is made up of a number of files that reside in an application folder group with a specific hi-erarchy.

Page 57: Getting Started with Logi Info .NET ApplicationsGetting Started with Logi Info 1 Introduction This publication introduces developers to Logi Info v12.1, in the .NET environment. Logi

Getting Started with Logi Info 51

The physical folder structure that contains source files is represented within Logi Studio in the Application panel, as shown above left. Files can be right-clicked and managed in the file system, as shown above right. Files that are deleted in Studio are placed in the Recycle Bin and can be restored, if desired. Report definitions can also be selected as the default report for an application (it's often useful to temporarily make a report the default during development, to avoid having to navigate to it through other reports during testing).

Files can be added to the application via the New File toolbar icon or, as shown above, by selecting and right-clicking the folder in the Application panel where you wish to add the file. Right-clicking the folder presents you with the option add a new file or an existing file to the application. If you select Existing Definition… a copy of the file will be placed in your application; the original file is left untouched.

Page 58: Getting Started with Logi Info .NET ApplicationsGetting Started with Logi Info 1 Introduction This publication introduces developers to Logi Info v12.1, in the .NET environment. Logi

52 Getting Started with Logi Info

You can also copy files into, or out of, Studio by dragging and dropping them from, or to, the operating system (from Windows Explorer or the Desktop, for example) or another Studio instance. In Studio, files are dragged from or dropped onto the file/folder tree in the Application Panel. When dropping files, if you don't explicitly drop them onto a folder in the tree, Studio will attempt to place them in the correct folders based on their file extensions. Files can be dragged and dropped within other fold-ers in the file tree.

Studio also supports a hierarchy of "pseudo folders" for additional file organization purposes. Folders are cre-ated by right-clicking any folder, as shown above, and selecting Add → New Folder.

Page 59: Getting Started with Logi Info .NET ApplicationsGetting Started with Logi Info 1 Introduction This publication introduces developers to Logi Info v12.1, in the .NET environment. Logi

Getting Started with Logi Info 53

Creating folders in this manner and then creating or dragging files into them produces the kind of file names shown in the example above. No actual folders are created in the file system. In Studio, entire folders can be dragged into other folders to reorganize them. The following types of files are found in a Logi application:

_Settings - This XML-formatted definition file provides configuration information with application-wide scope. Paths, constants, datasource connections, diagnostic settings, etc. are all configured here.

Reports - Report definitions are the basic source code files of a Logi application, with each report defi-nition usually equating to one web page. Individual files, with an .LGX extension, are enumerated here; double-clicking a definition will open it in the definition editor in the Workspace panel.

Mobile Reports - These are report definitions specifically designed for creating reports for mobile de-vices.

Processes - Process definitions are a special category of non-presentation source files. They can con-tain code for conditional and unattended processing and provide flexibility and coding depth not avail-able in Report definitions.

Data - Data definitions can be used to create an application that retrieves data from a variety of sources and then streams it out as JSON data, to Logi apps, non-Logi apps, and browser clients. See Using Data Definitions for more information.

Support Files - These are the files that support the report and process definition files and include style sheets, images, XML data files, and external HTML files.

Widgets, Templates - These folders contain files that are for special purposes.

To edit most files, double-click them and they’ll open in an editor in the Workspace panel. Do not attempt to edit complex data files in proprietary formats, such Excel spreadsheets, in the Workspace panel - these should be opened and edited externally.

Page 60: Getting Started with Logi Info .NET ApplicationsGetting Started with Logi Info 1 Introduction This publication introduces developers to Logi Info v12.1, in the .NET environment. Logi

54 Getting Started with Logi Info

In the file system, a basic Logi application looks like the example shown above. All of the files for a single appli-cation are contained in one folder, the "Application folder", which makes deploying the app easy. The bin folder and folders beginning with "rd" are system folders and must be present. The two folders high-lighted above are created automatically when the app runs, so don't be concerned if you create a brand new app and don't see them at first. Other folders may also be created, based on features in your application. Studio does not keep track of application files in a database, so you can directly manage files in the Windows file system, copying, moving, renaming, or deleting them without causing any damage. You can always update Studio's list of files by right-clicking any folder and selecting Refresh Application. Editing Files Logi Studio includes file type-aware editors for viewing and editing application files:

Page 61: Getting Started with Logi Info .NET ApplicationsGetting Started with Logi Info 1 Introduction This publication introduces developers to Logi Info v12.1, in the .NET environment. Logi

Getting Started with Logi Info 55

As shown above, when files are opened (multiple files can be opened simultaneously) they're added to the Workspace panel in tabbed panels. The editor for each tab panel is appropriate for the file's type. Features include:

The tabs themselves can be reordered by dragging. Editors may include line numbering, color coding, and collapsible regions. Elements and text can easily be copied and pasted between files in different tab panels. Copying an element also copies all of its child elements. Intelligent completion of element names and HTML tags is provided when typing Undo-Redo (Ctrl-Z, Ctrl-Y) is available for all changes made since the last Save. The Preview panel for definitions includes Forward, Back, Refresh and Stop buttons. Multiple elements (hierarchical peers) in the element tree can be selected at once, then moved or cop-

ied as a group. Elements have their valid child elements available for selection directly from their (right-click) context

menus as well as from the Element Toolbox panel. Files are closed, and their tabbed panel removed, by clicking the X icon in the tab by the file name. You are prompted to save any changes that have been made.

Page 62: Getting Started with Logi Info .NET ApplicationsGetting Started with Logi Info 1 Introduction This publication introduces developers to Logi Info v12.1, in the .NET environment. Logi

56 Getting Started with Logi Info

Tab context menus, available by right-clicking, were added to the tabs, as shown above. The menu options vary based on the type of file being edited in the tab panel.

At the bottom of the Definition Editor Panel are several tabs. The Source tab provides a view of the definition's XML source code. If an element is selected in the definition when the Source tab is clicked, its corresponding XML tag will be highlighted in the source code, as shown above. Skilled developers can edit the source directly here, if desired. Copying the XML source is an easy way to send the definition to someone else; for example, another develop-er or to Logi Support in an email. In fact, just copying the element right in the element tree itself and then pasting it into an email or another application will result in the XML source being pasted.

Working with Elements The primary source code files for Logi applications are report definitions. These files contain XML-formatted text and Studio allows you to create and edit this text in a graphical manner by manipulating objects, called "elements". In Studio, elements are arranged in a tree structure that mirrors the top-to-bottom structure of a web page and some elements have names that are similar to HTML tags.

Page 63: Getting Started with Logi Info .NET ApplicationsGetting Started with Logi Info 1 Introduction This publication introduces developers to Logi Info v12.1, in the .NET environment. Logi

Getting Started with Logi Info 57

The example above shows elements in the "Element Tree" in a report definition. An element can be the "own-er" of another element, creating a parent-child relationship between them. In the example above, the Image, New Line, and Label elements are children of the Body element. These relationships are governed by rules which are enforced within Studio by restricting the availability of child elements for assignment to a parent element.

Elements can be added to the element tree by first selecting the parent element and then double-clicking the child element in the Element Toolbox panel, or by dragging-and-dropping the element. The Element Toolbox, shown above, includes:

1. Elements that can be double-clicked and added to the definition. 2. Other elements, grouped in folders by function. 3. Links to start wizards that may be available. 4. Tabs to specify the relationship of the displayed elements to the element selected in the definition:

Child or Sibling. Only elements which apply to the specified relationship type will be displayed.

Page 64: Getting Started with Logi Info .NET ApplicationsGetting Started with Logi Info 1 Introduction This publication introduces developers to Logi Info v12.1, in the .NET environment. Logi

58 Getting Started with Logi Info

A child and sibling element can also be added to the definition by right-clicking an element in the tree and se-lecting it from the context menu that appears.

An element's context menu, shown above, includes several useful options for working with elements, such as moving, copying, cutting, or deleting them.

You can also select multiple parent elements (hold down the "Ctrl" key while selecting them) and then add a child element beneath all of them at once. In the example above on the left, multiple Data Table Column elements have been selected, and then the Sort element was chosen from the Element Toolbox. The result, on the right, shows a Sort element added beneath each selected Data Table Column element.

Page 65: Getting Started with Logi Info .NET ApplicationsGetting Started with Logi Info 1 Introduction This publication introduces developers to Logi Info v12.1, in the .NET environment. Logi

Getting Started with Logi Info 59

Once in the tree, elements can be moved up or down by dragging them or by using the Up and Down tool bar arrows or similar items in their context menus. The example above shows a New Line element being dragged upward in the tree; note the circled green positioning dot that helps you determine where to drop it. When an element is moved in this way, all of its child elements move with it. Even groups of elements (peers, on the same level in the tree) can be selected and moved at the same time. Elements can also be copied and pasted, individually or in groups, back into the same definition, into another definition, or even into another Logi application in order to reuse them. All of their child elements will be cop-ied with them. Even XML source code, copied from the Workspace panel's Source tab, can be pasted right into the element tree and will instantly appear there as the correct elements. This is a great way to share code via email or dis-cussion forums. Two special elements, Shared Element and Include Shared Element, can be used to make one instance of a group of elements re-useable throughout your application. Elements placed under a Shared Element element in one definition can be referenced using the Include Shared Element element in other definitions. This is par-ticularly useful, for example, for managing headers and footers that appear on many reports within an applica-tion. Element Positioning By default, Logi definitions use Flow Positioning to arrange the elements on a report page. This is a very com-mon scheme in web applications in which each element's location is dependent on the location of the ele-ments preceding it. This is the most flexible scheme and works best across multiple browsers and devices.

Setting Element Attributes Elements can have a number of attributes, or "properties", that govern how they behave. The attributes for a selected element appear in the Attributes Panel and the number of attributes varies depending on the nature of the element.

Page 66: Getting Started with Logi Info .NET ApplicationsGetting Started with Logi Info 1 Introduction This publication introduces developers to Logi Info v12.1, in the .NET environment. Logi

60 Getting Started with Logi Info

As shown above, attribute names appear in the left column and attribute values are entered in the right col-umn. Some attributes are required while others are optional. Attributes can be sorted in two ways: by Category or Alphabetically, by clicking the highlighted icons. When sorted by category, the required attributes appear at the top. Depending on the attribute, values can be entered in several different ways. Generally, values can always be typed-in directly.

Double-click the attribute name to open the Attribute Zoom window, shown above, which contains a larger, multi-line text entry area and allows you to see longer values without scrolling. Hovering your cursor over the value column will cause the complete value to appear in a tooltip, even multi-line SQL statements.

Page 67: Getting Started with Logi Info .NET ApplicationsGetting Started with Logi Info 1 Introduction This publication introduces developers to Logi Info v12.1, in the .NET environment. Logi

Getting Started with Logi Info 61

The values for some attributes consist of a specific set of valid choices and, as shown above, these are chosen by first clicking the circled down-arrow and then selecting a value from the drop-down list of choices. The length of the list can be expanded by dragging the indicated corner of the list.

After selecting a value from the drop-down list, you can hold down the Ctrl key and selected additional values in the list, creating a comma-separated list of attribute values.

Where attributes require column names from a datasource, as shown above, a drop-down list is provided that will, first, retrieve the column names, and then, display them in a drop-down list for easy selection. This feature only works with datasources that respond to schema requests, such as databases, and so does not work with flat files. In addition, the parent data table or chart must have a valid ID for column names to be re-trieved.

Page 68: Getting Started with Logi Info .NET ApplicationsGetting Started with Logi Info 1 Introduction This publication introduces developers to Logi Info v12.1, in the .NET environment. Logi

62 Getting Started with Logi Info

For some attributes, clicking the browse button in the value column will launch a wizard or tool. For example, when the browse button is clicked in the image above, it will open the SQL Query Builder tool, or…

…in the case of Color attributes, clicking the browse button cause the Color Selector dialog box, shown above, to be displayed. Colors can be selected from Basic, Web, and Professional palettes and can also be entered as hex, HSL, and RGB values.

Attributes can be assigned for several elements at the same time, by selecting multiple elements (hold down the Shift or Ctrl keys while clicking elements). The Attributes panel will show all of the attributes the selected elements have in common; attributes that already have different values assigned will be indicated by the "(Dif-

Page 69: Getting Started with Logi Info .NET ApplicationsGetting Started with Logi Info 1 Introduction This publication introduces developers to Logi Info v12.1, in the .NET environment. Logi

Getting Started with Logi Info 63

fering values)" message. As shown above, assigning an attribute like Class in this state will set the individual Class attributes for each of the selected elements. Element ID Attributes Some elements require a unique ID attribute value, which has to be entered by the developer. Developers are encouraged to use a "naming scheme" that conveys both element type and purpose.

However, most ID attributes are optional.

In addition, if an optional ID value is left blank, Studio will identify the element in the Element Tree by using text from another attribute value, as shown above. The attribute that Studio selects for this purpose varies, depending on the element type. The purpose of this change is to eliminate most "duplicate ID" errors (often caused when copying and pasting elements) and to relieve developers, in most cases, of the need to provide IDs at all. Variable and Parameter Lists Certain elements consist of lists of "variable attributes". In this case, the Attributes Panel displays an interface that allows you to enter as many attribute names and values as needed.

Page 70: Getting Started with Logi Info .NET ApplicationsGetting Started with Logi Info 1 Introduction This publication introduces developers to Logi Info v12.1, in the .NET environment. Logi

64 Getting Started with Logi Info

In the example above, a Link Parameters element has been selected and three attributes have been created. Attributes are created by entering a name in the text box at the top of the Attribute Panel and clicking the "+" icon. The new attribute then appears in the list and its value can be set by typing a value directly into the right-hand column. Values can consist of numbers, text, tokens, or formulae. Attributes can be removed by selecting their name and clicking the "-" icon. Attribute names can be edited by selecting them and clicking the "Pencil" icon. This will place the name into the top text box, where it can be edited. The icon will change to a "Diskette" icon and clicking it again will save the edited attribute name. Attribute values can be edited directly, as usual, by placing the cursor on them. Express Attribute Navigation Some developers may prefer keyboard navigation to set attributes, avoiding constant switching between their keyboard and their mouse. Here are some keyboard shortcuts that allow this kind of mouseless navigation:

Keys Action

Once you've entered an Attribute value, the Tab key can be used to commit the value and move to the next attribute value down. Tab can also be used to move from an element to its attributes: Select an element and press the Tab key three times. Focus is placed on the last value attribute visited, or the first empty attribute, and you can begin typing a value immediately. No cursor bar appears in the attrib-ute value.

Commit Value and Move - After typing an Attribute value, press Enter to commit it, and then the Up/Down arrow keys can be used to move to another attribute.

Abandon Value and Move - After typing an Attribute value, press Esc to abandon it, and then the Up/Down arrow keys can be used to move to another attribute.

Page 71: Getting Started with Logi Info .NET ApplicationsGetting Started with Logi Info 1 Introduction This publication introduces developers to Logi Info v12.1, in the .NET environment. Logi

Getting Started with Logi Info 65

The Attribute Spy The Attribute Spy feature allows you to see all of the values assigned to a particular attribute for all elements at once. This is a very powerful tool that makes it easy to compare values, such as style sheet class assign-ments, or get an overall view of values without excessive navigation and mouse-clicking.

As shown above, simply select an attribute (1) and then click the Attribute Spy button (2) at the top of the At-tributes panel. Text will appear in the Workspace panel (3) indicating the values for that attribute for every element in the tree (excluding elements that do not have a value assigned for that attribute). Click the button again to hide the text.

Intelligent Token Completion One of the most useful features in Logi Studio is the token completion feature. It can be difficult to remember all of the token types and identifiers that are available and this feature presents them and also prevents typing errors.

Page 72: Getting Started with Logi Info .NET ApplicationsGetting Started with Logi Info 1 Introduction This publication introduces developers to Logi Info v12.1, in the .NET environment. Logi

66 Getting Started with Logi Info

Here's how this feature works:

1. Type an @ sign and the first letter or two of a token type in an attribute value and a list of token types will appear, as shown above left. Use the Up and Down arrow keys to further navigate to the desired type, if necessary, and press the Space Bar to select it. The token type will be added in the attribute value. You can instead type @ + first letter, for example, @f, to navigate to the desired token.

2. Type a period (.) after the token type, as shown above right, and a list of token identifiers will appear. Type a letter or two and/or use the arrow keys again to navigate and the Space Bar again to select the desired identifier. It will be appended to the token type in the value column, including the trailing tilde.

Similarly, you can use the intelligent completion feature to provide column names, for example, for @Data tokens:

Page 73: Getting Started with Logi Info .NET ApplicationsGetting Started with Logi Info 1 Introduction This publication introduces developers to Logi Info v12.1, in the .NET environment. Logi

Getting Started with Logi Info 67

1. Type an @ sign and the letter "d" in an attribute value and a list of token types will appear, as shown

above left. If it's not positioned there already, use the Up and Down arrow keys to navigate to the Da-ta token item. Press the Space Bar to select it. The token type will be added in the attribute value.

2. Type a period (.) after the token type, as shown above right, and a list of columns, based on the datalayer in use, will appear. Use the arrow keys and Space Bar again to selection the desired column and it will be appended to the @Data token in the value column, including the trailing tilde. Under cer-tain circumstances, you may instead see an item named "Retrieve columns..." which will get the col-umn names and then display them. This feature only works with datasources that respond to schema requests.

The token completion feature also appears in other places, too:

For example, when you use the Attribute Zoom window and enter tokens, as shown above. Also, in the SQL Query Builder, if you edit your query manually and use tokens, it will pop up. The Space Bar and Period key-strokes work in these instances in the same way as described earlier. Token Validation Studio includes a token validation feature which examines tokens as you enter them and will flag those that are incorrectly spelled.

Page 74: Getting Started with Logi Info .NET ApplicationsGetting Started with Logi Info 1 Introduction This publication introduces developers to Logi Info v12.1, in the .NET environment. Logi

68 Getting Started with Logi Info

In the example shown above, the tilde ("~") has been left off of the end of the Data token. Studio responds by displaying an Invalid Token button in the current definition tab. Clicking the button will take you to the offend-ing token. The validation routine looks for missing tildes and misspelled token types ("@Requet" instead of "@Request", for example).

Studio Wizards Studio includes "wizards", or automated procedures, which walk you, step-by-step, through a number of com-plex tasks, from creating new applications to building charts. They save a lot of key strokes and mouse clicks and provide a repeatable, consistent productivity enhancement. Wizards can be invoked in several ways:

When you select an element that has wizard support in the Element Tree, a special tab will appear on the main menu, containing items for the appropriate wizards, a shown above.

Page 75: Getting Started with Logi Info .NET ApplicationsGetting Started with Logi Info 1 Introduction This publication introduces developers to Logi Info v12.1, in the .NET environment. Logi

Getting Started with Logi Info 69

Element wizards are also available in the context menus that pop-up when you right-click an element, as shown above. As in the main menu, their availability depends on which element is selected in the definition. The wizards shown above are specific to the Body element.

Page 76: Getting Started with Logi Info .NET ApplicationsGetting Started with Logi Info 1 Introduction This publication introduces developers to Logi Info v12.1, in the .NET environment. Logi

70 Getting Started with Logi Info

By default, if you double-click an element in the Element Toolbox that has a wizard associated with it, a dialog box like the one shown above will be displayed. It offers you the choice of inserting the element into the Ele-ment Tree or running the wizard. This behavior can be changed by unchecking the “Show this…” checkbox, in which case elements will just be inserted in the future. You can also control this behavior in the Tools → Options menu option. Wizards are also capable of validating your definition and will let you know, for example, if you're missing an element which needs to be provided before the wizard can proceed.

Studio includes other kinds of wizards as well, such as the Master Report Layout wizard. This wizard, available on the main menu's Design tab, let's you select the components and layout for

a master report that can be used to provide a framework for other reports, and then builds the definition for you. For more information, see our document Introducing Master Reports. Wizards in Action Studio's wizards are too numerous to document individually (there are more than 50!) but let's look at a repre-sentative example of a wizard in action:

In the definition shown above, Data Table and DataLayer.SQL elements have been added beneath the Body element, and the datalayer has been configured with a valid SQL query. Right-clicking the data table displays its context menu; let's let the Element Wizard add data columns to the table by selecting the Add Data Columns wizard.

If the query is invalid or contains a typo, or you try this with a datasource that can't return a schema, the

Page 77: Getting Started with Logi Info .NET ApplicationsGetting Started with Logi Info 1 Introduction This publication introduces developers to Logi Info v12.1, in the .NET environment. Logi

Getting Started with Logi Info 71

wizard will fail. In such a case, the wizard will display an error message that should assist you in correcting the problem.

As shown above, the wizard presents a dialog box displaying all of the columns that the SQL query returned. First, we'll click the Uncheck All link, and then individually check the boxes for the first four columns, so that the selections look like the example shown above. Then we'll click Next.

The wizard will insert, and configure, all of the elements necessary for the data table columns we selected, as shown above. Studio's wizards are a great resource for configuring elements, such as charts, that have a large number of con-figuration choices. For example, you could use the Add a Chart wizard to get the basic chart set up for you and then you could customize it from there.

Page 78: Getting Started with Logi Info .NET ApplicationsGetting Started with Logi Info 1 Introduction This publication introduces developers to Logi Info v12.1, in the .NET environment. Logi

72 Getting Started with Logi Info

Assigning Themes and Style Sheet Classes The presentation qualities of elements are set in two ways. In some cases presentation values, such as Color, may appear as element attributes that can be assigned directly. However, in most cases, this is achieved by using a Theme or by manually assigning style classes to an element's Class attribute. Using Themes Themes allow developers to instantly apply a consistent "look" to their applications. A theme is a collection of graphic images, a style sheet, and a template modifier file, that impart a specific appearance to a Logi applica-tion. Several standard themes are provided for your use. Themes do the work for you, assigning style classes and setting other appearance attributes, making it easier to produce great looking reports without an in-depth knowledge of style classes and style sheets. You can easily switch between themes in order to experiment with them.

When you use the New Application wizard in Studio, one of the steps is the selection of a theme for the new application, as shown above.

Page 79: Getting Started with Logi Info .NET ApplicationsGetting Started with Logi Info 1 Introduction This publication introduces developers to Logi Info v12.1, in the .NET environment. Logi

Getting Started with Logi Info 73

As shown above, one way to apply a theme is to add a Style element to your report definition, then set its Theme attribute to the name of one of the available themes. The report will have the theme applied to it. More information about themes is available in a later chapter: Using Themes and Style Sheets.

You can modify standard themes to create your own custom themes using the Theme Editor wizard in Logi Studio. For more information, see our document Using the Theme Editor.

Using Style Classes The first step in using style is to assign a style sheet. This .css file is typically placed in your application's _SupportFiles folder and assigned using the same Style element used in the previous example to assign a theme. Once the style sheet has been assigned to the report definition, its style classes are available for use.

As shown in the example above left, classes from the currently assigned style sheet are available for selection from a drop-down list in the Class attribute value of an element. The classes in the list are drawn from the style sheet assigned to the report definition or the application. This is a quick way to select classes, although class names can also be typed in directly. Multiple classes can also be assigned, separated by commas. A preview of the effect of the assignment is shown in Studio's Information panel. The list of class choices includes a (Class Selector...) item, shown above right, which opens the Class Selector tool:

Page 80: Getting Started with Logi Info .NET ApplicationsGetting Started with Logi Info 1 Introduction This publication introduces developers to Logi Info v12.1, in the .NET environment. Logi

74 Getting Started with Logi Info

The Class Selector tool, shown above, allows a class to be assigned by selecting it in the class list (1) and click-ing OK. The attributes of the class are shown in the upper right panel (2) and they can be edited there. Con-trols (3) allow you to save, add, and delete classes and the effect of the selected class is shown in the lower preview panel (4). This tool provides pretty comprehensive class management right within Studio. A more convenient editing option is to open the style sheet, by double-clicking it in Studio's Application panel, and it will open in a special editor in the Workspace panel. The intelligent editor will provide style selector choices and completion suggestions as you type. Finally, you can use an external style sheet editor, if you've installed one:

You can open and edit style sheets in the external style sheet editor by selecting the file in the Application panel, as shown above left, and right-clicking it, then selecting Open Externally from the pop-up menu.

Page 81: Getting Started with Logi Info .NET ApplicationsGetting Started with Logi Info 1 Introduction This publication introduces developers to Logi Info v12.1, in the .NET environment. Logi

Getting Started with Logi Info 75

Another method is to select the Style Sheet element in the element tree, select its Style Sheet attribute, and click the Open File... link that appears at the top of the Attributes panel, as shown above right. These actions will launch the application associated in the file system with the .css file extension and open the style sheet in it. More information about themes is available in a later chapter: Using Themes and Style Sheets.

Testing and Debugging Applications While developing a Logi application, you'll need to check your work by viewing it and Studio includes several ways to do this. Using the Preview Tab Studio's Preview button, at the bottom of the Workspace panel, provides the developer with a fast way to view the report definition currently being edited.

To preview a report definition that's open in the Workspace panel:

1. Ensure that the desired report definition is the selected definition in the workspace. 2. Click the Preview button at the bottom of the Workspace panel, as shown above. 3. Browse and interact with the report definition using the toolbar at the top of the Preview panel.

Page 82: Getting Started with Logi Info .NET ApplicationsGetting Started with Logi Info 1 Introduction This publication introduces developers to Logi Info v12.1, in the .NET environment. Logi

76 Getting Started with Logi Info

Note that clicking Preview will save all open definitions before displaying the report.

When using Preview, any JavaScript errors thrown will cause a count of the errors to appear next to the preview URL:

Click the number, as shown above, to display a dialog box containing the JavaScript error message. In earlier versions of Studio, the dialog box will simply be displayed automatically, interrupting execution. Using the "Live Preview" Feature The Live Preview feature allows you preview your work in a separate, "live" desktop window.

The Main Menu's Live Preview item is shown above. The live preview will be displayed in a separate window and any changes made to the definition will immediately be reflected in that window. You can resize and relo-cate the new preview window as desired; you can even drag it onto a separate display, if you have one. You can also switch to Live Preview from regular Preview mode:

Page 83: Getting Started with Logi Info .NET ApplicationsGetting Started with Logi Info 1 Introduction This publication introduces developers to Logi Info v12.1, in the .NET environment. Logi

Getting Started with Logi Info 77

To start Live Preview, first preview the report definition, using the Preview tab, and then click the Live Preview icon, circled above. The preview will be displayed in a separate window, and Studio will switch back to its Definition tab. You can resize and relocate the new preview window as desired; you can even drag it onto a separate display, if you have one. Any subsequent changes you make to the definition code will immediately be reflected in the Live Preview window.

If you don't want definition changes to be updated immediately in the Live Preview window, you can pause and restart them, using the Pause and Play icons, circled above. To exit Live Preview, just click the Live Preview window's Close (X) icon. Browsing the Default Report Definition In a Logi application, one of the report definitions is designated as the "default" report - the page that will be shown if no definition is specified in the URL. If you don't change it, this is usually the Default report definition.

You can browse the default report by clicking the Browse icon, shown above, in Studio's toolbar. Your comput-er's default browser (the one associated with .htm/html file extensions) will be used for this.

Page 84: Getting Started with Logi Info .NET ApplicationsGetting Started with Logi Info 1 Introduction This publication introduces developers to Logi Info v12.1, in the .NET environment. Logi

78 Getting Started with Logi Info

You can change the "default" report designation in the Application Panel:

As shown above, left, select the desired report definition, right-click it, and select Set As Default from the popup menu. This sets the Application element's Default Report attribute, shown above, right, in the _Settings definition. You can also change this attribute value directly in the _Settings definition. Using the Run Application menu item will save all open, unsaved definitions before displaying the report. Browsing Any Report Definition You can also browse any report definition without opening it in the Workspace Panel or setting it as the de-fault report.

As shown above, select the desired report definition, right-click it, and select Run in Browser from the popup menu. Using this menu item will save all open definitions before displaying the report definition.

Page 85: Getting Started with Logi Info .NET ApplicationsGetting Started with Logi Info 1 Introduction This publication introduces developers to Logi Info v12.1, in the .NET environment. Logi

Getting Started with Logi Info 79

Using the Test Parameters Panel One of Studio's least well-known panels is the Test Parameters panel. Studio makes this panel visible when the current definition expects to receive parameters. It provides a way for developers to supply request variable values for their definitions when previewing them in Studio and it makes experimenting with different values very easy.

The example above shows this panel in action. Studio will automatically populate the left column with the to-kens for any request variables expected by the current definition in the Workspace. You can enter values for those tokens, and they'll be fed to the definition when you Preview it in the Workspace panel, or right-click it in the Application panel and select "Run in Browser".

Token values are not fed to the application when you click the Run Application menu item or press F5.

Using the Debugging Features Logi Studio also provides debugging features for an application, but they have to be enabled to work. They are not enabled by default.

Page 86: Getting Started with Logi Info .NET ApplicationsGetting Started with Logi Info 1 Introduction This publication introduces developers to Logi Info v12.1, in the .NET environment. Logi

80 Getting Started with Logi Info

You can turn on comprehensive debugging for all your report pages by clicking the Debug menu item, shown above, and selecting Debugger Link from the selection list.

Selecting a debugger style in the menu sets an attribute value in the _Settings definition, as shown above. This value can also be set manually. When the Debugger Style has been set to Debugger Link, the Debugger Trace Report can be accessed in two ways: using the Debug this page link which will now appear at the bottom of your report pages, or from a link that appears on a runtime error page. The trace report appears either in the Preview panel or in your browser, depending on which method you were using to view your report.

Page 87: Getting Started with Logi Info .NET ApplicationsGetting Started with Logi Info 1 Introduction This publication introduces developers to Logi Info v12.1, in the .NET environment. Logi

Getting Started with Logi Info 81

As shown in the example above, the debug icon for the report "floats" in the lower right-hand corner of the browser window, so you don't have to scroll down to use it. Any charts, which are processed separately by the Logi Engine, will have their own debug icon and trace report. For more information about debugging, see our document Debugging Reports.

Deploying Logi Applications After you've developed your Logi application on your development machine, it's time to deploy it to your pro-duction server. There are several ways to this, and they're all discussed in our Deploying a Logi Application document. The easiest of these methods is to use Studio's Application Deployment tool. Before you use it, however, en-sure that:

Logi Server is installed on your production server. On a development machine you generally install both Logi Studio and Logi Server and you may wish to install both of them on a production server, but it's not required and most developers only install Logi Server there.

The appropriate .NET framework or JDK 1.6+ has been installed on the production server.

You have an appropriate Logi license for the production server.

You have the appropriate security credentials for writing to the production server.

The production server has connectivity to the database server or other datasources needed by your application, and you know the security credentials they require.

You know any storage conventions for folder locations on the production server that you need to ob-serve (such as, "all applications must be installed on the D: drive, not the C: drive")?

Studio’s Application Deployment tool is capable of copying all or part of your application to the production server using either file system copy commands to local or shared network drives, or one of three flavors of FTP (standard, SSL, and SSH). In Studio, the details of each operation are called a "deployment target" and they can be saved for later reuse.

Page 88: Getting Started with Logi Info .NET ApplicationsGetting Started with Logi Info 1 Introduction This publication introduces developers to Logi Info v12.1, in the .NET environment. Logi

82 Getting Started with Logi Info

The Application Deployment tool is started in Studio by selecting it from the Main Menu Tools tab, as shown above.

If no deployments have been defined, the dialog box shown above appears. Click the link or New... to define your first deployment target.

Page 89: Getting Started with Logi Info .NET ApplicationsGetting Started with Logi Info 1 Introduction This publication introduces developers to Logi Info v12.1, in the .NET environment. Logi

Getting Started with Logi Info 83

The Add/Edit Deployment Target dialog box contains the following:

1. An arbitrary name you give the deployment, for future reference. 2. The transfer method: Copy to Local or Network drive, FTP, FTP (SSL), or FTP (SSH). 3. If Local/Network selected: the UNC file path to destination app folder on production server. Example:

\\myWebServer\myLogiApp

If FTP variant selected: the FTP protocol URL to destination app folder and arguments. Examples: FTP & FTP SSL: ftp://myWebServer/myLogiApp,ftp://myWebServer.com:8082/projs/myLogiApp FTP SSH: sftp://[email protected]/myLogiApp If necessary, you will be prompted to supply a user ID and a password; do not include them in the URL. Both active and passive FTP is supported.

4. The Test button can be used to ensure connectivity to destination. 5. Select the files that are to be transferred. Files are overwritten at destination without warning! 6. If Server Engine has been selected above, the server type options for the deployment are shown. 7. If Server Engine has been selected, the available versions installed on the development machine are

listed.

Page 90: Getting Started with Logi Info .NET ApplicationsGetting Started with Logi Info 1 Introduction This publication introduces developers to Logi Info v12.1, in the .NET environment. Logi

84 Getting Started with Logi Info

If the destination requires a user ID and password in order to access it, when you click the Test button, you'll be prompted for login credentials. If the credentials are successfully authenticated, the user ID will automati-cally be saved with the deployment target details and, optionally, the password as well. Once a deployment target has been defined, it appears in a list…

…as shown above, where they can be managed and edited. To run a deployment, check its checkbox and click the Deploy button. If multiple deployments are selected, they'll run consecutively. The connection with the destination server will be established and then the files will be deployed to it.

Page 91: Getting Started with Logi Info .NET ApplicationsGetting Started with Logi Info 1 Introduction This publication introduces developers to Logi Info v12.1, in the .NET environment. Logi

Getting Started with Logi Info 85

The Deployment dialog box will expand to display the results of the process, as shown above. The running log indicates which files are added, replaced, or skipped. Deployment process logs are created in the rdDeployment folder beneath your app root folder as text files and are accessible through the View Logs link.

Finally, the deployment will complete and the link to its log file will be displayed.

It's very important that you understand that copying the files, using the Deployment tool, does not regis-

ter the application with a web server on the target machine. So, after the first deployment, this has to be done by the developer using Studio, Server Manager, or the web server's tools. Controlling Which Files Are Deployed The Add/Edit Target dialog box allows you to select the files to be deployed by category:

Category Description

Application Definition and Support

Copies all files in all folders with names beginning with an under-score, such as _Definition, _Script, _Support Files, etc. This includes folders like _Images and _Stylesheets, which are from the old app folder scheme. Identical files will be skipped.

Application Settings

Copies _Settings.lgx only. Identical files will be skipped.

Server Engine (.NET app)

Copies the rdTemplate and bin folders - files are overwritten without warning. Also copies any .aspx, .asax, and .config files if they do not already exist; does not overwrite them if they do exist.

Server Engine (Java app) Copies rdTemplate, Assemblies, and WEB-INF folders - files are over-written without warning. Also copies any .aspx, .asax, and .config files if they do not already exist; does not overwrite them if they do exist.

Page 92: Getting Started with Logi Info .NET ApplicationsGetting Started with Logi Info 1 Introduction This publication introduces developers to Logi Info v12.1, in the .NET environment. Logi

86 Getting Started with Logi Info

Why not just deploy all of the categories all of the time? You'll want to do so for your first deployment but, generally, you won't want to for subsequent deployments in order to avoid overwriting files that may have been customized for the production server, such as _Settings.lgx. And, unless you're changing engine versions, deploying the engine files with every deployment is unnecessary and a waste of time. So the tool offers you the opportunity to tailor your deployments as needed. However, developers may want to exclude specific application definition and support files from a deployment, and Studio provides an easy way to do that:

By default, all files in Studio's Application Panel are included in deployments. However, if you wish to exclude a file, select it in the Application Panel, right-click it, and uncheck the Include in Deployments item in the popup menu, as shown above.

Page 93: Getting Started with Logi Info .NET ApplicationsGetting Started with Logi Info 1 Introduction This publication introduces developers to Logi Info v12.1, in the .NET environment. Logi

Getting Started with Logi Info 87

If files have been excluded, the View Excluded Files link, shown above, will be displayed to alert you to this situation when you add or edit a deployment target in the Deployment tool. Clicking the link will display a list of the excluded files. License Files License files are never included in deployments, so you will have to manually deploy your license file the first time you deploy your application, or configure it to use a centralized license file. For more information about license files, see our document Product Licensing. After a First-Time Deployment After the first time an application is deployed, you must:

Provide a license file for the application, unless you're using a centralized license file. Register the application with the web server. Ensure that the datasource connection strings or parameters, constants, and other server-specific set-

tings are correct in the _Settings definition. For a Java app, complete any special configurations required for your web server.

Subsequent deployments for the purpose of updating report definitions, images, XML data, etc. should not require you to do any of the steps discussed above, unless you're changing folder locations or _Settings attrib-utes. This means Logi Server Engine files and _Settings.lgx can be left out of future deployments undertaken for simple update purposes. For more information, see our Deploying a Logi Application document.

Ribbon Menu, Shortcuts, and Search

Studio operations can be controlled using the Ribbon Menu at the top of the screen. Here are its tabs and ma-jor items:

The Home Tab

New Application Create a new application with the assistance of the New Application wizard.

Open Application Open an existing application from the File Explorer, the recent apps list, or a list of apps registered with the local web server.

New File Create a new file by selecting a file category.

Page 94: Getting Started with Logi Info .NET ApplicationsGetting Started with Logi Info 1 Introduction This publication introduces developers to Logi Info v12.1, in the .NET environment. Logi

88 Getting Started with Logi Info

Save, Save All, Close

Save the file in the current Workspace editor tab, save all edited files, and close the current application, with a prompt to save any unsaved files.

Edit Actions, Re-mark, Move Up/Down

Standard editing actions including Cut, Copy, Paste and more. Comment and uncom-ment elements and rearrange their order.

Search/Replace Search current, or all, definitions and supporting text files, and replace text, if desired.

Element Naviga-tion, Expand/Collapse

Navigate to previous or next element in the Element Tree navigation history. Expand or collapse all child elements beneath the selected element.

Test Actions Control debugging, and preview a definition in a browser or in a separate "live" win-dow.

The Design Tab

Master Report Layout

Launch the Master Report Layout wizard, which allows you to design a header-menu-footer template for use with each report definition.

Theme Editor

Launch the Theme Editor wizard, which allows you to create and edit your own custom themes.

Themes Apply the selected standard theme to the current report, or to the entire applica-tion. Other standard themes available in versions prior to 12.1 are no longer being included.

The Tools Tab

Application Deployment Deploy the application to other servers using the Application Deployment Tool.

Application Obfuscation Render definitions unreadable by humans to prevent tampering and theft using the Application Obfuscation Tool.

Server Manager View registered applications and change their Logi Engine versions individually or in bulk.

Team Development Manage built-in Logi source code control with file check-in/out and change his-tory.

Database Browser View schema and basic data samples from databases with connections in

Page 95: Getting Started with Logi Info .NET ApplicationsGetting Started with Logi Info 1 Introduction This publication introduces developers to Logi Info v12.1, in the .NET environment. Logi

Getting Started with Logi Info 89

_Settings file.

Elements/Attributes Pan-el

Specify the arrangement and order of the Element Toolbox and Attributes pan-els in Studio.

Options Specify Studio options including file encoding and definition editor colors.

The Wizards Tab

The Wizards tab appears when an element that has supporting wizards is selected. The number of wizards available varies depending on the selected element.

Some European keyboards use a key combination that includes the Alt key to produce characters like @ and ~ which are used frequently in Logi code. By default, the Alt key will shift focus to the Ribbon Menu, making it difficult to type these characters on European keyboards. An option to disable this focus shift is available in

Tools Options.

Ribbon Menu Controls

The other items on the Tools tab, Application Deployment, Application Obfuscation, Server Manager, Team Development, and the Database Browser, are discussed in separate sections in this document.

The Ribbon Menu items can be collapsed vertically to get more screen real estate, using the arrow highlighted above. The menu can be expanded again by clicking the arrow again, or by selecting a different menu tab.

The menu's Getting Started button, shown above, will redisplay the Getting Started dialog box whenever needed.

Page 96: Getting Started with Logi Info .NET ApplicationsGetting Started with Logi Info 1 Introduction This publication introduces developers to Logi Info v12.1, in the .NET environment. Logi

90 Getting Started with Logi Info

The menu's Help button, shown above, displays a drop-down list of resources for getting assistance and re-porting problems.

Keyboard Shortcuts The following keyboard shortcuts are available for those who may prefer to save mouse clicks:

Applications and Files Editing

Ctrl n = New application Ctrl f = Find

Ctrl o = Open application Ctrl h = Replace

Ctrl l = Open application from local web server Ctrl z = Undo

Ctrl s = Save selected file Ctrl y = Redo

Ctrl, Shift s = Save all open files Ctrl r = Toggle remark/unremark

F1 = Studio Help Ctrl x = Cut

F2 = Rename selected file Ctrl x = Copy

F5 = Run current definition in browser Ctrl v = Paste

F7 = Move element up (includes children) Ctrl + = Next navigation history item (v10.2.424)

F8 = Move element down (includes children) Ctrl - = Previous navigation history item (v10.2.424)

Ctrl ↑↓ = With focus in Attribute panel and value committed, move to Prev/Next element in Element Tree.

You can download and print our handy Studio Keyboard Shortcuts quick-reference card, if desired. Search & Replace Logi Studio includes a Search feature, including a Search control right on the main menu:

Page 97: Getting Started with Logi Info .NET ApplicationsGetting Started with Logi Info 1 Introduction This publication introduces developers to Logi Info v12.1, in the .NET environment. Logi

Getting Started with Logi Info 91

As shown above, the ribbon menu includes a text input control for entering new search terms and it keeps a historical list of terms sought during the current program session. Clicking the magnifying glass icon starts a new search using the displayed terms. Searches are not case-sensitive initially and can also be initiated using the Ctrl + F keys. Clicking the A-B icon, or using the Ctrl + H keys, will open the Search and Replace feature.

Search results are displayed in the Find and Replace dialog box, shown above. Additional searches can be launched from here with more selective scope and criteria, if desired. Results returned are listed by definition and are active links: clicking a result row will open and highlight the specific occurrence in the definition in the Workspace panel. Clicking the Replace tab in the dialog box reveals controls in which you can enter a replacement term and se-lectively make replacements.

Page 98: Getting Started with Logi Info .NET ApplicationsGetting Started with Logi Info 1 Introduction This publication introduces developers to Logi Info v12.1, in the .NET environment. Logi

92 Getting Started with Logi Info

Studio Options Logi Studio can be configured using the Tools → Options menu item:

Options include:

Show "Getting Started" dialog box - Select this option to display the dialog box designed for new users when Studio starts.

Ask to run wizards... - Controls whether or not a dialog box prompts you to insert an element or run its wizard when you double-click an element in the Element Toolbox.

Automatically open... - Select this option to have Studio, at startup, reopen that last application open when Studio was closed.

Limit SQL Requests... - Uncheck this option to allow very large result sets to be returned, but be pre-pared for possible delays.

Source Code Repository Friendly - When checked, prevents writing of the standard SavedAt, SavedBy, and EngineVersion attributes in definition file source code, which can interfere with some code reposi-tories like GIT. Also adds a .gitignore and .tfignore files in the application folder and makes formatting and other changes to the source code files. See the following section for more information.

Enable ribbon access... - Uncheck this option to prevent shifting focus to the Ribbon Menu when the Alt key is pressed. This is useful with some European keyboards that use key combinations that include the Alt key to produce characters like @ and ~.

Definition File Encoding - Specifies that character encoding scheme to be used in Logi definition files. Remarks Color - Colored block indicates the color to be used for remarked (commented out) elements

in the element tree. Click the block to open the Color Selector dialog box and choose a new color.

Page 99: Getting Started with Logi Info .NET ApplicationsGetting Started with Logi Info 1 Introduction This publication introduces developers to Logi Info v12.1, in the .NET environment. Logi

Getting Started with Logi Info 93

Notes Color - Colored block indicates the color to be used for Note element text in the element tree. Click the block to open the Color Selector dialog box and choose a new color.

Source Code Repository-Friendly Features Logi Studio v12+ includes features designed to make Logi definition source code easier to use with 3rd-party source code repository and control products like GIT and TFS. In addition to changing the source code format, the features also create .gitignore and .tfignore files in the application folder.

Note that if you enable these features your source code will be reformatted. However, it IS reversible. The example above shows the default (non-"repository friendly") definition source code format. It includes "SavedBy", "SavedAt", and "EngineVersion" information and XML elements and their attributes appear on the same line. Also, special attributes are provided (but not shown here) to describe the "collapsed state" of the elements in Studio's Element Tree.

<?xml version="1.0" encoding="utf-8"?>

<Report ID="MyDefault" SavedBy="LOGIXML\lee" SavedAt="4/2/2015 3:43:55 PM"

EngineVersion="12.0.029">

<StyleSheet Theme="Signal" />

<Body>

<DataTable ID="dtOrders">

<DataLayer Type="SQL" Source="SELECT * FROM Orders" ConnectionID="connNW" />

<DataTableColumn ID="colOrderID" Header="OrderID">

<Label ID="lblOrderID" Caption="@Data.OrderID~" />

<DataColumnSort DataColumn="OrderID" DataType="Number" />

</DataTableColumn>

</DataTable>

</Body>

<ideTestParams />

</Report>

Page 100: Getting Started with Logi Info .NET ApplicationsGetting Started with Logi Info 1 Introduction This publication introduces developers to Logi Info v12.1, in the .NET environment. Logi

94 Getting Started with Logi Info

<?xml version="1.0" encoding="utf-8"?>

<Report

ID="MyDefault"

>

<StyleSheet

Theme="Signal"

/>

<Body> <DataTable

ID="dtOrders"

>

<DataLayer

ConnectionID="connNW"

Source="SELECT * FROM Orders"

Type="SQL"

/>

<DataTableColumn

Header="OrderID"

ID="colOrderID"

>

<Label

Caption="@Data.OrderID~"

ID="lblOrderID"

/>

<DataColumnSort

DataColumn="OrderID"

DataType="Number"

/>

</DataTableColumn>

</DataTable>

</Body>

</Report>

Page 101: Getting Started with Logi Info .NET ApplicationsGetting Started with Logi Info 1 Introduction This publication introduces developers to Logi Info v12.1, in the .NET environment. Logi

Getting Started with Logi Info 95

The next example, above, shows the same code, reformatted to be "repository friendly". It has no timestamp, author, or engine version information and each XML attribute is displayed, in alphabetic order, on its own line. SQL queries will similarly be shown on multiple lines, making them easy to read. Any collapsed state attributes are saved in a separate file: _Definitions\Settings.lgp.

When you check or uncheck the Source Code Repository Friendly box in the Studio Options, you'll see the dia-log box shown above.

If you click Yes, all of your definition files will be converted immediately to the other format and saved. If you click No, then your files will be individually converted the next time you edit and save them. Click Cancel to make no changes.

Checking or unchecking the box sets the General element's Repo Friendly attribute to True or False, in the _Settings definition. You can change all, or individual, definitions back and forth between formats without concern. The format has no effect on the function or performance of a definition when executed.

The Database Browser The Database Browser tool allows developers to view the objects and data in connected databases. The ob-jects available include Tables, Columns, Views, and Stored Procedures. The database browser does not work with datasources that do not return a schema when queried, such as XML data files.

Page 102: Getting Started with Logi Info .NET ApplicationsGetting Started with Logi Info 1 Introduction This publication introduces developers to Logi Info v12.1, in the .NET environment. Logi

96 Getting Started with Logi Info

The Database Browser is launched from the main menu’s Tools tab, as shown above. Select a database from the list of connections that have been configured in the _Settings definition for this application.

If you select a Connection element in the _Settings definition and click the Database Browser menu item, it will open the database immediately. If no Connection element is selected, then a

list of databases like the one shown above will be displayed so you can select one.

The Database Browser, shown above, provides the following features:

1. A tree view of the Tables available in the database is presented, as shown above. 2. Each table folder can be expanded to display its columns. 3. The database's Views and Stored Procedures, if any, are also available. 4. The Query Builder utility can be launched from here with this button. 5. The Details tab provides table or column properties, the Source tab allows Stored Procedure code to

be viewed (but not edited), and the Data tab displays the table's actual data. 6. Rows of data displayed in the Data tab can be right-clicked and edited or deleted.

The Database Browser will work with the databases for which we provide "native" Connection elements, such as Oracle, MS SQL Server, and MySQL. It may work with other databases that use a connection that mimics that of a database for which we provide a native connection, such as Netezza PostgreSQL.

Page 103: Getting Started with Logi Info .NET ApplicationsGetting Started with Logi Info 1 Introduction This publication introduces developers to Logi Info v12.1, in the .NET environment. Logi

Getting Started with Logi Info 97

It is not guaranteed to work with every possible database and, in that case, we recommend that you use tools provided with the database to examine and manipulate it outside of Studio. The Database Browser may not support all of the functions and views available in Microsoft Access databases. By default, the Database Browser will only return 10,000 rows of data. You can turn this limit off in Studio in Tools Options. The Database Browser is a non-modal dialog box and can remain open, for reference, while you work elsewhere in Studio.

The SQL Query Builder The SQL Query Builder tool allows developers to examine data and construct and test their queries from with-in Studio. It's launched either from the Database Browser or…

… by clicking the browse button at the end of a datalayer element's Source attribute, as shown above.

Page 104: Getting Started with Logi Info .NET ApplicationsGetting Started with Logi Info 1 Introduction This publication introduces developers to Logi Info v12.1, in the .NET environment. Logi

98 Getting Started with Logi Info

The SQL Query Builder presents database objects in a (1) tree, from which tables and views can be dragged into the (2) center work area. Manipulating the visual objects results in a SQL query being generated in the (3) bottom command area. The query can use multiple lines in the command area and can, therefore, include DE-CLARE statements and other more complex SQL statement constructions. Clicking the (4) Data tab at the top of the SQL Query Builder executes the SQL statements and displays the re-sults in that tab panel. The F5 key can also be used to execute statements; portions of statements can be high-lighted and selectively executed using F5 as well. SQL statements such as INSERT and UPDATE can be used to modify the data but there is no graphical way to directly make modifications in the Data tab. By default, the SQL Query Builder will only return 10,000 rows of data. You can turn this limit off in Studio in Tools → Options. Clicking (5) OK will cause the query constructed in the command area to be copied into the datalayer's Source attribute, if the SQL Query Builder was called by clicking the attribute's browse button. Otherwise, the query text can be selected, copied, and pasted as needed.

The SQL Query Builder will work with the databases for which we provide "native" Connection elements, such as Oracle, MS SQL Server, and MySQL. It may work with other databases that use a connection that mim-ics that of a database for which we provide a native connection, such as Netezza → PostgreSQL.

The SQL Query Builder will not support all of the functions and views available in Microsoft Access data-bases, or other non-standard SQL languages, such as Salesforce Object Query Language. It is not guaranteed to work with every possible database and, in that case, we recommend that you use tools provided with the da-

Page 105: Getting Started with Logi Info .NET ApplicationsGetting Started with Logi Info 1 Introduction This publication introduces developers to Logi Info v12.1, in the .NET environment. Logi

Getting Started with Logi Info 99

tabase to create and test queries, and then copy and paste them into Studio. When Query Has Been Entered Manually Note that if you have already entered a query manually in the Source attribute and you then open SQL Query Builder, the tool will try to "reverse-engineer" the query into its graphical representation. It succeeds at this most of the time but, if the query includes tokens, the SQL Query Builder may fail and display an error mes-sage, especially when Logi tokens have been used outside of a SELECT statement. Use with Oracle and Multiple Schemas Due to Oracle's potential for use of multiple schemas, each potentially with many objects, prior to v10.1.59 it was possible for SQL Query Builder to crash when trying to retrieve thousands of schemas and objects. A new, updated version of the SQL Query Builder was included in Studio beginning in v10.1.59 to address this issue. When connecting to an Oracle DB, the updated SQL Query Builder will retrieve a list of schemas, prompt you to select one, and then retrieve the related objects.

The MDX Query Builder The MDX Query Builder provides an easy way to construct MDX queries, which are essentially two-dimensional queries against three-dimensional (cube) data. The notation used to select cube data has strict formatting requirements and the MDX Query Builder helps developers build valid queries.

It's launched, as shown above, by clicking the browse button at the end of the DataLayer.MDX element's MDX Source attribute.

Page 106: Getting Started with Logi Info .NET ApplicationsGetting Started with Logi Info 1 Introduction This publication introduces developers to Logi Info v12.1, in the .NET environment. Logi

100 Getting Started with Logi Info

Based on the selected (1) Cube, the MDX Query Builder presents lists of (2) Dimensions and Members, and (3) Measures. These can be moved to an axis or added and removed by selecting and right-clicking them, as shown above. The (4) results of these actions can be seen in the Results panel, in tabular or (5) source code form. Clicking (6) OK will cause the query constructed in the Results panel to be copied into the datalayer's MDX Source attribute, if the MDX Query Builder was called by clicking the attribute's browse button. Otherwise, the query text can be selected, copied, and pasted elsewhere as needed. When a Query Has Been Entered Manually Note that if you have already entered a query manually in the MDX Source attribute and you then open it in the MDX Query Builder, the tool will try to "reverse-engineer" the query. It succeeds at this most of the time but, if the query includes tokens or is created using a non-standard SQL language, the MDX Query Builder may fail and display an error message. This is especially likely when Logi tokens have been used outside of a SELECT statement.

Working with Studio Panels Studio provides an intelligent and dynamic development environment for the creation of Logi applications. Though almost all of the source files used in a Logi application are text files and can therefore be edited with something as simple as Notepad, the wizards, editors, and other tools within Studio make the development process faster and easier. The primary visual feature of Studio is its set of panels. These are used to manage, organize, and edit the files that make up a Logi application. The panels are flexible and can be sized to suit personal tastes.

Page 107: Getting Started with Logi Info .NET ApplicationsGetting Started with Logi Info 1 Introduction This publication introduces developers to Logi Info v12.1, in the .NET environment. Logi

Getting Started with Logi Info 101

To resize a panel, simply position your cursor over the panel border (where it will change to the resizing cursor, as shown above) and drag the border in the desired direction. This applies to both vertical and horizontal sep-arators.

If you prefer to add elements to the Element Tree using the "right-click and pop-up menu" method, you may not want to see the Element Toolbox panel at all; similarly, you may not use the Test Parameters panel. You can effectively hide these two by reducing their heights, as shown above. Just drag their separator bars down-ward completely. The Test Parameters panel is displayed only if the application accepts parameters.

Page 108: Getting Started with Logi Info .NET ApplicationsGetting Started with Logi Info 1 Introduction This publication introduces developers to Logi Info v12.1, in the .NET environment. Logi

102 Getting Started with Logi Info

If desired, the vertical positions of the Element Toolbox and Attributes/Test Parameters panels combination can be swapped, as shown above, using the Tools → Elements & Attributes Panels main menu item.

The two panels can also be arranged side-by-side, as shown above.

Page 109: Getting Started with Logi Info .NET ApplicationsGetting Started with Logi Info 1 Introduction This publication introduces developers to Logi Info v12.1, in the .NET environment. Logi

Getting Started with Logi Info 103

Changing Logi Application Versions A Logi application includes files and settings installed on the web server and version-specific binary files includ-ed in each Logi application project folder. This allows each Logi application to maintain its own version identity and allows backward compatibility from new versions of Logi Info. Applications can be upgraded and downgraded to different versions and, when a new version of Logi Info is installed, applications must be upgraded before they'll have the benefits of the new version.

When you open an application, Studio displays a warning in its Application tab, as shown above, if the applica-tion's version does not match the version of Logi Info being used. For existing Logi .NET and Java applications, v10 and later, Studio provides a quick and easy way to change ver-sions:

To change versions, click the Change Version... link, shown above. This will display a wizard with a list of the installed versions and, after you select one, will replace the application's version-specific binary files with the files of the selected version. The replacement may take several minutes. This will not affect any definitions or support files you have created and you can revert the change.

Page 110: Getting Started with Logi Info .NET ApplicationsGetting Started with Logi Info 1 Introduction This publication introduces developers to Logi Info v12.1, in the .NET environment. Logi

104 Getting Started with Logi Info

For .NET applications, the Server Manager, which can be launched from Studio's Tools menu, can also be used to change application versions. This is a tool that allows you to examine all of the .NET Logi applications on the local web server and manage them.

The Server Manager dialog box, shown above, displays a list of the applications installed on the local web server. Select one or more applications (1) and the desired product versions (2), and click Change Version... (3). The process usually takes less than a minute for each application selected.

Server Manager is intended for use only with .NET applications, using the IIS or Cassini web servers; if neither one of these servers is installed, Server Manager will prompt you to install them. For additional important information about changing application versions, see our document Upgrading Logi Products and Apps.

Team Development Features Logi Studio includes two features for use in a team development environment, where multiple developers are working on the same Logi application. File Locking prevents multiple developers from inadvertently working on the same file at the same time and blocking or overwriting each other's modifications. File History retains a copy of each file revision and current versions can be "rolled back" to earlier versions.

Page 111: Getting Started with Logi Info .NET ApplicationsGetting Started with Logi Info 1 Introduction This publication introduces developers to Logi Info v12.1, in the .NET environment. Logi

Getting Started with Logi Info 105

As shown above, these features are enabled by adding a Team Development element to the application's _Settings definition. The two features, File History and File Locking, are enabled by setting their respective at-tributes.

When you Save the _Settings definition, the Team Development features will become enabled. Definitions in the Application panel, including the _Settings definition, will be shown with a "padlocked" icon, indicating that the files have been locked. Hovering your mouse over the definitions will cause a "File Locked" tooltip to ap-pear. Attributes and their values for elements in those definitions will be shown with gray text, indicating that they cannot be edited.

Individual files can be unlocked, opened, closed, or locked using the pop-up menu options, shown above, that are now available when a file is right-clicked. The file icons will change to reflect a file's locked or unlocked state. Locking applies to text-based support files as well as definition files.

Page 112: Getting Started with Logi Info .NET ApplicationsGetting Started with Logi Info 1 Introduction This publication introduces developers to Logi Info v12.1, in the .NET environment. Logi

106 Getting Started with Logi Info

Team Development uses a source control system approach, where to unlock a file is to "check it out" and to lock it is to "check it in". This means:

When no one is working on any file, they are all locked (checked-in) and available to be unlocked (checked-out) by anyone.

When you unlock (check-out) and open a file, you can edit it, but everyone else is prevented from working with it.

When you save and/or re-lock (check-in) the file, then it's available to be unlocked by anyone again. When a file has been unlocked by a user, other users attempting to unlock it will see an "in-use" icon next to the entry in Studio and a tooltip that indicates who's working with this file, when they hover their mouse over it. Note that the initial locked state is also applied to the _Settings definition, and you must now unlock it if you want to modify it.

If they've been enabled in the _Settings definition, File Locking and File History information can be viewed by clicking the Team Development menu item, shown above, in the Tools tab.

When the menu item is clicked, the Team Development dialog box opens, as shown above. File Locking details are displayed in the first tab, allowing development team members to determine which files are locked, who locked them, and when.

Page 113: Getting Started with Logi Info .NET ApplicationsGetting Started with Logi Info 1 Introduction This publication introduces developers to Logi Info v12.1, in the .NET environment. Logi

Getting Started with Logi Info 107

File History details are displayed in the second tab. Revision information and the actual revised data are pre-sented. If a particular file is double-clicked, an individual file history dialog box is displayed and it includes a Rollback... button, which can be used to replace the current file contents with the selected version's contents.

The Team Development features use a local database file located under the folder "TeamDevelopment", shown above, in the Logi application folder. The folder and database file are automatically created when the Team Development features are enabled. The Pack Team Development Database feature helps to maintain performance. Clicking the appropriate but-ton in the Application History tab will present a prompt for confirmation. Clicking Yes will start a process that makes a backup of the Team Development database and then packs and shrinks it. All developers should close the application in Studio before a packing operation is started. You should pack the database whenever you feel that File History retrieval is taking a long time. These features allow team developers to work together on an application, without getting in each other's way, and provide a useful audit trail of modifications.

Page 114: Getting Started with Logi Info .NET ApplicationsGetting Started with Logi Info 1 Introduction This publication introduces developers to Logi Info v12.1, in the .NET environment. Logi

108 Getting Started with Logi Info

System Configuration A commonly-used approach for team development is to set up a centralized "development server" where the Logi application files can be accessed, using a shared network folder, by all members of the development team. Logi Info Server is installed on that server, along with a web server and all necessary supporting files. A Logi Info license is required for that server. Developers who can "map" a local drive to the shared folder on the development server must be given Read, Write, Modify, and Delete file access permissions. Developers must also have Logi Info or, at the very least, Logi Studio installed and licensed on their own machines. They then "open" the Logi application on the devel-opment server and apply the Team Development settings as outlined above. In the _Settings definition, the Path element's Application Path attribute should be set to the URL of the Logi app on the development server, rather than to the usual http://localhost/yourApp. Do not set the Alternative Definition Folder attribute, which is not relevant for this situation. Third-Party Source Control Products The choice of a source control system is highly dependent on the complexity of the source control functionality required. For smaller, simple applications, the use of the Team Development functionality within Logi Studio is often enough. Logi Team Development allows you to maintain version control, based on file saves, and pro-vides file-locking/sharing capabilities for multiple developers. If you require more sophisticated source control, then a third-party product will be necessary. Examples of popular products include Microsoft TFS, GIT, and SVN. The files that make up a Logi Info application are used directly from the file system; they're not stored in, or controlled by, a database or other constraining mecha-nisms, so third-party source control products can be used directly on them without concern. To benefit from a third-party product, however, you should keep your Logi application's source code folders (_Definitions, _SupportFiles, _Templates, _Scripts, _Plugins), and all the root folder .aspx files under source control. Keeping the bin, rdTemplate, and other "rd*" system folders outside of source control will allow you to easily move between different versions of the Logi engine without interfering with your source control functionality. Given the large number of, and different types of, source control products available, there are no plans to pro-vide tighter integration between them and Logi Info.

Obfuscating Definitions Obfuscation is a common technique used by developers to protect their software products from theft, tamper-ing, and reverse-engineering. The code obfuscation feature in Studio for .NET is a mechanism that allows Logi developers to make their _Settings, Report, and Process definition files unreadable by humans. Definitions that have been obfuscated can be de-obfuscated, making them readable again. At runtime, both .NET and Java Logi applications automatically decode and use obfuscated files. OEMs that embed Logi Info apps within their own applications should use obfuscation to aid in securing their products before distribution, but there may be little need for obfuscation in an enterprise setting where all Logi report consumers are internal corporate employees.

Page 115: Getting Started with Logi Info .NET ApplicationsGetting Started with Logi Info 1 Introduction This publication introduces developers to Logi Info v12.1, in the .NET environment. Logi

Getting Started with Logi Info 109

The Obfuscation tool is available via the Studio Tools tab on the main menu:

Obfuscation is based on a password, which is entered in the tool, shown above. There are three choices of files available in the process:

Skip Settings File - All process and report definitions will be obfuscated but the _Settings.lgx file will not be included. This can be useful if certain settings, such as Connection Strings, need to be manually edited after deployment or if there is a chance that debugging may be needed.

Settings File Only - This is useful if certain settings need to be hidden, such as Connection String pass-words, but there is little concern about securing other definitions. In particular, OEMs with deployed solutions should use this option to shield their license key data from view.

All Files - Includes all .lgx files in the process.

Other than the _Settings.lgx file, there is no way to select individual files within an application for obfuscation. In general, we do not recommend that you obfuscate files as a routine practice if you have no security con-cerns. When obfuscating files, record and store your password carefully. Logi Analytics is not able to decipher pass-words for the purpose of de-obfuscation if your password is lost or forgotten.

Page 116: Getting Started with Logi Info .NET ApplicationsGetting Started with Logi Info 1 Introduction This publication introduces developers to Logi Info v12.1, in the .NET environment. Logi

110 Getting Started with Logi Info

Batch Obfuscation Tool Developers may want to include obfuscation as part of an unattended build process and the obfuscation tool can be run as a console application for this purpose.

As shown above, if the default product installation is used, the tools can be found at:

C:\Program Files\LogiXML IES Dev\LogiObfuscation.exe

Running the tool without any arguments will display the help information shown above. These arguments are the same as the settings available through Studio's interface and discussed in the previous section.

Deleting a Logi Application If you want to delete an entire Logi application, you can do so by using your file system tools, such as Windows Explorer, to delete the entire application folder. On a typical Windows server platform, for example, you would delete: C:\inetpub\wwwroot\yourAppFolder

and all of its subfolders and files. Note that your web server may hold some application files open to improve performance and you might re-ceive an "access denied" type error when you try the deletion. If this happens, try stopping and restarting the web server. For IIS, this can be done very easily by running iisreset.exe from the Start Menu Run option or from a command line window. Once the web server is restarted, try deleting the application folder again. Afterwards, in Studio, your application will still appear in the Recent Applications panel of the Welcome tab. Click its entry, as if to open it, and Studio will display a warning that it no longer exists and remove it from its list of recent applications.

Page 117: Getting Started with Logi Info .NET ApplicationsGetting Started with Logi Info 1 Introduction This publication introduces developers to Logi Info v12.1, in the .NET environment. Logi

Getting Started with Logi Info 111

Granting File Access Permissions A Logi application, on your web server, consists of an application folder with a set of sub-folders and files. De-pending on the nature of the application, there may be a need to write data into some of those sub-folders. For example, data caching, temporary file creation, and exports are a few of the operations that will write data to these folders. However, the default security settings for these folders may prohibit file writing by accounts normally used to run web applications, so you may need to explicitly grant file access permissions to these folders (which are identified below). Tell-Tale Errors If you receive these or similar errors when trying to preview or browse your report… There was a problem running a DataLayer. The error was: The web application is un-

able to write to a folder.

Unable to save to the data cache.

The file was: <application file path>\rdDataCache\???.xml. Access to the path is

denied.

Access to the path 'C:\inetpub\wwwroot\HelloWorld\MyData' is denied.

… then it is most likely that you need to grant Write permissions to the rdDataCache, rdDownload, and/or oth-er folders.

Let the New App Wizard Do It If you use the New Application Wizard in Studio (File → New Application...) to create a .NET Logi app, it will set the appropriate file permissions for your application for you. It actually provides a pretty wide-open security setting, granting all rights to everyone, and you may care to set more restrictive rights manually. You may, nonetheless, need to manually grant rights when you deploy you app to a production server. Generally, if your application does anything more than put simple text on a page, granting file permissions will be required and you'll need to do this for each Logi application you develop and deploy.

Which Accounts? File access permissions should be assigned to these accounts:

Page 118: Getting Started with Logi Info .NET ApplicationsGetting Started with Logi Info 1 Introduction This publication introduces developers to Logi Info v12.1, in the .NET environment. Logi

112 Getting Started with Logi Info

Web Server OS Grant File Access Permissions To

Windows 7, 8, Windows Server 2003+

The local NETWORK SERVICE account and the named Application Pool your Logi application runs in.

Windows Server 2000, Win XP The local ASPNET machine account. That's "ASPNET", without a period - not "ASP.NET" and it's a local machine account, not a network domain account.

This presumes a default OS installation in which no special renaming or removal of default accounts has been undertaken. If you're experiencing "Access denied to file XYZ"- type errors when running your Logi application, try tempo-rarily giving Full Control permissions to Everyone. If the errors stop appearing, then you know for certain that file access permissions are the source of the errors.

Which Application Sub-Folders? Your web server account will, of course, have to be able to read all of the files in your application folder. The two sub-folders in your Logi application folder that will routinely need to have write permissions grant-ed to them are rdDataCache and rdDownload. The latter is often used as a convenient place to hold tempo-rary files and does not necessarily have anything to with actual downloads. If, in the course of your development work, you add your own new sub-folders to hold data files or "save files" used with elements like a Dashboard, or decide to write data to another folder you will need to grant Write and possibly even Full Control permissions to them as well. One approach that guarantees access is to give full control permissions to the Logi application folder (which is what the Studio New App wizard does). All files and folders within the app folder then inherit the permissions. However, this is not necessary and, as mentioned earlier, may cause security concerns.

Granting File Access Permissions Depending on your OS, you'll use File Explorer or My Computer to set file permission. The examples images used below come from Windows XP Pro.

Page 119: Getting Started with Logi Info .NET ApplicationsGetting Started with Logi Info 1 Introduction This publication introduces developers to Logi Info v12.1, in the .NET environment. Logi

Getting Started with Logi Info 113

1. On the web server, navigate into your Logi application's folder and select the rdDataCache folder.

2. Right-click the folder and select Properties from the pop-up menu, as shown above, left.

3. In the Properties dialog box, click the Security tab, as shown above, right. Click Add... No Security tab

visible? See special section below.

4. The account used must be a local account, on the computer, rather than a network account. In the Se-lect Users dialog box, shown above, left, click Locations...

Page 120: Getting Started with Logi Info .NET ApplicationsGetting Started with Logi Info 1 Introduction This publication introduces developers to Logi Info v12.1, in the .NET environment. Logi

114 Getting Started with Logi Info

5. In the Locations dialog box, select the computer's name, which will be at the top of the list. If the computer is not part of a network domain or even on a network, this step may be unnecessary.

6. Enter the desired account name (ASPNET or NETWORK SERVICE) into the Select Users dialog box, as

shown above. If desired, you can click Check Names to verify spelling and account existence; if valid, the name should change to <computer name>\<account name>. Then click OK.

7. Back in the rdDataCache Properties dialog box, you'll see that ASP.NET Machine Account has been added to the list of user names, as shown above.

Page 121: Getting Started with Logi Info .NET ApplicationsGetting Started with Logi Info 1 Introduction This publication introduces developers to Logi Info v12.1, in the .NET environment. Logi

Getting Started with Logi Info 115

8. Select the ASP.NET account in the list and check the Write permissions checkbox. Ensure that the oth-er checkboxes shown are also checked. Click OK.

Repeat this process for the rdDownload folder and for any other folders that you'll be writing data to. Granting Permissions to Windows 7 Application Pools In addition to setting the permissions shown above, you may also need to give permissions to the "application pool". Logi applications are generally run by IIS within an application pool, which provides isolation and per-formance improvements for web apps that may use different versions of .NET. To assign file access permis-sions to an application pool:

1. Open the IIS Manager utility, locate your Logi application and determine, by examining its properties,

which application pool it's assigned to. Note the name of the pool ("DefaultAppPool" in the example).

Page 122: Getting Started with Logi Info .NET ApplicationsGetting Started with Logi Info 1 Introduction This publication introduces developers to Logi Info v12.1, in the .NET environment. Logi

116 Getting Started with Logi Info

2. In the example above, we're setting permissions for the sub-folder "SavedFiles". Use File Explorer to navigate to your Logi app folder, then select and right-click the sub-folder in question, and select Properties.

3. In the Properties dialog box, click the Security tab, and then the Edit button.

4. In the Permissions dialog box, click Add.

5. In the Select Users or Groups dialog box, enter "IIS APPPOOL\<the app pool name>" as shown above.

6. Click OK, to close the dialog box and return to the Permissions dialog box.

Page 123: Getting Started with Logi Info .NET ApplicationsGetting Started with Logi Info 1 Introduction This publication introduces developers to Logi Info v12.1, in the .NET environment. Logi

Getting Started with Logi Info 117

Finally, select the application pool in the names list, and set its permissions, as shown above. Then click OK.

No Security Tab Visible? In order to make the Security tab visible in the Properties dialog box, you must turn off Simple File Sharing. This is usually an issue only on stand-alone computers.

1. Open Control Panel and locate the Folder Options link. In Windows XP, this is through the Appearance and Themes link. Or, instead, you can access Folder Options through the Tools menu item in My Com-puter.

2. In the Folder Options dialog box, select the View tab. 3. At the very bottom of the Advanced settings, un-check the "Use simple file sharing" option. Click OK.

The security tab should now appear when you select a file or folder's properties.

Page 124: Getting Started with Logi Info .NET ApplicationsGetting Started with Logi Info 1 Introduction This publication introduces developers to Logi Info v12.1, in the .NET environment. Logi

118 Getting Started with Logi Info

Managing Support Files In Logi applications, "Support Files" are defined as files that are part of an application that are not Report, Pro-cess or other definition files. This chapter discusses support files and their management within an application and provides important information about how files are handled in Studio. These files generally include:

Images (.gif, .jpg, .jpeg, .png, .bmp, .wmf, .xbm, .art) Style Sheets (.css) JavaScript (.js) Data files (.csv, .mdb, .xls, xlsx, .xml) HTML files (.htm, .html)

Definitions for Templates, Data, and Widgets are not included in this category of files. Logi Studio and the sup-port files concept are designed to make managing these files as easy as possible.

In Logi Studio, support files are managed in the Application Panel. The panel display standard organizational folders for each category of file in an application, including the support files. The default manner in which sup-port files are displayed is shown above left, with all support files shown together. Right-clicking the Support Files folder produces a popup menu, as shown above right. Note that the adding an existing file copies the existing file to your project folder; the original file is left untouched. The Application panel displays the files that are included in the application; there are no Registry entries, ta-bles, or other data concerning the files maintained by Studio as part of an application. This allows you to move, rename, or delete files outside of Studio without causing havoc. Adding a large number of support files from within Studio could be time-consuming. To save time in this situa-tion, files can be copied outside of Studio, using file system tools, directly into the appropriate folder. The files will automatically appear in Studio the next time the Application panel is refreshed, or the application is closed and re-opened.

Page 125: Getting Started with Logi Info .NET ApplicationsGetting Started with Logi Info 1 Introduction This publication introduces developers to Logi Info v12.1, in the .NET environment. Logi

Getting Started with Logi Info 119

The image above shows a typical collection of files and folders for a basic Logi application, as they exist in the file system. The top two folders, highlighted in yellow, correspond to the Reports and Support Files folders shown in Studio's Application panel. Other empty folders shown in Studio, such as Templates, will be physically created in the file system automatically when they're given some contents in Studio.

Studio is equipped with editors in the Workspace panel for all support files except images. Double-clicking the-se files will open them in the Workspace panel for editing. Developers can also manage the files (copy, delete, rename, etc.) from within Studio by right-clicking them, as shown above. Deleted files will be sent to the Recycle Bin.

Page 126: Getting Started with Logi Info .NET ApplicationsGetting Started with Logi Info 1 Introduction This publication introduces developers to Logi Info v12.1, in the .NET environment. Logi

120 Getting Started with Logi Info

If you wish to further organize your support files, you can do so by creating a new "folder", as shown above. This is a logical folder and does not appear in the file system as a separate folder. Here's how this works: when you create a new logical folder, you can give it a name, such as "dataXMLs". Files that you add to that folder from within Studio will appear in the file system with the folder name pre-pended to their name, with a dot separator. Or, if you're working directly in the file system, to get files to ap-pear in that folder, you rename them to begin with the folder name and a period.

So, for example, renaming sampleTopics.xml to dataXMLs.sampleTopics.xml in the file system will cause it to appear in Studio "inside" the new folder you created.

You're not required to manage support files from within Studio, but by doing so you ensure that all nec-essary files are included in the project folder, simplifying deployment. In addition, specifying the location of files within your report definitions is simplified as the standard support file folders are "known" to Logi applica-tions.

Page 127: Getting Started with Logi Info .NET ApplicationsGetting Started with Logi Info 1 Introduction This publication introduces developers to Logi Info v12.1, in the .NET environment. Logi

Getting Started with Logi Info 121

Using Themes and Style Sheets This chapter introduces developers to features that can be used to control the presentation of Logi applica-tions. You'll learn how to use Themes, how to include a style sheet within a Logi application, and how to assign individual style classes to elements.

About Themes In the context of Logi applications, a "theme" is a collection of graphic images, a style sheet, and a template modifier file, which impart a specific appearance to a Logi application. Several standard themes are included with Logi Info for your use and are also available on DevNet in the Sam-ple Themes library. These themes include a collection of graphic images, a style sheet, and a template modifi-er file, which impart a specific appearance to a Logi application. Themes do the work for you, setting appearance attributes for complex elements such as charts and super-elements such as the Analysis Grid, and making it easier to produce great looking reports without an in-depth knowledge of Cascading Style Sheets. You can easily switch between themes in order to experiment with them. As of this writing, the standard themes shipped with Logi Info include:

Theme Description

Black Pearl A black background and dramatic colors make this an unusual theme.

Clarity Offers a clean look that's "easy on the eyes".

Professional Blue Gradients and a polished look, with colors grouped in the blue spectrum. This theme is no longer included, starting with v12.1.

Professional Green Gradients and a polished look, with colors grouped in the blue spectrum. This theme is no longer included, starting with v12.1.

Signal A modern, professional, and attractive look that works well with both desktop and mobile displays.

Silver A simple, understated look.

Simple Blue A stronger appearance with flat blue color scheme. This theme is no longer included, starting with v12.1.

Transit A bold theme designed to look good on mobile devices.

Note that standard themes may be updated when a new product version is released and this may pro-

duce small changes in the appearance of applications that are upgraded to the new version. Similarly, applying an updated theme to an application using an older product version or vice versa, by copying them, may result in an unexpected appearance.

Page 128: Getting Started with Logi Info .NET ApplicationsGetting Started with Logi Info 1 Introduction This publication introduces developers to Logi Info v12.1, in the .NET environment. Logi

122 Getting Started with Logi Info

Use Beyond Appearance Themes, however, are not "just a pretty face". Because themes are capable of altering your report definitions, they can be used for purposes unrelated to application appearance. For example, they can be used to set de-fault attribute values. This can be very useful if you consistently use the same set of attribute values for, say, data tables, and you want to apply them as defaults every time you start a new definition or application. See the final section in this document for more information.

Selecting a Theme in Studio’s Wizard When you use the New Application wizard in Studio, one of the steps is the selection of a theme for the new application:

Just select a theme from the list and it will be applied automatically to your new application.

Adding Themes Manually You can also apply a theme manually. A theme can be applied at the application level (which is what the wizard does):

Page 129: Getting Started with Logi Info .NET ApplicationsGetting Started with Logi Info 1 Introduction This publication introduces developers to Logi Info v12.1, in the .NET environment. Logi

Getting Started with Logi Info 123

As shown above, to apply a theme to the application as a whole, add a Global Style element to the _Settings definition. Then set its Theme attribute to the name of one of the available themes. All reports in the applica-tion will have the theme applied to them. To apply a theme to an individual report definition:

As shown above, add a Style element to the report definition. Then set its Theme attribute to the name of one of the available themes. The report will have the theme applied to it. Themes and Style Sheets When a Theme is selected for a definition or application, it automatically applies a specific appearance to su-per-elements, like the Analysis Grid. In addition, the Theme makes available a standard set of style classes that developers can apply to regular elements. This can save a lot of time and helps to create a consistent appear-ance.

Page 130: Getting Started with Logi Info .NET ApplicationsGetting Started with Logi Info 1 Introduction This publication introduces developers to Logi Info v12.1, in the .NET environment. Logi

124 Getting Started with Logi Info

In the example shown above, we see a definition that has had a Theme applied to it. A Division element has been selected and one of the Theme-supplied style classes is being assigned to it. As you can see, all of the Theme-supplied classes begin with the letters "Theme" and they address alignment, font sizes, borders, and other useful styles. Themes do not set the style class for every element; for example, Label and Rows, Row, and Column Cells (HTML tables) are not affected. You can set the Class attribute for these elements independently of the Theme. You can specify both a style sheet and a Theme in a Global Style or Style element. If you have a style sheet and a Theme assigned, the available classes from both will appear in the drop-down class list.

Interaction with Other Style Sheets You may already have a style sheet that you like to work with when developing reports. How will that interact with a theme when it's applied to your report? If you have assigned a style class to an element and the theme also applies a style class to that same element, the theme's style will be applied first, then yours. This means both styles will be applied but your style will "win" when there's a direct conflict. When there's no conflict, the effect will be additive. Themes and Exports Theme effects will also be applied to exports, which may or may not be desirable, and there is no way to block or undo the effects of a theme that has been assigned using the Global Style element. So if you plan to export reports to a format where appearance is important, such as PDF, you may want to as-sign themes using individual Style elements in each report, instead of the Global Style element.

Creating Your Own Themes Beginning with v12.1, Logi Studio includes the Theme Editor wizard, a tool that allows you to quickly and easily create your own custom themes. This tool is also available as an element, if

you'd like to build an application that lets administrative users modify the application's appearance at runtime. For more information, see our document Using the Theme Editor. Developers working with earlier Logi Info versions can create custom themes manually. You're encouraged to examine the standard themes and use them as the basis for creating your own themes. The remainder of this section discusses this process. Creating a Custom Theme Manually At a minimum, themes consist of a Theme Modifier file, which does the work. Themes that impart an appear-ance generally also include a collection of images and a Theme style sheet. Each theme is contained in its own folder, which bears the name of the theme.

Page 131: Getting Started with Logi Info .NET ApplicationsGetting Started with Logi Info 1 Introduction This publication introduces developers to Logi Info v12.1, in the .NET environment. Logi

Getting Started with Logi Info 125

While themes are generally used to give an application a specific appearance, the Attribute Defaults sample theme (Advanced category) here on DevNet is an example of a theme that sets attributes to default values, but does not deal with appearance. When you create a Logi application, the standard themes distributed with Logi products are stored in separate folders in the <yourApp>\rdTemplate\rdTheme folder; these should never be edited.

However, you can copy standard theme folders and then customize the files within them to create your own custom theme. Copy the standard theme folder to the _Themes folder beneath your application folder, i.e. <yourApp>\_Themes, (which you may have to create) and rename it to the name of your new custom theme, as shown above. Apply your customizations to the files in this folder. Your custom theme will then be available for your applica-tion, by name, along with the standard themes, in the Style and Global Style elements' Theme attribute selec-tion list, and will also be available for deployment with Studio's Deployment Tool. One of the key mechanisms in a theme is the "template modifier file" or TMF. In your copied Theme folder, you'll find such a file, named ThemeModifier.xml. A TMF is an XML file that includes instructions for modify-ing the elements and attributes in a report definition. The TMFs in the standard themes are quite complex, as they attempt to cover all of the elements available for use in a report. Your custom TMF doesn't necessarily have to be so all-encompassing; it could, for example, only address the charts or other elements that are spe-cifically used in your reports. If you examine the TMF and style sheet in one of the stock themes, you'll see that the class and ID names are all carefully constructed to be unique, which is very important and which you are also encouraged to do.

Note that the standard ThemeModifier.xml file may contain references to the standard style sheet and standard images in the rdTemplate/rdTheme/<Theme> folder. In your custom TMF, you may need to change these to reference the style sheet and images in your custom Theme folder. Our document Using Template Modifier Files provides detailed information about creating and using TMFs. DevNet's Element Reference page has information about all of the elements and their attributes and may be useful when creating your own themes.

Page 132: Getting Started with Logi Info .NET ApplicationsGetting Started with Logi Info 1 Introduction This publication introduces developers to Logi Info v12.1, in the .NET environment. Logi

126 Getting Started with Logi Info

Your Custom Themes in the New Application Wizard If you want your custom themes to be available in Studio's New Application wizard, copy them to (.NET) C:\Program Files\LogiXML IES Dev\LogiStudio\BaseApp\RepDev\rdTemplate\rdTheme (Java) C:\Program Files\LogiXML IES Dev\LogiStudio\BaseApp\RepDevJava\rdTemplate\rdTheme The New Application wizard displays a thumbnail image of each theme. If you want to include images for your custom themes, place them, as a 225 x 160 px .JPGs with the same names as your themes, in this folder:

C:\Program Files\LogiXML IES Dev\LogiStudio\bin

Finally, if you create an appearance-specific, custom theme that you think looks cool, it would be great if you shared it on DevNet.

About Cascading Style Sheets Cascading Style Sheets (CSS) is a technology that allows the presentation aspects of web pages to be separated from the other page content. It can be used to add "style" (e.g. fonts, colors, alignment, spacing, and more) to web pages. It's a mature standard, fully supported by the W3C. If you're a developer with web design experi-ence you should already be familiar with style sheets.

Internet Explorer has lagged behind Firefox and Chrome in supporting new CSS standards. Not only does this introduce compatibility issues you may have to deal with but, because Logi Studio uses the Windows oper-ating system's IE components, Studio's Preview function may be affected. Issues of this nature tend to arise especially if you integrate 3rd party libraries that make heavy use of HTML5 and CSS3 into your Logi applica-tion. If you're a developer with web design experience, you should already be familiar with style sheets. If not, as used with Logi applications, style sheets are independent text files that define style classes with property set-tings. For example, the definition for the class "font8ptBold", shown below, contains selectors that cause text to appear in an 8-point, bold font: .font8ptBold

{

font-size: 8pt;

font-weight: bold;

}

Classes are assigned to elements within a Logi application in order to control their appearance. For example, we might assign the font8ptBold class to a Label element so that its caption will appear on the web page in an 8-point, bold font. CSS includes a wide variety of selectors that can affect everything from font weight, size, and color to the posi-tioning of images on the page. Use of style sheets creates slightly more complexity for the developer than having appearance properties di-rectly associated (as attributes) with elements in Logi Studio. The trade-off, however, is that they offer far more flexibility and browser-version compatibility. Logi reporting tools are CSS standards-compliant and to help you work with style classes, Logi Studio includes a style sheet editor.

Page 133: Getting Started with Logi Info .NET ApplicationsGetting Started with Logi Info 1 Introduction This publication introduces developers to Logi Info v12.1, in the .NET environment. Logi

Getting Started with Logi Info 127

Logi Info allows you to set a "doctype declaration" for your application, which gives the browser some guid-ance about how to render the page. This is discussed in our document Using Doctype Declarations and can help sort out some the behavioral differences between browsers. The "cascading" part of the style sheet name refers to the way in which the effect of a class permeates down-ward through hierarchical structures of elements in web pages. The effect starts at the top and, unless super-seded by other classes, continues downward within the container, structure, or child elements. You can develop your own "standard" style sheet file (or files) and then re-use it or parts of it with different Logi applications. This saves development time and promotes a consistent look for your applications, if desired. You may care to develop and share a "company style sheet" so that all of your Logi application developers pro-duce reports with the same appearance. Style classes can be applied in a number of ways, including "inline" or embedded directly into HTML. However, it's beyond the scope of this chapter to provide a complete explanation of Cascading Style Sheets; excellent resources can be found online at http://www.w3schools.com/css/css_intro.asp .

Create an Example Style Sheet Select and copy the following text, paste it into Notepad or a similar text editor, and save it to your desktop (or any other location you prefer) as CSSExample.css: /* CSSExample.css: our example style sheet */

.myTable

{

padding: 5px;

border-width: 2px;

border-style: solid;

border-color: Silver;

border-collapse: collapse;

background-color: White;

font-family: Verdana, Arial; /* if Verdana font not found, will use Arial */

font-size: 9pt;

font-weight: normal;

color: Black; /* this is the font color */

}

.myTable TH /* TH: automatically applied to table header */

{

padding: 5px;

border-style: solid;

border-color: Silver;

background-color: #F0F0F0; /* colors can also be specified using hex */

font-size: 10pt;

color: Maroon;

}

.myTable TD /* TD: automatically applied to table cells */

{

border: 2px solid Silver; /* combines three border selectors into one */

padding-left: 5px;

padding-right: 5px;

text-align: center;

}

Page 134: Getting Started with Logi Info .NET ApplicationsGetting Started with Logi Info 1 Introduction This publication introduces developers to Logi Info v12.1, in the .NET environment. Logi

128 Getting Started with Logi Info

.fontBold

{

font-weight: bold;

}

/* end of style sheet */

If you're wondering what those "TH" and "TD" designations are, they relate to the tags that make up an HTML table: TH = Table Header, and TD = Table Data. By including them as shown above, their classes will be auto-matically applied to any data table that uses the myTable class. This is a bit of CSS shorthand that saves you time and effort. The next two sections discuss how to include this style sheet in your application, and how to edit it within Stu-dio.

Including a Style Sheet in Your Application For the remainder of this document, we'll show screen shot images based on a fictional Logi application that pulls data from the Northwind Foods database (creating a similar, real application is discussed in our Basic Re-port Tutorial). If you already have a basic Logi database table report created, you can use it as we proceed.

A style sheet is considered a Support File which is included with the application. In Logi Studio, the Support Files are organized in the Application panel (upper left corner) beneath their own folder, as shown above. Now let's add your example style sheet one to your application:

1. In Logi Studio, right-click the Support Files folder in the Application panel. 2. Select Add → Existing File... from the popup menus. 3. Browse to the location where you saved the example style sheet, select it, and click OK. 4. The CSSExample.css style sheet will be added to your list of application support files and the file itself

will be copied to your application project file, in the _SupportFiles folder. As you see, multiple style sheets can be included within a Logi application. When you right-clicked the Support Files folder to add the style sheet you created earlier, you may also have noticed an option to Add → New File... which lets you create a style sheet file from scratch.

Page 135: Getting Started with Logi Info .NET ApplicationsGetting Started with Logi Info 1 Introduction This publication introduces developers to Logi Info v12.1, in the .NET environment. Logi

Getting Started with Logi Info 129

Editing a Style Sheet in the Workspace There are several ways to edit style sheets from Logi Studio and the most direct way is to do it right in the Stu-dio Workspace editor:

1. In the Application panel's Support Files folder, double-click the style sheet file to be edited. 2. The style sheet contents will appear in the Workspace panel, as shown above, and can be edited. 3. As you type, the editor will provide assistance via pop-up lists of selector names and values. 4. Make the necessary changes or additions and click Save on the toolbar.

Note that use of the Workspace Preview tab automatically saves definition files but does not save style sheet changes. You must click Save to save your changes before previewing. You can also select and right-click a style sheet file in the Application panel, and click Open Externally to edit it in any external CSS editing tool, such as Top, that you have installed. The file will be opened in whatever appli-cation is associated with the .css file extension.

Editing in the Style Sheet Class Selector Turn your attention to the Attributes panel now. Many elements have a Class attribute and its value field in-cludes a drop-down list icon. Clicking this icon causes a list of classes from the style sheet(s) assigned to your application (described in the next section) to be displayed. The top item in this list is a link to the Class Selector tool, which offers a second method of previewing and editing your style classes.

Page 136: Getting Started with Logi Info .NET ApplicationsGetting Started with Logi Info 1 Introduction This publication introduces developers to Logi Info v12.1, in the .NET environment. Logi

130 Getting Started with Logi Info

The Class Selector tool can be opened by selecting it from the list of Class attribute value choices for any ele-ment, as shown above.

The Class Selector tool, shown above, allows a class to be assigned by selecting it in the class list (1) and click-ing OK. The attributes of the selected class are shown in the upper right panel (2) and they can be edited there. Controls (3) allow you to save, add, and delete classes and the effect of the selected class is shown in the lower preview panel (4).

Page 137: Getting Started with Logi Info .NET ApplicationsGetting Started with Logi Info 1 Introduction This publication introduces developers to Logi Info v12.1, in the .NET environment. Logi

Getting Started with Logi Info 131

Editing a Style Sheet Using the External Style Sheet Editor The external editing option works only if you have installed a 3rd-party style sheet editor program, which has been associated in the file system with the .css file extension. This external editor can then be launched from within Studio in two different ways:

A style sheet file can be selected in the list of files in the Application panel, right-clicked, and opened external-ly, as shown above left. Or, in a report definition, when the Style element's Style Sheet attribute has been se-lected in the Attributes panel, as shown above right, the Open Referenced File... icon will appear and can be used to open the file in the external editor. Note that, if you've edited a style sheet in an external editor, you may need to "refresh" the file in Studio before any changes are recognized. This is done by right-clicking the file in the Application panel and selecting Refresh Application.

Applying a Style Sheet to Your Definition Once a style sheet file has been added to an application's _SupportFiles folder, it's available for use with any of the definitions within that application.

Page 138: Getting Started with Logi Info .NET ApplicationsGetting Started with Logi Info 1 Introduction This publication introduces developers to Logi Info v12.1, in the .NET environment. Logi

132 Getting Started with Logi Info

1. Open your report definition in the Workspace panel and select the Style element, as shown above. 2. In the Attributes panel, click the Style Sheet attribute and pull-down the list of available style sheets. 3. Select the CSSExample.css style sheet entry in the list, which will assign it to the Style Sheet attribute.

Now the classes in that style sheet are available for use in your definition. Assignment Using a URL If a style sheet resides on a web server, it can instead be assigned using an absolute URL, such as:

http://www.myFirm.com/CSS/myStyleSheet.css

Just enter the URL into the Style Sheet attribute, instead of a file name.

Global vs. Local Style Sheets The presence of the Style Sheet element in a report definition indicates a local style sheet, one that applies only to that definition. A Logi application may contain several report definitions, and each definition may use a separate style sheet. Alternatively, a global style sheet can be used instead, one that affects all report defini-tions in an application. The global style sheet is configured in the _Settings definition. Or, if they will all use the same style sheet, a global style sheet can be used for all report definitions in the ap-plication. The global style sheet is configured in the _Settings definition:

1. Select the _Settings definition in the Application panel and then select the root element (_settings) in the Workspace panel.

2. Double-click a Global Style element in the Element Toolbox to add it to the definition.

Page 139: Getting Started with Logi Info .NET ApplicationsGetting Started with Logi Info 1 Introduction This publication introduces developers to Logi Info v12.1, in the .NET environment. Logi

Getting Started with Logi Info 133

3. Select the newly added Global Style element in the Workspace panel. 4. In the Attributes panel, enter a value for the Style Sheet attribute or select one from the pull-down list.

Now all of the applications definitions will be able to use classes from the global style sheet and you need not assign a style sheet to each definition individually. However, what happens if you assign both a local and a global style sheet, and each has a class with the same name but with a different class definition? As you might guess, the local style sheet's classes will override those of the same name in the global style sheet.

Assigning Style Classes to Elements Now you're ready to assign style classes from the style sheet to elements in your application. The images be-low assume this query:

SELECT CategoryID, CategoryName, Description FROM Categories

has been used to produce a report from the Northwind Foods database. Follow along in your application, making adjustments as necessary. These examples assume you've already assigned the CSSExample.css style sheet to your application.

The report output above shows the data returned by the query. It's raw, unformatted, and ugly. Let's assign some style sheet classes to improve the appearance of our output. Elements that can be affected by classes have a Class attribute. Some may have several class-related attributes depending on the complexity of the element.

Page 140: Getting Started with Logi Info .NET ApplicationsGetting Started with Logi Info 1 Introduction This publication introduces developers to Logi Info v12.1, in the .NET environment. Logi

134 Getting Started with Logi Info

In your report definition, select the Data Table element and, in the Attributes panel, find its Class attribute and, using the drop-down list, select the myTable class, as shown above.

Note that the list includes all of the classes in your style sheet. It's also possible to manually assign multiple classes, separated by commas or spaces, as a Class attribute value. Now let's preview the report:

As shown above, here's our table with the style sheet classes applied. Quite a difference from the raw table! The style sheet has affected font sizes and colors, text alignment, background color, spacing and padding, and borders. The classes affect everything about the table and its contents, flowing down through the Data Table element and all its child elements. This is the "cascading" effect of Cascading Style Sheets. However, the effects can be overridden by assigning other classes to child elements lower down in the hierarchy. Let's see how that works. With the myTable class assigned to the table, all the data in all the columns appears in a normal, black font. Let's change the data in the first column, the CategoryID, to be bold-faced as well.

Page 141: Getting Started with Logi Info .NET ApplicationsGetting Started with Logi Info 1 Introduction This publication introduces developers to Logi Info v12.1, in the .NET environment. Logi

Getting Started with Logi Info 135

As shown above, select the Data Table Column element for the Category ID and, in its Class attribute, select the fontBold class from the drop-down list.

As you can see above, the class applied to the data column has produced an additive effect, in that column only. We could just as well have assigned the class to the Label element that actually displays the data. By as-signing it to the Data Table Column, we applied the affect to all its child elements, which covers situations where you have multiple Labels or other elements in the column. Create an Alternate Row Class If you're using a standard Logi theme, it comes with a ThemeAlternatingRow class that you can assign to your Data Table element's Alternating Row Class attribute. If you're not using a theme, or want to create your own class for alternating data table rows, the following ex-ercise shows you how to do it. Add a new class to the style sheet and then assign it to the Data Table. The goal is to have every other row in our table look slightly different, which makes it easier to read across many columns.

1. In the Application panel, double-click and open the CSSExample.css style sheet file. 2. In the Workspace editor, add the following CSS class:

.alternateRows {

background-color: LightYellow;

}

Page 142: Getting Started with Logi Info .NET ApplicationsGetting Started with Logi Info 1 Introduction This publication introduces developers to Logi Info v12.1, in the .NET environment. Logi

136 Getting Started with Logi Info

3. Click the Save icon in the toolbar, to save the style sheet changes. 4. Click the tab at the top of the Workspace panel to return to your report definition. 5. Select the Data Table element and assign your new alternateRows class to the Alternating Row Class

attribute. 6. Preview the results:

Create Dynamic Row Highlighting If you're using a standard Logi theme, it automatically applies dynamic row highlighting. However, if you're not using a theme, or want to create your own class for dynamic row highlighting, the following exercise shows you how to do it. Note that this effect may not work with all browsers (especially older browsers):

1. Once again, open your CSSExample.css style sheet file. 2. In the Workspace editor, add the following CSS class:

.myTable TR:hover TD {

background-color: LightYellow;

}

3. Click the Save icon in the toolbar, to save the style sheet changes. 4. Click the tab at the top of the Workspace panel to return to your report definition. 5. Select the Data Table element and delete the Alternating Row Class attribute value, leaving it blank. 6. Preview the results, and pass your mouse cursor over the rows:

As you’ve just seen, style sheets are powerful tools that assist you in creating visually-interesting report presentations. More information about style sheets can be found in our documents Managing Style Sheets and Using Style Sheets.

Page 143: Getting Started with Logi Info .NET ApplicationsGetting Started with Logi Info 1 Introduction This publication introduces developers to Logi Info v12.1, in the .NET environment. Logi

Getting Started with Logi Info 137

Development Best Practices Logi Analytics offers training for Logi Info and this chapter enumerates the "best practices" that are taught in our classroom sessions covering report development with Logi Studio. The items included here are based on the experiences of hundreds of Logi developers and offer the new de-veloper a head start in learning correct and valuable Logi development techniques. 1. KISS: Begin with the end in mind Keep it simple! Start to design your report definition by mentally visualizing the finished report or web page. If necessary, sketch it out on paper to understand the broad page geography and to identify separate regions. 2. DevNet is your BFF DevNet is your best source for documentation, reference, and samples. 3. Always turn on Debugger Links During the development process, turn on and leave on the Debugger Links debugging option. 4. Speeling matters, cAse matters Pay close attention to spelling accuracy and the correct use of case. Always assume that case is significant, even when dealing with SQL syntax (case-sensitivity may have been enabled for the database server). 5. Think "Waltzing @~" When working with tokens, think of the famous Australian bush ballad, Waltzing Matilda, and let it remind you to start every token with an @ sign and, most importantly, to end it with a ~ (tilde). 6. Always edit your definitions in Studio Studio provides the best environment for development and will catch or prevent many errors. 7. Save early, save often Save your work in Studio frequently to avoid a loss due to power outages or equipment failure. Back-up your work at the end of a productive day. 8. Always specify the data type Always set the Data Type attribute value for sorting and group elements and others that use it. 9. Use regular file names Don't use spaces or special characters in file names; they may not be valid when converted to XML. 10. Provide a unique ID for every element Provide a unique ID for every element, even when it's optional, and don't use any special characters in the ID. Use a logical and consistent naming scheme for element IDs. 11. For best performance, do it in SQL If possible, do as much grouping, sorting, and qualifying as possible in SQL (i.e. on the database server), instead of with datalayer child elements.

Page 144: Getting Started with Logi Info .NET ApplicationsGetting Started with Logi Info 1 Introduction This publication introduces developers to Logi Info v12.1, in the .NET environment. Logi

138 Getting Started with Logi Info

12. Use Compare Filters, Not Condition Filters For best performance when filtering datalayers, use the Compare Filter element, which is built into the Logi Engine, instead of Condition Filters, which have to run a script for every row. 13. Filters and Conditions always "Filter Through" In general, data filtering is hierarchical and cumulative: later filtering begins with the results of any earlier fil-tering. Security Filters are an exception to this rule. 14. Use Divisions liberally Use Division elements often to provide structure to your report definition, making it easier to maintain, copy, or rearrange grouped elements. Divisions also make it easy to apply Style, Security, Conditions, and Show Modes to groups of elements. 15. When exporting, always "Go Native" When building exports into your report definition, always select those elements with "Native" in their names, such as Export Native Excel and Export Native Word. 16. Always specify the Connection ID Always set the Connection ID attribute value for datalayers and other elements that use it. 17. Quote Text comparisons, not Numeric comparisons When making comparisons in Condition attributes, in SQL queries, and in script functions, always quote (or double-quote) text, but not numbers. For example, place double-quotes around a request variable and a literal when comparing text: "@Request.Name~" = "Fairfax" but not around those comparing numbers: @Request.InvoicePrice~ < 100 18. "Column" in Attribute name means no token If an attribute name includes the word "Column", don't use an @Data token in the value; just use the column name by itself. 19. Use Shared Elements to reuse code, save time Use Shared Elements to optimize the reuse of repetitive code and to provide "single-source" maintenance. Al-ways collect your shared elements into a separate report definition of their own - do not mix them into other report definitions. 20. Give Excel export a Worksheet name When exporting to Excel, always provide a name for the Pattern Block element's Worksheet attribute. 21. Multi-Selects need IN and SingleQuote Token When working with user inputs that allow multiple selections, use the IN( ) function in your SQL WHERE clause and use the @SingleQuote token as a prefix to wrap the resulting comma-delimited input values in single quotes in the query. For example, SELECT * FROM MyTable WHERE Color IN(@SingleQuote.Request.MySelectList~)

22. Test Templates with Dummy Data Always populate Excel Template support files with dummy data to test formatting and formulae.

Page 145: Getting Started with Logi Info .NET ApplicationsGetting Started with Logi Info 1 Introduction This publication introduces developers to Logi Info v12.1, in the .NET environment. Logi

Getting Started with Logi Info 139

Debugging Applications This chapter introduces developers to debugging techniques for use with Logi Studio. It provides you with in-formation about the tools and techniques available in Studio to help you understand what's happening within your application, especially if things don't work as expected.

Previewing and Browsing A Logi application may have one or more report definition files and, while actually browsing a report shows you the big picture, doing so can be cumbersome if you have multiple definitions and have to “drill-down” eve-ry time. Studio's Preview tab provides the developer with a fast way to view report definitions without chang-ing the Default Report attribute in the _Settings definition.

1. To preview a Report definition in Studio, first open the definition in the Workspace editor. 2. Click the Preview tab at the bottom of the Workspace Panel, as shown above. 3. Browse and interact with the report definition using the toolbar at the top of the Preview panel.

Logi Info developers can also test their Process and Data definitions in a similar way:

Page 146: Getting Started with Logi Info .NET ApplicationsGetting Started with Logi Info 1 Introduction This publication introduces developers to Logi Info v12.1, in the .NET environment. Logi

140 Getting Started with Logi Info

1. In the Application Panel, select and open the process definition to test. 2. In the Test Parameters Panel, set values for any parameters the process task requires. 3. At the bottom of the Workspace Panel, select the individual process task to test in the task list. 4. Click the Run button at the bottom of the Workspace Panel, as shown above.

When using Preview, any JavaScript errors thrown will cause a count of the errors to appear next to the preview URL:

Click the number, as shown above, to display a dialog box containing the JavaScript error message. In earlier versions of Studio, the dialog box will simply be displayed automatically, interrupting execution. Using Live Preview The Live Preview feature allows you preview your work in a separate, "live" desktop window.

The Main Menu's Live Preview item is shown above. The live preview will be displayed in a separate window and any changes made to the definition will immediately be reflected in that window. You can resize and relocate the new preview window as desired; you can even drag it onto a separate display, if you have one. You can also switch to Live Preview from regular Preview mode:

Page 147: Getting Started with Logi Info .NET ApplicationsGetting Started with Logi Info 1 Introduction This publication introduces developers to Logi Info v12.1, in the .NET environment. Logi

Getting Started with Logi Info 141

To start Live Preview, first preview the report definition, using the Preview tab, and then click the Live Preview icon, circled above. The preview will be displayed in a separate window, and Studio will switch back to its Definition tab. You can resize and relocate the new preview window as desired; you can even drag it onto a separate display, if you have one. Any subsequent changes you make to the definition code will immediately be reflected in the Live Preview window.

If you don't want definition changes to be updated immediately in the Live Preview window, you can pause and restart them, using the Pause and Play icons in the Live Preview window, circled above. To exit Live Preview, just click the Live Preview window's Close (X) icon. Browsing the Default Report Definition In a Logi application, one of the report definitions is designated (in the _Setting definition) as the "default" re-port - the page that will be shown if no definition is specified in the URL. If you don't change it, this is usually the Default report definition.

You can browse the default report by clicking the Run Application menu item, shown above, in Studio's Main Menu, or by pressing the F5 key. Your computer's default browser (the one associated with .htm/.html file ex-tensions) will be used for this.

Page 148: Getting Started with Logi Info .NET ApplicationsGetting Started with Logi Info 1 Introduction This publication introduces developers to Logi Info v12.1, in the .NET environment. Logi

142 Getting Started with Logi Info

You can change the "default" report designation using two methods:

As shown above, left, in the Application panel, select the desired report definition, right-click it, and select Set As Default from its context menu. This sets the Application element's Default Report attribute, shown above, right, in the _Settings definition. You can also manually edit this attribute value directly in the _Settings defini-tion. Using the Run Application menu item will save all open, unsaved definitions before displaying the report.

Using Comments, Remarks, and Application Notes As an application grows in size and complexity, it's often helpful for developers to leave in-line comments and descriptive notes within the definitions. The Note element holds these comments and can be placed anywhere in a report definition; it's ignored when the report is executed.

In the above example, Note elements have been placed in the _Settings definition to provide instructions for other developers. Placing the Notes in different levels of the tree establishes context for the reader, as show by the final note element above. Blue is the default note text color, but you can change this using Studio's Tools → Options menu. To add a comment:

1. Double-click the Note element to add it to the definition.

Page 149: Getting Started with Logi Info .NET ApplicationsGetting Started with Logi Info 1 Introduction This publication introduces developers to Logi Info v12.1, in the .NET environment. Logi

Getting Started with Logi Info 143

2. Select the newly added Note element to define its attributes. 3. Double-click the Note attribute to open the Zoom window, type your comment, and click OK. 4. To prevent Notes from appearing in the generated HTML page, remark them (see below).

Remarking Elements During development, it may be helpful to temporarily "comment out" certain elements. The developer can remark a single element or an entire hierarchy of sub-elements in order to temporarily hide them from execu-tion. This can be an important debugging tool as it allows you to selectively prevent execution of parts of the application. A common troubleshooting technique is to remark a definition repeatedly, successively reducing it down to fewer and fewer basic parts, in order to isolate the source of a difficult-to-find error.

In the example above, the first two Divisions in the element tree are active. A third Division element has been remarked and appears in a green font; it is therefore inactive. Green is the default color but you can change this using Studio's Tools → Options menu. Remarked elements do not affect the appearance or functionality of the application but remain present in the definition file. At runtime, the Logi Server Engine ignores remarked elements and they are not rendered into the HTML page output. To remark an element:

1. Select the element to remark from the definition file. 2. Right-click it and choose Remark from the pop-up menu.

Because elements are structured in a hierarchical tree, if a parent element is remarked, all of its child elements in the tree are also remarked. Writing Application Notes It's often useful to write detailed notes about topics that affect the entire application, such as database modi-fications or session variable names, and the Note element isn't useful for this purpose. Instead there's an Ap-plication Notepad for each Logi Studio application. To access it, switch to the Workspace Welcome tab.

Page 150: Getting Started with Logi Info .NET ApplicationsGetting Started with Logi Info 1 Introduction This publication introduces developers to Logi Info v12.1, in the .NET environment. Logi

144 Getting Started with Logi Info

To write Application Notes:

1. Click Edit Notes to begin writing the application notes. 2. Type the notes in the provided textbox. 3. Click Save Notes to commit the changes.

The following formatting options are available when writing application notes:

Bold, Italic, and Underline Bulleted List, Numbered List Decrease Indent, Increase Indent Insert Link

Using the Test Parameters Panel One of Studio's least well-known panels is the Test Parameters panel. Studio makes this panel visible when the current definition expects to receive and use parameters. It provides a way for developers to supply request variable values for their definitions when previewing them in Studio and it makes experimenting with different values very easy.

Page 151: Getting Started with Logi Info .NET ApplicationsGetting Started with Logi Info 1 Introduction This publication introduces developers to Logi Info v12.1, in the .NET environment. Logi

Getting Started with Logi Info 145

The example above shows this panel in use. Studio will automatically populate the left column with the tokens for any request variables expected by the currently selected definition in the Workspace. You can enter values for those tokens, and they'll be fed to the definition when you Preview it in the Workspace panel, or right-click it in the Application panel and select "Run in Browser".

The token values in Test Parameters are not fed to the application when you click the Run Application menu item or press the F5 key.

Using the Debugging Features Logi Studio provides debugging features for an application, but they have to be enabled to work. They are not enabled by default.

You can turn on debugging for all your report pages by clicking the Debug menu item, shown above, in Studio's main menu in the Home tab, and selecting Debugger Link from the options.

Selecting a debugger style in the toolbar sets an attribute value in the General element, in the _Settings defini-tion, as shown above. This value can also be set manually.

Page 152: Getting Started with Logi Info .NET ApplicationsGetting Started with Logi Info 1 Introduction This publication introduces developers to Logi Info v12.1, in the .NET environment. Logi

146 Getting Started with Logi Info

Now, when run, each report page will include a debug icon "floats" in the lower right-hand corner of the browser window, as shown above. Click this link to display the Debugger Trace Page (discussed below). You can right-click the link to open the debug page, open it in a new tab (if displayed in a browser), or in a new window, etc. Each chart will have its own debug icon or link, as well, and a separate debug trace page. The other debugging modes include:

Debugger Link No Data - Produces the same report as Debugger Link, but does not include links to, or cache, the XML data retrieved. For more discussion of this option, see below.

Error Detail - Appends detailed error at the bottom of a page only when an error occurs. No Details - Prevents any debugger information from appearing when there's an error, so the user

cannot see sensitive system security information. Use this option for system deployment. Redirect - Redirects the browser when an error occurs to a custom error page, at the URL you must

specify in the "Redirect Error URL" attribute. The default value is No Details. Using Debugger Link No Data Why is Debugger Link No Data useful? When you debug using the standard Debugger Link setting, debug data files are generated for all of the datalayer elements inside your report. Creating these files requires a signifi-cant amount of processing overhead and your reports will run slower. How much slower depends on how much data there is, but expect ~2x slower for each datalayer element. However, if you wish to debug for performance reasons and want to inspect the timings of different events, you can use the Debugger Link No Data setting, which creates no debug data files and incurs no processing overhead, to produce a more accurate execution time profile. About the Debugger Trace Report When the Debugger Style has been set to Debugger Link or Debugger Link No Data, the Debugger Trace Re-port can be accessed in two ways: using the Debug icon or link discussed earlier, or from a link that appears on a runtime error page. The trace report appears either in the Preview panel or in your browser, depending on which method you were using to view your report.

Page 153: Getting Started with Logi Info .NET ApplicationsGetting Started with Logi Info 1 Introduction This publication introduces developers to Logi Info v12.1, in the .NET environment. Logi

Getting Started with Logi Info 147

Page 154: Getting Started with Logi Info .NET ApplicationsGetting Started with Logi Info 1 Introduction This publication introduces developers to Logi Info v12.1, in the .NET environment. Logi

148 Getting Started with Logi Info

As shown above, the Debugger Trace Report includes step-by-step events, values, and time notations for the report run. Tracing application execution is very useful for troubleshooting, especially for data retrieval issues. Here are some of the items you'll find in the trace report:

1. The Trace Report shows valuable information about the system environment. 2. The Trace Report shows the Request parameters being passed to the report, which can be helpful in

determining what values are being passed from other reports or as a result of user input. 3. Datalayer activity, such as a SQL query issued to a database, is shown. This is especially useful if some

of the query includes tokens that are resolved at runtime. SQL queries shown here can be copied and pasted into Studio's Query Builder or other tools in order to run and test them independently. Data retrieval and manipulation operations are optimized under one or more "data operation plans" to reduce data cache reads and writes. Plan information now appears in this section of the debug report.

4. If the Debugging Style selected was Debugger Link, you can view the underlying XML data to verify the retrieval of data from a SQL database; if the XML data is absent or incomplete, then the SQL query syn-tax should be examined.

5. If the Debugging Style selected was Debugger Link, the data in the datalayer, after retrieval and sub-sequent processing with condition filters, calculated columns, grouping, etc., can be viewed.

6. A bar chart is integrated into the column, which gives you a visual reference for performance during each step.

7. If you're working with a Logi Java application, the Trace Report will also include a special section near the

top that presents information about your Java configuration.

Page 155: Getting Started with Logi Info .NET ApplicationsGetting Started with Logi Info 1 Introduction This publication introduces developers to Logi Info v12.1, in the .NET environment. Logi

Getting Started with Logi Info 149

In addition, if an error has occurred, a detailed error report, shown above, including the stack trace will also appear, often with a more detailed error message to aid in debugging. Debugging Scripts You can also cause debugging to extend to scripts:

To enable this, configure the General element's Script Source Debugger Style attribute. Its None value is the default, or you can set it to OnError, in which case the View Script File link shown above appears in the Debug-ger Trace Page when an error occurs. This link displays the script as generated when the report was run. If the script is a simple, single line of script, the actual error may appear here instead of a link. A third value option, Always, causes the link to appear in the trace page at all times. The routine use of Always is discour-aged as it will incur a significant performance hit.

Logging Errors If errors are intermittent or difficult to reproduce, then logging the errors may be a good strategy for observing them.

Page 156: Getting Started with Logi Info .NET ApplicationsGetting Started with Logi Info 1 Introduction This publication introduces developers to Logi Info v12.1, in the .NET environment. Logi

150 Getting Started with Logi Info

Error logging is enabled in the application's _Settings definition, as shown above, by setting the General ele-ment's Log Errors attribute to True. This setting will write out the Debugger Trace Report as an HTML page when an error occurs. Normally, these debugger pages will be written to the <application folder>\rdErrorLog folder, how-ever the General element's Error Log Location attribute can be used to direct them to another location in the web server file system. This attribute value must be a fully qualified file path and the target folder will be cre-ated if it does not exist. Tokens can be used here as part of the path, such as:

@Function.AppPhysicalPath~\MyErrorLogs

Keep in mind that the local ASPNET system account requires full access rights to the target folder. If the folder does not exist, then the application folder must have these rights so that the target folder, when created, in-herits them. To use a custom location in a web farm environment, specify a network folder and change the application's identity from a local machine account to a network account.

Page 157: Getting Started with Logi Info .NET ApplicationsGetting Started with Logi Info 1 Introduction This publication introduces developers to Logi Info v12.1, in the .NET environment. Logi

Getting Started with Logi Info 151

Hello World! Tutorial This chapter walks you through the process of building a simple Logi application. This tutorial assumes that you have:

Microsoft IIS web server and .NET Framework 4.x installed, - OR –

A supported Java web server and Sun JDK 1.6 1.7, or 1.8, or JRockit, installed;

And an un-expired trial license or a regular or OEM license file installed in C:\Program Files\LogiXML IES Dev\LogiStudio.

Begin by launching Logi Studio, using its desktop icon or Start → All Programs → Logi Info → Studio.

1. In Logi Studio, close the Getting Started dialog box and click New Application in the Welcome Panel, as

shown above.

Page 158: Getting Started with Logi Info .NET ApplicationsGetting Started with Logi Info 1 Introduction This publication introduces developers to Logi Info v12.1, in the .NET environment. Logi

152 Getting Started with Logi Info

2. Logi Studio is capable of producing both .NET and Java web applications. For this tutorial, we'll select the .NET option, as shown above.

3. Provide an application name: HelloWorld - DO NOT insert a space between the two words. Choose the location for the new HelloWorld application folder. For simplicity, use the default, C:\Inetpub\wwwroot, and the wizard will create a new application folder there.

Click OK to create the application. The progress indicator, shown above, will appear and required sub-folders and files will be created in your HelloWorld folder.

Page 159: Getting Started with Logi Info .NET ApplicationsGetting Started with Logi Info 1 Introduction This publication introduces developers to Logi Info v12.1, in the .NET environment. Logi

Getting Started with Logi Info 153

4. The Prepare a New Application Wizard, shown above, will start. The next step is to configure the basic application settings and register it with your web server. Click Next.

5. The wizard will now test the web server and configure your application, as described. Click Next.

Page 160: Getting Started with Logi Info .NET ApplicationsGetting Started with Logi Info 1 Introduction This publication introduces developers to Logi Info v12.1, in the .NET environment. Logi

154 Getting Started with Logi Info

The results of the diagnostic tests will displayed, as shown above. If all test results are "OK", click Next.

The failure of any test indicates that something is wrong with your web server environment's abil-ity to run the new application. This could be caused by a number of things, such as failing to install the new Logi version as an Administrator, or having incorrect file permissions on the application folder, or failing to have the correct version of .NET installed. Contact Logi Support for assistance.

6. Next you'll be asked to select a Theme for your application. Use the default, Signal, and click Next.

Page 161: Getting Started with Logi Info .NET ApplicationsGetting Started with Logi Info 1 Introduction This publication introduces developers to Logi Info v12.1, in the .NET environment. Logi

Getting Started with Logi Info 155

7. Next, enter a caption for the application, and click Next.

8. When the wizard prompts you to create a Data Visualization, click Cancel.

Page 162: Getting Started with Logi Info .NET ApplicationsGetting Started with Logi Info 1 Introduction This publication introduces developers to Logi Info v12.1, in the .NET environment. Logi

156 Getting Started with Logi Info

9. In Studio's Application panel (at the upper-left), double-click the Default report definition and it will open in the Workspace panel.

10. In the Default definition, right-click the Body element and navigate the pop-up menus as shown above,

finally clicking on the Label menu item. A Label element will be added to the definition.

Page 163: Getting Started with Logi Info .NET ApplicationsGetting Started with Logi Info 1 Introduction This publication introduces developers to Logi Info v12.1, in the .NET environment. Logi

Getting Started with Logi Info 157

11. Click the Label element and, in the Attributes panel, enter the text "Hello World!" in the Caption attribute,

as shown above. Then, in the Class attribute, select ThemeTextLargest from its pull-down list of style class options.

12. Click the Preview tab at the bottom of the Workspace panel to save your definitions and run the Default

report. Your "Hello World" message should be displayed, as shown above.

Congratulations on completing your first Logi report!

Page 164: Getting Started with Logi Info .NET ApplicationsGetting Started with Logi Info 1 Introduction This publication introduces developers to Logi Info v12.1, in the .NET environment. Logi

158 Getting Started with Logi Info

Glossary AJAX An acronym for Asynchronous JavaScript and XML, AJAX is a technology used in creating interactive web appli-cations. The intent is to make web pages feel more responsive by exchanging small amounts of data with the server behind the scenes, so that the entire web page does not have to be reloaded each time the user re-quests a change. This is meant to increase the web page's interactivity, speed, and usability. Application Path In a Logi application, the Application Path is the URL of the application. It's a standard HTTP URL including the web server name and virtual directory name that has been registered for your application. Examples:

http://localhost/myfirstapp

http://194.255.255.10/helloworld

Attribute A customizable, predefined property of an element, consisting of a name and value. Some attributes, such as ID, are common to all elements and some are required for application execution. Attribute Name The identifier portion of an attribute; a user-defined application setting for a specific attribute name. Attribute Value The data portion of an attribute; a user-defined application setting for a specific attribute name. BLOB Acronym for Binary Large Object. In a database context, refers to binary data such as images, music files, vide-os, or executable files that are stored as an object in a single data table column. Child Element An element that hierarchically belongs to the element above it (its parent) in the element tree in a definition. Child elements stay with their parent elements when the parent element is copied, moved, or deleted. CLOB Acronym for Character Large Object. In a database context, refers to text data such as documents, HTML pag-es, and logs that are stored as an object in a single data table column. Condition An element attribute that controls whether the element is processed or ignored. If the value or formula in this attribute value evaluates to True, the element is processed; if it evaluates to False, it’s ignored. Connection String A value used to make a connection to a database or datasource. May contain a variety of information such as server, database, user id, password, etc. Example:

Provider=SQLOLEDB.1;Persist Security Info=False;User ID=sa;Initial Cata-

log=Northwind;Data Source=MYDATASERVER

Page 165: Getting Started with Logi Info .NET ApplicationsGetting Started with Logi Info 1 Introduction This publication introduces developers to Logi Info v12.1, in the .NET environment. Logi

Getting Started with Logi Info 159

CSS An acronym for Cascading Style Sheet, CSS is a style sheet language used to create style classes that describe the presentation of an HTML document. Its purpose in Logi applications is to control appearance, alignment, location, and other presentation aspects in report definitions. The CSS specifications are maintained by the World Wide Web Consortium (W3C). Debugger Trace Page A diagnostic HTML page that provides information about program execution. It contains columns for the event, object, data value, and time of occurrence. Clicking a debug link (which appears when turned on in an applica-tion's _Settings definition) will display this page, as will fatal errors. Division An element used within the element tree in a report definition as a container for other elements. The Division element can be conditionally shown or hidden, causing all of the elements it contains (its child elements) to be shown or hidden. Also useful for organizing elements for improved definition readability and for copying groups of elements. Results in a SPAN or DIV tag in the report HTML output. Element A reusable, XML-based component, usually represented by an icon in Logi Studio, used as the visual building block of a Logi application. Elemental Development The process of creating robust and flexible web-based reporting applications with reusable XML-based compo-nents. Flow Positioning The process of defining layout based upon the hierarchical structure of elements within a report definition. Analogous to Flow Layout. Formula Attribute A category of element attributes that are able to accept a literal value or a formula. When a formula is used, the first character in the value is the equals sign (=). This is followed by a formula using intrinsic or JavaScript functions which is evaluated at runtime. Examples include the Label element's Caption attribute and the Calcu-lated Column element's Formula attribute. Heat Map The Heat Map chart element provides a graphical representation of data consisting of a rectangular arrange-ment of many smaller rectangles, where the size and color of each small rectangle represents a data value. Heat maps are used for purposes such as DNA tracking in Molecular Biology and stock market analysis. Layout Positioning The process of defining layout using fixed or absolute positions for an element or group of elements within a report definition. Analogous to Grid Layout. Process Definition An XML source code file used in Logi applications, consisting of one or more Task elements, which contain hi-erarchical collections of elements that define a specific server-side task to run. Tasks are used to manipulate data, send email, test data conditions, and perform other processing and are used for automated and sched-uled events.

Page 166: Getting Started with Logi Info .NET ApplicationsGetting Started with Logi Info 1 Introduction This publication introduces developers to Logi Info v12.1, in the .NET environment. Logi

160 Getting Started with Logi Info

Query String That portion of a web page URL that is used to pass data to the web server. In this example, the Query String follows (but does not include) the question mark (?):

http://www.logianalytics.com/rdPage.aspx?rdReport=myPage&rdMethod=Post

Remarked Element An element (including child elements) that have been disabled or "commented out" of a report definition. By default, remarked elements appear in a green font within Studio. Report Definition An XML source code file used in Logi applications, created by a developer, which contains hierarchical collec-tions of elements, processed by the Logi Engine to produce report pages. Request Parameters That portion of a web page URL used to identify individual data parts to be passed to the web server. In this example, the request parameters consist of a "name" and a "value" pair connected by an equals sign. Each name-value pair is separated from the next by an ampersand (&):

http://www.logi.com/rdPage.aspx?rdReport=myPage&rdMethod=Post&rdTime=EDT

In a Logi report definition, these parameters are available using @Request tokens. In the above example, the final request parameter is available as @Request.rdTime~ and its value is "EDT". Shared Element A container element that holds other elements, defined in one report definition but available to be referenced from other report definitions so that elements can be defined once but used many times. This is especially use-ful for implementing standardized headers and footers. Shared Element elements are referenced in other defi-nitions using the Include Shared Element element. Show Modes A mechanism that makes it possible to hide and show elements in reports based on a data value. The value is often passed to report pages in a Request parameter named "rdShowModes". Style Sheet A developer-created file that contains style classes that control the presentation aspects of Logi reports. See CSS above. Support Files Style sheets, images, XML data files, HTML documents, and Scripts included with a Logi report application. Token A "placeholder" for a value which is evaluated by the Logi Server Engine at runtime. Analogous to a "macro". Tool Tip An attribute for some elements that causes explanatory text to appear when the mouse is hovered over the element. This is very useful for providing immediate context help for elements like Input Text and Input Text Area. Validation The process of ensuring that all required elements are present in a Logi application, with values defined for all required attributes.

Page 167: Getting Started with Logi Info .NET ApplicationsGetting Started with Logi Info 1 Introduction This publication introduces developers to Logi Info v12.1, in the .NET environment. Logi

Getting Started with Logi Info 161

Virtual Directory In the context of Microsoft Internet Information Server (IIS), a virtual directory is an alias for a physical directo-ry on the web server. This alias is used in a web page URL to request a page from the physical directory. The following example contains the virtual directory "HelloWorld":

http://localhost/HelloWorld

When an application is registered in Studio, a virtual directory is created for it. Under Windows, the IIS Manag-er program can also be used to create virtual directories. By using a virtual directory in the URL, browsers are not required to be given any of the physical storage details. Web Service A Web API that can be accessed over the Internet and executed on a remote system hosting the requested services. A web service provides specific processing and/or data, over the Internet, that developers can incor-porate into their own applications. Fees are sometimes charged for the use of a web service. XML The Extensible Markup Language (XML) is a W3C-recommended general-purpose markup language that sup-ports a wide variety of applications. In Logi applications, the source code for definitions is an XML docu-ment and the results returned from a datasource into a datalayer are cached as XML data.

Page 168: Getting Started with Logi Info .NET ApplicationsGetting Started with Logi Info 1 Introduction This publication introduces developers to Logi Info v12.1, in the .NET environment. Logi

162 Getting Started with Logi Info

Resources and Support The following resources are available if you need additional information or support: Corporate Headquarters Phone: 1-888-564-4965 (703) 752-9700 Fax: (703) 995-4811 Email: [email protected] Address: 7900 Westpark Drive, Suite A200 McLean, VA 22102 Web site: www.logianalytics.com Developer http://devnet.logianalytics.com Network: Sales Department Email: [email protected] Customer Service and Support Email: [email protected]