Visual Report Editor Exercise

Objectives:

  1. To explore the features of RBF Visual Report Editor.
  2. To produce printed output from the Library database.
The aim in this exercise is to design and develop a report that lists details for current book loans. When executing the report, the user is to be prompted for a borrower# and then the following details are to be printed for that borrower:- borrower#, borrower_name, borrower_status, accession#, loan_date, and title.

(remember you may have different attribute identifiers) Should the user enter '%'when prompted for the borrower#, then all outstanding loans for all the borrowers are to be included in the report.

IMPORTANT

THERE IS A KNOWN BUG IN INGRES. IF YOU BACK OUT OF THE INITIAL EDIT SESSION OF RBF AND THEN GO BACK INTO EDIT MODE THE REPORT WILL NOT WORK. A PATCH IS ON ITS WAY. THIS MEANS YOU SHOULD NOT BACK OUT OF THE FIRST EDIT SESSION UNTIL YOU HAVE MADE ALL THE CHANGES YOU WANT TO MAKE TO THE REPORT. IGNORE ANY STEPS WHICH SAY "SAVE AND BACK OUT" BELOW AND CARRY STRAIGHT ON WITH THE NEXT STEP THAT INVOLVES EDITING.

IF YOU DO BACK OUT OF THE EDITOR YOU WILL NEED TO DESTROY YOU REPORT AND START AGAIN FROM SCRATCH.

Setting up the basic report

  1. Invoke RBF, which is the Reports utility on the Ingres main menu.
  2. Choose the Create option on the RBF - Report Catalog
  3. In the RBF - Creating a Report window, chose the JoinDef option to create a report based on a JoinDef.
  4. use the borrower_loans joindef, and the master/detail report style
  5. You now have a default report layout.
  6. (DON'T) Save this and back out to the RBF - Report Catalog
  7. (DON'T) Go the report to see what it looks like, next we'll go back and edit it. You will find it easier to save the report to a file and then look at it. You will be able to look at the full width of the report.

Editing the Default Layout

  1. Now invoke the Edit option to begin customising the report layout
  2. You can edit the report layout in the same way that you could edit under VIFRED so you should be able to figure out what to do.
  3. Tab to the fields shown below (i.e. the fields rather than the trim) and Delete the following fields: The only extra item we've got is isbnx (as the report won't work if we take this out!).
  4. Delete the blank lines between the Detail block and the Page-Footer block. This will close up the lines of books that are on loan by a particular borrower.
  5. Move the isbnx field to the right hand side of the report.
    1. tab to the isbnx field
    2. invoke the move option, immediately followed by the column option. This will move the field and its trim.
    3. now invoke the right option to move the field to the rightmost position
  6. Move the title and loan date fields so they are 'next to' the Acc.No. and loan date fields.
  7. Next we need to edit the trim. Again this is straightforward. Make the field headings Number, Name, and Status for the borrower fields, and Acc.No., Loan Date and Title for the loan/copies/book fields.
  8. Change the report heading to be Borrower Loans. Move the heading to the left hand side of the report using the move and left options.
  9. You report should now look something like this.
  10. (DON'T) Save the report, back out of the editor, and go it to see what it looks like.

Prompting for a borrower number

  1. Go back into the edit option.
  2. invoke the ColumnOptions option
  3. using the ListChoices option, set the selection criteria for bor_no to value.
  4. (NOW DO) Save the report, back out of the editor, and 'Go(f8)' it to see what happens. Try entering '%' (the SQL wild card), and a specific borrower number.

Continue with this trainer


This WWW material is copyright De Montfort University and may only be reproduced or used if this copyright notice is included.
This page is maintained by John Skelton. Comments or suggestions for improving this material can be emailed to jas@dmu.ac.uk) and will be gratefully received.