on 2013 Jan 14 12:24 AM
I have two subreports that are displayed on my main report. The first subreport assigns a value to a shared variable from one of the fields that is returned from the subreport's stored procedure. I'm able to successfully display that shared variable value on the main report. I added a second subreport that to a section beneath the first subreport that will use the shared variable value as a parameter input. I haven't been able to get the second subreport to use the shared variable value to return any data.
Here is what I've tried so far:
Clicked "change subreport links" on the second subreport
moved the main page shared variable formula to the "fields to link to" pane.
Selected the second subreport stored procedure parameter name in the "subreport parameter field to use" section.
The checkbox to the right is greyed out.
Can anyone offer any advice on what I'm doing wrong? Is there an easier way to populate a subreport from a field that is returned in another section?
I'm using Crystal 10, thanks.
Request clarification before answering.
Hi Fred,
Hope, you have placed the main report shared variable formula atleast one section above the section where subreport # 2 is placed.
Also you might be aware that the datatype and format of the 'value' going from shared variable formula to subreport # 2's stored proc parameter should be matching.
You can test if the shared variable is actually passing any value to the subreport # 2 or not, by simply calling it in a formula inside subreport # 2.
Thanks,
Prathamesh
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Well, if you see the parameter from the subreport's source under "Subreport parameter fields to use", that usually means that the datatype of this parameter and field in the "Fields to link to" pane are same!
If the datatypes don't match, CR does not show the parameter in the drop-down.
-Abhilash
Yes, I can see the parameter from the subreport's source. The forumula has NumberVar and the stored procedure parameter has an Int type. I'm not sure why the subreports is not being displayed. I did not that the forumla return 23.00 instead of 23 but I don't think that should be a problem?
I can see the forumla value if I drag the formula into the the section before or the section with the subreport. I believe something is wrong with the way I have the parameter linked.
Hi Fred,
You should be able to link to a parameter in another Subreport using the shared variable without any issues.
You said that you were able to move the shared variable to fields to link to pane and also select the stored proc's parameter from the drop-down list. What happens after this? Doesn't the second subreport return data respective to the shared variable's value?
What you're following is the correct way to do it, in fact if you've linked the shared variable to the subreport's parameter so the subreport should return something.
-Abhilash
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
| User | Count |
|---|---|
| 15 | |
| 9 | |
| 6 | |
| 4 | |
| 4 | |
| 4 | |
| 3 | |
| 2 | |
| 2 | |
| 2 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.