Building Dashboards with Drilldowns to ZCC with ZENworks Reporting

As I’m sure you are aware by now, the Micro Focus Endpoint Management portfolio provides you with a powerful reporting platform in the form of ZENworks Reporting. In previous Cool Solutions we’ve talked about the basics of ZENworks Reporting, how to build basic dashboards and even how to connect dashboards together. In last month’s Open Horizon’s magazine I added some new information about how to use JasperStudio to create a simple visualization that can be added to a dashboard.

In this solution, we’ll take a look at how to build data views with JasperStudio, how to link to those data views from ZENworks Reporting dashboards, and finally how to have those data views drill into ZENworks Control Center to get you the details for the objects that appear in your data views.

Building Simple Ad Hoc Views for Your Dashboard

Let’s start by building a simple Ad Hoc Views. First we will build a simple chart that shows the Device Type (Server, Workstation and Mobile Device) and Platform (Windows, iOS, etc) in a dual layer pie chart.

The process for creating the first report is:

  1. Browse to your ZENworks Reporting server and login as a user with permissions to create reports.

  • Select Create > Ad Hoc View

  • From the Select Data domain, select ZENworks Domain. This is the domain that has information about the devices; then click Choose Data.

  • Expand ZENworks System > Managed Device Status.

  • Select the following fields and then click the right arrow to add them to the Selected Fields list.

    • Device Type

  • Managed Device Count

  • Platform

  • Click OK.

  • In the Ad Hoc View type dropdown, instead of Table, choose Chart.

  • Expand Measures > Managed Device Status, right-click Managed device count, then select Add to Columns.

  • Expand Fields > ZENworks System > Managed Device Status, highlight each of the two fields and select Add to Rows.

  • Right-click each of the Fields and select Create Filter.

  • Change the Filter to be Starts with and enter a default value of %. This will be important later on when wiring the dashboard.

  • Click Apply

  • From the Chart Properties drop-down  , select Chart Type…

  • Click Dual Layer Pie.

  • Click the Ad Hoc View properties drop-down  , and select Toggle the Title Bar since this will be displayed on a dashboard with a title already.

  • You should now have a chart view that looks like this:

  • Save the report in some folder as Devices by Type and Platform Dashlet.


Building a Data View in JasperStudio

JasperStudio is a great tool for building pixel-perfect reports that you want to print or send to your manager. It’s also a great tool for creating dashboard components that you can’t build with the ad hoc editor and building data views that can be used to drill into external tools such as ZCC. In this section, we’ll build a very simple data view that will then allow us to drill into ZCC.

