How can I see the reports in which a specific view field is used?

Vefa Gulecyuz shared this question 3 years ago
Answered

Hey there, I want to remove a field from a view and I do not want this to create any problems in my reports because this field is used in some of the reports.

I already check one by one all the reports from that specific view and removed them. But the field is still grayed out in the view meaning that it is somehow used in a report/subquery/filter etc.

Is there a way to see where a specific field is used in the reports/subqueries/filters etc?

That can also be via repository database.


Application Version:8.0.4
Build:20191216
Java Version:1.8.0_252
Operating System:Linux 4.19.112+ (amd64)

Replies (7)

photo
1

Hi Vefa,

Thanks for reaching out to support with your question. I've found a query that may help in this case-

Find Reports by Column Name

SELECT ReportName FROM reportheader as h

WHERE ReportId in (

SELECT ReportId FROM .reportfield as f

INNER JOIN reportfieldtemplate as t

WHERE t.FieldTemplateId=f.FieldTemplateId

AND t.ColumnName="DEMOGRAPHIC");


Does this help to find where the field is being used?

Thanks,

Eric

photo
1

Hey Eric thanks for the query. This query works but it only shows the reports if a field is used as a column. If a field is used as a filter, it does not show the report.

And according to this query result, I am still unable to find what I am looking for. All the reports are correct, using the field I want.

I wrote another query that shows all the reports/subqueries from a specific view:

SELECT ReportName,* FROM reportheader as h

WHERE ReportId in (
SELECT ReportId FROM reportfield as f
INNER JOIN reportfieldtemplate as t on t.FieldTemplateId=f.FieldTemplateId 
) 
and reportstatuscode in ('OPEN','DRAFT') and viewid = 219533
Again, this query does not show anything new either.

The field that I want to remove does not exist in these reports, yet I am unable to remove that field from the view.

There must be a bug or maybe the field is still blocked by archived or deleted reports etc.

photo
1

Hi Vefa,

Thanks for the update,sorry the query didn't return the results you were looking for here. I assume there's a couple of table joins needed to link the filter field id with a report, so I'll do some research and see if I can get that query for you.

Thanks,

Eric

photo
1

Hey Simon, thanks for the reply. Sorry I was busy with other stuff.

As far as I see this query also brings reports that have a specific column in the report itself. (i.e if this field is in the select statement) but it does not show the reports where this field can be used as a filter.

I need a query that shows the reports/subqueries that use my target field in any part of the report/subquery query itself (it can be in select or where statement). Is this possible?

photo
1

Hi Simon, thanks for the reply. This is exactly what I needed. However, even though I checked everything one by one, I could not find it in any reports/subqueries, yet that field is still in use somehow.

I think we can close this ticket. The problem must be somewhere else.

Thanks a lot!

photo
1

Hi Simon, the original problem is still the same as it is described in the original post.

Basically, I want to remove a field from a view. But that field is used in some reports, so it is greyed out when I edit the view. I can not remove it. I checked all the reports/subqueries one by one from that view, none of them is seemingly using that field. But it is still greyed out, I can not remove it.

I suspected that YF is somehow not showing correctly in the edit view, so I wanted to see everything related to that field in the database. This is why I have requested above queries.

As a last resort, I will import/export the same view without that field. But I want to check everything possible before doing this.

photo
1

Hey Simon thanks, I did not have a chance to try workaround solutions yet. You can close the ticket, thanks for the help!

Leave a Comment
 
Attach a file