The Problem with Panels, part 2

Continued from part 1.

Time for a stored procedure. This is gonna be lengthy, so I’ll explain a few things first before I get to pasting.

You’re going to need a string-parsing function. Mine is called cus_fnParseDelimitedList, and it looks like this:

You’re also going to need cus_vExcludePatients, my Exclude Patients View, or something similar to it if you need to filter out inactive/deceased/test patients. You can find that here. If you don’t need that, just delete those lines from the script.

Once you’ve got the stored procedure in place, create your subreport using the procedure as its data source. Link your formulas and parameters to the subreport, matching the parameters shown below (keeping the names the same makes everything easy).

At this point it’s probably best to let you explore the report and the procedure and see if you have any questions. It should come together pretty easily, but I’m here to help if you need it. Good luck!

Leave a Reply