6. Global Code Translation

Since SmartCare is a normalized database, all global code fields in any table will only contain the code and in order to display the more user friendly global code description, a function will need to be used as follows

In this example, the MaritalStatus and EmploymentStatus are examples of global codes where just the code is in the Clients table.   To display the description of the global codes, a function can be used as shown below:

  1. Enter ssf_GetGlobalCodeNameById prior to database field enclosed in parentheses
  1. Next, copy the query and add it to the dataset in MS Visual Studio by right clicking on DataSets and choose Add Dataset
  1. Select Use a dataset embedded in my report, choose Text for Query Type and copy query text into Query: box and then click OK
  1. Now the dataset is available under Datasets area of Report Data window

Fields from SQL query created in MS SQL Server Mgmt Studio are now available to insert into report layout in MS Visual Studio