Skip to Content
author's profile photo Former Member
Former Member

Need help linking shared variable to subreport paramter

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.

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

2 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Jan 14, 2013 at 01:28 PM

    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.



    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Jan 14, 2013 at 10:38 AM

    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.


    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.