Environment Sets needed for GRW for C#

Use this procedure to verify that you have the minimum environment sets selected for your GRW for C# configuration.

Before you begin:
There are several environment sets needed for the GRW for C# configuration. If you have not modified the default selection provided by the .NET configuration during installation, these will already be selected for you:
  • Reporting Template (latest version)
  • Microsoft® .NET
  • Report Writer (latest version)
  • Demo .NET Database Connection
  • DB - SQLite
Use this procedure to verify that you have the correct environment sets selected. You will likely need to alter the database-related environment sets for your environment, to use a database other than the demo database.
Tip: It is recommended that you make a copy of database-specific environment sets, and alter the copy. This allows you to keep the original database-specific environment sets for use with the demo programs.
  1. In the Genero Configurations combobox, select .NET.
    This combobox is located in the lower right-hand side of Genero Studio.
  2. Select Tools > Genero Configurations.
    The Genero Configuration Management dialog opens.
  3. At a minimum, select the following environment sets.
    Reporting Template (latest version)

    Only required for programs generated by the Business Application Modeler (BAM).

    This environment set includes the GSTSETUPDIR environment variable, which defines the directory where the BAM templates reside. In environments where multiple templates reside, you can only have one template path set.

    Microsoft .NET

    This environment set defines where the Microsoft .NET Framework and SDK software resides, and adds their path details to the PATH environment variable.

    Report Writer (latest version)

    In addition to setting GREDIR, this environment set ensures that all necessary library files are made available.

    Note: The .NET APIs are defined in gre.dll. This file is specified in the Link tab of the project build rules.
    Demo .NET Database Connection (or a copy thereof)
    Important: Select this environment set when generating your application using the Business Application Modeler. The environment variables ADO_PROVIDER and ADO_CONNECTION_STRING are mandatory for generated BAM C# projects only. The generated code is not dependent on the data provider. The prover can be chosen at runtime using these environment variables. For a non-generated application, there is no need to set these parameters, as the provider and connection string are typically hard-coded.
    The .NET Framework includes ADO.NET providers for direct access to Microsoft SQL Server and Oracle® databases, and for indirect access to other databases. It includes two environment variables:
    ADO_PROVIDER
    The invariant name of the ADO.NET data provider in the format "System.Data.ProviderName".
    ADO_CONNECTION_STRING
    The database connection string.

    Genero Studio for Report Writer includes precompiled binaries of ADO.NET Data Provider for SQLite. For direct access to other databases, many third-party providers are available, and the setup package will install all the necessary runtime components and dependencies. Each installed data provider that supports a factory-based class registers configuration information in the machine.config file on the local computer, in the <DbProviderFactories> section (C:\Windows\Microsoft.NET\Framework\version\Config).

    Table 1. Configuration Examples
    SQLite configuration example:
    • ADO_PROVIDER: System.Data.SQLite
    • ADO_CONNECTION_STRING: Data Source=$(GSTUSERSAMPLESDIR)/OfficeStoreRes/database-sqlite/officestore.db
    IBM-Informix® configuration example:
    • ADO_PROVIDER: System.Data.Odbc
    • ADO_CONNECTION_STRING: Driver= {IBM INFORMIX ODBC DRIVER (64-bit)};Host=localhost;Server=ol_informix1170;Service=9088;Protocol=olsoctcp;Database=officestore;Uid=myUsername;Pwd=myPassword;
    MySQL configuration example:
    • ADO_PROVIDER: MySql.Data.MySqlClient
    • ADO_CONNECTION_STRING: Server=myServerAddress;Database=officestore;Uid=myUsername;Pwd=myPassword;
    SQL Server configuration example:
    • ADO_PROVIDER: System.Data.SqlClient
    • ADO_CONNECTION_STRING: Server=myServerName\myInstanceName;Database=myDataBase;Trusted_Connection=True;
    Oracle configuration example:
    • ADO_PROVIDER: Oracle.DataAccess.Client
    • ADO_CONNECTION_STRING: Data Source=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=hostname)(PORT=1521)))(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=XE)));User Id=myUserId;Password=myPassword;
    Warning: SMALLFLOAT and FLOAT data types are not supported by the ADO.NET provider for Oracle. To use these data types, use a third party provider which supports them, such as Oracle Data Provider for .NET (ODP).
    Database environment

    The environment set for the database must also be set, whether it be an IBM® Informix-specific set, an Oracle-specific set, and so on.

    For the sample reporting application, check the DB-SQLite environment set.

  4. Click OK until all dialogs close.