Crystal Reports:在"Report Header"部分插入一个图像 [英] Crystal Reports : Insert an image in the Report Header section

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

问题描述

我需要在现有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事件探查器中看到它...我认为我的查询是针对FOR EACH行执行的,该行由初始存储过程...我不知道为什么.

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.

Crystal报表版本:10.2

Version of Crystal Reports : 10.2

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

Any ideas ? Thanks a lot.

推荐答案

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

I finally found the following solution :

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

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:在"Report Header"部分插入一个图像的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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