后端接收不到openReport的参数
参照JsViewerAPI中的openApi中传递了参数,但后端取不到,请问是怎么回事呢您好,你现在使用的是JSviewer 进行报表的 展示,然后后端想获取 报表的参数进行一个参数的过滤是吧。那么你可以这样操作:
https://gcdn.grapecity.com.cn/forum.php?mod=viewthread&tid=69784&extra=page%3D2
关于其他的 JSviewer 的知识可以参考这个:https://gcdn.grapecity.com.cn/forum.php?mod=viewthread&tid=75712&extra=page%3D1 您好
在前台为后台报表参数传值时,首先需要在报表设计时,为报表添加对应数量的参数,且需要在数据集参数中添加参数以映射到报表参数:https://gcdn.grapecity.com.cn/fo ... 7898&extra=page%3D2
这里的args.parameters[] 获取的就是数据集的参数。
前端传值格式参考:https://gcdn.grapecity.com.cn/forum.php?mod=viewthread&tid=54418&extra=page%3D5
data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAPsAAADGCAYAAAAUlvbVAAAdYUlEQVR4Ae2dTa/ltJaGzw/pf1GTO9+TK/XPuFLNyAgJBj3gHyDYfOgIJjCgJYRAgj2huwUlwQR0JCS0BUh0QemWigFVV7qHUd1m4NbrZDnLjvNtn+wk75Fy8mU7jr0ev8vOjnN1e3trupZHjx51nu+Ku6dzNzc35tVXXzXvvfeeefr0Kcusx672ZBuXcq9XfRnZG+zffvut+eijj3qXTz75xPz000/m73//u13eeOMNC7sA31euPN8tMiyf9OWzGOz/9h//a2S5lIp99uyZhfzBgwcOYoG5bf3999+b6+tr89VXXxkB/s0337xzZf/iiy/M22+/bZePP/7Y/Pzzz515wPnPPvvMhr+U8mc+0gOuy5SwK3dTYG8DOzwO0AVwrAE8wP/11187QdMVkGpbQNdrwBx2KX777TeDxgDh3n///d5GIVX+mE5ekIeUL2FXsKPA4MKHUMf2Nehw3bEAeIQdUvCpw5zPZwuvhh3bH3zwgQUe0Gv1jzUEqfPE9JYHXNcBYZ8Aewx0wA5lXwp2qdSvv/7avPPOO86lF+Ch4tIQfPfdd4s0SJJHrpdpBAj7SNj7QMeg3dLGDBWX/rgAjjUag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rgr2hkqLKnfNGw+gkMYY2G34CLTVdWRKqv4yp7L3l9H2GrnssIuyT11buAeOxouqy5hcEmW300thJB6AXLk53vRHIpDHuLJ3zBt/e2t0I4GGRO87tbUNR/gkIOzP11NMh0bcnmak0cC1Wr2Q7Rl/WFZb388Oe4oChGKH6YhrLmun6vfLL7Xi+GzYG8pbucQy8KXAEPV3kPbNG28H4vBFGLjxZbracwCket+//wjsuuvQ5YZX4fClGp2+bRTU/fjXI+hbKI/ssIuipy4sgVzWTtXr7zjOgt1CG+3DVqDNnDcejcPheAqes9dQjYY9fGYfgd82SO6eqoar6nJo8FPXFdOr63XJssgOe4qba5s3HmnjT6u6qLleS4MwfTQ+Ulmqz458xN14xCvd/3De+FMB17xW6IZnIP1+WTtIkWYdT5evTUPUWefPdkWuzKEovG/CI65VdC/tyL12eQo81/A6dZ1c0nZ22FMoO6ahaps3HiCLqmvA9fZdwe5ceAAKgCrIpB/cBCsOrUDYrra+KuO6Zdh6XAHXwoCdd01Re8mXQC77yLc0FoR4NRAPbVCywz40I13h9JxzCKf3taqHH4UQ4NPBXsIkUGsYPWUHKBVAOgzy7qlvi0IjHCAN41pwrdLHH9fZMnTghoN6Mvof+3gk1dyW3cYbuOywp1J2AK4XqRxR9fuREfupsEvaXLMR2JINZIc9RWEJ5EhLb2N/zN/QPnuKPDMNNhSXZgP/DzTNP1HWCaDtAAAAAElFTkSuQmCC
是否可以绕过报表传参,
直接创建一个Controller,在Action里接收参数,
然后new 一个Report,
通过Post请求业务方的Api,然后把返回的Json数据绑定到Report对象中,
再把这个对象返回出去呢?(Action的返回值为IActionResult)
另外我想问下这个参数是做什么用的,是获取viewer的数据源吗,我设置了之后,按F12里看,请求和之前是一样的
老师,我说下我们的需求,您看看有没有建议的解决方案:
项目环境是前后端分离,
前端是Vue,
后端是NetCore,
需要根据查询参数去请求业务API,
业务API返回JSON数据,
(为什么没有直接把参数添加到报表模板中直接连数据库查呢,是因为我们所有的数据都要经过数据权限的框架,每个角色能看哪些数据是由框架里自动处理的)
我们想把返回的JSON数据通过报表展示,
调用哪个API去获取业务数据是根据前端传递的参数来决定的,
在升级到14后,使用JsViewer来展示时,前端没有办法传递reportId以外的参数,
在StartUp里尝试使用UseCustomStore来获取拼装后的reportId,发现参数太长就传不过来(每个API都要带Bearer Token),
都不知道要怎么弄了,希望老师能给点建议,
要是有一个可能获取前端传参,请求json结果,再设置数据源的demo就好了.
在之前13时使用H5 的Viewer时,我们的流程是这样的:
前端把参数直接POST传递到我们Controller/Action中,
Action把参数解析后,设置参数Model,
转到View.cshtml页面,
该页面里有一个Viewer,
Viewer设置了reportService到一个asmx服务中,
asmx服务重写OnCreateReportHandler去请求业务方api,
从返回的json中组装一个Datatable返回,
现在到14使用core+JsViewer时,不知道怎么操作了 你好,JSviewer和H5是两种不同的 方式,JSviewer现在已经没有你说的这个服务的方法了。服务的方法是在startUp的方法中进行对应的 操作的,关于JSviewer中 startUp中的可以看我刚刚给你的 那个JSviewer的资料就可以找到。如果 有什么不懂的可以 直接打我们的售后电话进行沟通
页:
[1]