Jump to content
Xtreme .Net Talk

Recommended Posts

Posted (edited)

Dear Experts,

Please help me to send parameter programetically to Crystal Report Subreport from C#. I can pass parameter to the main report using the following way:

 

ReportDocument cryRpt = new ReportDocument();

cryRpt.Load("rptMainReport.rpt");

ParameterFields parameterFields = new ParameterFields();

ParameterField parameterField = new ParameterField();

parameterField.ParameterFieldName = "myRoleID";

ParameterDiscreteValue parameterValue = new ParameterDiscreteValue();

parameterValue.Value = 2;

parameterField.CurrentValues.Add(parameterValue);

parameterFields.Add(parameterField);

CrystalReportViewer1.ParameterFieldInfo = parameterFields;

CrystalReportViewer1.ReportSource = cryRpt;

 

 

but having problem to send parameter to subreport. so please help me sending example code.

 

Thanx in advance

Tahmeed Ahmed

Edited by tahmeed

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...