CA Service Management

  • 1.  Sql Query is not working properly

    Posted Feb 17, 2019 02:37 PM

    This below Query is working fine in SQL and Jasper Studio Main report but when adding table using this  query in jasper Studio query data showing three times.

     

    SELECT dbo.pri.sym,
    COUNT(*) AS Priority_cnt
    FROM dbo.call_req
    INNER JOIN dbo.pri ON
    dbo.pri.enum = dbo.call_req.priority
    INNER JOIN dbo.prob_ctg ON
    dbo.prob_ctg.persid = dbo.call_req.category
    WHERE
    dbo.prob_ctg.sym LIKE 'Application ISU%'
    AND dbo.call_req.status = 'CL'
    GROUP BY dbo.pri.sym

     

    Please help me with a proper solution.

    Regards,

    Saikat Das



  • 2.  Re: Sql Query is not working properly

    Broadcom Employee
    Posted Feb 18, 2019 04:20 AM

    Hi Siladitya

    ,

     

    The query within the jasper studio is no recognizing it as a valid query. However, can you tweak your query and add a DISTINCT keyword to wrap the existing query and display the results? Let me know if this helps?



  • 3.  Re: Sql Query is not working properly

    Posted Feb 18, 2019 04:30 AM

    Can you add a screenshot showing the behaviour that you are seeing?



  • 4.  Re: Sql Query is not working properly

    Posted Feb 18, 2019 09:47 AM

    Report output showing like this



  • 5.  Re: Sql Query is not working properly
    Best Answer

    Posted Feb 18, 2019 09:40 PM

    I wonder if you have placed the table in a 'band' that is linked to another query that currently returns 3 records?

    Try placing the table in a 'Summary' band, and/or use a query that returns one record as the query for the master report - such as 'select count(*) from dbo.pri as pri_count'.

    Regards,

    James



  • 6.  Re: Sql Query is not working properly

    Posted Feb 19, 2019 09:39 AM

    Thanks foe your kind information. This issue on details band when it put in summary it working fine.