Client Management Suite

 View Only
  • 1.  Custom Drilldown Report by raw SQL

    Posted Feb 12, 2016 03:40 AM

    Hi all, 

    I am using CMS 7.6 which is installed on Windows Server 2012 R2. I am assigned to create a custom endpoint report with drilldown details of installed software.

    In the Data Source tab of custom report, I have written the following SQL query:

    SELECT 

    [iaai].[_ResourceGuid] AS [_ItemId],

    [iaai].[Name],

    [iaai].[FQDN],

    [iaai].[System Type],

    [iaai].[OS Name],

    [iaai].[Last Logon User]

    FROM

    Inv_AeX_AC_Identification iaai

    ORDER BY [iaai].[Name]

    In the Drilldowns tab, I have the following configuration:

    ScreenHunter_105 Feb. 12 15.59.jpg

    For the child report which runs drilldown action, I have written the following SQL query:

    DECLARE @v1_DrillTemp2 uniqueidentifier
       SET @v1_DrillTemp2 = '00000000-0000-0000-0000-000000000000'


    SELECT

    [iarp].[_ResourceGuid] AS [_ItemId],

    [iarp].[DisplayName],

    [iarp].[DisplayVersion],

    [iarp].[Publisher],

    [iarp].[InstallDate]

    FROM

    Inv_AddRemoveProgram iarp

    WHERE [iarp].[_ResourceGuid] = @v1_DrillTemp2

    ORDER BY [iarp].[DisplayName]

    I have also added a query parameter for child report as below:

    ScreenHunter_106 Feb. 12 16.07.jpg

    After saving changes of two reports, I open the custom endpoint report and test the drilldown action by double-click the endpoint name. The drill down action is successful but the child report is shown without any data result. What steps I need to do so that the data can be shown in the child report after running the drill down action in the custom report?



  • 2.  RE: Custom Drilldown Report by raw SQL
    Best Answer

    Broadcom Employee
    Posted Feb 12, 2016 08:55 AM
      |   view attached

    Hi brainCamida,

    1. Seems like you've forgot to check "Parameter Required" for drilldown query parameter report.

    2. I've done some little changes and I see that it works fine on my CMS 7.6 HF7.

    If you want, you can import attached report and check how it will works on your side)

    Parent report

    SELECT
    
    [iaai].[_ResourceGuid] AS 'Computer Guid',
    
    [iaai].[Name],
    
    [iaai].[FQDN],
    
    [iaai].[System Type],
    
    [iaai].[OS Name],
    
    [iaai].[Last Logon User]
    
    FROM
    
    Inv_AeX_AC_Identification iaai
    
    ORDER BY [iaai].[Name]

    Drilldown report

     SELECT
    
    [_ResourceGuid] ,
    
    [iarp].[DisplayName],
    
    [iarp].[DisplayVersion],
    
    [iarp].[Publisher],
    
    [iarp].[InstallDate]
    
    FROM
    
    Inv_AddRemoveProgram iarp
    
    WHERE [_ResourceGuid] = '%Computer Guid%'
    
    ORDER BY [iarp].[DisplayName]

     

    Thanks,

    IP.

    Attachment(s)

    xml
    For brainCamida.xml   22 KB 1 version


  • 3.  RE: Custom Drilldown Report by raw SQL

    Posted Feb 15, 2016 02:36 AM
      |   view attached

    Hi IP,

    I have imported your attached report and it works! Your changes make me know where my mistake is. 

    I may confuse with variable declaration so I make change on it.

    Before:

    DECLARE @v1_DrillTemp2 uniqueidentifier
       SET @v1_DrillTemp2 = '00000000-0000-0000-0000-000000000000'

    After:

    DECLARE @v1_DrillTemp2 uniqueidentifier
       SET @v1_DrillTemp2 = '%DrillTemp2%'

    I have still no check on "Parameter Required" for drilldown query parameter report but it still show the results. FYI, I have attached my report and you may check it if you are free.

    Thank you very much for your effort,

    brainCamida

    Attachment(s)

    xml
    Drilldown Test.xml   35 KB 1 version


  • 4.  RE: Custom Drilldown Report by raw SQL

    Broadcom Employee
    Posted Feb 15, 2016 05:21 AM

    I've checked your "Drilldown test.xml" on CMS 7.6 HF7 released build and I see that it works now.

    Glad to help!



  • 5.  RE: Custom Drilldown Report by raw SQL

    Posted Feb 16, 2016 02:01 PM

    interesting. I need to learn drill down reports... 

    {subscribed}



  • 6.  RE: Custom Drilldown Report by raw SQL

    Posted Feb 25, 2016 11:20 AM

    I agree @TeleFragger, me too! This is helpful thank you