你好,这个问题我解决了,但是现在碰到一个传参数的问题,我在jsviewer传了参数
- function loadViewer() {
- viewer = GrapeCity.ActiveReports.JSViewer.create({
- element: '#viewerContainer',
- reportID: '@reportId',
- reportParameters: [{ name: 'ReportParameter1', value: ["@ViewBag.MainId"] }],
- settings: {
- zoomType: 'FitPage'
- },
- });
- }
复制代码 控制器加了
- [Route("{id}")]
- [HttpGet]
- public ActionResult Views(string id, string mainid)
- {
- var theme = Request.QueryString["theme"] ?? "blue";
- if (string.IsNullOrWhiteSpace(id)) return new HttpStatusCodeResult(HttpStatusCode.BadRequest);
- ViewBag.Id = id;
- ViewBag.MainId = mainid;
- ViewBag.Theme = theme;
- return View("Index");
- }
复制代码 在线设计器的SQL查询语句为
- SELECT c.YanFaNo 项目编号1,c.YanpPinNo 样单编号1, a.[id]
- ,a.[UniqueNo] as 复制唯一号
- ,a.[IsCopy] as 是否复制单
- ,a.[ProductionNoticeId] as 生产通知单id
- ,a.[ProjectNo] as 项目编号
- ,a.[Xmname]as 项目名称
- ,a.[docCode]as 存档编号
- ,a.[BatchNo] as 批次号
- ,a.[GoodsName]as 品名
- ,a.[GoodsNum]as 数量
- ,a.[PaiHao]as 牌号
- ,a.[ColorNo]as 色号
- ,a.[KeHuName]as 客户名称
- ,a.[KeHuNo]as 客户编号
- ,a.[YangPinAuditTime]as 样品审核时间
- ,a.[IsAudit]
- ,a.[AppTime] as 申请时间
- ,a.[AuditTime]as 审核时间
- ,a.[ProcessId]
- ,a.[Adduser]
- ,a.[Addtime]
- ,a.[Edituser]
- ,a.[Edittime]
- ,a.[JiTaiNo]as 机台号
- ,a.[DateStr]as 日期
- ,a.[ShiYanMudi]as 实验目的
- ,a.[IsZiYan]as 是否自研
- ,a.[IsSongYang]as 是否送样
- ,a.[JiShuZhiBiao]as 技术指标
- ,a.[PeiFangAText]as 配方A文本
- ,a.[PeiFangBText]as 配方B文本
- ,a.[PeiFangCText]as 配方C文本
- ,a.[PeiFangDText]as 配方D文本
- ,a.[PeiFangEText]as 配方E文本
- ,a.[PeiFangASum]as 配方A汇总
- ,a.[PeiFangBSum]as 配方B汇总
- ,a.[PeiFangCSum]as 配方C汇总
- ,a.[PeiFangDSum]as 配方D汇总
- ,a.[PeiFangESum]as 配方E汇总
- ,a.[ShiYanASum]as 实验A汇总
- ,a.[ShiYanBSum]as 实验B汇总
- ,a.[ShiYanCSum]as 实验C汇总
- ,a.[ShiYanDSum]as 实验D汇总
- ,a.[ShiYanESum]as 实验E汇总
- ,a.[GongYi]as 工艺混料
- ,a.[JiChuGongYiJiTou]as 基础工艺机头
- ,a.[JiChuGongYi1]as 实际工艺1区
- ,a.[JiChuGongYi2]as 实际工艺2区
- ,a.[JiChuGongYi3]as 实际工艺3区
- ,a.[JiChuGongYi4]as 实际工艺4区
- ,a.[JiChuGongYi5]as 实际工艺5区
- ,a.[JiChuGongYi6]as 实际工艺6区
- ,a.[JiChuGongYi7]as 实际工艺7区
- ,a.[JiChuGongYi8]as 实际工艺8区
- ,a.[JiChuGongYi9]as 实际工艺9区
- ,a.[JiChuGongYi10]as 实际工艺10区
- ,a.[JiChuGongYiZhuanSu]as 实际工艺转速
- ,a.[JiChuGongYiBoXianSu]as 实际工艺玻纤数
- ,a.[JiChuGongYiZhuLiao]as 实际工艺主料
- ,a.[JiChuGongYiDianLiu]as 实际工艺电流
- ,a.[JiChuGongYiZhenKong]as 实际工艺真空
- ,a.[JiChuGongYiLvWang]as 实际工艺滤网
- ,a.[SheDingGongYiJiTou]as 实定工艺机头
- ,a.[SheDingGongYi1]as 设定工艺1区
- ,a.[SheDingGongYi2]as 设定工艺2区
- ,a.[SheDingGongYi3]as 设定工艺3区
- ,a.[SheDingGongYi4]as 设定工艺4区
- ,a.[SheDingGongYi5]as 设定工艺5区
- ,a.[SheDingGongYi6]as 设定工艺6区
- ,a.[SheDingGongYi7]as 设定工艺7区
- ,a.[SheDingGongYi8]as 设定工艺8区
- ,a.[SheDingGongYi9]as 设定工艺9区
- ,a.[SheDingGongYi10]as 设定工艺10区
- ,a.[SheDingGongYiZhuanSu]as 设定工艺转速
- ,a.[SheDingGongYiBoXianSu]as 设定工艺玻纤数
- ,a.[SheDingGongYiZhuLiao]as 设定工艺主料
- ,a.[SheDingGongYiDianLiu]as 设定工艺电流
- ,a.[SheDingGongYiZhenKong]as 设定工艺真空
- ,a.[SheDingGongYiLvWang]as 设定工艺滤网
- ,a.[Status]
- ,a.[DingFangValue]as 定方值
- ,a.[QueRenValue]as 确认方值
- ,a.[ShiYanPQCId]as 实验pqcid
- ,a.[F_CreateUserId]
- ,a.[SongYangTime]as 送样时间
- ,a.[DeliveryRemarks]as 送样备注
- ,a.[Auditor]as 审核人
- ,b.[F_RealName]as 用户名
-
- FROM [YanF_lims_data].[dbo].[ExperimentFormula] as a left join [YanF_lims_base].[dbo].[Base_User] as b on a.F_CreateUserId=b.F_UserId inner join [YanF_lims_data].[dbo].ProductionNotice c
- on a.ProductionNoticeId = c.Id
- where a.id=@Id
复制代码
预览的时候,没有任何数据 ,说明这个ID没有传进去
|