Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Working through this, most fields are self explanatory.

report_name is the name fo for the report query as it appears on the screen and in the menu.

report_display_in_menu determines if the report should be shown in the menu. Certain reports queries are not designed to be displayed int he in the menu. Specific Software is one example. You need to provide a software_id to this report. It is designed to be called form the Installed Software report.

...

column_id is the numeric order of the column on the displayed report query page.

column_name is the header value for the column.

...

The other join that should appear in a report_sql statement is the group join. In order to run a report query on a particular group, the group id is passed for you by the front-end and you can reference it via @group. You need to create a join like thus:

...

Code Block
languagesql
WHERE oa_group_sys.group_id = @group

Loading the Query

Once you have created your XML definition you can get it into Open-AudIT in one of two ways. You can save the file to /open-audit/code_igniter/application/controllers/reports/queryname.xml and then go to menu -> Admin -> Queries -> Activate Query. If all is correct, it should appear in the list and be able to be activated by clicking the 'tick' icon on the right side.

You can alternately copy the XML contents and insert it into the text box on the menu -> Admin -> Queries -> Import Query page. 

Once you have added the query to Open-AudIT, it should appear in the menu under Queries when you view a Group.

You can upload, test the query and if it's not working as intended, delete it via menu -> Admin -> Queries -> List Queries. Make your changes and upload/activate the query again. Test, rinse, repeat (smile)

And don't forget - you can always post to the forums and ask for help!

...