View Single Post
  #6 (permalink)  
Old July 26th, 2003, 04:43 AM
melvik melvik is offline
Friend of Wrox
Points: 3,558, Level: 25
Points: 3,558, Level: 25 Points: 3,558, Level: 25 Points: 3,558, Level: 25
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: California, USA
Posts: 996
Thanks: 2
Thanked 11 Times in 11 Posts
Send a message via Yahoo to melvik
Default

Hi there:
I hope this sample will help u to pass parameter to Report File.
(Use '@' if u use Stored Procedure in ur report)

  reports.vekalat crReportDocument;
  ParameterFields crParameterFields;
  ParameterField crParameterField;
  ParameterValues crParameterValues;
  ParameterDiscreteValue crParameterDiscreteValue;

  private void Page_Load(object sender, System.EventArgs e)
  {
  crReportDocument = new REPORT_NAME();

  CrystalReportViewer1.ReportSource = crReportDocument;
  crParameterFields = CrystalReportViewer1.ParameterFieldInfo;
  crParameterField = crParameterFields["@PARAMETER_NAME"];
  crParameterValues = crParameterField.CurrentValues;

  crParameterDiscreteValue = new ParameterDiscreteValue();
  crParameterDiscreteValue.Value = PARAMETER_VALUE;
  crParameterValues.Add(crParameterDiscreteValue);
  }

let me know about that.


Always:),
Hovik Melkomian.
Reply With Quote