none
assign dataset to a textbox?

    Question

  • I am creating a security system so different each users can see different reports. I Have them in a table. In a dataset I can retrieve all the information. At the first page are all the links to the different reports. I would like to llok at the dataset to know if the connected user is authorized to see a report, to show or not the links. The easiest way to do it is to link the textbox that works as a button to the dataset and in the visibility expression say if either the button should be shown or not, but I have not been able to do this. I have also thought of a custom program in C#, but I would like to know id there is an easier way to get it.
    Tuesday, July 21, 2009 9:40 AM

Answers

  • You are right Jerry. Sorry.

    I have created two tables. One for users and another one for groups. Permissions are asigned at group level and both tables are related through the field GroupID, which in the group table is PK and in the users table is FK. In the group table I assign different fields to different screens and I assign through a boolean if a group has permission on the screens.

    At the initial page I get information of a dataset provided by both tables to know the rights of different screens. And I apply a filter so that the field user or the table users must be equal to User!UserID. Afterwards I just assign a expression to buttons at visibility property.

    =Not(CBOOL(First(Fields!ListaIndicadoresPorConcesionarios.Value, "Permisos")))

    It works with First because there is always just one row for each user.

    • Marked as answer by Joan Ferrer Friday, January 08, 2010 9:15 AM
    Friday, January 08, 2010 9:15 AM

All replies

  • Hi ,
    Please put your doubt in clear way ,its bit confusing and not easy to get waht you want specifically.

    Thanks,
    Mahasweta

    Mahasweta das
    Tuesday, July 21, 2009 11:48 AM
  • you are right, Mahasweta, I was trying to do things too fast. Sorry. Anyway I have solved it. Such an easy solution that it doesn't worth writting it and other people reading it.

    thanks, next time I gonna try to improve
    Tuesday, July 21, 2009 1:07 PM
  • Hi Joan,

     

    Glad to see the issue is resolved by yourself. However, you are encouraged to POST out the solution and mark it as answer, which can benefit other people having the same issue.

     

    Thanks,

    Jerry

    Thursday, July 23, 2009 2:21 AM
  • You are right Jerry. Sorry.

    I have created two tables. One for users and another one for groups. Permissions are asigned at group level and both tables are related through the field GroupID, which in the group table is PK and in the users table is FK. In the group table I assign different fields to different screens and I assign through a boolean if a group has permission on the screens.

    At the initial page I get information of a dataset provided by both tables to know the rights of different screens. And I apply a filter so that the field user or the table users must be equal to User!UserID. Afterwards I just assign a expression to buttons at visibility property.

    =Not(CBOOL(First(Fields!ListaIndicadoresPorConcesionarios.Value, "Permisos")))

    It works with First because there is always just one row for each user.

    • Marked as answer by Joan Ferrer Friday, January 08, 2010 9:15 AM
    Friday, January 08, 2010 9:15 AM