开发者

Having trouble with add crystal report path

开发者 https://www.devze.com 2023-03-08 09:49 出处:网络
I am trying to add crystal report file name in my program, but it\'s doesn\'t work. i used load(server.mappath(\"\"));// but it doesn\'t support(no intellisense), may be i am missing some namespace.

I am trying to add crystal report file name in my program, but it's doesn't work.

i used load(server.mappath(""));// but it doesn't support(no intellisense), may be i am missing some namespace.

i added following namespaces.

using CrystalDecisions.CrystalReports.Engine;  
using CrystalDecisions.Shared;  

Instead of that if i hard-code the path like "C:\\abc.rpt" then it works fine, but i need a perman开发者_开发问答ent solution for this.

even "~\\abc.rpt" doesn't work for me.


I found the Solution.

System.AppDomain.CurrentDomain.BaseDirectory.ToString();

i used windows form that's why server.mappath didn't work.

0

精彩评论

暂无评论...
验证码 换一张
取 消