Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/image-processing/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
使用vb.net在access上打印预览数据_Vb.net_Gridview - Fatal编程技术网

使用vb.net在access上打印预览数据

使用vb.net在access上打印预览数据,vb.net,gridview,Vb.net,Gridview,我正在为我的学校项目制作一个工资系统。我有这个表格,你可以打印员工信息的数据。例如名称、税款、扣除额等 我在互联网上寻找可能的答案,但我所拥有的只是: Dim ce = form1.grid.currentcell.Rowindex e.Graphics.DrawString(Form1.dtg.Item(Form1.column.headertext, ce).value.tostring.systemfonts.brushes.black, 300, 200) 此代码打印gridview上

我正在为我的学校项目制作一个工资系统。我有这个表格,你可以打印员工信息的数据。例如名称、税款、扣除额等

我在互联网上寻找可能的答案,但我所拥有的只是:

Dim ce = form1.grid.currentcell.Rowindex
e.Graphics.DrawString(Form1.dtg.Item(Form1.column.headertext, ce).value.tostring.systemfonts.brushes.black, 300, 200)
此代码打印gridview上的选定行(使用工具手动创建)。
有人知道如何将我的gridview access数据库所选行放入printview表单吗?谢谢

您实际上是指WinForms应用程序中的
DataGridView
?请澄清。是的,winforms应用程序中的datagridview。如果是
datagridview
,请这样说。我们不应该猜这样的东西。使用事物的实际名称并不难,而且可以节省时间和混乱。无论如何,您需要使用
PrintDocument
PrintPreviewDialog
,这两者都可以从工具箱中添加。你在这么做吗?是的。。实际上,我的问题是在打印预览表单中打印数据库的选定行