I have a Form with a PrintPreviewDialog and a TabularReport. I also have a DataGridView.
I fill a DataView object from my DataBase. Nevermind now how, but it works. When I use my DataView on the DataGridView, I can see the the right rows and coloumns. I use this code:
DataView v = new DataView(dTable);
bindingSource1.DataSource = dTable;
grid.DataSource = bindingSource1;
But when I use the same DataView on my TabularReport and then try to see it in my PrintPreviewDialog I get an empty page (besides an header). I use this Code:
TabularReport1.DataView = v; // here v is the same DataView from the previous code block above
printPreview1.Document = TabularReport1;
//here of course i also set a button to load printPreview1.ShowDialog()
Does anyone knows why Im getting a blank page? Thanks!
you have to set the margins for table also , here a sample code how to set the margins with data and using dataview also
pls take a look at this Link for more info
i hope it will helps you....
this is printdetailrow function...