Novell Home

AppNote: Creating ZENworks Inventory Reports Using the Crystal Reports Designer

Novell Cool Solutions: AppNote
By Jagannathan Somakala

Digg This - Slashdot This

Updated: 22 Nov 2005
 

J Somakala
Senior Software Engineer
Novell Inc.
JSomakala@novell.com

This AppNote explains how to create inventory reports from Novell ZENworks for Desktops and ZENworks for Servers using the Crystal Reports Designer included in Crystal Reports 8.0 and 8.5. Crystal Reports is a third-party product for producing customized reports from various types of databases.


Topics inventory reports, ZENworks for Desktops, ZENworks for Servers, Crystal Reports, databases
Products Novell ZENworks for Desktops 4, Novell ZENworks for Servers 3, Novell ZENworks 6, 6.5, 7
Audience ZENworks administrators
Level intermediate
Prerequisite Skills basic knowledge of database fundamentals, familiarity with ZENworks inventory reporting
Tools Crystal Reports 8.0 and 8.5
Sample Code no

Introduction

A solution for creating customized Inventory reports using Crystal Decisions' Crystal Reports for Novell's ZENworks for Desktops 4, ZENworks for Servers 3, and ZENworks 6, 6.5, 7 has been developed. This AppNote explains how ZENworks administrators can create a variety of reports from the ZENworks Inventory database with minimal effort.

The solution also allows user-defined reports to be added to the Novell ConsoleOne utility to simplify the process of compiling Inventory data for the administrator. The instructions on how to do this are given in the Administration Guides for ZENworks for Desktops 4, ZENworks for Servers 3, and ZENworks 6, 6.5, 7.

Throughout this AppNote, references to ZENworks for Desktops and ZENworks for Servers will be abbreviated as ZfD and ZfS, respectively.

Note: Although the views and attributes described in this AppNote are specific to ZfD 4, becoming familiar with the tasks described in this AppNote should help you in designing reports for the Inventory database in ZENworks for Desktops 3.2.

This AppNote assumes that the user has installed Crystal Reports 8.0 or above, and has a basic knowledge of designing reports using the Crystal Reports Designer. It also assumes that the user has basic knowledge of database fundamentals.

Prerequisite Procedures

Before you proceed with the instructions in this AppNote for creating Inventory reports with the Crystal Reports Designer, you must check your software versions and configure the ODBC driver to connect to the appropriate Inventory Database server.

Software Versions

The instructions given in this AppNote are based on the following ZENworks versions:

  • ZENworks for Desktops 4 with Support Pack 1 (SP1)

  • ZENworks for Servers 3 with SP1 or SP2

  • ZENworks 6

  • ZENworks 6.5

  • ZENworks 7

If you do not have Crystal Reports 8.0, it can be purchased from the company's Web site at http://www.crystaldecisions.com or from your local software retailer.

Configuring ODBC

You need to configure the ODBC driver to connect to the appropriate Inventory Database server on the machine where Crystal Reports Designer is installed.

Before you can create reports using the Crystal Report Designer, the ODBC client for Sybase, Oracle, or Microsoft SQL must be installed on your workstation. You can install the Sybase ODBC driver from the ZfD or ZfS Companion CD. To install the Sybase ODBC driver, copy the \ODBC\SYBASE\SYBASEODBC.ZIP file from the Companion CD to a local drive. For installation instructions, refer to the ODBCREADME.TXT file in the same directory on the Companion CD.

After installing the appropriate ODBC client, you need to configure the ODBC driver on your workstation. To configure the ODBC driver, follow these steps (details may vary depending on the version of Windows you have):

  1. Click Start and select Settings > Control Panel > Administrative Tools. Double-click the "Data Sources (ODBC)" icon and click the Add button.

  2. In the list of ODBC drivers, select the one for the database you want to connect to.

  3. Click Finish.

  4. Enter the Data Source Name as "ZenInventory" (or whatever DSN you want) and fill in the database connection details (see Figure 1).

  5. Note: If you use the DSN name of "ZenInventory", you can add the reports you design to the existing Inventory reports that can be viewed using ConsoleOne. More details can be found in the ZfD and ZfS Administration Guides.

    Figure 1: ODBC Driver Setup screen.

  6. Click OK . The DSN you entered should now appear in the list of User Data Sources.

  7. Click OK to close the ODBC configuration utility.

