Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

Reports

Help
2004-10-04
2013-05-30
  • 1. Is there a way of suppressing the display of unwanted fields in Reports? For local reasons (data protection/privacy) I do not require the following fields to be displayed in Report List 6:
    Address1 / Address2 / Home Phone / Work Phone / Email
    in the list of headers --
    Last Name/First Name/Address1/Address2/Home Phone/Work Phone/Email/Grade/Barcode/Title/Author/Status/Status Begin Date/Due Back Date/Days Late

    Reports / Report List / 6. Over Due Member List:
    Report Search Criteria (optional)
    Criteria 1: Date due back / < or = / 2004-10-04

    I tried in the /reports/ directory and also overdueList.xml in /reportdefs/ but could not seem to track where to edit out the headings.

    2. Are there problems with the Days late option in Reports? I keep getting an error message, irrepective of what values I enter.

    Reports / Report List / 6. Over Due Member List:
    Report Search Criteria (optional)
    Criteria 1: Days late / > /  1
    Run report then gives the following error message:
    Error running report.

    Thanks again for the help!
    chris dot dagleish at gmx dot de

     
    • Micah Stetson
      Micah Stetson
      2004-10-04

      1.  You remove the fields you don't want from the select clause in .../reports/reportdefs/overdueList.xml.  For the case you describe, just delete the lines with member.address1, member.address2, member.home_phone, member.work_phone, and member.email.  The report code takes the list of columns directly from the MySQL result, it gets the names by passing the MySQL column names through the text translation routines.

      2. This is a bug.  The column names to be used in the where clause of the query are gotten by asking the database the name of a result column.  But the result column names may be aliases defined in the select statement, and MySQL will not allow such aliases to be used in the where clause.  The general fix is non-trivial and ugly: make the code completely understand the syntax and symantics of MySQL's SQL.  I think we probably need to rethink the report system to avoid this altogether, but that's not something I can work on right now.

      Micah

       
      • Thank you, Micah! I had already tried what you suggested below but unfortunately the fields are still displayed (and if I delete the German translation, I merely get the Original English). Originally I just used a plain editor to edit out the unwanted fields, but yesterday I tried it again with Phase5, but with no difference in the result. Or do I need something special to edit the XML file?

        Does this method work on your system? If so, perhaps I have edited out something important from some other dependent file?!

        Any further advice gratefully received!

        1. You remove the fields you don't want from the select clause in .../reports/reportdefs/overdueList.xml. For the case you describe, just delete the lines with member.address1, member.address2, member.home_phone, member.work_phone, and member.email. The report code takes the list of columns directly from the MySQL result, it gets the names by passing the MySQL column names through the text translation routines.

        Thanks again for the help!
        chris dot dagleish at gmx dot de

         
        • Micah Stetson
          Micah Stetson
          2004-10-12

          Yes, I just tried it and it works for me.  Also, you really shouldn't need anything special to edit the files -- I always just use a text editor.

          I'm not certain what you could edit that would cause unlisted fields to be displayed.  Unless you're running some add-on that messes with the reports system, I don't see how fields that aren't in the select query could appear in the results.  If there is any way for that to happen, it's a bug.

          I don't want to insult you by asking you questions that might seem obvious to you, but sometimes all of us overlook things.  Are you sure you're editing the XML on the server and not just on your own computer?  Is it possible you saved the new report under a different name, but are still looking at the old version?  If you put your changes into a new report file, did you change the report's ID?

          If you add a field to the select clause (i.e. biblio.call_nmbr1), does the new field display?

          Micah

           
    • Thank you for your patience! It is now working fine, though I cannot explain why ...

      I deleted (or rather checked in) my overdue example to start afresh and suddenly it all worked a treat with the unwanted fields (and reports) removed. Cache?? I understand too little of these things ... Anyway, I am relieved it is all working!

      Thanks again!

      chris dot dagleish at gmx dot de

       
      • Micah Stetson
        Micah Stetson
        2004-10-12

        It must have been some sort of cache issue.  I'm glad it's working now.

        Micah

         
      • When editing reports I noticed that changes become active after refreshing the Report List.
        This could be the explanation for Chris' changes to appear after checking in and returning to the reports tab.