Dashboard Tabs
Answered
Hi,
I am trying to run a query on YF repository in order to retrieve all the dashboards tabs.
SELECT *
FROM dbo.ReportGroup
WHERE StatusCode = 'OPEN'
AND GroupTypeCode = 'SUBTAB'
Although i filter on status open i get multiple records for every tab showing the tab's change history.
how can i filter the current open tab record and how can i link between the SUBTAB record to the Dashboard record?
Thanks!
Hi Tal,
I believe that you may have had this code before
This should show all reports that are on dashboards as well as the type of dashboard and if it is on a sub-tab.
If the sub-tab value is null it isn't a sub-tab
SELECT
RG2.ShortDescription AS 'Dashboard'
, RG2.GroupTypeCode AS 'Type'
, CASE WHEN RG1.ShortDescription <> 'New Tab' THEN RG1.ShortDescription END AS 'Sub Tab'
, ReportHeader.ReportId AS 'Report Id'
, ReportHeader.ReportName AS 'Report'
FROM ReportHeader
LEFT OUTER JOIN ReportGroupEntity RGE1
ON RGE1.EntityId = ReportHeader.ReportId
AND RGE1.EntityTypeCode = 'REPORT'
LEFT OUTER JOIN ReportGroup RG1
ON RG1.GroupId = RGE1.GroupId
LEFT OUTER JOIN ReportGroupEntity RGE2
ON RGE2.EntityId = RG1.GroupId
LEFT OUTER JOIN ReportGroup RG2
ON RG2.GroupId = RGE2.GroupId
WHERE ReportHeader.ReportStatusCode = 'OPEN'
AND RG1.StatusCode = 'OPEN'
AND RG2.StatusCode = 'OPEN'
I think this was discussed with you in http://community.yellowfin.bi/agent/object/2370
Thanks,
Pete
Hi Tal,
I believe that you may have had this code before
This should show all reports that are on dashboards as well as the type of dashboard and if it is on a sub-tab.
If the sub-tab value is null it isn't a sub-tab
SELECT
RG2.ShortDescription AS 'Dashboard'
, RG2.GroupTypeCode AS 'Type'
, CASE WHEN RG1.ShortDescription <> 'New Tab' THEN RG1.ShortDescription END AS 'Sub Tab'
, ReportHeader.ReportId AS 'Report Id'
, ReportHeader.ReportName AS 'Report'
FROM ReportHeader
LEFT OUTER JOIN ReportGroupEntity RGE1
ON RGE1.EntityId = ReportHeader.ReportId
AND RGE1.EntityTypeCode = 'REPORT'
LEFT OUTER JOIN ReportGroup RG1
ON RG1.GroupId = RGE1.GroupId
LEFT OUTER JOIN ReportGroupEntity RGE2
ON RGE2.EntityId = RG1.GroupId
LEFT OUTER JOIN ReportGroup RG2
ON RG2.GroupId = RGE2.GroupId
WHERE ReportHeader.ReportStatusCode = 'OPEN'
AND RG1.StatusCode = 'OPEN'
AND RG2.StatusCode = 'OPEN'
I think this was discussed with you in http://community.yellowfin.bi/agent/object/2370
Thanks,
Pete
Hello,
This is likely dependent on the database you are using (for formatting) but you should be able to select unique or top1 records for each type
If you can tell us what database you are using, we can give you better SQL commands! :)
I hope that helps,
Best regards,
Pete
Hello,
This is likely dependent on the database you are using (for formatting) but you should be able to select unique or top1 records for each type
If you can tell us what database you are using, we can give you better SQL commands! :)
I hope that helps,
Best regards,
Pete
Hi Tal,
I believe that you may have had this code before
This should show all reports that are on dashboards as well as the type of dashboard and if it is on a sub-tab.
If the sub-tab value is null it isn't a sub-tab
SELECT
RG2.ShortDescription AS 'Dashboard'
, RG2.GroupTypeCode AS 'Type'
, CASE WHEN RG1.ShortDescription <> 'New Tab' THEN RG1.ShortDescription END AS 'Sub Tab'
, ReportHeader.ReportId AS 'Report Id'
, ReportHeader.ReportName AS 'Report'
FROM ReportHeader
LEFT OUTER JOIN ReportGroupEntity RGE1
ON RGE1.EntityId = ReportHeader.ReportId
AND RGE1.EntityTypeCode = 'REPORT'
LEFT OUTER JOIN ReportGroup RG1
ON RG1.GroupId = RGE1.GroupId
LEFT OUTER JOIN ReportGroupEntity RGE2
ON RGE2.EntityId = RG1.GroupId
LEFT OUTER JOIN ReportGroup RG2
ON RG2.GroupId = RGE2.GroupId
WHERE ReportHeader.ReportStatusCode = 'OPEN'
AND RG1.StatusCode = 'OPEN'
AND RG2.StatusCode = 'OPEN'
I think this was discussed with you in http://community.yellowfin.bi/agent/object/2370
Thanks,
Pete
Hi Tal,
I believe that you may have had this code before
This should show all reports that are on dashboards as well as the type of dashboard and if it is on a sub-tab.
If the sub-tab value is null it isn't a sub-tab
SELECT
RG2.ShortDescription AS 'Dashboard'
, RG2.GroupTypeCode AS 'Type'
, CASE WHEN RG1.ShortDescription <> 'New Tab' THEN RG1.ShortDescription END AS 'Sub Tab'
, ReportHeader.ReportId AS 'Report Id'
, ReportHeader.ReportName AS 'Report'
FROM ReportHeader
LEFT OUTER JOIN ReportGroupEntity RGE1
ON RGE1.EntityId = ReportHeader.ReportId
AND RGE1.EntityTypeCode = 'REPORT'
LEFT OUTER JOIN ReportGroup RG1
ON RG1.GroupId = RGE1.GroupId
LEFT OUTER JOIN ReportGroupEntity RGE2
ON RGE2.EntityId = RG1.GroupId
LEFT OUTER JOIN ReportGroup RG2
ON RG2.GroupId = RGE2.GroupId
WHERE ReportHeader.ReportStatusCode = 'OPEN'
AND RG1.StatusCode = 'OPEN'
AND RG2.StatusCode = 'OPEN'
I think this was discussed with you in http://community.yellowfin.bi/agent/object/2370
Thanks,
Pete
Hello Tal,
I think we have covered everything in this ticket, so I'm going to close it down.
If you are still having problems, please reply here or open a new ticket.
Have a great day!
Best regards,
Pete
Hello Tal,
I think we have covered everything in this ticket, so I'm going to close it down.
If you are still having problems, please reply here or open a new ticket.
Have a great day!
Best regards,
Pete
Replies have been locked on this page!