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

Subreport links

Hi,

I'll start by admitting that when it comes to subreport linking, mechanically I get it done, but I've never really wrapped my brain around it.

So, I have a report, containing a linked subreport, that worked just fine. Uses only a Customer Number parameter.

The vendor of the software that we use (SQL Server 2008 backend), did an upgrade and told me that access to the DB had changed, and that I "might" need to update the DB links (SQL Native Client 10.0)

Sure enough I had to update the Database source for my reports, but when I updated for this particular report, something broke, and now when the report is run, there are two prompts for the Customer Number. I can delete and recreate (which I did), but I'm trying to make this a teachable moment.

Can anyone give me, or point me to, a definitive checklist of EVERYTHING I need to look at if choose to fix rather than recreate?

Short of definitive, any suggestions would also be helpful...

Thank you,

Matt

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

3 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Aug 29, 2013 at 04:44 PM

    Hi

    1) How did you link main report and sub report (like field to field or parameter to field or parameter to parameter)

    2) Does the customer Number parameter created in both reports or only one report?

    3)can you attach the report with saved data?

    Regards,

    Naga.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Aug 29, 2013 at 04:46 PM

    Hi Matthew,

    If there is any change at the backend i.e a driver change, ODBC DSN change etc then you just need to map the existing reports database connection to the new connection that is probably using the changed driver or DSN name. This is usually done from the Database >> Set datasource lcation option.

    In you case since there are main and sub reports this would have to be done for both the reports. Now that you are changing the database connection, probably the link between the main and the sub report is lost or it has to be re-done(I've not tested this though).

    In the right click menu of the sub report you have the edit subreport links option that will be required to re-do the link. Just select the CustomerNumber parameter from the main report and use the same parameter to link from the subreport in this dialogue box. This will eliminate the multiple prompting issue.

    -Prathamesh

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Aug 29, 2013 at 04:51 PM

    Hi Matt,

    Subreport links isn't that hard to understand. You can link:

    • A field/formula from the Main Report to a field in the Subreport
    • A parameter from the Main Report to a field in the Subreport
    • A parameter/field/formula from the Main Report to a parameter in the Subreport/Subreport's source

    If the Subreport has a Customer Number prompt in its datasource or at the Report Level (which is eventually tied to the Record Selection Formula) AND your Main Report also has a Customer Number prompt, you can simply link the two prompts by:

    Right-clicking the Subreport > Change Subreport Links > Moving the Main Report prompt to the pane on the right > Choosing the option 'Subreport parameter field to use' > Selecting the corresponding prompt from the drop-down

    If you simply wish to filter the Subreport based on a value in the Main Report then you would choose the 'Select Subreport data based in field' option and choose the corresponding field to that matches with the field from the Main report.

    If you wish to 'receive' a value from the Main Report to be used in calculations/further filtering, you would want to 'uncheck' the 'Select Subreport data based in field' option and let it pass the value via the parameter it automatically creates in the Subreport.

    -Abhilash

    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.