ViewVC Help
View File | Revision Log | Show Annotations | Revision Graph | Root Listing
root/i-scream/projects/cms/source/reports/DBReporter2/DBReporterMain.java
Revision: 1.1
Committed: Sat Feb 3 14:56:14 2001 UTC (24 years, 10 months ago) by pjm2
Branch: MAIN
Log Message:
A rewrite of the database reporting tools.  These reflect the new way in
which the database stores the original XML rather than parameter and value
pairs.

File Contents

# Content
1 import java.sql.*;
2 import java.io.*;
3
4 public class DBReporterMain {
5
6 public static void main(String[] args) {
7
8 long endTime = DateUtils.startOfToday();
9 endTime = DateUtils.subtractDays(endTime, 2);
10 long startTime = DateUtils.subtractDays(endTime, 1);
11
12 DBReporter reporter = new DBReporter(startTime, endTime);
13
14 ReportList reportList = null;
15 try {
16 reportList = new ReportList("report_list.txt");
17 }
18 catch (IOException e) {
19 System.out.println(e);
20 return;
21 }
22
23 try {
24 reporter.runReports(reportList);
25 }
26 catch (SQLException e) {
27 System.out.println("Fatal SQL errors - Cannot complete reports: " + e);
28 }
29 catch (Exception e) {
30 System.out.println("Fatal errors - Cannot complete reports: " + e);
31 }
32
33 System.out.println("DBReporterMain finished.");
34
35 }
36
37 }