Menu

Restrict Report Info

Help
2006-08-25
2013-04-24
  • Jim Blansett

    Jim Blansett - 2006-08-25

    I would like to be able to restrict report info to each individual user.  It appears that, at this time, any user can run a report on any person on the list.  Am I missing something? (I mean besides a high-functioning mind.)

    Jim

     
    • Anonymous

      Anonymous - 2006-08-29

      I too would like to know.  I'm told by the author that someone in this fourm found a way to do it, but he has not posted such instructions.

      This would be very helpful to know.

      -Kreg

       
    • Anonymous

      Anonymous - 2006-08-29

      I can make a personal donatinto the project if this helps to encourage support for such a featuer.

      If I can prove the software to the company, then there is good chance I can get the company to make a donation (obvioiusly bigger) to support this as well.

      -Kreg
      Direct Communications

       
    • pappyzan

      pappyzan - 2006-08-30

      this would be nice to have as an option, but since that's not really possible without someone issuing another release, it can be hardcoded in the reports you want to run.

      In order for this fix to work, 2 specific variables must be set to "yes" in config.inc.php, $username_dropdown_only must be set to "yes", and $use_reports_password must be set to "yes".

      now take a look at /reports/timerpt.php (the Daily Time Report). anywhere you see these lines (you should see them twice):

      if ($username_dropdown_only == "yes") {
      $query = "select * from employees order by empfullname asc";

      change the $query line to look like this:

      $query = "select * from employees where empfullname = '".$_SESSION["valid_reports_user"]."' order by empfullname asc";

      do the same in /reports/total_hours.php (the Hours Worked Report).

      again, this isn't the *best* way to do it since it really should be a configurable option in config.inc.php, but it should do the trick.

      ken

       
      • Jim Blansett

        Jim Blansett - 2006-08-30

        Ken, I gave this a quick try and then attempted to run a "daily" report (for a user who has no time, at this point).  This message was returned:
        Parse error: parse error, expecting `']'' in /xxxxxxxxxxxxx/reports/timerpt.php on line 59

        A mistake on my part?  Or?

        Jim

         
      • Jim Blansett

        Jim Blansett - 2006-08-30

        Man, I wish I could get my act together, this morning.  :-(

        Even though the error message was returned, I was able to get a daily report, nonetheless.

        Jim

         
    • pappyzan

      pappyzan - 2006-08-30

      you may need single quotes within the brackets instead of double quotes.

      ken

       
    • Jim Blansett

      Jim Blansett - 2006-08-30

      Okay, Ken, a further report.  When I try to run a "daily time report" I get this error message:

      Warning: mysql_free_result(): supplied argument is not a valid MySQL result resource in /xxxxxxxxxxxx/reports/timerpt.php on line 73

      When I try to run an "hours worked report" I get this error message:

      Warning: mysql_free_result(): supplied argument is not a valid MySQL result resource in /xxxxxxxxxx/reports/total_hours.php on line 74

      I guess I should include that, when I attempt to run an "Audit Log" report, I get no error message and the report runs fine.

      I wonder if anybody else is having this difficulty.

      Jim

       
    • Anonymous

      Anonymous - 2006-08-30

      Sounds like you are at least making progress Jim.  Please keep us posted.  I will try the above lines as well.

      -Kreg

       
      • Jim Blansett

        Jim Blansett - 2006-08-31

        Well, we can run reports and restrict reports to individuals, now.  We can thank Ken for that.  That there is a minor display showing an error, at certain actions, is really inconsequential.

        Thanks, Ken, for keeping your ear to the ground with your "baby" here.  It's great to witness how it's grown!

        Jim

         
        • pappyzan

          pappyzan - 2006-08-31

          jim, i still am unable to recreate the error being displayed. i've changed the double quotes within the brackets to single quotes, but still that doesn't produce an error here either.

          ken

           
          • Jim Blansett

            Jim Blansett - 2006-08-31

            Well, no wonder you can't duplicate the problem - it doesn't exist.

            Suspecting I might have yet another typo, I went back and did a "cut-n-paste" on the code you provided.  I then changed from " to ' in all the changes, as you had suggested.  Now, the program functions just as it should - and NO error messages.

            Sorry for causing you all the trouble I have, Ken.  My sincerest apologies.

            Jim

             
    • Anonymous

      Anonymous - 2006-09-02

      can we just make it easy on use lamers and release a 1.03.000001  or something?

      maybe a cvs update?

      -kreg

       
    • Anonymous

      Anonymous - 2006-10-18

      Any follow up to this feature?  As far as I can tell, this is really the only thing holding me down on this application.  We have been using this application for 2 months now and we love it.  However I have some employees commenting about people since they can see other peoples hours.

      Can I at least find out if this is planned for a next release?

      -Kreg

       
    • Anonymous

      Anonymous - 2006-10-19

      I've made the changes suggested above, however it doesn't seem to do anything.  The user can still choose "ALL" and display all users hours.

      -Kreg

       
    • Anonymous

      Anonymous - 2006-11-02

      anyone?

       
    • Jim Blansett

      Jim Blansett - 2006-11-02

      It's been awfully quiet here since we acquired new project leaders.  Oh, how I long for the days when Ken answered questions nearly instantaneously.

      Sadly, I fear support for this wonderful project has gone the way of the Model A Ford.

       
    • Anonymous

      Anonymous - 2006-11-03

      and Pepsi Clear

       
      • Jim Blansett

        Jim Blansett - 2006-11-03

        You're showing your age.  ;-)

         

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.