c# - Print DatagridView to rdlc Report -
how print items datagridview , rdlc report. items in datagridview filled manually, , not database, that's why gives me issues.
p.s know there ways print printform want print .rdlc.
tryed datatable doenst show me right colums on rdlc dataset
dataset ds = new dataset(); datatable dt = new datatable("prodfromdgv"); foreach (datagridviewcolumn col in datagridview1.columns) { dt.columns.add(col.headertext); } foreach (datagridviewrow row in datagridview1.rows) { datarow drow = dt.newrow(); foreach (datagridviewcell cell in row.cells) { drow[cell.columnindex] = cell.value; } dt.rows.add(drow); } ds.tables.add(dt); dt.writexml("table.xml");`
Comments
Post a Comment