Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
2715
2 reportviewer on same page
posted

I have a mvc 5 project with to report views

each in it own tabs

the second is always zoom out

is there a way to avoid this

see images

<div id="tabs">
<ul>
<li><a href="#tabs-1">BEKRÆFTIGELSE</a></li>
<li><a href="#tabs-2">OPLYSNINGER TIL OMVISER</a></li>
</ul>
<div id="tabs-1">
<div style="text-align:center; width:850px" id="viewer1"></div>
</div>
<div id="tabs-2">
<div style="text-align:center; width:850px" id="viewer2"></div>
</div>
</div>

var rangeParameters = [{ Key: "ID", Value: 1 }];
$(document).ready(function () {
$("#tabs").tabs();
var _ID = '@ViewBag.ID';
var bekraeft = '@ViewBag.Bekraeft';
var sxs = '@ViewBag.SXS';
rangeParameters[0].Value = _ID;
$("#viewer2").igReportViewer({
renderSettings: {
definitionUri: "/Reports/Oplysninger_Omviser.igr",
serviceEndpointUri: "/ReportService1.svc/ajaxAddress/"
},
parameters: rangeParameters,
width: 800,
height: 550,
pageFit: 'fitToWidth'
});
if (bekraeft != 'Nej') {
$("#viewer1").igReportViewer({
renderSettings: {
definitionUri: "/Reports/Bekraeftigelse.igr",
serviceEndpointUri: "/ReportService1.svc/ajaxAddress/"
},
parameters: rangeParameters,
width: 800,
height: 550,
pageFit: 'fitToWidth'
});
}
});

Report.zip