// public raFilterPj() {} public QueryDataSet getClone(String uvijetS) { int uvijet = -1; hr.restart.baza.dM dm = hr.restart.baza.dM.getDataModule(); try { uvijet = Integer.parseInt(uvijetS); } catch (Exception e) { uvijet = -1; } QueryDataSet za_vratiti = hr.restart.util.Util.getNewQueryDataSet(aSS.getQuery4rFP4getClone(uvijet), false); za_vratiti.close(); za_vratiti.setColumns(dm.getPjpar().cloneColumns()); za_vratiti.open(); /* za_vratiti.setQuery(new QueryDescriptor(dm.getDatabase1(), aSS.getQuery4rFP4getClone(uvijet))); za_vratiti.open(); za_vratiti.interactiveLocate(String.valueOf("1"),"PJ",com.borland.dx.dataset.Locate.FIRST,true); */ return za_vratiti; }
public void okPress() { // to be changed // jbChart.setVisible(true); String selectString = getUpit(); QueryDataSet tmpSet = ut.getNewQueryDataSet(selectString); if (tmpSet.isEmpty()) setNoDataAndReturnImmediately(); monthSet = new QueryDataSet(); monthSet.setColumns( new Column[] { dm.createIntColumn("CART", "Šifra"), dm.createStringColumn("CART1", "Oznaka", 20), dm.createStringColumn("BC", "Barcode", 20), dm.createStringColumn("NAZART", "Naziv artikla", 50), dm.createIntColumn("CPAR", "Kupac"), dm.createBigDecimalColumn("01", moonshine[0], 2), dm.createBigDecimalColumn("02", moonshine[1], 2), dm.createBigDecimalColumn("03", moonshine[2], 2), dm.createBigDecimalColumn("04", moonshine[3], 2), dm.createBigDecimalColumn("05", moonshine[4], 2), dm.createBigDecimalColumn("06", moonshine[5], 2), dm.createBigDecimalColumn("07", moonshine[6], 2), dm.createBigDecimalColumn("08", moonshine[7], 2), dm.createBigDecimalColumn("09", moonshine[8], 2), dm.createBigDecimalColumn("10", moonshine[9], 2), dm.createBigDecimalColumn("11", moonshine[10], 2), dm.createBigDecimalColumn("12", moonshine[11], 2), dm.createBigDecimalColumn("UKUPNO", "Ukupno", 2) }); monthSetGraph = new QueryDataSet(); monthSetGraph.setColumns( new Column[] { dm.createIntColumn("CPAR", "Kupac"), dm.createStringColumn("NAZPAR", "Naziv partnera", 50), dm.createStringColumn("MJESEC", "Mjesec", 2), dm.createBigDecimalColumn("IZNOS", "Iznos", 2), dm.createBigDecimalColumn("UKUPNO", "Ukupno", 2) }); monthSet.open(); monthSetGraph.open(); tmpSet.first(); String misec; isIspis = true; try { racunica(tmpSet); } catch (Exception ex) { // ex.printStackTrace(); setNoDataAndReturnImmediately(); } monthSet.last(); setDataSetAndSums( monthSet, new String[] { "01", "02", "03", "04", "05", "06", "07", "08", "09", "10", "11", "12", "UKUPNO" }); }