cancel
Showing results for 
Search instead for 
Did you mean: 

Subreport links

Former Member
0 Kudos

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

Accepted Solutions (0)

Answers (3)

Answers (3)

abhilash_kumar
Active Contributor
0 Kudos

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

Former Member
0 Kudos

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

Former Member
0 Kudos

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.