public void setConnection ( Connection connection , boolean csv ) { this . connection = connection ; this . csv = csv ; try { dialect = DialectUtil . getDialect ( connection ) ; } catch ( Exception e ) { e . printStackTrace ( ) ; } if ( chart != null ) { if ( chart . getReport ( ) . getQuery ( ) != null ) { chart . getReport ( ) . getQuery ( ) . setDialect ( dialect ) ; } } }
Set database connection