How to display different clients and logos from a library table on reports


  

 

Applies To
Product(s):gINT Logs, gINT Professional, gINT Professional Plus
Version(s):N/A
Environment: N/A
Area: Library Database
Subarea:
Original Author:Kirk Johnson, Bentley Technical Support Group

 

 

 

 

 

 

 

Problem

You want the client name, address, city, and state printed on your logs. You could have these four fields in the PROJECT table of your database and then have the log report print each one. A better and faster way is to create a library table for all your clients with these fields (and others, if you wish). Each client record would be identified by a client identification code. We will set up this example here. You don't have to go through the steps but make sure you understand them.If you don't, it would be worthwhile to implement the example.

Background

This method should be used when a company uses a master client list for all user locations in a shared library file. If each office will have their own unique list and do not want to pull from the library there is a second method where the client table is stored in the database as a table. See wiki article How to display different clients and logos from a project table on reports.

Steps to Accomplish

 

  1. Move to Data Design►Library Tables
  2. Select the File►New menu item
  3. Every library table must have a key field. This is the record identifier. The default value is "Key" but you will generally want to replace that with a more appropriate word. Type CLIENT for the Name, ClientID for the Key Field Name, and click the OK  button
  4. Using the New button, you will add the desired fields. Just type in the Name property. Leave the other properties as the defaults.

5. To use a logo field you will need to add a lookup to bitmap symbols ► hit the lookup button and choose Graphic!bmsymb ► check Must use lookup

6. Now move to Data Design►Library Data (the tab to the right of Library Tables) and add some client data

7. You will need to add any additional Client logos in Symbol Design►Bitmap Symbols. Hit the new button and load raster file

8. You would then associate this lookup to a "ClientID" field in your PROJECT table in Data Design►Project Database as described above under the Implement section. At input time, you will see this list when you are on the ClientID field. The list for a library table lookup will always consist of the key field and the first field to the right of the key field (ClientID and Name in this case). When you select a record, the key field will be pasted into your project database field.

Now we need to have the log report extract the appropriate client name, address, city, and state from the CLIENT library table and print it on the final log output. To do so, you would add a text entity in your log report with the following text property. Many times this text entity is stored in a Drawing block called company information. It can be found in DRAWINGS ►Company Information

     <<ListBuildSepTrim(_
  <<cr>>,_
  <<Lookup(<<CLIENT.Name>>,<<CLIENT.ClientID>>=<<PROJECT.Client>>)>>,_
  <<Lookup(<<CLIENT.Address1>>,<<CLIENT.ClientID>>=<<PROJECT.Client>>)>>,_
  <<Lookup(<<CLIENT.City>>,<<CLIENT.ClientID>>=<<PROJECT.Client>>)>>,_
  <<DelimitData(Telephone:  ,<<Lookup(<<CLIENT.Phone>>,<<CLIENT.ClientID>>=<<PROJECT.Client>>)>>)>>,_
)>>

You are telling the report to lookup the client name, address, city, and state in the CLIENT table for the client record whose key field (ClientID) is the same as the one found in the PROJECT.Client field.

9. Lastly you will need to change the bitmap symbol entity in your report. Many times this bitmap entity is stored in a    Drawing block called company information. It can be found in DRAWINGS ►Company Information. Double Click on the Bitmap entity and change the bitmap Symbol property to

<<ProjectSymbol(<<Lookup(<<CLIENT.Logo>>,<<CLIENT.ClientID>>=<<PROJECT.Client>>)>>)>>