HOW TO PASS OPTIONAL PARAMETERS IN CRYSTAL REPORThttp://forums.asp.net/t/1785143.aspx/1?HOW+TO+PASS+OPTIONAL+PARAMETERS+IN+CRYSTAL+REPORTWed, 28 Mar 2012 04:08:40 -040017851434898863http://forums.asp.net/p/1785143/4898863.aspx/1?HOW+TO+PASS+OPTIONAL+PARAMETERS+IN+CRYSTAL+REPORTHOW TO PASS OPTIONAL PARAMETERS IN CRYSTAL REPORT <p>hi i have to pass three parameters to my crystal report..two of them are optional for my store procedure</p> <p>but when miss to pass those parameters to my crystal report it start giving me parameter missing msg..i just want to know how to</p> <p>make it work with these optional parameters.</p> <p>any idea??</p> 2012-03-26T07:37:36-04:004901256http://forums.asp.net/p/1785143/4901256.aspx/1?Re+HOW+TO+PASS+OPTIONAL+PARAMETERS+IN+CRYSTAL+REPORTRe: HOW TO PASS OPTIONAL PARAMETERS IN CRYSTAL REPORT <p>My question is why you pass parameter for SP and report both. Pass the parameter to SP and bind result to the Report. Whatever to get rid of parameter prompting use &quot; &quot;. But i am not getting ur requirement.</p> 2012-03-27T09:59:15-04:004902852http://forums.asp.net/p/1785143/4902852.aspx/1?Re+HOW+TO+PASS+OPTIONAL+PARAMETERS+IN+CRYSTAL+REPORTRe: HOW TO PASS OPTIONAL PARAMETERS IN CRYSTAL REPORT <p>no may i explain badly...i was meant that i have a crystal report bind to a storeprocedure and of course i have to pass those parameters at runtime so that report will be displayed correctly...</p> <p>i was passing parameters like this but two of my parameters wereoptional...</p> <pre class="prettyprint">string reportpath = Server.MapPath(&quot;AssigmntsReport.rpt&quot;); rpt.Load(reportpath); ConnectionInfo connectionInfo = new ConnectionInfo(); string[] ConnStringKey = ConfigurationManager.AppSettings.GetValues(&quot;NestleConnString&quot;); string ConnStr = ConfigurationManager.ConnectionStrings[ConnStringKey[0]].ConnectionString; System.Data.SqlClient.SqlConnectionStringBuilder builder = new System.Data.SqlClient.SqlConnectionStringBuilder(ConnStr); rpt.SetDatabaseLogon(builder.UserID, builder.Password, builder.DataSource, builder.InitialCatalog, false); rpt.DataSourceConnections[0].SetConnection(builder.DataSource, builder.InitialCatalog, false); rpt.DataSourceConnections[0].SetLogon(builder.UserID, builder.Password); rpt.SetParameterValue(&quot;@Type&quot;, Type);</pre> <pre class="prettyprint">&nbsp;</pre> <pre class="prettyprint">&nbsp;</pre> <pre class="prettyprint">now two of my parameters are optional for my store procedure </pre> <pre class="prettyprint">but when was not passing those parameters i was getting error but it get solved now </pre> <pre class="prettyprint">&nbsp;i simply pass null for those parameters.,</pre> 2012-03-28T04:05:52-04:004902859http://forums.asp.net/p/1785143/4902859.aspx/1?Re+HOW+TO+PASS+OPTIONAL+PARAMETERS+IN+CRYSTAL+REPORTRe: HOW TO PASS OPTIONAL PARAMETERS IN CRYSTAL REPORT <p><img src="http://forums.asp.net/scripts/tiny_mce/plugins/emotions/img/smiley-smile.gif" alt="Smile" title="Smile" border="0"></p> <p></p> 2012-03-28T04:08:40-04:00