[ASK] Crystal Report-rpt文件无法从Access数据库加载数据.为什么? [英] [ASK] Crystal Report - rpt file cannot load data from access database. Why?

查看:100
本文介绍了[ASK] Crystal Report-rpt文件无法从Access数据库加载数据.为什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在学习在项目中使用Crystal Report.当我将项目文件夹移动到另一个文件夹时,报表无法加载插入数据库中的新数据".我原来的项目文件夹是D:\ Learning \,当我复制到D:\ Deploy \ Learning \时,报表无法加载新数据.请帮我解决问题.这是代码.

I''m learning to use crystal report in my project. When I move my project folder to another folder the report can''t load the "new data" inserted into database. My original project folder is D:\Learning\ and when I copied to D:\Deploy\Learning\ the report can''t load the new data. Please, help me how to solve my problem. Here is the code.

Private Sub CrystalReport_Load(sender As System.Object, e As System.EventArgs) Handles MyBase.Load
        Dim rpt As New ReportDocument
        rpt.Load(Application.StartupPath & "\CrystalReport1.rpt")
        Me.CrystalReportViewer1.ReportSource = rpt
        Me.CrystalReportViewer1.Refresh()
    End Sub

推荐答案

您的数据库也保存在您的项目中吗?如果是这样,则可能需要执行水晶报表,右键单击字段资源管理器"中的数据库字段",选择设置数据库位置",然后找到数据库的新位置.

在某些 CP文章中,您可能会找到更多帮助. ^ ].
Is your database also kept in your project? If so...you may have to go the crystal report, right click on Database Fields in the Field Explorer, select Set Database location and find the database the new location.

You might find more help in some of the CP Articles[^].


这篇关于[ASK] Crystal Report-rpt文件无法从Access数据库加载数据.为什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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