How to display subreport by clicking item in report
I have a report that lists part numbers. Each part has lots of details, so I would like the user to be able to click on a part number in the main report to bring up a subreport with the details for just that part. Is this possible?
Abhilash Kumar replied
Here's what you need to do:
1) Insert a Subreport on the details section or whichever section holds the Part Number field. Assuming that this Subreport has a lot of fields to be displayed, you can position the Subreport's left margin against the left margin of the Part Number field and then stretch the Subreport all the way to the end of the Main Report's width.
This will give you a Subreport that is wide enough to place as many fields as the Main report.
2) Right-click the Subreport, select Change Subreport Links > Move the Part Number field from the panel on the left to the pane on the right > Where it says 'Select data in Subreport based on field', choose the Part Number field from the drop-down (assuming the subreport is based off of tables/views).
If the Subreport is based off of a Command SQL or a Stored Proc and has a prompt defined in the source, you will need to select the other check box on the left that says 'Subreport parameter field to use' and choose the Part number prompt from the list.
3) Next, right-click the Subreport and select Format Subreport > Subreport tab > Check the 'On-demand Subreport option > Delete the existing Subreport Name and type in a space. Then go to the Font tab and uncheck 'Underline'
Hope this helps.