Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
Last post Mar 28, 2012 04:08 AM by cnranasinghe
Mar 26, 2012 07:37 AM|LINK
hi i have to pass three parameters to my crystal report..two of them are optional for my store procedure
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
make it work with these optional parameters.
Mar 27, 2012 09:59 AM|LINK
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 " ". But i am not getting ur requirement.
Mar 28, 2012 04:05 AM|LINK
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...
i was passing parameters like this but two of my parameters wereoptional...
string reportpath = Server.MapPath("AssigmntsReport.rpt");
ConnectionInfo connectionInfo = new ConnectionInfo();
string ConnStringKey = ConfigurationManager.AppSettings.GetValues("NestleConnString");
string ConnStr = ConfigurationManager.ConnectionStrings[ConnStringKey].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.SetConnection(builder.DataSource, builder.InitialCatalog, false);
now two of my parameters are optional for my store procedure
but when was not passing those parameters i was getting error but it get solved now
i simply pass null for those parameters.,
Mar 28, 2012 04:08 AM|LINK