Inventory Database Schema

The ZENworks Inventory database is modeled after the CIM schema, a standard information model developed by the Desktop Management Task Force (DMTF).

The main view in the ZENworks Inventory database is CIM.UnitaryComputer-System. This view contains all the workstations and servers scanned for Inventory in ZfD and ZfS. All other details scanned, such as processor, disk drive, operating system, and so on, are exposed through relevant views and are linked to CIM.UnitaryComputerSystem using association views. Each of these classes has specific attributes which are scanned for. The entire set of attributes scanned, the views, and their link to CIM.UnitaryComputerSystem are shown in Table 1.

In the table, the LHS view links to the RHS view using the association view. "L" in the association view is the attribute name which links to id$ of the LHS view. "R" in the association view is the attribute name which links to id$ of the RHS view. So, to get the OS of a particular machine, by looking in the first column you see that you have to link

CIM.UnitaryComputerSystem.id$ = CIM.InstalledOS.GroupComponent

and

CIM.InstalledOS.PartComponent = ZENworks.ZENOperatingSystem.id$

Entries marked with an asterisk (*) and highlighted in red indicate a further link. For example, to get Hard Disk drive details, the SQL statement would have the condition:

CIM.UnitaryComputerSystem.id$ = CIM.SystemDevice.GroupComponent and

CIM.SystemDevice.PartComponent = ZENworks.ZENDiskDrive.id$ and

ZENworks.ZENDiskDrive.id$ = CIM.Realizes.Dependent and

CIM.Realizes.Antecedent = ZENworks.PhysicalDiskDrive.id$

Table 1: Links between various views in the Inventory database.

ZW Versions
LHS View
Association View
RHS View

All

CIM.UnitaryComputerSystem

Name

PrimaryOwnerName

PrimaryOwnerContact

CIM.InstalledOS

L:GroupComponent

R:PartComponent

ZENworks.ZenOperatingSystem

(can be used for common data across Windows and NetWare)

Windows:

ZENworks.WinOperatingSystem

CodePage

OSType

InstallDate

Caption

OtherTypeDescription

Role

TotalVirtualMemorySize

TotalVisibleMemorySize

Version

NetWare:

ZENworks.NetWareOperatingSystem

(in addition to the above attributes)

AccountingVersion

InternetBridgeSupport

MaxNumberOfConnections

PeakConnectionsUsed

PrintServerVersion

QueuingVersion

RevisionLevel

SecurityRestrictionLevel

SFTLevel

TTSlevel

VAPVersion

VirtualConsoleVersion

InternalNetworkNumber

All

CIM.UnitaryComputerSystem

CIM.InstalledSoftware

Element

L:System

R:Software

ZENworks.InventoryScanner

Version

LastScanDate

InventoryServer

ScanMode

All

CIM.UnitaryComputerSystem

ManageWise.Designates

L:Host

R:Designation

ManageWise.DNSName

Label

All

CIM.UnitaryComputerSystem

ManageWise.Designates

L:Host

R:Designation

ManageWise.MSDomainName

Label

All

CIM.UnitaryComputerSystem

ManageWise.Designates

L:Host

R:Designation

ManageWise.NDSName

Label

Tree

All

CIM.UnitaryComputerSystem

CIM.HostedAccessPoint

L:Antecedent

R:Dependent

CIM.IPProtocolEndPoint

Address

SubnetMask

All

CIM.UnitaryComputerSystem

CIM.HostedAccessPoint

L:Antecedent

R:Dependent

CIM.IPXProtocolEndPoint

Address

All

CIM.UnitaryComputerSystem

CIM.HostedAccessPoint

L:Antecedent

R:Dependent

CIM.LANEndPoint

MACAddress

All

CIM.UnitaryComputerSystem

CIM.SystemBIOS

L:GroupComponent

R:PartComponent

ZENworks.BIOS

Caption

InstallDate

SerialNumber

Version

Manufacturer

PrimaryBIOS

BIOSIDBytes

Size

All

CIM.UnitaryComputerSystem

CIM.ComputerSystem-

