cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
PieInDaFace Frequent Visitor
Frequent Visitor

Disable Commenting on PowerBI Report Server

Wondering if there is a way to prevent commenting on a desktop report. Looking at the table dbo.upgradeinfo (within the reportserver - database), there is a item called "enablecomments" with a status of True. Tried to replace with a false, but once I bounce the website, the value is restored. Dont know if this even refers to commenting on a desktop report, but was wondering if anybody has came across this and knows of a solution. 

 

Thanks.

1 ACCEPTED SOLUTION

Accepted Solutions
PieInDaFace Frequent Visitor
Frequent Visitor

Re: Disable Commenting on PowerBI Report Server

Okay... so this is a dirty solution, but ended up putting in a trigger on the comments table of which desktop reports I dont want to allow commenting. Below is the *cough* "solution", which we also capture the comment and user name to have it send via email. If a user does attempt to submit a comment, they will receive the error message "An error has occurred. Something went wrong. Please try again later.". I believe the error is a result to not sending anything back from the post. Out of curiosity I imagine if you didn't want the error message, you could have the stored procedure "GetCommentByCommentID" return false data.


declare @commentid int, @comment varchar(2048), @username varchar(260

 

if (select count(*) from dbo.[Catalog] a
join inserted b on a.ItemID = b.ItemID
where Name like '%your condition%') > 0


begin


select @commentid = a.commentid,@comment = a.[Text], @username = coalesce(b.UserName,'Unknown') from inserted a
left join dbo.Users b on a.UserID = b.UserID

exec dbo.DeleteComment @commentid


end

 

View solution in original post

3 REPLIES 3
PieInDaFace Frequent Visitor
Frequent Visitor

Re: Disable Commenting on PowerBI Report Server

Okay... so this is a dirty solution, but ended up putting in a trigger on the comments table of which desktop reports I dont want to allow commenting. Below is the *cough* "solution", which we also capture the comment and user name to have it send via email. If a user does attempt to submit a comment, they will receive the error message "An error has occurred. Something went wrong. Please try again later.". I believe the error is a result to not sending anything back from the post. Out of curiosity I imagine if you didn't want the error message, you could have the stored procedure "GetCommentByCommentID" return false data.


declare @commentid int, @comment varchar(2048), @username varchar(260

 

if (select count(*) from dbo.[Catalog] a
join inserted b on a.ItemID = b.ItemID
where Name like '%your condition%') > 0


begin


select @commentid = a.commentid,@comment = a.[Text], @username = coalesce(b.UserName,'Unknown') from inserted a
left join dbo.Users b on a.UserID = b.UserID

exec dbo.DeleteComment @commentid


end

 

View solution in original post

Community Support Team
Community Support Team

Re: Disable Commenting on PowerBI Report Server

@PieInDaFace,

 

Thanks for sharing the information.

Community Support Team _ Sam Zha
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Highlighted
kiwipeet Frequent Visitor
Frequent Visitor

Re: Disable Commenting on PowerBI Report Server

Yeah I'd really appreciate the capability of turning this off globally as well. If you want to drive people through the portal, then allowing content editors the ability to edit/delete/suppress comments would be useful.

Helpful resources

Announcements
October 2019 Community Highlights

October 2019 Community Highlights

October was a busy month in the community. Read the recap article to learn about some of the events and content.

New Badges

Incoming: New and Improved Badges

Exciting news: We've given our badges an overhaul and added brand news ones.

Ask Amir Anything

Exclusive LIVE Community Event No. 2 – Ask Amir Anything

Next in our Triple A series: Ask Amir Netz questions about the latest updates, features and future.

Analytics in Azure virtual event

Analytics in Azure virtual event

Experience a limitless analytics service built to ingest, prep, manage, and serve data for immediate use in Power BI.

Users Online
Currently online: 306 members 3,172 guests
Please welcome our newest community members: