0

I am using Crystal Reports with Asp.Net and C#. I am facing a problem sharing field values to a subreports stored procedure parameters.

My report structure :

1. Main report (M) with stored procedure P(1)
2. Subreport (S) with another stored procedure P(2)

P(1) accepts a parameter which is a comma separated string of values. This comma separated string goes to the IN operator of the procedure query. So I get a list of records.

comma-separated param = "v1,v2,v3....vn".

Now I have to use these comma separated values into subreport (S) procedure P(2) individually.

So that my subreport is generated a single time for a comma separated value.

output to be achieved is:

Main report M1
Subreport S1
Main report M2
Subreport S2
.
.
.
and likewise.

Kindly help me pass the values v1...vn to sub report stored procedure.

Brian Tompsett - 汤莱恩
  • 5,753
  • 72
  • 57
  • 129
  • https://stackoverflow.com/questions/2099131/how-can-we-pass-a-parameter-from-main-report-to-subreport-in-crystal-reports-xi – Vijunav Vastivch Jun 20 '17 at 00:23
  • I do not have to link the sub report by main report parameter. What i want to do is process the main report comma separated string parameter to get individual value and then pass that individual value to sub report as a stored procedure parameter. – Gaurav Choudhary Jun 21 '17 at 02:33
  • @GauravChoudhary So you want to render your subreport for each value in your list? If your Param is "v1,v2,v3" you want to execute your subreport 3 times, is that correct? – dd4711 Jun 27 '17 at 11:53
  • yes exactly @dd4711 – Gaurav Choudhary Jul 03 '17 at 11:56

0 Answers0