Uncategorized

SQL Rounding Error when calculating percentages

Posted on

For cross compatability between sql and mysql servers when we do a division on a aggregated variable like count we need to promote the INT to a DOUBLE type by multiplying it by 1.00 otherwise our results will loose precision Examples 1/2=0 Incorrect Results 1.00/2=.5 or 1.00/2.00=.5 Good For sake of consistency both variables have […]

Uncategorized

Detecting Wide Area Network(WAN) IP programmatically

Posted on

Detecting Wide Area Network(WAN) IP programmatically This is a reliable way to detect WAN IP address from Java, cpp or any other programming language. Motivation for this was my need to update my DNS server automatically, presented code will be in Java I have decided to use Java for cross-platform support and its my favorite […]

Uncategorized

Fixing JasperReports net.sf.jasperreports.engine.JRRuntimeException: Error creating SAX parser

Posted on

While upgrading machines I have upgraded to run jdk 1.6 which have screwed up compiling of my reports with following error. C:\Program Files (x86)\Java\jdk1.6.0_24\jre\lib\endorsed Source File:c:/Users/greg/report2.jrxml Exception in thread "main" net.sf.jasperreports.engine.JRRuntimeException: Error creating SAX parser at net.sf.jasperreports.engine.xml.JRReportSaxParserFactory.createParser(JRReportSaxParserFactory.java:109) at net.sf.jasperreports.engine.xml.JRXmlDigesterFactory.createParser(JRXmlDigesterFactory.java:1320) at net.sf.jasperreports.engine.xml.JRXmlDigesterFactory.createDigester(JRXmlDigesterFactory.java:1295) at net.sf.jasperreports.engine.xml.JRXmlLoader.load(JRXmlLoader.java:199) at net.sf.jasperreports.engine.xml.JRXmlLoader.load(JRXmlLoader.java:164) at net.sf.jasperreports.engine.xml.JRXmlLoader.load(JRXmlLoader.java:148) at net.sf.jasperreports.engine.JasperCompileManager.compileReportToFile(JasperCompileManager.java:85) at com.americanbanksystems.complianceproreports.util.CompileReport.compileReport(CompileReport.java:133) at com.americanbanksystems.complianceproreports.util.CompileReport.main(CompileReport.java:189) Caused by: […]