从水晶报表中的路径加载动态图像

7

本文介绍了从水晶报表中的路径加载动态图像的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

问题描述

我想在我的报告中显示一个图像,我将图像的路径保存在我的 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

这篇关于从水晶报表中的路径加载动态图像的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

The End

相关推荐

C# 中的多播委托奇怪行为?
Multicast delegate weird behavior in C#?(C# 中的多播委托奇怪行为?)...
2023-11-11 C#/.NET开发问题
6

参数计数与调用不匹配?
Parameter count mismatch with Invoke?(参数计数与调用不匹配?)...
2023-11-11 C#/.NET开发问题
26

如何将代表存储在列表中
How to store delegates in a List(如何将代表存储在列表中)...
2023-11-11 C#/.NET开发问题
6

代表如何工作(在后台)?
How delegates work (in the background)?(代表如何工作(在后台)?)...
2023-11-11 C#/.NET开发问题
5

没有 EndInvoke 的 C# 异步调用?
C# Asynchronous call without EndInvoke?(没有 EndInvoke 的 C# 异步调用?)...
2023-11-11 C#/.NET开发问题
2

Delegate.CreateDelegate() 和泛型:错误绑定到目标方法
Delegate.CreateDelegate() and generics: Error binding to target method(Delegate.CreateDelegate() 和泛型:错误绑定到目标方法)...
2023-11-11 C#/.NET开发问题
14