Crystal Reports:在报表标题部分插入图像 [英] Crystal Reports : Insert an image in the Report Header section

查看:18
本文介绍了Crystal Reports:在报表标题部分插入图像的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要在现有 RPT 文件中插入报告主页.现有的 RPT 文件工作正常,它显示来自存储过程的结果.没关系.

I need to insert a report homepage on an existing RPT file. The existing RPT file works fine, it displays results from a stored procedure. It's ok.

主页必须包含来自数据库的图像.因此,首先,我添加了一个带有新 SQL 查询的新 SQL 命令(通过数据库专家"窗口),以获得图像徽标.我拖&将图像字段放在报告标题"部分中.它在设计器中工作,我可以看到从数据库中检索到的图像.

The homepage must contain an image from the database. So first, I added a new SQL command (through the window "Database Expert") with a new SQL query in order to get the image logo. I drag & drop the image field in the Report Header section. It works in the designer, I can see the image which is retrieved from the database.

但是当我生成报告时,我的获取图像的 SQL 查询被执行了好几次......我可以在我的 SQL 分析器中看到它......我认为我的查询是针对由返回的每行执行的初始存储过程...我不知道为什么.

But when I generate the report, my SQL query which get the image is executed several times... I can see it in my SQL profiler... I think that my query is executed FOR EACH row which is returned by the initial stored procedure... I don't know why.

水晶报表版本:10.2

Version of Crystal Reports : 10.2

有什么想法吗?非常感谢.

Any ideas ? Thanks a lot.

推荐答案

我终于找到了如下解决方案:

I finally found the following solution :

1 > 创建一个新的子报表.(右键单击设计器 > 插入 > 子报表).这个新的子报表将与包含图像数据的表相关.

1 > Create a new SubReport. (Right click on the designer > Insert > SubReport). This new SubReport will be related to the table which contain the image data.

2 > 确保此子报告位于报告标题部分.如果需要,删除黑色边框.

2 > Ensure that this sub report is in the Report Header section. Remove black borders if needed.

3 > 在子报表中,将您的图像 SQL 字段拖到详细信息部分.不要忘记指定相等条件以检索正确的图像.

3 > In the SubReport, drag your image SQL field into the Details section. Don't forget to specify an equals-condition in order to retrieve the right image.

这篇关于Crystal Reports:在报表标题部分插入图像的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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