zhao
2021-07-19 8347f2fbddbd25369359dcb2da1233ac48a19fdc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
@{
    ViewBag.Title = "PrintReport";
    //Layout = "~/Views/Shared/_LayoutVue.cshtml";
}
<!DOCTYPE html>
<html>
<head>
    <meta name="viewport" content="width=device-width" />
    <title></title>
    <link href="~/Content/Report/css/Site.css" rel="stylesheet" />
    <link href="~/Content/Report/css/theme-cosmo.css" rel="stylesheet" />
    <link href="~/Content/Report/css/GrapeCity.ActiveReports.Viewer.Html.css" rel="stylesheet" />
    <style>
        body {
            padding-top: 5px !important;
        }
    </style>
</head>
<body>
    <div>
        <div id="viewer" style="height:460px;width:100%;"></div>
    </div>
    <script src="~/Content/Report/js/jquery-1.10.2.js"></script>
    <script src="~/Content/Report/js/bootstrap-3.0.0.js"></script>
    <script src="~/Content/Report/js/knockout-2.3.0.js"></script>
    <script src="~/Content/Report/js/GrapeCity.ActiveReports.Viewer.Html.js"></script>
    <script>
        $(function () {
            //var no = GetUrlParam("no");
            //var rdlx = GetUrlParam("rdlx");
            //var asmx = GetUrlParam("asmx");
            var viewer = GrapeCity.ActiveReports.Viewer({
                element: '#viewer',
                report: {
                    id: "ActiveReport/Template/"+"@ViewData["rdlx"]",
                    //id: "ActiveReport/Template/OutFromOrderReport.rdlx",
                    parameters: [
                                    {
                                        name: "tokenId",
                                        value: "@ViewData["tokenId"]"
                                    },
                                    {
                                        name: "no",
                                        value: "@ViewData["no"]"
                                    }
                                    //, {
                                    //    name: 'reportName',
                                    //    value: '入库单报表'
                                    //}
                    ]
                },
                reportService: {
                    url: "/ActiveReport/Service/"+"@ViewData["asmx"]"+".asmx"
                    //url: "/ActiveReport/Service/OutFromOrderService.asmx"
                },
                uiType: 'desktop',
                localeUri: '/Content/Report/js/i18n/Localeuri.txt',
                documentLoaded: function reportLoader() {
                    console.log(viewer.pageCount);
                },
                reportLoaded: function (reportInfo) {
                    console.log(reportInfo.parameters);
                }
            });
        })
    </script>
</body>
</html>