Click here to Skip to main content
15,885,032 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Private Sub BtnShowReport_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles BtnShowReport.Click

        Dim cryRpt As New ReportDocument
        Dim dt As New DataTable
        Dim dr As OleDbDataReader
      
        Call connect()
        Dim C2_Qry As String
        C2_Qry = String.Empty
        C2_Qry = "select R_ID, R_date, OldBalance, R_Amount, CurrentBalance from receivings where R_date=@dt"
        comm.Parameters.AddWithValue("@dt", Date.Parse(Me.ReportDatePicker.Value).ToShortDateString)
        comm.Connection = conn
        comm.CommandType = CommandType.Text
        comm.CommandText = C2_Qry
        dr = comm.ExecuteReader
        dt.Load(dr)
        cryRpt.Load("E:\BFC\Last--BFCProject\BFCProject\CrystalReports\Roznamcha.rpt")
        cryRpt.SetDataSource(dt)
        RoznamchaCrystalReportViewer.ReportSource = cryRpt
        RoznamchaCrystalReportViewer.Refresh()
        dr.Close()

    End Sub


What I have tried:

i have ReportDatePicker control on my form. by this control i change my date to see report in
RoznamchaCrystalReportViewer
.

Problem is that when i change date from ReportdatePicker control my report display data of previous date which i select before last one.

it does not update data on in report view.

Pleae help.
Posted
Updated 19-Jun-19 7:58am

1 solution

Maybe you can try another tool like Seal Reports, see: best-open-source-reporting-tools[^]
If you want something simple Google Charts might be an option: reporting-and-business-intelligence-bi-tools~google-charts[^]
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month


CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900