Processor

L:GroupComponent

R:PartComponent

CIM.Processor

DeviceID

Role

Family

OtherFamilyDescription

UpgradeMethod

MaxClockSpeed

CurrentClockSpeed

All

CIM.UnitaryComputerSystem

CIM.ComputerSystem-

Package

L:Dependent

R:Antecedent

ZENworks.SystemInfo

Description

Model

SerialNumber

Tag

ManagementTechnology

All

CIM.UnitaryComputerSystem

CIM.SystemDevice

L:GroupComponent

R:PartComponent

CIM.PointingDevice*

Name

PointingType

NumberOfButtons

All

CIM.PointingDevice*

CIM.AllocatedResource

L:Dependent

R:Antecedent

CIM.IRQ

IRQNumber

All

CIM.UnitaryComputerSystem

CIM:SystemDevice

L:GroupComponent

R:PartComponent

ZENworks.ZENKeyboard

Description

NumberofFunctionKeys

Layout

Delay

TypematicRate

Subtype

All

CIM.UnitaryComputerSystem

CIM.SystemDevice

L:GroupComponent

R:PartComponent

ZENworks.Bus

Description

Name

BusType

Version

All

CIM.UnitaryComputerSystem

CIM.SystemDevice

L:GroupComponent

R:PartComponent

ZENworks.VideoAdapter

Description

VideoMemoryType

MaxMemorySupported

CurrentBitsperPixel

CurrentHorizontalResolution

CurrentVerticalResolution

MaxRefreshRate

MinRefreshRate

VideoArchitecture

NumberOfColorPlanes

ChipSet

DACType

ProviderName

All

CIM.UnitaryComputerSystem

CIM.SystemDevice

L:GroupComponent

R:PartComponent

ZENworks.NetworkAdapter

Caption

Description

InstallDate

Name

PermanentAddress

MaxSpeed

AutoSense

AdapterType

ProviderName

All

CIM.UnitaryComputerSystem

CIM.SystemDevice

L:GroupComponent

R:PartComponent

ZENworks.SoundAdapter

Description

Name

ProviderName

All

CIM.UnitaryComputerSystem

CIM.SystemDevice

L:GroupComponent

R:PartComponent

ZENworks.ZENPOTSModem

Description

Name

DeviceID

ProviderName

All

CIM.UnitaryComputerSystem

CIM.SystemDevice

L:GroupComponent

R:PartComponent

CIM.Battery*

Name

Chemistry

DesignCapacity

All

CIM.Battery*

CIM.Realizes

L:Dependent

R:Antecedent

CIM.PhysicalComponent

InstallDate

Manufacturer

SerialNumber

All

CIM.UnitaryComputerSystem

CIM.SystemDevice

L:GroupComponent

R:PartComponent

CIM.PowerSupply

Description

TotalOutputPower

All

CIM.UnitaryComputerSystem

CIM.SystemDevice

L:GroupComponent

R:PartComponent

CIM.DisketteDrive*

All

CIM.DisketteDrive*

CIM.Realizes

L:Dependent

R:Antecedent

ZENworks.PhysicalDiskette

Description

Manufacturer

Capacity

PhysicalCylinders

PhysicalHeads

SectorsPerTrack

All

CIM.DisketteDrive*

CIM.Realizes

L:Dependent

R:Antecedent

ZENworks.LogicalDiskette

DeviceID (DriveLetter)

All

CIM.UnitaryComputerSystem

CIM.SystemDevice

L:GroupComponent

R:PartComponent

ZENworks.ZENDiskDrive*

Removable

All

ZENworks.ZENDiskDrive*

CIM.Realizes

L:Dependent

R:Antecedent

ZENworks.PhysicalDiskDrive

Description

Manufacturer

Capacity

PhysicalCylinders

PhysicalHeads

SectorsPerTrack

All

CIM.UnitaryComputerSystem

CIM.HostedFileSystem

L:GroupComponent

R:PartComponent

CIM.LocalFileSystem*

FileSystemSize

AvailableSpace

FileSystemType

All

CIM.LocalFileSystem*

CIM.ResidesOnExtent

L:Dependent

R:Antecedent

ZENworks.LogicalDiskDrive

