Thanks for the input, everyone! First, the code belongs to my client and I'm not able to share a lot of detail--just the overall logic. Second, this isn't even my project; I just jumped in to help and now my curiousity has gotten the best of me. 😉 The output is 6 pages. Page 1 is a waterfall all 5 values of VAR, each a different color: VAR = 1 then red VAR = 2 then blue VAR = 3 then yellow VAR-= 4 then green VAR = 5 then purple Pages 2 through 6 are 1 VAR each, and we want the colors to match what is on page 1; so page 2 (VAR = 1) will be red, page 3 (VAR = 2) will be blue, etc. It seems that the overall issue is how the macros are set up: A proc template is called to create the style "STYLEX", using "replace GraphData1" etc. to set the 5 colors for page 1. A proc template is called to create the format for the page 1 waterfall Proc sgrender creates page 1 from the dataset A macro is created to subset the dataset by value of VAR (if VAR = &val) A proc template (still within the macro) is called to create the format for the pages 2-6 waterfalls Proc sgrender (still within the macro) creates the page Macro is called 5 times, once for each value of VAR Another macro combines all 6 pages into one output--and this macro calls STYLEX. Since pages 2 through 6 only have one value of VAR, each one gets treated like VAR = 1 and is assigned red. I think what we might need to do is find a way to alter that final macro so that we can create each page in a different style, THEN combine them.
... View more