Creating "left join" between subreport and report
Posted on 2010-08-26
I am unsure as to how exactly I can word this, so please bear with me.
I have a report that kicks out some information regarding supervisors, followed by a subreport that outputs information about employees that each supervisor supervises. What I'd like to do is more or less indicate, "If there are no employees currently supervised by this supervisor, don't display the supervisor."
Coming from a SQL background, I think of it as essentially having two tables: one table lists supervisors, the other lists employees and their supervisors. I would like to perform the equivalent of a left join from the employee table to the supervisor table (I suppose this could also be done as an inner join, if I wanted to be technical).
The only method I have encountered is to create a shared variable that is populated in the detail section of the subreport when each employee is printed, and then look at this shared variable in the main report. I am unsure as to whether or not this is the accepted method for performing such an action, or if there is a better way of doing so. Any input on the matter would be greatly appreciated.