@{
	ViewBag.Title = "Index";
}


<h3>This sample demonstrates ReportViewer widget without the Toolbar UI.</h3>


<p>
Change report definition:
<select id="reportSelect">
	<option value="C1ReportXML/CommonTasks.xml|01: Alternating Background (Greenbar report)">
		(C1Report) CommonTasks.xml</option>
	<option value="C1ReportXML/MultiColSubreport.xml|Multi Across">(C1Report) MultiColSubreport.xml</option>
	<option value="C1ReportXML/BarcodeLabels.xml|Product Labels (EAN-13, Label 5096)">(C1Report)
		Product Labels (EAN-13, Label 5096)</option>
	<option value="~/Rdl/Nice2_SpanningGroups.rdl|" selected="selected">(RDL) Nice2_SpanningGroups.rdl
		(with outline)</option>
	<option value="~/Rdl/Nice3_3Reports.rdl|">(RDL) Nice3_3Reports.rdl</option>
	<option value="~/Rdl/Nice4_Big.rdl|">(RDL) Nice4_Big.rdl</option>
	<option value="~/Rdl/ReportParameters01.rdl|">(RDL) ReportParameters01.rdl</option>
	<option value="~/Rdl/ReportParameters03.rdl|">(RDL) ReportParameters03.rdl</option>
</select>
</p>
<script language="javascript" type="text/javascript">
	$(document).ready(function () {
		$("#reportSelect").change(function () {
			var arr = $("#reportSelect").val().split("|");
			$("#reportviewersample").c1reportviewer("option", "fileName", arr[0]);
			$("#reportviewersample").c1reportviewer("option", "reportName", arr[1]);
			$("#reportviewersample").c1reportviewer("generate");
		});
	});
</script>

<p>
Custom UI methods:&nbsp; Change zoom:
<select id="zoomSelect">
	<option value="10%">10%</option>
	<option value="20%">20%</option>
	<option value="40%">40%</option>
	<option value="50%">50%</option>
	<option value="70%">70%</option>
	<option value="100%" selected="selected">100%</option>
	<option value="actual size">Actual size</option>
	<option value="fit page">Fit page</option>
	<option value="fit width">Fit width</option>
	<option value="fit height">Fit height</option>
</select>
<label>
	Toggle paged view:<input type="checkbox" checked="checked" onchange='$("#reportviewersample").c1reportviewer("option", "pagedView", this.checked);' />
</label>
&nbsp;
<label>
	<a href='javascript:void(null)' onclick='$("#reportviewersample").c1reportviewer("option", "fullScreen", true);'>
		Enable full screen mode (press ESC for exit).</a>
</label>
</p>
<script language="javascript" type="text/javascript">
	$(document).ready(function () {

		$("#zoomSelect").change(function () {
			$("#reportviewersample").c1reportviewer("option", "zoom", $("#zoomSelect").val());
		});
		$(document).keydown(function (e) {
			if (e.which == 27) {
				// exit from full screen mode.
				if ($("#reportviewersample").c1reportviewer("option", "fullScreen")) {
					$("#reportviewersample").c1reportviewer("option", "fullScreen", false);
				}
			}
		});

	});
</script>


<script language="javascript" type="text/javascript">
	$(document).ready(function () {
		$("#reportviewersample").c1reportviewer({
			reportServiceUrl: "@Url.Content("~/reportService.ashx")",
			fileName: "C1ReportXML/BarcodeLabels.xml",
			reportName: "Product Labels (EAN-13, Label 5096)",
			zoom: "fit width",
		});
	});
</script>

<div id="reportviewersample" style="width: 800px; height: 600px;border:1px solid gray;">
</div>

