I have created a report which shows our company structure. The stored procedure lists all staff in the oganisation and their position, imagine Main Boss is Simon who has 2 subordinates Fred and Dave, Dave has three subordinates call Harry, Sally and Amy and Amy has one subordinate called Joe, This would look like this
Field1 Field2 Field3 Field4
Simon Fred <Null> <Null>
Simon Dave Harry <Null>
Simon Dave Sally <Null>
Simon Dave Amy Joe
I designed the sp this way to make the report easy to design as i am simply grouping by the first field and then on 2nd Field.
This report looks great and works perfectly.
But now i want to have a subreport in the main report which will give me more details about the selected employee in the form of a business card to the right of the structure. I have set the parameters in the main report manually to an employees ID and the subreport shows the correct record.
But how do i set it to show the business card for a different person depending on who they click??
What i want to be able to do is when a user clicks a name in the structure, i then need some code to say 'right, now set the subreports parameter to 66' and refresh the subreport.
Thank you all in advance