我正在使用第三方自定义助手打开报告。我已将其包含在我视图中的另一个辅助方法中,如下所示
var types = ["w", "x", "y", "z"];
var data = [["x", 3], ["y", 4], ["x", 2], ["z", 6], ["z", 3], ["x", 1], ["z", 2]];
var counts = [];
var totals = [];
_.each(types, function(type, index){
var count = 0;
var total = 0;
_.each(data, function(value, index){
if(type == value[0]){
count ++;
total += value[1];
}
});
counts.push([type, count]);
totals.push([type, total]);
});
console.log(counts);
console.log(totals);
我需要在按钮或锚点击上调用此辅助方法。我们怎么可能这样做?
我正在尝试这样似乎不起作用的事情
@helper OpenReport(string reportName)
{
@Html.MvcReportViewer("/FolderName/"+reportName,
new { Height = 900, Width = 900, style = "border: none" })
}
有什么想法吗?感谢