Caption (Volume Label)

DeviceID (Drive Letter)

VolumeSerialNumber

All

CIM.UnitaryComputerSystem

CIM.SystemDevice

L:GroupComponent

R:PartComponent

CIM.CDROMDrive*

All

CIM.CDROMDrive*

CIM.Realizes

L:Dependent

R:Antecedent

ZENworks.PhysicalCDROM

Caption

Description

Manufacturer

All

CIM.CDROMDrive*

CIM.MediaPresent

L:Antecedent

R:Dependent

ZENworks.LogicalCDROM

DeviceID (Drive Letter)

ZfD 4, ZfS 3, ZW 6

CIM.UnitaryComputerSystem

ZENworks.InstalledProduct

L:ComputerSystem

R:Product

CIM.Product*

IdentifyingNumber

Name

Vendor

Version

ZfD 4, ZfS 3, ZW 6

CIM.Product*

ZENworks.Installed-

Directory

L:Product

R:Directory

CIM.Directory

Name (Location)

All

CIM.UnitaryComputerSystem

ZENworks.InstalledDriver

L:System

R:Software

CIM.VideoBiosElement

InstallDate

Version

Manufacturer

IsShadowed

All

CIM.UnitaryComputerSystem

ZENworks.InstalledDriver

L:System

R:Software

ZENworks.NetworkAdapterDriver

Description

Name

Version

All

CIM.UnitaryComputerSystem

ZENworks.InstalledDriver

L:System

R:Software

ZENworks.PointingDeviceDeviceDriver

Name

Version

All

CIM.UnitaryComputerSystem

CIM.InstalledSoftware-

Element

L:System

R:Software

ZENworks.NetWare Client

Version

All

CIM.UnitaryComputerSystem

CIM.ComputerSystemIRQ

L:System

R:Software

CIM.IRQ

IRQNumber

Availability

TriggerType

Shareable

All

CIM.UnitaryComputerSystem

CIM.SystemDevice

L:GroupComponent

R:PartComponent

CIM.CacheMemory*

ErrorMethodology

Level

WritePolicy

CacheType

LineSize

ReplacementPolicy

ReadPolicy

Associativity

All

CIM.CacheMemory*

CIM.RealizesExtent

L:Dependent

R:Antecedent

CIM.PhysicalMemory

Speed

Capacity

All

CIM.UnitaryComputerSystem

CIM.ComputerSystem-

Package

L:Dependent

R:Antecedent

CIM.DMA

Description

DMAChannel

Availability

BurstMode

All

CIM.UnitaryComputerSystem

CIM.ComputerSystem-

Package

L:Dependent

R:Antecedent

CIM.Card*

All

CIM.Card*

CIM.CardInSlot

L:Dependent

R:Antecedent

CIM.Slot

Description

MaxDataWidth

ThermalRating

All

CIM.UnitaryComputerSystem

CIM.ComputerSystem-

Package

L:Dependent

R:Antecedent

ZENworks.MotherBoard

Description

Manufacturer

HostingBoard

NumberOfSlots

All

CIM.UnitaryComputerSystem

CIM.SystemDevice

L:GroupComponent

R:PartComponent

ZENworks.ParallelPort*

Name

DMASupport

Address

All

ZENworks.ParallelPort*

CIM.AllocatedResource

L:Dependent

R:Antecedent

CIM.IRQ

IRQNumber

All

CIM.UnitaryComputerSystem

CIM.SystemDevice

L:GroupComponent

R:PartComponent

ZENworks.SerialPort*

Name

Address

All

ZENworks.SerialPort*

CIM.AllocatedResource

L:Dependent

R:Antecedent

CIM.IRQ

IRQNumber

All

CIM.UnitaryComputerSystem

Managewise.Current-

LoginUser

L:Client

R:Owner

Managewise.User

Name

All

CIM.UnitaryComputerSystem

Managewise.LastLogin-

User

L:Client

R:Owner

Managewise.User

Name

ZW 6.5, 7

CIM.UnitaryComputerSystem

CIM.SystemDevice

L:GroupComponent

R:PartComponent

ZENworks.ZENDesktopMonitor*/p>

DeviceID

Description

ModelID

ManufactureDate

