Toggle a map layer on and off without reprocessing the report?
Hi, I have a map report with multiple layers - one for polygon, one for points and one for layers. Is it possible to hid a layer after the report is rendered, without having to redraw the map which takes several seconds? Thanks
January 21st, 2011 2:52pm

Hi, Map control in Reporting Services 2008 R2 does not have "Toggle" property, but if you want to hide only one layer, there is a workaround for your purpose, please refer to these steps: 1. Suppose the layer which will be hidden is layer A, create two report named SubReportA and SubReportB, in SubReportA it has only the map, but in SubReportB it has the map without layer A. 2.Create a table to original report, add an dataset for binding, such as "SELECT 1", add a parent group to detail cell, and then add a child group to the parent group, add an adjacent group to the child group, the parent group, child group, and adjacent group should group on same field (if you use select 1, it may be "ID" here), insert SubReportA as sub report to the detail cell of the child group and SubReportB to the adjacent group detail cell. 3. Make the child group and its adjacent group take their parent group as toggle item, and set the visibility of one of both to "show" and another to "hide". In fact, it shows one report and hides another here (it's a drill down report), but the report will look like hide a layer of map. And because the drill down report only retrieve the data which can be shown in report, so it will retrieve one of the both maps every time, and the dataset of sub report can be cached on report server, so it will run faster than redraw the whole report. Thanks, Albert Ye
Free Windows Admin Tool Kit Click here and download it now
January 27th, 2011 5:04am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics