我想要我的应用程序加载水晶报告的路径,
Dim Report As New ReportDocument
Report.Load("D:\xxx\xx\x\ Report.rpt")
而不是硬编码路径我需要它使用代码,因为我不知道我的客户将在哪里安装这个应用程序。
所以我尝试了以下代码
filepath = Path.GetDirectoryName(Application.ExecutablePath)
但它返回的路径为 D:\xxx\xx\x\bin\
我不想在我的路径中使用那个 Bin,因为我的报告在“D:\xxx\xx\x\ Report.rpt”中可用,所以我该怎么办这里?