Code: Select all
StiJsonDatabase db = new StiJsonDatabase("Connection1", "http://www.weather.com.cn/data/cityinfo/101010100.html");
report.getDictionary().getDatabases().add(db);
StiDataTableSource ts = new StiDataTableSource("Connection1.weatherinfo", "weatherinfo", "weatherinfo");
ts.setColumns(new StiDataColumnsCollection());
ts.getColumns().add(new StiDataColumn("cityid", "cityid", StiSystemTypeEnum.SystemString.getSystemType()));
ts.setDictionary(report.getDictionary());
report.getDictionary().getDataSources().add(ts);