The data view we build here is a very simple data view that could be further refined with additional data, branding or formatting as desired.

  1. If not already installed, you will need to install JasperStudio. This can be downloaded from the normal ZENworks download page.

  • (Optional) If you are using an Internal CA for your ZENworks Reporting server you will need to add your server’s CA trusted root certificate to the JasperStudio keystore. To do this:

    1. Run Internet Explorer as Administrator.

  • Browse to your ZENworks Reporting Server.

  • Click on the lock and view the certificate.

  • Click the Certification Path tab.

  • Click the top most certificate, then click View Certificate.

  • Click the Details tab.

  • At the welcome screen click Next.

  • Select Base-64 encoded X.509(.cer)

  • Click Next and then enter a file path and name for the certificate.

  • Click Next, then Finish.

  • Exit Internet Explorer.

  • Run CMD as Administrator.

  • Change to C:\Program Files\Jaspersoft\js-studio-pro-6.2.1\features\jre.win32.win32.x86_64.feature_1.8.0.u74\bin

  • Run the following command to import the certificate
    keytool.exe –import –alias “ZENworks Reporting” –file “<path to the .cer you downloaded> -keystore ..\lib\security\cacerts –storepass “changeit”

  • When prompted if you want to import the certificate choose to do so.

  • JasperStudio should now trust your CA and be able to establish a connection to your ZENworks Reporting server.

  • Launch JasperStudio.

  • Add your ZENworks Reporting Server.

    1. In the Repository Explorer pane, right-click Servers and click Create JasperReports Server Connection.

  • In the Name field, enter ZENworks Reporting

  • In the URL field, enter the URL to your ZENworks Reporting server, including “/jasperserver-pro”

  • In the User field, enter the name of a user with rights to create reports.

  • In the Password field, enter the password for the user.

  • Click Test Connection and verify the connection works.

  • Click Finish.

  • Create a simple data view report that lists the Device Name, Platform, Device Type, Agent Version, and Last Contact Time using the New Report Wizard.

    1. Select File > New > Jasper Report.

  • Select Blank Letter; then click Next.

  • In the File name field, enter DeviceDetails.jrxml; then click Next.

  • On the Data Source selection screen, click New….

  • Select Domain JRS; then click Next.

  • In the Name field, enter ZENworks Domain; then click Finish.

  • From the Data Source, select ZENworks Domain.

  • In the Server drop-down, select the ZENworks Reporting Server.

  • In the Domain drop-down, select /Domains/ZENworks_Domain.

  • Expand ZENworks System > Managed Device Status.

  • Right-click each of the following and select Add to Fields.

    • Device Name

  • Device Type

  • Device ZUID

  • Last Contact

  • Platform

  • ZENworks Agent Version

  • Right-click Device Type and select Add to Filters.

  • Change the expression to Device Type Starts With %

  • Check the box that says Is for Prompting; then click Generate Parameter.

  • Click OK.

  • Right-click Platform and select Add to Filters.

  • Change the expression to Device Type Starts With %

  • Check the box that says Is for Prompting; then click Generate Parameter.

  • Click OK.

  • Click Next.

  • Click the >> button to add all of the dataset fields to the fields list; then click Next.

  • Click Next.

  • Click Finish.

  • Now customize the report to remove unwanted bands in the report. In the Outline pane, right-click each of the following as select Delete.

    • Title

  • Page Header

  • Column Footer

  • Page Footer

  • Summary

  • Background

  • Define a Variable that will be used to allow drill-down to ZCC by providing the GUID as part of the URL.

    1. In the Outline pane, right-click Variables and select Create Variable.

  • Change the name of the Variable to ZUID

  • In the expression field, enter the following to get the ZUID in the format expected by the ZCC URL (strips the leading 0x from the value).REPLACE($F{ZENworks_System.Managed_Device_Status_zs.Device_ZUID_zs},1,2,"")

  • Place your data fields and column headers on the report.

    1. Drag each of the fields except Device _ZUID_zs from the outline into the Details 1 band of the report, arrange the fields so that they are in this order:

      1. Device Name

    2. Platform

  • Device Type

  • ZENworks Agent Version

  • Last Contact

  • Rename each of the Column Headers to be friendly and match the previous screenshot.

  • Hold down the CTRL key and select each of the Column Headers, then in the Properties pane select Static Text.

  • Change the text font to use Bold.

  • Resize the height of both the details and column header bands so that they take up just the height of the fields. Your report design should now look something like this:

  • Click the Preview tab to view a preview of what your report will look like with data. When prompted for values, just press the play button to select the default % values. It should look something like this:

  • Customize the report so that the Device Name appears as a drill-down and when clicked takes you to the ZCC details page for the device.

    1. Click the Design tab to return to design mode.

  • Click the Device Name column in the detail band.

  • In the Properties pane, select Appearance and change the foreground appears to Blue instead of Black.

  • Select the Text Field tab of the Properties pane, and choose to Underline the text.

  • Select the Hyperlink tab of the Properties pane.

  • In the Link Target drop-down, select Blank.

  • In the Link Reference Expression enter the following:
    IF(EXACT($F{ZENworks_System.Managed_Device_Status_zs.Device_Type_zs},"Workstation"),CONCATENATE("",$V{ZUID},"&adminid=Devices&pageid=workstationDetails"),IF(EXACT($F{ZENworks_System.Managed_Device_Status_zs.Device_Type_zs},"Mobile Device"),CONCATENATE("",$V{ZUID},"&adminid=Devices&pageid=mobileDeviceInfo"),IF(EXACT($F{ZENworks_System.Managed_Device_Status_zs.Device_Type_zs},"Server"),CONCATENATE( "",$V{ZUID},"&__VIEWSTATEVERSIONGET=859&adminid=Devices&pageid=serverDetails"),"")))

  • Click the Preview tab to preview the results.

  • Click the Play button when asked for Filter values.

  • Click the arrow next to the disk button in the report pane and select Export to HTML.

  • Save the file.

  • Open a browser and login to ZCC with a valid admin credential.

  • Open the report html file in a browser.

  • Click on one of the device names. You should be taken to the device’s details in ZCC.

  • Return to JasperStudio.

  • Select File > Save.

  • At the Export Report to JasperReports Server, choose Yes.

  • Browse to the Folder you wish to save the report in and enter the Name as Device Details.

  • Click Next.

  • At the Resource List screen, click Next.

  • At the Configure the data source screen, click Finish.

  • You should get a message like the one below, make a note of the full report name and the parameter names.

You have now completed the drill-down report that will be used to get the list of data and allow you to drill-down to ZCC from your dashboard.

Building the Dashboard

Now that you’ve got the different components you are ready to build your dashboard. In this section we’ll drag the two reports onto the canvas and we’ll wire the components together.

  1. Return to the ZENworks Reporting web console.

  • Select Create > Dashboard.

  • In the Existing Content search field enter Devices By to filter the list.

  • Drag the Devices by Type report onto the canvas.

  • Click the Dashboard Properties icon and check the Show filter dashlet as pop-up folder.

  • Under Filters expand Devices by Type and Platform and drag each of the filters onto the canvas.

  • Right click Devices by Type and Platform Dashlet and select Properties.

  • Select the Hyperlinks tab.

  • Check Enable chart hyperlinks.

  • In the Action dropdown, select Open new page.

  • In the Web Address/Repository URI field, enter      repo:<path to your custom report as shown on step #16 of prior section>?decorate=no&Device_Type_zs_0=$P{Device Type}&Platform_msd_0=$P{Platform}

  • This should look similar to this screen:

  • Click OK.

  • Now preview the dashboard by clicking the preview button   on the icon bar.

  • Click on an outside slice of the pie and see what happens. You should get a pop-up that shows a pre-defined set of filters, we’ll want to change this.

  • Click Cancel and close the new tab to return to the dashboard.

  • Click Save and save this as Device Dashboard.

  • Use the Repository browser to browse to your Device Details report.

  • Right click the report and select Edit…

  • Select Controls & Resources.

  • Uncheck the Always prompt checkbox so that Prompts are displayed on startup.

  • Change Display Mode to In Page so that users can see what the filters are when they are taken to the drilldown.

  • Click Submit.

  • Now open your dashboard and try clicking on an outside slide of the pie again. This time it should automatically open the device data report and you should be able to click a device and be taken to its details in ZCC.

You now have a sample dashboard that allows you to drill from a graph, to a set of data and then immediately into ZCC if you are authenticated to both ZENworks Reporting and ZCC.


In this solution you’ve seen how to leverage a combination of ZENworks Reporting adhoc reports and JasperStudio data views to deliver a drillable dashboard that starts with a simple visualization, allows you to click in and view the data, and then even drills down into the Device Object inside of ZENworks Control Center.


How To-Best Practice
Comment List