简体   繁体   English

Crystal Reports将插入某些图像,但不会插入其他图像

[英]Crystal Reports will insert certain images but not others

Are there specific requirements for images that are to be inserted into CR? 对于要插入CR的图像是否有特定要求?

I'm trying to insert an image into Crystal reports, but nothing happens after I select my file. 我正在尝试将图像插入到Crystal报表中,但在选择我的文件后没有任何反应。 I have a different image that I've used for testing that inserts with no problems so I'm assuming that it has something to do with the JPG file settings when saving the image. 我有一个不同的图像,我用于测试插入没有问题,所以我假设它与保存图像时的JPG文件设置有关。 Note that this is just a static logo for a page header – nothing is being dynamically loaded. 请注意,这只是页眉的静态徽标 - 没有动态加载。

I know that GIFs cannot be used, so I've tried JPG and PNG to no avail. 我知道GIF不能使用,所以我试过JPG和PNG无济于事。 I've even saved my “working” image again through Photoshop and it will insert. 我甚至通过Photoshop再次保存了我的“工作”图像,它将插入。 I've then used those settings to save the non-working image, but that image wont insert. 然后我使用这些设置来保存非工作图像,但该图像不会插入。 I've used Crystal Reports a lot in the past and this is the first time I've come across this issue and my searches lead me to a variety of resources for dynamic image inclusion, but nothing to for this hopefully simple issue. 我过去经常使用Crystal Reports,这是我第一次遇到这个问题而且我的搜索引导我获得了各种动态图像包含的资源,但对于这个希望简单的问题没有任何意义。

I'm using Crystal Reports for Visual Studio 2010. 我正在使用Crystal Reports for Visual Studio 2010。

Link to images used in testing 链接到测试中使用的图像

After messing with this problem all day, I found out it's a bug in the Crystal Reports IDE. 在整天搞乱这个问题之后,我发现它是Crystal Reports IDE中的一个错误。

Here's how to duplicate the issue: 以下是复制问题的方法:

  1. Right click on your report and select Insert >> Picture 右键单击您的报告,然后选择“插入>>图片”
  2. Double-click on the image that you wish to insert. 双击要插入的图像。

Depending on your image and how the image was saved in Photoshop, it may or may not insert into the report. 根据您的图像以及图像在Photoshop中的保存方式,它可能会也可能不会插入到报告中。 I've had mixed results and apparently some images work and some do not. 我的结果好坏参半,显然有些图像有效,有些则无效。 I haven't quite figured out the pattern yet, but I believe it has to do with the color profiles of the image. 我还没有弄清楚这个模式,但我相信它与图像的颜色配置文件有关。 I probably won't waste any more time investigating it, because the following resolution has worked for me every time and I can import every image that I've created in Photoshop regardless of how the image was saved and the settings used to save the images. 我可能不会再浪费时间调查它了,因为以下分辨率每次都适用于我,我可以导入我在Photoshop中创建的每个图像,无论图像是如何保存的,以及用于保存图像的设置。 (Assuming that they're all JPGs, of course.) (当然,假设他们都是JPG。)

Resolution: 解析度:

  1. Right click on your report and select Insert >> Picture 右键单击您的报告,然后选择“插入>>图片”
  2. SINGLE-click on the image that you wish to insert to select it. 单击要插入的图像以选择它。
  3. Click “Open” 点击“打开”

The image should insert into the report properly. 图像应正确插入报告中。

It's a subtle difference, but I hope this saves someone else a few hours of debugging. 这是一个微妙的差异,但我希望这可以节省其他人几个小时的调试时间。

Dave 戴夫

Worked AOK for me. 为我工作了AOK。 Check if you have all the latest patches. 检查您是否拥有所有最新的补丁。 I've attached a screenshot in Crystal 2011 and saved the .rpt for you to try and open in Visual Studio 2010: http://speedy.sh/RGgfg/crimages.zip 我在Crystal 2011中附加了一个屏幕截图并保存了.rpt供您尝试在Visual Studio 2010中打开: http//speedy.sh/RGgfg/crimages.zip

在此输入图像描述

原因是因为格式不受支持,我有完全相同的问题,但当我将文件保存为JPG时,它开始工作完美!

i think crytal report does not accept some image formats but what i did when i encountered the problem was to 1. open the image with coreldraw 2. copy the image content of the image and paste it in the crystal report instead of using the insert tool on crystal report and it worked 我认为crytal报告不接受某些图像格式,但我遇到问题时所做的是1.用coreldraw打开图像2.复制图像的图像内容并将其粘贴到水晶报告中而不是使用插入工具在水晶报告上,它的工作原理

hope this will also be helpul. 希望这也将是帮助。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM