load dynamic image from path in crystal report(从水晶报表中的路径加载动态图像)
问题描述
我想在我的报告中显示一个图像,我将图像的路径保存在我的 sqlserver 数据库中,现在我想从路径加载图像.我搜索所有互联网并尝试所有指导,我首先将图像插入我的报告,然后我转到 >Format Editor >图片>图形位置 >
并将图像路径插入到 textarea 中,像这样 {Command.path}
但是当我运行时,它不显示任何图片.现在我该怎么办?
我使用visual studio 2013和最新版本的水晶报表.
I want to show an image in my report , I save path of image in my sqlserver database and now I want to load image from path .I search all of internet for that and try all of guidance , I first insert image into my report and after that I go to >Format Editor > picture > Graphic Location >
and insert path of image into the textarea like this {Command.path}
but when I run , it doesn't show any picture . Now how should I do ?
I use visual studio 2013 and latest version of crystal report .
推荐答案
Use a conditional formula to dynamically change the location of a report’s image.
1. 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.
2. 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
It worked for me.
Source: cogniza.com
这篇关于从水晶报表中的路径加载动态图像的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:从水晶报表中的路径加载动态图像
基础教程推荐
- 有没有办法忽略 2GB 文件上传的 maxRequestLength 限制? 2022-01-01
- 将 XML 转换为通用列表 2022-01-01
- MS Visual Studio .NET 的替代品 2022-01-01
- 如何激活MC67中的红灯 2022-01-01
- c# Math.Sqrt 实现 2022-01-01
- 如何在 IDE 中获取 Xamarin Studio C# 输出? 2022-01-01
- 将 Office 安装到 Windows 容器 (servercore:ltsc2019) 失败,错误代码为 17002 2022-01-01
- rabbitmq 的 REST API 2022-01-01
- SSE 浮点算术是否可重现? 2022-01-01
- 为什么Flurl.Http DownloadFileAsync/Http客户端GetAsync需要 2022-09-30