February 13, 2019 at 12:08 pm
I want to only display a subreport on a report if the user is part of a specific AD group. I thought I could do this by only allowing specific AD groups access to the subreport itself, however if a user which is not in that AD Group runs the report they get the "Subreport could not be shown" error in the parent report which I want to avoid. Is there a way of doing this without showing this text on the parent report. I think you may be able to do it using any custom assemblies but I'd rather not do this if I can get away with it.
February 13, 2019 at 1:21 pm
martin.griffiths 83810 - Wednesday, February 13, 2019 12:08 PMI want to only display a subreport on a report if the user is part of a specific AD group. I thought I could do this by only allowing specific AD groups access to the subreport itself, however if a user which is not in that AD Group runs the report they get the "Subreport could not be shown" error in the parent report which I want to avoid. Is there a way of doing this without showing this text on the parent report. I think you may be able to do it using any custom assemblies but I'd rather not do this if I can get away with it.
The only way to do this would be to have a query for the main report that returns whether or not the current user is a member of the appropriate global group, and the user would be the parameter to that dataset. The result from that dataset would have to be part of the Hidden property for the subreport.
Steve (aka sgmunson) 🙂 🙂 🙂
Rent Servers for Income (picks and shovels strategy)
February 13, 2019 at 1:40 pm
sgmunson - Wednesday, February 13, 2019 1:21 PMmartin.griffiths 83810 - Wednesday, February 13, 2019 12:08 PMI want to only display a subreport on a report if the user is part of a specific AD group. I thought I could do this by only allowing specific AD groups access to the subreport itself, however if a user which is not in that AD Group runs the report they get the "Subreport could not be shown" error in the parent report which I want to avoid. Is there a way of doing this without showing this text on the parent report. I think you may be able to do it using any custom assemblies but I'd rather not do this if I can get away with it.The only way to do this would be to have a query for the main report that returns whether or not the current user is a member of the appropriate global group, and the user would be the parameter to that dataset. The result from that dataset would have to be part of the Hidden property for the subreport.
So to have a dataset that does an adsi query may be to see if User!UserId is part of that AD Group and return a Yes or No, then, we can provide full access to all users to the subreport but hide the subreport if the result of the dataset is No?
February 13, 2019 at 1:48 pm
martin.griffiths 83810 - Wednesday, February 13, 2019 1:40 PMsgmunson - Wednesday, February 13, 2019 1:21 PMmartin.griffiths 83810 - Wednesday, February 13, 2019 12:08 PMI want to only display a subreport on a report if the user is part of a specific AD group. I thought I could do this by only allowing specific AD groups access to the subreport itself, however if a user which is not in that AD Group runs the report they get the "Subreport could not be shown" error in the parent report which I want to avoid. Is there a way of doing this without showing this text on the parent report. I think you may be able to do it using any custom assemblies but I'd rather not do this if I can get away with it.The only way to do this would be to have a query for the main report that returns whether or not the current user is a member of the appropriate global group, and the user would be the parameter to that dataset. The result from that dataset would have to be part of the Hidden property for the subreport.
So to have a dataset that does an adsi query may be to see if User!UserId is part of that AD Group and return a Yes or No, then, we can provide full access to all users to the subreport but hide the subreport if the result of the dataset is No?
That's the idea... I'm not aware of any other way to do it, although I'd be happy to be corrected...
Steve (aka sgmunson) 🙂 🙂 🙂
Rent Servers for Income (picks and shovels strategy)
February 13, 2019 at 2:23 pm
sgmunson - Wednesday, February 13, 2019 1:48 PMmartin.griffiths 83810 - Wednesday, February 13, 2019 1:40 PMsgmunson - Wednesday, February 13, 2019 1:21 PMmartin.griffiths 83810 - Wednesday, February 13, 2019 12:08 PMI want to only display a subreport on a report if the user is part of a specific AD group. I thought I could do this by only allowing specific AD groups access to the subreport itself, however if a user which is not in that AD Group runs the report they get the "Subreport could not be shown" error in the parent report which I want to avoid. Is there a way of doing this without showing this text on the parent report. I think you may be able to do it using any custom assemblies but I'd rather not do this if I can get away with it.The only way to do this would be to have a query for the main report that returns whether or not the current user is a member of the appropriate global group, and the user would be the parameter to that dataset. The result from that dataset would have to be part of the Hidden property for the subreport.
So to have a dataset that does an adsi query may be to see if User!UserId is part of that AD Group and return a Yes or No, then, we can provide full access to all users to the subreport but hide the subreport if the result of the dataset is No?
That's the idea... I'm not aware of any other way to do it, although I'd be happy to be corrected...
Thanks. I'll give that a go and let you know how I get on.
Viewing 5 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic. Login to reply