多个子报表,其中一个子报表将值传递给其他子报表 [英] Multiple Subreports with a subreport passing value to other

查看:78
本文介绍了多个子报表,其中一个子报表将值传递给其他子报表的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在WinForms中的C#上使用报表查看器.我有3个数据库表:Equipament,Sector和History,我还有3 Report.rdlc,MAIN是ReportEquipament,另外两个子报表是ReportSector和ReportHistory.我已经知道如何填充ReportSector,我想要做的就是从ReportSector传递idSector,因此我可以在SQL Server数据库中调用一个过程,并搜索具有该Sector ID的所有历史记录,并在ReportHistory.我不知道该怎么做.我是ReportViewer的新手,这是我第一次做Reports.

I'm using Report Viewer at C# in WinForms. I have 3 database tables: Equipament, Sector and History, I also have 3 Report.rdlc, The MAIN is the ReportEquipament and the other two subreport are ReportSector and ReportHistory. I already know how to fill the ReportSector, what I want to do is to pass the idSector from the ReportSector, so I can call a procedure at the SQL Server database and search all the History with this Sector ID, and show the data at the ReportHistory. I have no idea on how to do it. I new with ReportViewer and this is my first time doing Reports.

PS:我知道该怎么做,只是不知道如何使用.

PS: I know how to do the procedure, just don't know how to use it.

谢谢.

乔纳斯.

让我尝试更好地解释一下:

Let me try to explain better:

我搜索一个特定的设备,并且该设备已通过许多部门, 当他在这个部门时,他遇到了问题,而这些问题与 该部门.

I search for a specific Equipament, and that Equipament passed for many Sectors, and while he was at this sector he had problems, and this problems are related to the Sector.

我想要的是这样的

设备:X

部门:(在此处传递了设备的ID以查找他拥有的部门)

Sectors: (Here the ID of the Equipament is passed to find the Sector that he has)

扇区:X(此处此扇区的ID传递给子报告问题") 问题:(使用该部门的ID,我搜索该部门的所有问题) 问题:X 问题:是

Sector: X (here the ID of this Sector is passed to the Subreport "Problem") Problems: (with the ID of the Sector I search all the problems at this sector) Problem: X Problem: Y

扇区:Y(此处此扇区的ID传递给子报告问题") 问题:(使用该部门的ID,我搜索该部门的所有问题) 问题:X 问题:是

Sector: Y (here the ID of this Sector is passed to the Subreport "Problem") Problems: (with the ID of the Sector I search all the problems at this sector) Problem: X Problem: Y

推荐答案

如果我没有记错的话,您会在子报表中传递参数时遇到问题. 此处是该链接

If i am not wrong you getting problem in parameter passing in sub report. Here is the link for that

这篇关于多个子报表,其中一个子报表将值传递给其他子报表的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