将位图图像导出到水晶报告 [英] exporting bitmap image to crystal report
本文介绍了将位图图像导出到水晶报告的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在绘制图表并将其保存为.bmp格式。我正在将该图像转换为数据集中的二进制格式,然后我将该图像导出到水晶报表。现在问题是,它显示黑色作为背景颜色。请点击水晶报告的以下链接。任何帮助或想法都会非常值得赞赏。
此处的图像
I'm drawing a graph and saving it as ".bmp" format. I'm converting that image to binary format in a dataset, and then I'm exporting that image to crystal report. Now the problem is, It is showing Black as a background color. Please click the below link for the crystal report. any help or idea's would be highly appreciable.
Image here
推荐答案
您是否按照以下步骤在水晶报表中显示位图图像:Step-bby-step guide [ ^ ]
另外,看看这篇文章:如何在运行时上传或更改Crystal Report中的图像 [ ^ ]
Did you follow the following steps to show the Bitmap images in your crystal report: Step-bby-step guide[^]
Also, have a look at this article: How to Upload or Change an image in the Crystal Report at runtime[^]
我遇到了同样的问题e。
根本原因是: 您的位图图像具有透明背景。
在绘制图像之前,只需绘制白色背景或彩色的东西。
例如:
System.Drawing.SolidBrush whiteBrush = new System.Drawing.SolidBrush(System.Drawing.Color.White);
System.Drawing.Rectangle rect = new System.Drawing.Rectangle(0, 0,350,200);
g.FillRectangle(whiteBrush,rect);
\\\ \\tthen继续画在这里
i got the same problem before.
The rootcause is this: your bitmap image has transparent background.
Just draw white background or something in color before your image is drawn.
example:
System.Drawing.SolidBrush whiteBrush = new System.Drawing.SolidBrush(System.Drawing.Color.White);
System.Drawing.Rectangle rect = new System.Drawing.Rectangle(0, 0, 350, 200);
g.FillRectangle(whiteBrush, rect);
\\then continue to draw here
这篇关于将位图图像导出到水晶报告的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文