HMS
Class Report
java.lang.Object
|
+--HMS.Report
- All Implemented Interfaces:
- java.awt.print.Printable
- public class Report
- extends java.lang.Object
- implements java.awt.print.Printable
This class is a frame that represents the entity class Report. It provides
the methods for generating and printing the following system reports, which
are listed below with the required fields needed to generate them,
shown as sub-bullets:
- Hotel Occupancy
- RoomAvailable.Date
- RoomAvailable.NumAvailable
- RoomAvailable.RoomTypeID
- Revenue
- Payment.PaymentAmount
- Payment.PaymentDate
- Price Exceptions
- Bill.BillID
- Bill.ReservationID
- BillItem.BillID
- BillItem.BillItemAmount
- BillItem.BillItemTypeID
- BillItem.DiscountID
- BillItemType.BillItemType
- BillItemType.BillItemTypeID
- Customer.CustomerID
- Customer.LName
- Discount.DiscountID
- Discount.DiscountName
- Discount.DicountPercent
- Payment.PaymentDate
- Payment.ReservationID
- Reservation.CustomerID
- Reservation.ReservationID
- Pending Checkouts
- Checkin.RoomID
- Checkout.ReservationID (only populate if checked out)
- Customer.CustomerID
- Customer.LName
- Reservation.CustomerID
- Reservation.ExpectedCheckoutDate
- Reservation.ReservationID
- Room.RoomID
- Room.RoomNumber
Fields inherited from interface java.awt.print.Printable |
NO_SUCH_PAGE, PAGE_EXISTS |
Constructor Summary |
Report(java.lang.String rType,
java.lang.String bDate,
java.lang.String eDate)
This is the constructor for the Report class that instantiates the
selected report. |
Method Summary |
int |
print(java.awt.Graphics g,
java.awt.print.PageFormat pageFormat,
int pageIndex)
This function prints the entire scrollable JTable containing the report. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Report
public Report(java.lang.String rType,
java.lang.String bDate,
java.lang.String eDate)
- This is the constructor for the Report class that instantiates the
selected report.
- Parameters:
rType
- The report type (revenue, occupancy, checkout, exceptions)bDate
- The begin date of the report.eDate
- The end date of the report.
print
public int print(java.awt.Graphics g,
java.awt.print.PageFormat pageFormat,
int pageIndex)
throws java.awt.print.PrinterException
- This function prints the entire scrollable JTable containing the report.
Many thanks to JDC member Isaac Elias for developing the
initial version of this function.
- Specified by:
print
in interface java.awt.print.Printable
- Parameters:
g
- GraphicspageFormat
- PageFormatpageIndex
- - Returns:
- int PrintablePage.PAGE_EXISTS