title: How to pass parameter/prompt & schedule the webi report using SAP BO 4.0 SDK in C#
body: <p>I am able to schedule a webi report using C#. But can't able to pass prompt/parameter into the report. Please help</p>
  
  <pre><code> public string GetReport(int _reportId)
          {
              EnterpriseSession ceSession = EntSession;
  
              EnterpriseService ceEnterpriseService;
              InfoStore ceInfoStore;
              CrystalDecisions.Enterprise.InfoObjects ceReportObjects;
              CrystalDecisions.Enterprise.InfoObject ceReportObject;
              Report ceReport;
              string sQuery;
              try
              {
                  //grab the Enterprise session
                  if (ceSession != null)
                  {
                     // ceSession = (EnterpriseSession)Session["ceSession"];
  
                      //Create the infostore object
                      ceEnterpriseService = ceSession.GetService("", "InfoStore");
                      ceInfoStore = new InfoStore(ceEnterpriseService);
  
                      //Create query to grab the desired report
                      sQuery = "Select top 1 SI_ID, SI_PROCESSINFO.SI_PROMPTS,* From CI_INFOOBJECTS Where  SI_ID=" + _reportId + " AND SI_INSTANCE=0 ";
                      ceReportObjects = ceInfoStore.Query(sQuery);
  
                      //check for returned reports
                      if (ceReportObjects.Count &gt; 0)
                      {
                          ceReportObject = ceReportObjects[1];
  
                          //ceReport = (Report)ceReportObject;
  
                          //Create an interface to the scheduling options for the report.
                         CrystalDecisions.Enterprise.SchedulingInfo ceSchedulingInfo;
                          ceSchedulingInfo = ceReportObject.SchedulingInfo;
                          //run the report right now
                          ceSchedulingInfo.RightNow = true;
                          //run the report once only
                          ceSchedulingInfo.Type = CeScheduleType.ceScheduleTypeOnce;
  
                          //When scheduling to all destinations except the printer, you must first retrieve 
                          //the appropriate destination object. Each destination InfoObject is stored in the 
                          //CMS system table (CI_SYSTEMOBJECTS) under the Destination Plugins folder
  
                          //Retrieve the DiskUnmanaged Plugin from CI_SYSTEMOBJECTS
                        CrystalDecisions.Enterprise.InfoObjects ceDestinationObjects;
                        CrystalDecisions.Enterprise.InfoObject ceDestinationObject;
                          ceDestinationObjects = ceInfoStore.Query("Select * from CI_SYSTEMOBJECTS Where SI_NAME = 'CrystalEnterprise.DiskUnmanaged'");
                          ceDestinationObject = ceDestinationObjects[1];
                          //ReportFormatOptions ceReportFormatOpts;
                          //ceReportFormatOpts = ceReportObject.ReportFormatOptions;
  
  
                          //Create the DestinationPlugin object
                          DestinationPlugin ceDisk = new DestinationPlugin(ceDestinationObject.PluginInterface);
  
  
  
                          DiskUnmanagedOptions ceDiskOpts = new DiskUnmanagedOptions(ceDisk.ScheduleOptions);
  
                          ceDiskOpts.DestinationFiles.Add(@"" + Utility.BO.BOReportFolder + DateTime.Now.ToString("yyyy_MM_dd") + "_" + ceReportObject.Title.ToString() + ".pdf");
  
                          CrystalDecisions.Enterprise.Destination ceDestination;
                          ceDestination = ceSchedulingInfo.Destination;
                          ceDestination.SetFromPlugin(ceDisk);
                          List&lt;string&gt; reportParameterList = new List&lt;string&gt;();
  
  
                          Report rpt = ceReportObject as Report;
                          if (rpt != null)
                          {
                              //for each (CrystalDecisions.Enterprise.Desktop.Internal.ISReportParameter parameter in (CrystalDecisions.Enterprise.Desktop.Internal.ISReportParameter)rpt.ReportParameters)
                              //{
                              //    reportParameterList.Add(new ReportParameter(parameter));
                              //}
                              for (int i = 0; i &lt; rpt.ReportParameters.Count; i++)
                              {
                                  rpt.ReportParameters[i].DefaultValues[0].SingleValue.Value = "";
                                 // ISReportParameter isp =(ISReportParameter) rpt.ReportParameters[i];
                                 // reportParameterList.Add(rpt.ReportParameters[i].ToString());
                              }
                          }
  
  
  
  
                          //ReportParameters ceParameters;
                          //ReportParameterValue ceParamValue;
                          //ReportParameters rpt = ceReportObject as ReportParameters ;
  
                          //if (rpt != null)
                          //{
  
  
                          //    //ceParameters = ((Report)ceReportObject).ReportParameters;
                          //    foreach (ReportParameter ceParameter in rpt.ReportParameters)
                          //    {
                          //        ceParamValue = ceParameter.CreateSingleValue();
                          //        // ceParamValue.SingleValue.Value = "Time(12,15,15)";
                          //        //ceParameter.CurrentValues.Add(ceParamValue);
                          //    }
                          //}
  
  
  
                          //schedule report
                          ceInfoStore.Schedule(ceReportObjects);
  
                          return "Report Scheduled Successfully with an Object ID of : " + ceDestinationObject.ID.ToString()
                           + "&lt;br&gt;Report Scheduled to the following location: " + ceDiskOpts.DestinationFiles[1].ToString();
                      }
  
                  }
                  else
                  {
                      //no Enterprise session available
                      return ("No Valid Enterprise Session Found!&lt;br&gt;"
                      + "Please click &lt;a href='Index.aspx'&gt;here&lt;/a&gt; to return to the logon page.&lt;br&gt;");
                  }
              }
              catch (Exception err)
              {
                  throw new Exception(
                  "There was an error scheduling the report: &lt;br&gt;" +
                  err.Message.ToString() + "&lt;br&gt;" +
                  "Please click &lt;a href='Index.aspx'&gt;here&lt;/a&gt; to return to the logon page.&lt;br&gt;");
              }
              return "";
          }
  </code></pre>
  
  <p>Please help to pass paramater to WEBI Report.</p>