Click here to Skip to main content
15,889,281 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
i got a code from here


Dim cryRpt As New ReportDocument

        If IsConnected() = True Then
            myCmd.Connection = returnConn()
            strSQL = "SELECT * FROM tbl_sample where samp='EX'"
            myCmd.CommandText = strSQL
            myDA.SelectCommand = myCmd
            myDA.Fill(myDS, "tbl_sample")


        End If

        'myDR.Close()
        'frmReports.Show()
        'frmReports.cReportViewer.ReportSource = testReport1
        Dim r_username As String
        Dim r_pass As String
        r_username = "***"
        r_pass = "***"

        cryRpt.Load(DefPhotoPath + "sample.rpt")
        cryRpt.SetDatabaseLogon(r_username, r_pass)
        cryRpt.SetDataSource(myDS.Tables("tbl_sample"))


        With frmReportsPrev
            .cReportViewer.ReportSource = cryRpt
            .cReportViewer.RefreshReport()
            .cReportViewer.Zoom(100)
            .cReportViewer.RefreshReport()
        End With
        frmReportsPrev.ShowDialog(Me)



it dosent refresh the report
when you want to show the report
it will add the preview data
pls help me about the refresh of the report
Posted
Updated 2-May-11 22:17pm
v2
Comments
Ankit Rajput 3-May-11 4:17am    
[EDIT]: Code block added.

1 solution

You can always use the crystal report viewer. This has a refresh button that you could use.
 
Share this answer
 
Comments
misgaryroland@gmail.com 3-May-11 4:34am    
i have that refresh but nothing happens :(
Abhinav S 3-May-11 5:10am    
You will probably need to write code in the refresh button to repopulate the report.
misgaryroland@gmail.com 3-May-11 5:20am    
i have to my friend look at my code ... :(
misgaryroland@gmail.com 3-May-11 22:20pm    
i already used
refresh()
refreshreport()
dipose()

wht should i do now

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



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