Class RBDocument

All Implemented Interfaces:
RMArchiver.Archiving, RJMinMaxSizeSettable, Cloneable

public class RBDocument extends RMDocument implements RJMinMaxSizeSettable
The RMDocument class represents a ReportMill document and is also an RMShape subclass, so it can be a real part of the document/shape hierarchy. RMDocuments are also what ReportMill refers to as templates, and is commonly used like this:

   RMDocument template = RMDocument.getDoc(aSource); // Load from path String, File, byte array, etc.
   RMDocument report = template.generateReport(aDataset); // Any Java dataset: EJBs, custom classes, collctns, etc.
   report.writePDF("MyReport.pdf");
 

On rare occasions, you may also want to create a document dynamically. Here's an example:

   RMDocument doc = new RMDocument(612, 792); // Standard US Letter size (8.5" x 11"), in points
   RMTable table = new RMTable(); // Create new table ...
   doc.getPage(0).addChild(table); // ... and add to first page
   table.setBounds(36, 36, 540, 680); // Position and size table
   table.getRow("Objects Details").getColumn(0).setText("Title: @getTitle@"); // Configure first text
 

  • Constructor Details

    • RBDocument

      public RBDocument(int aWidth, int aHeight)
      Creates a new document with the given width and height.
  • Method Details