我需要在客户端计算机上的项目中安装绝对路径信息 [英] Absolute Path Information Required Wen i install in the project in my client machine

查看:108
本文介绍了我需要在客户端计算机上的项目中安装绝对路径信息的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

朋友,我用Crystal Report创建了Vb.net项目.........我在客户端计算机上安装了该项目,该项目显示错误需要绝对路径信息"

如果我在机器上安装了相同的Project,则表示它可以完美运行...
我曾经使用过这样的代码

Hi friends I hav Created Vb.net project With Crystal Report ......... I Install the project in Client machine it Shows The Error "Absolute Path Information Required "

If i install the same Project in my machine means it works Perfectly ...
I hav used code like this

Crystaldataadapter = New OleDbDataAdapter("select * from COMPANYPROFILE,CalInstrumentDetails,InputStd,OutputStd,nabl_presstans where CalInstrumentDetails.iptagno = InputStd.ipTagno  and CalInstrumentDetails.optagno = OutputStd.opTagno  and CalInstrumentDetails.Instrumenttagno = nabl_presstans.tagno and CalInstrumentDetails.CustomerID =Customerdetails.customerid and CalInstrumentDetails.Instrumenttagno = ''"& Reportgeneration.cb_Tagno.Text &"''", reportcon.connectionstring)
                    Crystalcommandbuilder = New OleDbCommandBuilder()
                    Crystaldataadapter.Fill(ds, "CalInstrumentDetails")
                    Crystaldataadapter.Fill(ds, "InputStd")
                    Crystaldataadapter.Fill(ds, "OutputStd")
                    Crystaldataadapter.Fill(ds, "Customerdetails")
                    Crystaldataadapter.Fill(ds, "nabl_presstans")
                    Crystaldataadapter.Fill(ds, "COMPANYPROFILE")
                    Dim str As String = ds.Tables(0).Rows(0)(1)
                    cryNablthermosimplex.Load(Application.StartupPath &"\\termocouplesimplex.rpt")
                    cryNablthermosimplex.SetDataSource(ds)
                    CalmanReportViewer.ReportSource = cryNablthermosimplex
                    CalmanReportViewer.Refresh()
                    CalmanReportViewer.RefreshReport()


请给我一些建议,以解决这个问题......这是非常紧急的


Plz Giv me some suggection to slove this problem ...... its very urgent

推荐答案

那里没有很多信息,很难说,但是您的代码中只有两个地方使用任何形式的路径:
With not a lot of information there, it is difficult to say, but there are only two places in your code where any form of path are used:
Crystaldataadapter = New OleDbDataAdapter("select * from ...", reportcon.connectionstring)

cryNablthermosimplex.Load(Application.StartupPath &"\\termocouplesimplex.rpt")


由于后者使用的方法应始终返回完整的有效路径,因此必须使用另一种方法.检查您的reportcon.connectionstring值:很可能是错误的.

不知道从何处获得它,很有可能您在安装时忘记了设置配置文件参数,或者使用了明智的"默认设置.


Since the latter uses a method which should always return a full, valid path, it has to be the other. Check your reportcon.connectionstring value: it is very likely to be wrong.

Without knowing where you get it from, there is a good chance that you have forgotten to set configuration file parameters when you did the install, or to use "sensible" defaults instead.


一个明显的例子问题是您正在使用字符串串联来构建报表的文件路径.您还要在文件名前加上2个反斜杠.删除其中之一,您的代码就可以使用.

One obvious problem is that you''re using string concatenation to build the filepath to your report. You also put 2 backslashes before the filename. Remove one of those and your code MAY work.

cryNablthermosimplex.Load(Application.StartupPath &"\\termocouplesimplex.rpt")


这篇关于我需要在客户端计算机上的项目中安装绝对路径信息的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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