在运行时动态更改Crystal Report中的图像 [英] Dynamically change an image in a Crystal Report at runtime

查看:207
本文介绍了在运行时动态更改Crystal Report中的图像的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用VisualStudio 2005附带的Crystal Reports。我想在运行时更改报表上显示的图像,理想情况是通过构建图像文件的路径,然后在报表上显示该图像。 / p>

有没有人能用这个版本的Crystal Reports完成这个?

解决方案

在工作中,我们通过将图像作为数据表的字段推送到报表中来完成此操作。它不漂亮,但它完成了工作。当然,此解决方案要求您通过DataSet将数据推送到报表中。我一直认为这是一个充其量的黑客。我真的希望CR的图像参数是可能的。



编辑:值得注意的是,如果你将水晶报告绑定到普通的旧版本您希望为报表公开byte []属性以将其视为图像的对象。


I'm using the Crystal Reports included with VisualStudio 2005. I would like to change the image that is displayed on the report at runtime ideally by building a path to the image file and then have that image displayed on the report.

Has anyone been able to accomplish this with this version of Crystal Reports?

解决方案

At work we do this by pushing the image(s) into the report as fields of a datatable. It's not pretty, but it gets the job done. Of course, this solution requires that you push data into the reports via a DataSet. I've always felt this was a hack at best. I really wish that image parameters were a possibility with CR.

Edit: It's worth noting, if you are binding your crystal report to plain old objects you want to expose a byte[] property for the report to treat that as an image.

这篇关于在运行时动态更改Crystal Report中的图像的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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