Add an image with transparency to Crystal Reports

梦想与她 提交于 2019-12-18 18:59:43

问题


Is it really true that Crystal Reports does not support images that have transparency?

We are using it at work and the guy that does Crystal Reports told me it doesn't support transparency. I couldn't believe it so I've spent the last 20 minutes googling and think he might be right. This seems absolutely incredible in this day and age.

Can anyone please confirm whether or not CR supports transparency, and if so how you do it (we are not limited by the type of image to insert - png, gif etc).

For the record we are using CR version that comes with VS 2008 (version 10.5).


回答1:


CR doesn't support transparency but you can use a wmf image to solve your problem. I'm using CR 12 (2008), i need to put an image as signature (as a watermark) on another image.

Example:

Background_image.jpg Signature_image.jpg

Convert Signature_image.jpg into a wmf file using "Inkscape" (freeware).

In the report, we have "Background_image.jpg" and over it the "Signature_image.wmf" image, it works great!




回答2:


Just reached over here while searching for same problem. Unfortunately this is true till this date :(

Answering this question for users who may visit again here.

Transparent background of image is not retained when adding it to Crystal Reports

I achived solution following way.

Painted transperent area with printing page color i.e. white in my case.

I would like to put image in page header and some text over it.

In CR design mode.

  1. right click in page header section -> select section expert
  2. select page header -> click insert
  3. In page header a check "Underlay following sections" -> click ok.
  4. back in design, in section "page header a" include image.
  5. In section "page header b" include text which I would like to show over image (i.e. I am expecting to be transparent).

Hope this helps for future visitors.




回答3:


There is another work around I tried and was successful. If you want the image as a watermark in your report, use your report as a sub report in the detail section of the main report and keep the image in a main report page header and use the option 'Underlay Following Sections' in the Section Expert. All the lines and texts will appear properly on top of the image.




回答4:


As AR_Italy said, confirmed that wmf files are the way to go, even though SAP site says transparent images are not supported, so thank you to AR_Italy. The only thing I would add is that these can be Exported from Adobe Illustrator as well (make sure your image has a transparent background first).




回答5:


If your Image has a white background AND your lazy just check this out: Rightclick on your report, select Report and Report options and Check "Retain Original Image Color Depth



来源:https://stackoverflow.com/questions/847204/add-an-image-with-transparency-to-crystal-reports

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!