Visual Report Editor Exercise
Objectives:
- To explore the features of RBF Visual Report Editor.
- 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
- Invoke RBF, which is the Reports utility on the Ingres main menu.
- Choose the Create option on the RBF - Report Catalog
- In the RBF - Creating a Report window, chose the JoinDef
option to create a report based on a JoinDef.
- use the borrower_loans joindef, and the master/detail report
style
- You now have a default report layout.
- (DON'T) Save this and back out to the RBF -
Report Catalog
- (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
- Now invoke the Edit option to begin customising the report layout
- 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.
- Tab to the fields shown below (i.e. the fields rather than the trim) and
Delete the following fields:
- (from borrower), delete addr1, addr2, town, and post_code
- (from copies), delete buy_price, and buy_date
- (from book), delete pub_code, pub_date, and now_price
The only extra item we've got is
isbnx (as the report won't work if we take this out!).
- 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.
- Move the isbnx field to the right hand side of the report.
- tab to the isbnx field
- invoke the move option, immediately followed by the column
option. This will move the field and its trim.
- now invoke the right option to move the field to the rightmost
position
- Move the title and loan date fields so they are 'next to' the Acc.No. and
loan date fields.
- 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.
- 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.
- You report should now look something like this.
- (DON'T) Save the report, back out of the editor, and go it to see what it looks
like.
Prompting for a borrower number
- Go back into the edit option.
- invoke the ColumnOptions option
- using the ListChoices option, set the selection criteria for
bor_no to value.
- (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.