Package jimm.datavision

Examples of jimm.datavision.Report


public PDFLETest(String name) {
    super(name);
}

public void setUp() throws Exception {
    report = new Report();

    OUT_FILE.deleteOnExit();
    report.setLayoutEngine(new PDFLE(new FileOutputStream(OUT_FILE)));

    report.read(EXAMPLE_REPORT);
View Full Code Here


* @param databasePassword string to give to report; OK if it's
* <code>null</code>
* @return <code>true</code> if we need to ask the user for connection info
*/
protected boolean readReport(String fileName, String databasePassword) {
    report = new Report();
    String url = getAppletViaCheapTrick().getReportURL();
    try {
  if (url != null && url.length() > 0)
      report.read(new InputSource(url));
    }
View Full Code Here

    // can paste into the same area later.
    sectionArea = origSectionWidget.getSectionArea();
}

public void paste(Designer designer) {
    Report pasteReport = designer.getReport();
    Report origReport = origSectionWidget.getReport();
    SectionWidget sw = null;

    if (pasteReport == origReport) {
  if (pasteReport.contains(origSectionWidget.getSection()))
      sw = origSectionWidget;
View Full Code Here

    // Don't need to call Designer.enableMenuItems because each call
    // to Designer.select already does that.
}

protected SectionWidget sectionWidgetBySectionArea(Designer designer) {
    Report report = designer.getReport();
    Section s = report.getFirstSectionByArea(sectionArea.getArea());
    if (s == null)    // Can be null if area was group, for example
  // Will not be null; there is always at least one report header section
  s = report.getFirstSectionByArea(SectionArea.REPORT_HEADER);
    return designer.findSectionWidgetFor(s);
}
View Full Code Here

protected String connInfo;
protected String dbName;
protected String username;

public DbConnReader() {
  super(new Report());
}
View Full Code Here

     + "</foo>" + linesep,
     s.toString());
}

public void testReportWrite() {
    Report report = null;
    try {
  report = new Report();
  report.setDataSource(new MockDataSource(report));
  report.read(EXAMPLE_REPORT); // Must come after setting password
  report.setParameterXMLInput(PARAM_INPUT_FILE);

  File f = File.createTempFile("xml-writer-test", ".xml");
  f.deleteOnExit();
  report.writeFile(f.getPath());
  report.read(f);
  f.delete();
    }
    catch (Exception e) {
  fail(e.toString());
  e.printStackTrace();
View Full Code Here

*/
protected static Integer groupCount(Field f) {
    if (f == null)
  return new Integer(0);

    Report report = f.getReport();
    Group group = report.findGroup(f.getSection());

    if (group == null && f.getSection().isDetail())
  group = report.innermostGroup(); // May be null

    return new Integer(group == null ? report.rowNumber()
           : group.getRecordCount());
}
View Full Code Here

  Driver d = (Driver)Class.forName(DRIVER_CLASS_NAME).newInstance();
  DriverManager.registerDriver(d);
  conn = DriverManager.getConnection(CONNECTION_INFO, DB_USER,
             DB_PASSWORD);

  Report report = new Report();
  report.setDatabaseConnection(conn);

  OUT_FILE.deleteOnExit();
  PrintWriter out = new PrintWriter(new FileWriter(OUT_FILE));
  report.setLayoutEngine(new CharSepLE(out, '\t'));

  report.runReport();
    }
    catch (Exception e) {
  e.printStackTrace();
  fail("exception thrown: " + e);
    }
View Full Code Here

      OUT_FILE.delete();
    }
}

public void testQueryAfterReset() {
    Report report = new Report();
    try {
  report.setDatabasePassword(DB_PASSWORD);
  report.read(EXAMPLE_REPORT);

  Database db = (Database)report.getDataSource();
  SQLQuery query = (SQLQuery)db.getQuery();

  assertEquals("{jobs.ID} < 100", query.getWhereClause());
  assertNotNull(db.findColumn("ALL_CAPS.COL1"));
  assertNotNull(db.findColumn("jobs.fk_office_id"));
View Full Code Here

  fail(e.toString());
    }
}

public void testDatabaseReset() throws Exception {
    Report report = new Report();
    report.setDatabasePassword(DB_PASSWORD);
    report.read(EXAMPLE_REPORT);

    Database db = (Database)report.getDataSource();
    SQLQuery origQuery = (SQLQuery)db.getQuery();

    db.reset(db.getDriverClassName(), db.getConnectionInfo(), db.getName(),
       db.getUserName(), "");
    SQLQuery q = (SQLQuery)db.getQuery();
View Full Code Here

TOP

Related Classes of jimm.datavision.Report

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.