找回密码
 立即注册

QQ登录

只需一步,快速开始

wcfboy1

中级会员

13

主题

57

帖子

559

积分

中级会员

积分
559

微信认证勋章

wcfboy1
中级会员   /  发表于:2020-5-20 12:06  /   查看:4026  /  回复:5




数据源是  标准json格式

[{"SendUserId":"4e98e3db-bb3c-40d8-8333-126f7dacce78","SendUserName":null,"SendTime":"2020-04-30","ReceiveUserId":"54c8b09f-49ab-4843-bea2-70e275c5896c","ReceiveUserName":null,"ReceiveTime":"0001-01-01","Created":"2020-04-30","Updated":"0001-01-01","Id":"a6f0a9ac-c37e-400f-883b-4acbcc06e1c2","MsgType":1,"MsgStatus":2,"MsgTitle":"12","MsgContent":"21","CreateTime":"2020-04-30","UpdateTime":"0001-01-01"},{"SendUserId":"3ff751a1-9d50-4568-b0a4-e7976575f835","SendUserName":null,"SendTime":"2020-04-30","ReceiveUserId":"c5a76827-f480-49c1-994d-972d201d8b59","ReceiveUserName":null,"ReceiveTime":"0001-01-01","Created":"2020-04-30","Updated":"0001-01-01","Id":"66edc4bb-187c-4cca-b07d-4e8952898a56","MsgType":1,"MsgStatus":3,"MsgTitle":"qwe","MsgContent":"qweqwe","CreateTime":"2020-04-30","UpdateTime":"0001-01-01"},{"SendUserId":"4e98e3db-bb3c-40d8-8333-126f7dacce78","SendUserName":null,"SendTime":"2020-04-30","ReceiveUserId":"54c8b09f-49ab-4843-bea2-70e275c5896c","ReceiveUserName":null,"ReceiveTime":"0001-01-01","Created":"2020-04-30","Updated":"0001-01-01","Id":"82be3aeb-6781-4114-a6d2-4ebedfdf0159","MsgType":1,"MsgStatus":2,"MsgTitle":"111","MsgContent":"222323","CreateTime":"2020-04-30","UpdateTime":"0001-01-01"},{"SendUserId":"3ff751a1-9d50-4568-b0a4-e7976575f835","SendUserName":null,"SendTime":"2020-04-30","ReceiveUserId":"035c6706-b34b-42f9-add5-6efc7cb95eeb","ReceiveUserName":null,"ReceiveTime":"0001-01-01","Created":"2020-04-30","Updated":"0001-01-01","Id":"b42e414e-2843-4515-ab00-8730f1cf35e0","MsgType":1,"MsgStatus":3,"MsgTitle":"asssssssss","MsgContent":"aaaaaaa","CreateTime":"2020-04-30","UpdateTime":"0001-01-01"},{"SendUserId":"4e98e3db-bb3c-40d8-8333-126f7dacce78","SendUserName":null,"SendTime":"2020-04-30","ReceiveUserId":"5707eb3d-a194-4447-ba1f-c5fab8868f1b","ReceiveUserName":null,"ReceiveTime":"0001-01-01","Created":"2020-04-30","Updated":"0001-01-01","Id":"a6f7d3ab-e55a-44b9-bac2-c83f7484184f","MsgType":1,"MsgStatus":2,"MsgTitle":"212","MsgContent":"1212","CreateTime":"2020-04-30","UpdateTime":"0001-01-01"},{"SendUserId":"3ff751a1-9d50-4568-b0a4-e7976575f835","SendUserName":null,"SendTime":"2020-04-30","ReceiveUserId":"4e98e3db-bb3c-40d8-8333-126f7dacce78","ReceiveUserName":null,"ReceiveTime":"0001-01-01","Created":"2020-04-30","Updated":"0001-01-01","Id":"5274da25-90cc-4cd3-b1f8-d45275f42172","MsgType":1,"MsgStatus":3,"MsgTitle":"202004300923标题","MsgContent":"202004300923内容","CreateTime":"2020-04-30","UpdateTime":"0001-01-01"},{"SendUserId":"4e98e3db-bb3c-40d8-8333-126f7dacce78","SendUserName":null,"SendTime":"2020-04-30","ReceiveUserId":"3ff751a1-9d50-4568-b0a4-e7976575f835","ReceiveUserName":null,"ReceiveTime":"0001-01-01","Created":"2020-04-30","Updated":"0001-01-01","Id":"c099ab2f-4c16-4ab0-b3e1-f31d79883a07","MsgType":1,"MsgStatus":3,"MsgTitle":"ASas","MsgContent":"按时aSaSA","CreateTime":"2020-04-30","UpdateTime":"0001-01-01"},{"SendUserId":"4e98e3db-bb3c-40d8-8333-126f7dacce78","SendUserName":null,"SendTime":"2020-04-30","ReceiveUserId":"3ff751a1-9d50-4568-b0a4-e7976575f835","ReceiveUserName":null,"ReceiveTime":"0001-01-01","Created":"2020-04-30","Updated":"0001-01-01","Id":"c4e29849-efb0-4083-9326-f36e6eff9e38","MsgType":1,"MsgStatus":4,"MsgTitle":"22222","MsgContent":"21121","CreateTime":"2020-04-30","UpdateTime":"0001-01-01"}]

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有帐号?立即注册

x

5 个回复

倒序浏览
Lenka.Guo讲师达人认证 悬赏达人认证
超级版主   /  发表于:2020-5-20 14:25:33
沙发
您好

您在报表中绑定Json数据源时,是绑定的 URL 还是 .Json文件。

如果是给的Json 的URL, 需要 URL 服务端做跨域请求配置处理,参考网络资料:
https://segmentfault.com/a/1190000012550346
回复 使用道具 举报
wcfboy1
中级会员   /  发表于:2020-5-20 14:31:44
板凳
本帖最后由 wcfboy1 于 2020-5-20 14:34 编辑
Lenka.Guo 发表于 2020-5-20 14:25
您好

您在报表中绑定Json数据源时,是绑定的 URL 还是 .Json文件。

绑定的URL,通过API测试工具没问题,而且只是报表预览,没放到服务器上
回复 使用道具 举报
Lenka.Guo讲师达人认证 悬赏达人认证
超级版主   /  发表于:2020-5-20 14:47:46
地板
是API 测试没问题,主要是要JSON URL 做跨域配置,而不是报表服务做跨域设置。
您可以通过将JSON 文件保存到本地,用设计器打开文件来连接,如果没有问题,那肯定是JSON URL跨域配置的问题。
如果有问题,那就有可能是JSON 数据结构的问题了。
回复 使用道具 举报
wcfboy1
中级会员   /  发表于:2020-5-20 15:06:18
5#
Lenka.Guo 发表于 2020-5-20 14:47
是API 测试没问题,主要是要JSON URL 做跨域配置,而不是报表服务做跨域设置。
您可以通过将JSON 文件保存 ...

保存为json文件没问题
回复 使用道具 举报
Lenka.Guo讲师达人认证 悬赏达人认证
超级版主   /  发表于:2020-5-22 09:03:19
6#
您可以通过将JSON 文件保存到本地,用设计器打开文件来连接,如果没有问题,那肯定是JSON URL跨域配置的问题。
如果有问题,那就有可能是JSON 数据结构的问题了。跨域需要对webapi进行设置
回复 使用道具 举报
您需要登录后才可以回帖 登录 | 立即注册
返回顶部