本文介绍了在VB.NET中帮助打印部分的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我为学校建立一个软件和一个一个一个打印罚款凭证。我想打印所有类别的所有费用凭证一键点击哪个学生在Datagridview表中加载。
我尝试了什么:
我不知道怎么做我在google上搜索很多但是失败
i build a software for school and a fee voucher printing fine one by one .i want to Print all fee voucher of selected class in One Click which student is loaded in Datagridview table.
What I have tried:
I dont know how to do it i search alot on google but failed
推荐答案
<pre>
Public Function itemQillareport() As DataSet
Dim dsData As DataSet
Try
'dsData = DalHelper.ExecuteDataset(m_ConString, CommandType.Text, "select * from PrintChallan where Reg_num='" & StidentFee.TextBox14.Text & "' and fee_Month='" & StidentFee.ComboBox1.Text & "' and Fea_year='" & StidentFee.TextBox4.Text & "'")
dsData = DalHelper.ExecuteDataset(m_ConString, CommandType.Text, "SELECT dbo.PrintChallan.*, dbo.School_Info.* FROM dbo.PrintChallan CROSS JOIN dbo.School_Info where PrintChallan.Reg_num='" & StidentFee.TextBox14.Text & "' and PrintChallan.fee_Month='" & StidentFee.ComboBox1.Text & "' and PrintChallan.Fea_year='" & StidentFee.TextBox4.Text & "' and School_Info.Id='1'")
Catch ex As Exception
Return Nothing
End Try
Return dsData
End Function
Private Sub Employe_Led_report_Load(sender As System.Object, e As System.EventArgs) Handles MyBase.Load
ReportViewer1.LocalReport.ReportEmbeddedResource = "KTC.Report36.rdlc"
Dim rdsNumberofReferrals As New Microsoft.Reporting.WinForms.ReportDataSource()
rdsNumberofReferrals.Name = "DataSet1"
Dim dsBrands As DataSet = itemQillareport()
rdsNumberofReferrals.Value = dsBrands.Tables(0)
ReportViewer1.LocalReport.DataSources.Add(rdsNumberofReferrals)
ReportViewer1.Update()
Dim newPageSettings As New System.Drawing.Printing.PageSettings
newPageSettings.PaperSize = New Printing.PaperSize("Custom", 820, 1150)
newPageSettings.Landscape = True
newPageSettings.Margins = New System.Drawing.Printing.Margins(10, 10, 10, 10)
ReportViewer1.SetPageSettings(newPageSettings)
Me.ReportViewer1.RefreshReport()
End Sub
这篇关于在VB.NET中帮助打印部分的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!