我真的不知道该怎么办。我创建了一个通用类来为我的应用程序打开报告。这些报告包含在另一个未被引用为嵌入资源的dll中。
如果我引用dll,我可以这样做: Viewer.LocalReport.ReportEmbeddedResource = "SomeLibrary.ReportName.rdlc";
Viewer.LocalReport.ReportEmbeddedResource = "SomeLibrary.ReportName.rdlc";
但是,由于我没有引用dll,我认为我必须通过反射来获取报告。这就是我被困的地方。我真的不知道该怎么办。
我通过读取RDLC并返回流找到了一种实现这一点的方法。
public void PrepareReport(IAppReport report) { Viewer.LocalReport.LoadReportDefinition(report.GetStream()); }
经过一点思考,我就能够拉动那个物体了。