Package jimm.datavision

Examples of jimm.datavision.Report


    assertEquals(origQuery.getNumTables(), q.getNumTables());
    assertEquals(origQuery.getNumSelectables(), q.getNumSelectables());
}

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

    // Found because we try blank schema
    Column col = report.findColumn("jobs.ID");
    assertNotNull(col);
    assertEquals("public.jobs.ID", col.getId());

    // Found due to exact match
    col = report.findColumn("public.jobs.ID");
    assertNotNull(col);
    assertEquals("public.jobs.ID", col.getId());

    // Not found because schema doesn't match table's schema
    col = report.findColumn("dv_example.jobs.ID");
    assertNull(col);
}
View Full Code Here


    super(name);
}

public void setUp() {
    area = new SectionArea(SectionArea.DETAIL);
    report = new Report();
    sect = new Section(report);
}
View Full Code Here

        }

        try {
            String datasourceName = delegator.getEntityHelperName(info);

            Report report = new Report();
            report.setDatabaseConnection(ConnectionFactory.getConnection(datasourceName));

            /* NOTE: this is the old code that is no londer needed because of the new setDatabaseConnection method
            report.setDatabasePassword(""); // password can be bogus because we are using an OFBiz connection...
            Debug.logInfo("before creating database", module);
            DataVisionDatabase dvDb = new DataVisionDatabase(datasourceName, report);

            report.setDatabase(dvDb);
            */

            Debug.logInfo("before reading file", module);
            report.read(new File(context.getRealPath(page))); // Must be after password

            /* NO support for param file yet... need to pull in page params or something
             if (there_are_params_in_report) {
             // This must come after reading the report file
             report.setParameterXMLFile(param_xml_file_name);
             } */

            Debug.logInfo("before set layout engine", module);
            report.setLayoutEngine(new jimm.datavision.layout.HTMLLE(response.getWriter()));
            Debug.logInfo("before run report", module);
            report.runReport();   // Run the report in this thread
            Debug.logInfo("after run report, end", module);
        } catch (UserCancellationException e) {
            throw new ViewHandlerException("User cancelled report", e);
        } catch (FileNotFoundException e) {
            throw new ViewHandlerException("Report file not found [" + page + "]", e);
View Full Code Here

        }

        try {
            String datasourceName = delegator.getEntityHelperName(info);

            Report report = new Report();
            report.setDatabaseConnection(ConnectionFactory.getConnection(datasourceName));

            /* NOTE: this is the old code that is no londer needed because of the new setDatabaseConnection method
            report.setDatabasePassword(""); // password can be bogus because we are using an OFBiz connection...
            Debug.logInfo("before creating database", module);
            DataVisionDatabase dvDb = new DataVisionDatabase(datasourceName, report);

            report.setDatabase(dvDb);
            */

            Debug.logInfo("before reading file", module);
            report.read(new File(context.getRealPath(page))); // Must be after password

            /* NO support for param file yet... need to pull in page params or something
             if (there_are_params_in_report) {
             // This must come after reading the report file
             report.setParameterXMLFile(param_xml_file_name);
             } */

            Debug.logInfo("before set layout engine", module);
            report.setLayoutEngine(new jimm.datavision.layout.HTMLLE(response.getWriter()));
            Debug.logInfo("before run report", module);
            report.runReport();   // Run the report in this thread
            Debug.logInfo("after run report, end", module);
        } catch (UserCancellationException e) {
            throw new ViewHandlerException("User cancelled report", e);
        } catch (FileNotFoundException e) {
            throw new ViewHandlerException("Report file not found [" + page + "]", e);
View Full Code Here

        }

        try {
            String datasourceName = delegator.getEntityHelperName(info);

            Report report = new Report();
            report.setDatabaseConnection(ConnectionFactory.getConnection(datasourceName));

            /* NOTE: this is the old code that is no londer needed because of the new setDatabaseConnection method
            report.setDatabasePassword(""); // password can be bogus because we are using an OFBiz connection...
            Debug.logInfo("before creating database", module);
            DataVisionDatabase dvDb = new DataVisionDatabase(datasourceName, report);

            report.setDatabase(dvDb);
            */

            Debug.logInfo("before reading file", module);
            report.read(new File(context.getRealPath(page))); // Must be after password

            /* NO support for param file yet... need to pull in page params or something
             if (there_are_params_in_report) {
             // This must come after reading the report file
             report.setParameterXMLFile(param_xml_file_name);
             } */

            Debug.logInfo("before set layout engine", module);
            report.setLayoutEngine(new jimm.datavision.layout.HTMLLE(response.getWriter()));
            Debug.logInfo("before run report", module);
            report.runReport();   // Run the report in this thread
            Debug.logInfo("after run report, end", module);
        } catch (UserCancellationException e) {
            throw new ViewHandlerException("User cancelled report", e);
        } catch (FileNotFoundException e) {
            throw new ViewHandlerException("Report file not found [" + page + "]", e);
View Full Code Here

        }

        try {
            String datasourceName = delegator.getEntityHelperName(info);

            Report report = new Report();
            report.setDatabaseConnection(ConnectionFactory.getConnection(datasourceName));

            /* NOTE: this is the old code that is no londer needed because of the new setDatabaseConnection method
            report.setDatabasePassword(""); // password can be bogus because we are using an OFBiz connection...
            Debug.logInfo("before creating database", module);
            DataVisionDatabase dvDb = new DataVisionDatabase(datasourceName, report);

            report.setDatabase(dvDb);
            */

            Debug.logInfo("before reading file", module);
            report.readFile(context.getRealPath(page)); // Must be after password

            /* NO support for param file yet... need to pull in page params or something
             if (there_are_params_in_report) {
             // This must come after reading the report file
             report.setParameterXMLFile(param_xml_file_name);
             } */

            Debug.logInfo("before set layout engine", module);
            report.setLayoutEngine(new jimm.datavision.layout.HTMLLE(response.getWriter()));
            Debug.logInfo("before run report", module);
            report.runReport();   // Run the report in this thread
            Debug.logInfo("after run report, end", module);
        } catch (UserCancellationException e) {
            throw new ViewHandlerException("User cancelled report", e);
        } catch (FileNotFoundException e) {
            throw new ViewHandlerException("Report file not found [" + page + "]", e);
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.