Generally we need to use crystal report in our application and it may happen more than crystal report share same headers, putters for ex address, name etc. so we need not write these values on every crystal report saperately, we can pass it from app.config
like this
<Configuration><appSettings>
<add key="cname" value="mayur"/>
<add key="address" value="address of mayur"/>
</appsettings></configuration>
now on form on which you are displaying crystal report do following things
using system.Configuration
string name=ConfigurationManager.Appsettings.Get("cname");
string addr=ConfigurationManager.Appsettings.Get("address");
ReportDocument obj=new ReportDocument();
obj.load("path of report");
crystalreportviewer.ReportSource=obj;
obj.SetparameterValue("your parameter name in crystal report for name",name);
obj.SetparameterValue("your parameter name in crystal report for address",addr);
Join the conversation! Your thoughts help the community grow.
Sign in to leave a comment
It is the same account you read, post and publish with — and you will come straight back to this page.

MadhavPosted May 20, 2016, 8:26 AM
no,this is not working any way