0
我使用Perpetuum Reports在我的應用程序中打印發票。現在我需要讓我的用戶打印發票。我應該如何使用hiperlink來做到這一點?Perpetuum Reports中的報告編輯器
我用下面的代碼,但它不工作:
<script src="@Url.Content("~/Scripts/jquery.treeview.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/mscorlib.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/PerpetuumSoft.Reporting.WebViewer.Client.Model.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/PerpetuumSoft.Reporting.WebViewer.Client.js")" type="text/javascript"></script>
<script type="text/javascript">
var reportViewer = null;
$(document).ready(function()
{
var reportViewer = new PerpetuumSoft.Reporting.WebViewer.Client.ReportViewer("#ReportViewerElement");
reportViewer.setServiceUrl("http://jmanlocal/ReportServiceController");
reportViewer.reportName = "InvoicesRep";
reportViewer.renderDocument();
reportViewer.setThumbnailsControl("#ssr_thumbnailContentPanel");
reportViewer.setDocumentMapControl("#documentMapView");
});
function PrintRep()
{
reportViewer.exportToPdf();
}
</script>
<div id="ReportViewerElement"></div>
<button onclick="PrintRep()">Print</button>