NominalSize

ViewableSize

ZW 6.5, 7

ZENworks.ZENDesktopMonitor*

CIM.Realizes

L:Dependent

R:Antecedent

CIM.PhysicalComponent

Model

Manufacturer

SerialNumber

ZW 6.5, 7

CIM.UnitaryComputerSystem<

/td>

CIM.ComputerSystemPackage

L:Dependent

R:Antecedent

ZENworks.ZENChassis

ChassisType

NumberOfPowerCords

Manufacturer

SerialNumber

Version

AssetTag

Tag

ZW 6.5, 7

CIM.UnitaryComputerSystem

MW_DBA.InstalledSoftware

L:computerid

R1:Productid

R2:Directoryid

Pinstanceid

Productidentifier

Internalversion

Language

UninstallString

InstallationSource

FriendlyName

LastExecutionTime

FrequencyOfUsage

Description

Editionid

Spid

Informationsrc_bitmap

Fk_pinstanceid

Packageguid

adrmsikey

MW_DBA.Software

IdentifyingNumber

Name

Vendor

Version

Category

Helplink

PackageGUID

ZW 6.5, 7

 

MW_DBA.InstalledSoftware

R2:Directoryid

Mw_dba.Directory

Name (Location)

ZW 6.5, 7

Mw_dba.InstalledSoftware

Mw_dba.InstalledSoftwarePatch*

L:computerid

L:Pinstanceid

R:patchid

Mw_dba.Patch

Name

ZW 6.5, 7

CIM.UnitaryComputerSystem

Mw_dba.InstalledFile

L:Computerid

R1:Fileid

R2:Directoryid

Mw_dba.file

Name

FileVersion

InternalName

ProductVersion

Size

LastModified

Company

ProductName

Language

SoftwareDictionaryID

ZW 6.5, 7

 

MW_DBA.InstalledFile

R2:Directoryid

Mw_dba.Directory

Name (Location)

ZW 6.5, 7

Mw_dba.InstalledSoftware

Mw_dba.InstalledFile

L:computerid

L:pinstanceid

R:fileid

Mw_dba.File

