cancel
Showing results for 
Search instead for 
Did you mean: 

Display the parameters only once in main report , work for Subreport also

Former Member
0 Kudos

Hi Experts,

I am using Subreport with the main report in Crystal Report Concept, I have two parameters same in both reports(Main and Subreport) and i give those parameters two times in different report, I want to give the parameters only once in main report so that it work for subreport also.

Kindly tell me, how can i get this solution

Regards

Rahul

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Rahul.....

I would suggest you to keep the parameters same in Main CR as well as Subreport also......

Regards,

Rahul

Former Member
0 Kudos

Hi Rahul,

Parameters are same in both the report Main and Subreport, but i don't want to give parameter's values two different times , i want to give the parameter's value once in main report so that it should work for Subreport also. Is it Possible..?

Regards

Rahul

Former Member
0 Kudos

Hi Rahul,

Parameters are same in both the report Main and Subreport, but i don't want to give parameter's values two different times , i want to give the parameter's value once in main report so that it should work for Subreport also. Is it Possible..?

Regards

Rahul

Former Member
0 Kudos

Hi Rahul......

Is that CR for Marketing document?

Or it is a report?

If it is CR for Marketing document then import it under particular document and see the preview.....

Regards,

Rahul

Former Member
0 Kudos

Hi Rahul,

As i have mentioned already that i am working on Crystal Report , that has One Complete Report including Main report and one Subreport and both the reports have same parameters . I want to give parameters only once in main report so that it will work for subreport also.

Regards

Rahul

Former Member
0 Kudos

Hi,

Option 1:

Let's say in the main report, your parameter is called ?DateFrom

In the subreport, if you called in Pm-?DateFrom

You will notice that when you do the subreport link (right click on the subreport and select Change subreport link), select ?DateFrom, you will see that it will match ?DateFrom in main report to Pm-?DateFrom in subreport.

So, in the subreport, you use Pm-?DateFrom instead.

Option 2:

You can keep it the same name as you have done. You can link the subreport parameter with the main report parameter at Change subreport link as well.

Hope that make sense.

Former Member
0 Kudos

Hi,

I have two parameters @Docnum and @Cardcode which are same in both Main and Subreport, I am giving parameters two times in Main and Subreport, but i want to give only once in Main report and no need to give again for Subreport that will automatically work for Subreport.

how can i do this tell me the solution.

Regards

Rahul

Former Member
0 Kudos

Hi,

Im confused with your statement? When creating a subreport, it must be link to the main report unless

your sub report is independent.

Example :

Main Report - Parameter use (@DocNum,@CardCode)

Sub Report - Parameter use (?@DocNum,?@CardCode)

In dealing with subreport you must manually link which parameter from Main Report.

THanks.

Clint

Former Member
0 Kudos

Hi,

Please try this:-

1. Go to main design view in your crystal report.

2. Then do right click on the sub-report box.

3. Choose Change Subreport links.. option.

4. From Report fields choose your docnum parameter and press the right arrow key.

5. Then goto Subreport parameter field to use dropdownbox.

6. There will be three options :-

(a) ?Pm - ?docnum

(b) Parameter fields

(c) ?docnum

7. Choose (c) i.e. ?docnum

8. Now choose again from Report fields choose cardcode your second parameter and press the right arrow key.

9. Then goto Subreport parameter field to use dropdownbox.

10. There will be three options :-

(a) ?Pm - ?cardcode

(b) Parameter fields

(c) ?cardcode

11. Choose (c) i.e. ?cardcode

12. Finally choose OK.

Its done.

Regards

ARYA

Former Member
0 Kudos

Hi Arya,

I have tried your solution and followed all the steps but its not working , situation is still same again i am giving these two parameters two times First time in Main report then in Subreport.

I want the Solution so that i give the parameter's value only once in main report and it should work automatically for subreport.

Regards

Rahul

Former Member
0 Kudos

Hi,

PLease refer to this [link|http://www.crystalreportsbook.com/Forum/forum_posts.asp?TID=2241]

Thanks.

Clint