Private Sub btnOPrint_Click(sender As Object, e As EventArgs) Handles btnOPrint.Click If MsgBox("Print Offertory Record?", MsgBoxStyle.OkCancel, "Print Record") = MsgBoxResult.Ok Then Dim report As New ReportDocument report.Load("C:\Users\Paolo\Documents\Visual Studio 2015\Projects\NewMonitoringSystem\NewMonitoringSystem\OffertoryReport.rpt") docprint.CrystalReportViewer1.ReportSource = report docprint.CrystalReportViewer1.SelectionFormula = "{tblOffertory.Date}=""" & dtpOffertory.Text & """AND {tblOffertory.Weekly}=#" & txtOffertory.Text & "#" docprint.CrystalReportViewer1.Refresh() docprint.Show() End If End Sub
AND {tblOffertory.Weekly}=#" & txtOffertory.Text & "#"
docprint.CrystalReportViewer1.SelectionFormula = "{tblOffertory.Date}=""" & dtpOffertory.Text & """"
totext({tblOffertory.Date})
docprint.CrystalReportViewer1.SelectionFormula = "ToText({tblOffertory.Date})=""" & dtpOffertory.Text & """"
{tblOffertory.Weekly}
docprint.CrystalReportViewer1.SelectionFormula = "ToText(CDate({tblOffertory.Date}))= ToText(CDate(""" & dtpOffertory.Text & """))"
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)