Cool Solutions

Building Dashboards with Drilldowns to ZCC with ZENworks Reporting

jblackett

By:

October 3, 2017 4:56 am

Reads:501

Comments:2

Score:Unrated

Print/PDF

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.
  2. Select Create > Ad Hoc View
  3. From the Select Data domain, select ZENworks Domain. This is the domain that has information about the devices; then click Choose Data.
  4. Expand ZENworks System > Managed Device Status.
  5. Select the following fields and then click the right arrow to add them to the Selected Fields list.
    • Device Type
    • Managed Device Count
    • Platform
  6. Click OK.
  7. In the Ad Hoc View type dropdown, instead of Table, choose Chart.
  8. Expand Measures > Managed Device Status, right-click Managed device count, then select Add to Columns.
  9. Expand Fields > ZENworks System > Managed Device Status, highlight each of the two fields and select Add to Rows.
  10. Right-click each of the Fields and select Create Filter.
  11. Change the Filter to be Starts with and enter a default value of %. This will be important later on when wiring the dashboard.
  12. Click Apply
  13. From the Chart Properties drop-down , select Chart Type…
  14. Click Dual Layer Pie.
  15. 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.
  16. You should now have a chart view that looks like this:

  17. 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.
  2. (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.
    2. Browse to your ZENworks Reporting Server.
    3. Click on the lock and view the certificate.
    4. Click the Certification Path tab.
    5. Click the top most certificate, then click View Certificate.
    6. Click the Details tab.
    7. At the welcome screen click Next.
    8. Select Base-64 encoded X.509(.cer)
    9. Click Next and then enter a file path and name for the certificate.
    10. Click Next, then Finish.
    11. Exit Internet Explorer.
    12. Run CMD as Administrator.
    13. Change to C:\Program Files\Jaspersoft\js-studio-pro-6.2.1\features\jre.win32.win32.x86_64.feature_1.8.0.u74\bin
    14. 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”
    15. When prompted if you want to import the certificate choose to do so.
    16. JasperStudio should now trust your CA and be able to establish a connection to your ZENworks Reporting server.
  3. Launch JasperStudio.
  4. Add your ZENworks Reporting Server.
    1. In the Repository Explorer pane, right-click Servers and click Create JasperReports Server Connection.
    2. In the Name field, enter ZENworks Reporting
    3. In the URL field, enter the URL to your ZENworks Reporting server, including “/jasperserver-pro”
    4. In the User field, enter the name of a user with rights to create reports.
    5. In the Password field, enter the password for the user.
    6. Click Test Connection and verify the connection works.
    7. Click Finish.
  5. 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.
    2. Select Blank Letter; then click Next.
    3. In the File name field, enter DeviceDetails.jrxml; then click Next.
    4. On the Data Source selection screen, click New….
    5. Select Domain JRS; then click Next.
    6. In the Name field, enter ZENworks Domain; then click Finish.
    7. From the Data Source, select ZENworks Domain.
    8. In the Server drop-down, select the ZENworks Reporting Server.
    9. In the Domain drop-down, select /Domains/ZENworks_Domain.
    10. Expand ZENworks System > Managed Device Status.
    11. Right-click each of the following and select Add to Fields.
      • Device Name
      • Device Type
      • Device ZUID
      • Last Contact
      • Platform
      • ZENworks Agent Version
    12. Right-click Device Type and select Add to Filters.
    13. Change the expression to Device Type Starts With %
    14. Check the box that says Is for Prompting; then click Generate Parameter.
    15. Click OK.
    16. Right-click Platform and select Add to Filters.
    17. Change the expression to Device Type Starts With %
    18. Check the box that says Is for Prompting; then click Generate Parameter.
    19. Click OK.
    20. Click Next.
    21. Click the >> button to add all of the dataset fields to the fields list; then click Next.
    22. Click Next.
    23. Click Finish.
  6. 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
  7. 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.
    2. Change the name of the Variable to ZUID
    3. 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,””)
  8. 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
      3. Device Type
      4. ZENworks Agent Version
      5. Last Contact
    2. Rename each of the Column Headers to be friendly and match the previous screenshot.
    3. Hold down the CTRL key and select each of the Column Headers, then in the Properties pane select Static Text.
    4. Change the text font to use Bold.
    5. 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:

    6. 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:

  9. 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.
    2. Click the Device Name column in the detail band.
    3. In the Properties pane, select Appearance and change the foreground appears to Blue instead of Black.
    4. Select the Text Field tab of the Properties pane, and choose to Underline the text.
    5. Select the Hyperlink tab of the Properties pane.
    6. In the Link Target drop-down, select Blank.
    7. In the Link Reference Expression enter the following:
      IF(EXACT($F{ZENworks_System.Managed_Device_Status_zs.Device_Type_zs},"Workstation"),CONCATENATE("https://zennext.zenguru.info/zenworks/jsp/index.jsp?uid=",$V{ZUID},"&adminid=Devices&pageid=workstationDetails"),IF(EXACT($F{ZENworks_System.Managed_Device_Status_zs.Device_Type_zs},"Mobile Device"),CONCATENATE("https://zennext.zenguru.info/zenworks/jsp/index.jsp?uid=",$V{ZUID},"&adminid=Devices&pageid=mobileDeviceInfo"),IF(EXACT($F{ZENworks_System.Managed_Device_Status_zs.Device_Type_zs},"Server"),CONCATENATE( "https://zennext.zenguru.info/zenworks/jsp/index.jsp?uid=",$V{ZUID},"&__VIEWSTATEVERSIONGET=859&adminid=Devices&pageid=serverDetails"),"https://zenworks.zenguru.info")))
    8. Click the Preview tab to preview the results.
    9. Click the Play button when asked for Filter values.
    10. Click the arrow next to the disk button in the report pane and select Export to HTML.
    11. Save the file.
    12. Open a browser and login to ZCC with a valid admin credential.
    13. Open the report html file in a browser.
    14. Click on one of the device names. You should be taken to the device’s details in ZCC.
    15. Return to JasperStudio.
  10. Select File > Save.
  11. At the Export Report to JasperReports Server, choose Yes.
  12. Browse to the Folder you wish to save the report in and enter the Name as Device Details.
  13. Click Next.
  14. At the Resource List screen, click Next.
  15. At the Configure the data source screen, click Finish.
  16. 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.
  2. Select Create > Dashboard.
  3. In the Existing Content search field enter Devices By to filter the list.
  4. Drag the Devices by Type report onto the canvas.
  5. Click the Dashboard Properties icon and check the Show filter dashlet as pop-up folder.
  6. Under Filters expand Devices by Type and Platform and drag each of the filters onto the canvas.
  7. Right click Devices by Type and Platform Dashlet and select Properties.
  8. Select the Hyperlinks tab.
  9. Check Enable chart hyperlinks.
  10. In the Action dropdown, select Open new page.
  11. 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}
  12. This should look similar to this screen:

  13. Click OK.
  14. Now preview the dashboard by clicking the preview button  on the icon bar.
  15. 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.
  16. Click Cancel and close the new tab to return to the dashboard.
  17. Click Save and save this as Device Dashboard.
  18. Use the Repository browser to browse to your Device Details report.
  19. Right click the report and select Edit…
  20. Select Controls & Resources.
  21. Uncheck the Always prompt checkbox so that Prompts are displayed on startup.
  22. Change Display Mode to In Page so that users can see what the filters are when they are taken to the drilldown.
  23. Click Submit.
  24. 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.

Summary

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.

0 votes, average: 0.00 out of 50 votes, average: 0.00 out of 50 votes, average: 0.00 out of 50 votes, average: 0.00 out of 50 votes, average: 0.00 out of 5 (0 votes, average: 0.00 out of 5)
You need to be a registered member to rate this post.
Loading...

Tags: ,
Categories: Technical, ZENworks, ZENworks Reporting

2

Disclaimer: This content is not supported by Micro Focus. It was contributed by a community member and is published "as is." It seems to have worked for at least one person, and might work for you. But please be sure to test it thoroughly before using it in a production environment.

2 Comments

  1. By:HKO

    Above doesn’t work at our site.

Comment

RSS