在水晶报表中插入图像 [英] Insert an image in crystal report

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

问题描述


我用VB.net创建了一个小的winform应用程序,在Form I中创建了一个GriddataControle,一个chartControl和一些文本字段。

我创建了一个函数,将chartControl替换为图片。



Hi I created a small winform application with VB.net, in Form I created a GriddataControle, a chartControl and some text fields.
I created a function that replaces chartControl to picture.

My problem is  to import this picture in a report "Crystal Reports", so I inserted an picture (any picture) and after that I try to replace it like a textbox, but it does not work .
Please is there a way I can insert this picture in Crytal Report.





我尝试过:





What I have tried:

Private Function GetChartImage(ByVal Chart As ChartControl, ByVal Format As ImageFormat) As Image
       ' Create an image.
       Dim Image As Image = Nothing
       ' Create an image of the chart.
       Dim s As New MemoryStream()
       Try
           Chart.ExportToImage(s, Format)
           Image = Image.FromStream(s)
       Finally
           s.Dispose()
       End Try
       ' Return the image.
       Return Image
   End Function










cryRpt.SetParameterValue("Picture2", GetChartImage(ChartControl1, Imaging.ImageFormat.Jpeg))

推荐答案

看看这个解决方案。

Crystal Reports中的图像 [ ^ ]
Take a look at this solution.
Image in Crystal Reports[^]


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

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