使用ImagePath C#在Crystal Report中动态显示图像(来自数据库) [英] Showing image(coming from database) dynamically in crystal report using ImagePath C#
本文介绍了使用ImagePath C#在Crystal Report中动态显示图像(来自数据库)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我将图像路径存储在这样的数据库中: UploadedImage / FabricImage / 11115.JPG
。
I store image path in database like this: UploadedImage/FabricImage/11115.JPG
.
我想要在水晶报表中动态显示它们。谁能帮我?
I want to show them dynamically in a crystal report. Can anyone help me?
推荐答案
使用条件公式来动态更改报表图像的位置。
Use a conditional formula to dynamically change the location of a report’s image.
- 将图像添加到报告中:
->插入->图片
此图片将用作占位符。
请确保该占位符与将动态加载的占位符大小相同,否则将缩放该图片。 - 更改图像的图形位置:
- 右键单击图像
- 选择格式化图形…
- 选择图片选项卡
- 单击条件公式按钮(看起来像x + 2)
- 设置公式的文本到将包含图像URL的公式或参数字段的名称
- 保存公式并单击确定按钮
- 保存报告
- Add an image to the report:
-> Insert -> Picture
This image will act as a placeholder.
Ensure that the placeholder is the same size as the one that will be dynamically loaded, otherwise the image will be scaled. - Change the image’s Graphic Location:
- right click image
- select Format Graphic…
- select Picture tab
- click the conditional-formula button (looks like x+2)
- set the formula’s text to the name of the formula or parameter field that will contain the image’s URL
- save the formula and click the OK button
- Save the report
来源: cogniza.com
这篇关于使用ImagePath C#在Crystal Report中动态显示图像(来自数据库)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文