Note (applicable only for ZENworks 6.5 and 7):
  1. The UnitaryComputerSystem -> InstalledFile -> File link represents all files scanned on the machine.
  2. The UnitaryComputerSystem -> InstalledSoftware -> InstalledFile -> File link represents all files scanned on the machine, which are associated to a particular software.
  3. To find all files, present on a machine which does not have software associate (in other words, a diff of (a) and (b), use the condition "InstalledFile.pinstanceid IS NULL"

If you have custom attributes in your database, you can use the view ZENworks.CustomInformation.

Creating Inventory Reports with Crystal Reports Designer

In Crystal Reports Designer, the creation of reports first involves walking through the entire database to choose relevant views, which will be used in the creation of the report. As explained above, the ZENworks Inventory database, which is modelled on the CIM schema, has views which are exposed to the user for ease of use. Hence all of your selections will involve views in the Inventory database.

As an example, suppose you need a report on Processor details. The steps for creating such a report are given below.

  1. If you observe the database schema as published in the Administration Guide for ZFD or ZFS, you can find the link of the processor-relevant views (refer to Table 1 for the view details) expressed as shown in Figure 2.

    Figure 2: Processor-related views in the Inventory database schema.

  2. The names "CIM_UnitaryComputerSystem", "CIM_Processor" and associations like "ComputerSystemProcessor" stand for names of views in the database. The actual names of the views are CIM.UnitaryComputerSystem, CIM.Processor, and CIM.ComputerSystemProcessor, respectively.

    Note: Oracle treats all table and view names in a case-sensitive manner. If you are designing a report that must work across databases, it is preferable to start the creation of the report on an Oracle database. By following the syntax for Oracle, you can use the report across databases.

    Referring to Table 1, you can find the information shown in Figure 2 represented as a row entry:

    CIM.UnitaryComputerSystem

    CIM.ComputerSystemProcess

    L:GroupComponent

    R:PartComponent

    CIM.Processor

    Current Clock Speed,

    Device ID,

    Maximum Clock Speed,

    OtherFamilyDescription,

    Processor Family,

    Processor Stepping,

    Role,

    Upgrade Method

    As shown in Figure 3, choose a view and name it with a user-friendly alias in Crystal Reports Designer.

    Figure 3: Selection of views from the database to use in the report.

  3. When linked in Crystal Reports Designer, your selections will appear as shown in Figure 4.

    Figure 4: Database linking for Processor data in Crystal Reports.

    One thing to watch out for here is that you must undo the option in Designer for Default linking before you link views belonging to the Inventory database. Default linking creates links between attributes with the same name and type across views. Inventory views have attributes like id$, class$, Name, and so on, which are common but cannot be linked together. If you have specified links but haven't disabled the Default option, drop all the default links first before you create the relevant links. The linking can be done based on the simple logic explained above, by using the cardinality of the association and the rule to follow while translating it to a view link.

  4. Once you have finished linking views, select relevant attributes on the page shown in Figure 5. If you don't use the Report Expert, you can drag and drop the attributes onto the report design page.

    Figure 5: Selecting attributes for display.

  5. Click Finish to see a preview of the report. An example preview is shown in Figure 6.

    Figure 6: Preview of a Processor report.

    As another example, Figure 7 shows the linking that would be done to create reports for extracting software information.

    Figure 7: Database linking for a Software report.

  6. Figure 8 shows how the data would look on the design page for this software report.

    Figure 8: Design page for a Software report.

    Hopefully these examples have given you a good idea of how to use Crystal Reports Designer to create basic Inventory reports. You can explore the various options in Crystal Reports Designer to group the data, sort on relevant attributes, and include filters for the data to be viewed. Crystal Reports also has the ability to export data to various popular formats such as Microsoft Word, HTML, CSV, and so on. (For more information, refer to the Crystal Reports documentation.)

Advanced Inventory Report Creation

This section discusses certain detailed points regarding the usage of the Inventory database to create advanced reports.

Enumerated Data Types

In the above report preview (Figure 8), for Processor.Family you might have expected to see something like "Pentium III" rather than the value "13". In the Inventory database, these specific attributes are maintained as enumerated data. The actual value for Processor.Family is stored in a view called CIM.Family_en_us. These attributes in the Inventory database are enumerations and have integer values, which can take a range of meaning.

Since these are constants, the enumerations are localized. So the typical name of a localized enum view is <view_name>_locale_country. ZENworks for Desktops 4 supports English (en_us), French (fr), German (de), Spanish (es), and Portugese-Brazilian (pt_br). ZENworks for Servers 3 supports English only (en_us). ZENworks 6.5 and ZENworks 7, support English (en_us), French (fr), German (de), Spanish (es), Portugese-Brazilian (pt_br) and Japanese (ja).

The entire set of enumeration views in the Inventory database, along with the corresponding attributes to which they are linked, is given in Table 2. These views have only two attributes: Enum and EnumString. By linking the enumerated view (as shown in Figure 9), you can see the actual data for Processor.Family (see Figure 10).

Figure 9: Linking the enumerated view for Processor.Family.

Figure 10: Preview of Processor data with values for Processor.Family.

Table 2: Enumerations.

ZW Versions
Attributes
Enum Views

All

ZENworks.WinOperatingSystem

ZENworks.NetWareOperatingSystem

OSType

Role

CIM.OSType_en_us

ZENworks.OSRole_en_us

All

CIM.Processor

Family

UpgradeMethod

Role

CIM.Family_en_us

CIM.UpgradeMethod_en_us

CIM.Role_en_us

All

CIM.PointingDevice

PointingType

CIM.PointingType_en_us

All

ZENworks.Bus

BusType

ZENworks.BusType_en_us

All

ZENworks.VideoAdapter

VideoArchitecture

VideoMemoryType

CIM.VideoArchitecture_en_us

CIM.VideoMemoryType_en_us

All

CIM.VideoBiosElement

IsShadowed

CIM.IsShadowed

All

CIM.IRQ

Availability

TriggerType

Shareable

CIM.Availability_en_us

CIM.TriggerType_en_us

CIM.Shareable

All

CIM.CacheMemory

Level

CacheType

ReadPolicy

ReplacementPolicy

WritePolicy

Associativity

CIM.Level_en_us

CIM.CacheType_en_us

CIM.ReadPolicy_en_us

CIM.ReplacementPolicy_en_us

CIM.WritePolicy_en_us

CIM.Associativity_en_us

All

CIM.DMA

Availability

BurstMode

CIM.Availability_en_us

CIM.BurstMode

All

ZENworks.ParallelPort

DMASupport

CIM.DMASupport

All

ZENworks.BIOS

PrimaryBIOS

CIM.PrimaryBIOS

All

CIM.Battery

Chemistry

CIM.Chemistry_en_us

All

ZENworks.InventoryScanner

ScanMode

ZENworks.ScanMode_en_us

All

ZENworks.SystemInfo

ManagementTechnology

ZENworks.ManagementTechnology_en_us

All

ZENworks.ZENDiskDrive

Removable

ZENworks.Removable

All

ZENworks.ZENNetworkAdapter

AutoSense

CIM.AutoSense

ZW 6.5, 7

ZENworks.ZENChassis

ChassisType

CIM.ChassisType_en_us

Note: In this listing of enumerations, you can see an attribute Role belonging to the view ZENworks.WinOperatingSystem/ZENworks.NetWareOperatingSystem. This attribute maintains the role of the machine--that is, whether it acts as a managed server or a managed workstation. When ZfD and ZfS store data in the same database, this attribute can then be used to distinguish between workstations and servers and generate separate reports.

Linking CIM Classes

The database schema shown in the Administration Guide for ZfD and ZfS shows the cardinality of the association. Continuing with the Processor example, if there is a "1" near GroupComponent and a "*" near PartComponent, this means that there can be more than one processor for a machine and it is a 1-to-n association.

For a one-to-one relationship, an equal join (the default) can be used. For all 1-to-n relationships, it is preferable to use a Left Outer Join in the Crystal Reports DB relationships.

Consider the 1-to-n association between CIM.UnitaryComputerSystem, CIM.System-Device, and CIM.PointingDevice. When scanned, the machine may have a single mouse attached, or there is the chance that no mouse is scanned, or the machine may have more than one mouse attached. In this case, using an equal join will yield the following result:

  • In the case of a single mouse, the correct result is shown.

  • In the case of no mouse scanned, the machine name is suppressed.

  • In the case of more than one mouse, the correct result (both the pointing devices) is shown.

For single-item scans, this is a desirable set of results. However, when you want data about more than one item to be shown in the same report (for example, to show both keyboard details and pointing device details in the same report), the suppression will result in the data of that machine being suppressed. So in spite of the fact that there might be a keyboard attached to the entry, the machine will not be displayed. In this case, a Left Outer Join between CIM.UnitaryComputerSystem and CIM.SystemDevice is the answer.

Issues in Desiging Inventory Reports Using Crystal Reports

There are several issues you might face while developing Inventory reports for ZENworks using Crystal Reports.

  • Integer fields over 15 digits in length are represented as float. All primary keys in Inventory are 19-digit integers. This poses a problem when you want to use these attributes to compute values, or use them in linking sub-reports.

  • String fields over 255 characters in length are treated as memo fields in Crystal Reports. In ZfD and ZfS, all string fields are within this limit, but in ZENworks for Desktops 3.2, certain important attributes like CIM.Product.Name and CIM.Product.

    Vendor are strings of 256 characters in length. These strings can be used only in display and cannot be used in a formula or to group. To use these strings, you will have to create a view which exposes the first 254 characters and copy this view on all databases on which the report will be run.

  • Processing of sub-reports on an Inventory database with more than 1000 workstations has been quite slow. It is preferable to build the links on the main table itself, rather than using sub-reports embedded in the main report.

These issues are addressed at the Crystal Care Technical Support Site. You can do a knowledge base search at http://support.businessobjects.com/search/ for more information.

Conclusion

Now that you have the basics of the Inventory database and how to create reports using the Crystal Reports Designer, you can include combinations of attributes to create reports relevant to your requirements. You can also use the above information to create views in the Inventory database and then build the reports over these views.

* Originally published in Novell AppNotes


Novell Cool Solutions (corporate web communities) are produced by WebWise Solutions. www.webwiseone.com

© 2014 Novell