c# - Drill-Down DevExpress Using Stored Procedure -
well, trying create drill-down devexpress report stored procedure in sql server drilled data same in every row, have solution? thanks.
here stored procedure:
begin select a.id_sl_invoice [id_invoice], b.kode [kode_konsumen], b.nama [nama_konsumen], a.nomor [nomor_inj], a.tanggal [tanggal_inj], e.nomor [nomor_spj], a.harga [nilai_penagihan], f.tanggal [tanggal_sj], f.nomor [nomor_sj] sl_invoice join ms_konsumen b on a.id_ms_konsumen = b.id_ms_konsumen join sl_invoice_suratjalan c on a.id_sl_invoice = c.id_sl_invoice join sl_invoice_suratpesanan d on a.id_sl_invoice = d.id_sl_invoice join sl_suratpesanan e on d.id_sl_suratpesanan = e.id_sl_suratpesanan join sl_suratjalan f on f.id_sl_suratjalan = c.id_sl_suratjalan a.tanggal >=@tanggalawal , a.tanggal <= @tanggalakhir end
and code in report
const string sshowdetail = "show detail"; const string shidedetail = "hide detail"; public repinvoicepenj() { initializecomponent(); } arraylist expandedvalues = new arraylist(); bool shouldshowdetail(int idinvoice) { return expandedvalues.contains(idinvoice); } private void detailreport_beforeprint(object sender, system.drawing.printing.printeventargs e) { e.cancel = !shouldshowdetail((int)getcurrentcolumnvalue("id_invoice")); } private void xrtablecell6_beforeprint(object sender, system.drawing.printing.printeventargs e) { xrlabel label = (xrlabel)sender; if (shouldshowdetail((int)label.tag)) { label.text = shidedetail; } else { label.text = sshowdetail; } } private void xrtablecell6_previewclick(object sender, previewmouseeventargs e) { int index = (int)e.brick.value; bool showdetail = shouldshowdetail(index); if (showdetail) { expandedvalues.remove(index); } else { expandedvalues.add(index); } viewcontrol viewcontrol = e.previewcontrol viewcontrol; fieldinfo fieldinfo = viewcontrol.gettype().getfield("pc", bindingflags.nonpublic | bindingflags.instance); printcontrol printcontrol = (printcontrol)fieldinfo.getvalue(viewcontrol); page page = printcontrol.selectedpage; createdocument(); printcontrol.selectedpageindex = page.index; //change selectedpageindex instead of calling showbrick method. } private void xrtablecell6_previewmousemove(object sender, previewmouseeventargs e) { cursor.current = cursors.hand; } private void repinvoicepenj_datasourcedemanded(object sender, eventargs e) { this.sp_invoicepenjualantableadapter1.fill(repsalesinvoicedataset1.sp_invoicepenjualan, convert.todatetime(this.tanggalawalparam.value), convert.todatetime(this.tanggalakhirparam.value)); }
and result like
row 1 = drilled-down data 1 = , b , c row 2 = b drilled-down data 2 = , b , c row 3 = c drilled-down data 3 = , b , c
i need make result like
row 1 = drilled-down data = row 2 = b drilled-down data = b row 3 = c drilled-down data = c
thanks
Comments
Post a Comment