You're right. The reason why the switcher is only showing and hiding the "report1" section is that the "report2" section is not a child of the switcher at all.
Especially on a view this complicated (or half this complicated), you need to be very careful with your indentation so as to minimize your own confusion. If the file was indented cleanly, it would have been easy for you to spot the misalignment - the fact that "report1" and "report2" were not siblings of eachother.
There's basically an extra </module> tag before the "report2" section, that you'll have to move to the end of that same section.
However... there's a lot else that is quite wrong with this approach and there's a lot of dead stuff in this view that can be removed. I've taken the liberty of cleaning it all up and posting the result to pastebin. The cleaned up version is half the size. http://pastebin.com/xtZRVU8X
1) The only difference between the report1 section and the report2 section, is that the first does chart avg(duration) by PAGE COMMON_TASK and the second does | timechart avg(duration) by PAGE .
Just have those be the two values of your Pulldown, and dont use the Switcher module at all. Switcher should be a last resort, for when you have some difference between sections where the module config per section has to be fundamentally different. Here you can factor the difference into a single $foo$ token. This will drastically simplify your view.
2) You're setting searchWhenChanged to False on the TimeRangePicker even though you have allowSoftSubmit to False on the SubmitButton. Change searchWhenChanged to True (you should quite honestly never use False ever. it is kind of evil and the UI can behave badly)
3) lots of dead or vestigial module code.
a) I strongly suspect that your ViewstateAdapter module is actually serving no purpose and it has just been copied over from some original simpleXML conversion long ago. Delete it entirely
b) HiddenFieldPicker and Gimp are definitely doing nothing, and are vestigial carryovers from simpleXML conversion. Delete them.
c) JobProgressIndicator and EnablePreview should never contain downstream modules (it does no harm but it makes no sense). This is a bug in the SimpleXML conversion code. De-indent these child modules. Save your eyesight a little.
4) weird things on the <view> tag. Some of these are side effects of simplexml conversion, but you can delete autoCancelInterval="90" isVisible="true" objectMode="SimpleForm" and also autorun="False" . Some of those are defaults and some are having no effect.
5) updatePermalink on the SubmitButton module isn't going to be doing anything useful so you can remove it. However... if you want a permalink to be constantly updated, even in an arbitrary form search view in advanced XML like this, you can use the Sideview URLLoader module with the keepUrlUpdated param set to true, and it will actually update a working permalink as well as enable back button and forward button for all the pulldown changes.
6) the groupLabel param is meaningless and it's just cruft accidentally inserted by the simpleXml conversion code. You can delete all of these.
7) lots of duplicated layoutPanel attributes. If layoutPanel is specified for a given module, all its downstream modules will inherit that layoutPanel so there's no need to specify it again.
😎 I'm fairly certain that many of your charting keys were explicitly setting values that happen to be the default values for the given key in the charting framework, so I removed those.
In the end your XML becomes a LOT simpler with all these fixes and cleanups.
For some reason the answers site is being a bit ornery with respect to posting large code samples, so I've put a cleaned up version over in pastebin for you.
http://pastebin.com/xtZRVU8X
One more note - a useful and cheap trick to perfectly indent a crazily-indented view, is to load that view in the Sideview Editor, then pick something at random to edit. Submit the form however with the exact values that it loaded with. The Sideview Editor will write the XML back to disk, but it will do lots of little cleanup things to it and one of those is that the indentation will get fixed. You might have to fish the file out of local and move ti over to default, but it can be useful.
... View more