如何刷新水晶报表 [英] how to refresh a crystal report

查看:82
本文介绍了如何刷新水晶报表的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我从这里得到了一个代码


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

推荐答案

您可以始终使用Crystal报表查看器.这有一个您可以使用的刷新按钮.
You can always use the crystal report viewer. This has a refresh button that you could use.


这篇关于如何刷新水晶报表的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