水晶报告添加和打印动态图像 [英] crystal report adding and printing dynamic image

查看:78
本文介绍了水晶报告添加和打印动态图像的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在应用程序中有一个文件夹。在文件夹中有图像(任何数字)。我想要做的是将这些图片导入水晶报告以及每张图片底部的图像名称,然后打印出来。文件夹中可以有10张图片,100张图片。

我怎么能这样做

这是我在水晶报告中的第一个应用程序。如此友好地建议一步一步的文章或回答

i have a folder in application. in the folder there are images (any number). what i want to do is import these picture into crystal report along with the name of images at bottom of each picture and then print those. there can be 10 pic, 100 pic any number in the folder.
how can i do this
this is my first application in crystal report. so kindly suggest step by step article or answer

推荐答案

1。使用带有两个字段的DataTable创建一个类型化DataSet,一个是String类型的ImageName,另一个是System.Byte []类型的ImageBlob(即一个字节数组)



2.根据该数据集设计报表,并将每个字段放在报表正文中。你应该得到一个BLOBField和一个文本项目



3.在你的代码中,你必须用你从指定文件夹中获得的图像填写数据表



4.使用DataTable填充图像+文本,您需要使用ReportDocument的SetDataSource方法动态地将其绑定到报表
1. Create a typed DataSet with a DataTable with two fields, one ImageName of type String, and the other ImageBlob of type System.Byte[] (i.e. an array of bytes)

2. Design your report based on that dataset, and place each fields on the report body. You should get a BLOBField and a text item

3. In your code, you MUST fill out the datatable with the images you get from the specified folder

4. With that DataTable filled with the images + text, you need to BIND it to the report dynamically by using ReportDocument's SetDataSource method


这篇关于水晶报告添加和打印动态图像的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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