Filter by Current User's Group

Sort:
You are not authorized to post a reply.
Author
Messages
MCordero
Basic Member
Posts: 10
Basic Member
    Our company is very new to Lawson (9.0.1.5..still currently not live), and I've been looking at Crystal Reports 2008 through LBI.

    Most of our reports need to be filtered based off what facility the current user is a part of. How do I go about pulling user's Facility Group and pass it as a parameter? Or, I suppose I should as a more general question of how do I pull a user's 'anything' to pass as a parameter?




    FireGeek21
    Veteran Member
    Posts: 84
    Veteran Member
      There is a couple ways you can filter... For example, if you are using the EMPLOYEE table and want to filter by COMPANY. You can go to Report -> Select Expert and enter the parameter there or you can use the Parameter Fields shown in View -> Field Explorer. The Parameter Fields are where you would set up a prompt for the user to enter a value when the report runs.

      Hope this helps.
      Chris Martin
      Veteran Member
      Posts: 277
      Veteran Member
        You can utilize the bursting functionality within LBI. After creating the Structure and Elements (ie Facility Group), you create the bursting Rights (ie Facility Group = 'x') for each user or, preferably, role. The Rights are then applied to the published report in LBI, which requires you to map the Elements to the related fields in the report.
        mark.cook
        Veteran Member
        Posts: 444
        Veteran Member
          The first key is to pull the data into the report. Secondly you then have the options like the others indicated of using LBI structures or Crystal Filters to provide only the needed data to each user.

          We do many reports which filter the data by employee user id, supervisor code, or other attibutes stored in MX. Those parameters are fed into the report, published on LBI and to the end user all they see is the correct data. The two examples above are the two schools of thought on how to produce bursted/filtered reports for users.
          MCordero
          Basic Member
          Posts: 10
          Basic Member
            The 'feeding the parameters into the report' part is what I don't know how to do.

            I figured I'd start with a simple report, no actual data, which just displays the parameter string. I see under Data Filtering > Customize Report Parameters, you can set a default value as well as hide the auto-prompt. That's about as far as I've gotten. I've seen reference to @CurrentUser, but i'm sure im missing steps besides just putting that in the default value. Also, just trying to set to auto prompt and hide it doesn't seem to be working. Every refresh asks for a value, and the text field is blank, even though I have a default value set inside it.
            amynelson
            Advanced Member
            Posts: 25
            Advanced Member
              If you pull the value Facility Group into the report somehow, not knowing what the report is going to look like, just it will need to be in the report. I doesn't need to show on the report, just somewhere in it. Then create Rights Management (i.e. Structure and Elements) with an Element called Facility Group and then assign each LBI user in Rights Mangement a valid value for the respective Facility Group(s) that they are allowed access to. You do not need to create any parameters in the report, just when you publish the report to LBI assign that Structure to the report and then tie the Element Facility Group to the field in the report Facility Group. When each user executes the report, LBI will then filter the data based on the users rights management. This is all seamless to the end user, they just see the data that they have rights to see.

              Hope this helps.
              MCordero
              Basic Member
              Posts: 10
              Basic Member
                I see what you're saying about using Rights Management to filter lawson data, however, we're planning on recreating all of our current reports (which are in Corvu) to Crystal Reports and use Lawson's Dashboard. Currently, we have to create 17-35 copies of each corvu report, with a different facility as a filter for each and control user access at login. All of these reports will be accessing databases other than Lawson's, so my hope was to be able to pass the user's facility as a parameter to a single report.
                David Williams
                Veteran Member
                Posts: 1127
                Veteran Member
                  The datasource of the report is not important to LBI - just as long as the data you want to filter on is in the report. If you're filtering the report to create 17-35 copies then the data used to filter must be available within the datasource? Include that data in the report and then apply the filtering rules explained above.
                  David Williams
                  amynelson
                  Advanced Member
                  Posts: 25
                  Advanced Member
                    With that being the case, I think your answer is going to be maybe some advanced java scripting, which of course is very technical and definitely not a delivered piece of LBI.
                    amynelson
                    Advanced Member
                    Posts: 25
                    Advanced Member
                      Let me rephrase that...Regardless of the datasource of the report, if the value of Facility Group is in the report, Rights Mangement works the same. If you want to pass parameter values to the reports, not using rights managment, for whatever reason, I have seen that done with advanced java scripting within Reporting Services. This is very technical and isn't supported by Lawson, so proceed with caution.
                      mark.cook
                      Veteran Member
                      Posts: 444
                      Veteran Member
                        It sounds like you need to create the 1 report (not 17-35 copies) most likely grouped by facility. You will publish that report and then use the filtering/bursting described to keep you out of maintance on all those reports.

                        John Henley
                        Senior Member
                        Posts: 3348
                        Senior Member

                          Posted By mark.cook on 05/28/2010 09:25 AM
                          It sounds like you need to create the 1 report (not 17-35 copies) most likely grouped by facility. You will publish that report and then use the filtering/bursting described to keep you out of maintance on all those reports.

                          Allow me to jump in (and excuse my blatant commercial plug), and provide a slightly different approach.

                          Based on numerous customer requests, I have developed a solution (called DecisionPoint) that provides a very simple end-user web interface to their specific reports (i.e. it has a security model), determines the parameters for the selected report, supports binding to the (Lawson or otherwise) database (as well as Lawson IOS) for dynamic parameters, etc. One of the driving reasons for developing this product was just what you are talking about...having the same report that needs to serve xx number of user groups, and not wanting to have to re-publish it xx times with different parameters, etc. No requirement for Crystal nor for LBI. Currently in "early adopter" phase. See attached for a preview...
                          Thanks for using the LawsonGuru.com forums!
                          John
                          MCordero
                          Basic Member
                          Posts: 10
                          Basic Member
                            Forgive me as yesterday would be the first day i've even seen Lawson Reporting Services.

                            After playing with databurst options more today, i'm pretty sure I understand what you guys are saying and how it should work. ( I only tried filter by UserID and didn't know what data structures were for, so I assumed I would have to pull the User's group some other way.) Unfortunately we don't have any actual Data Structures created, so i'll have to get with someone about creating a test one to be able to pull the Facility Element from it. Thank you guys so much for your help!
                            You are not authorized to post a reply.