建立子报表数据源文件:
1
<?xml version="1.0" ?>
2
<xs:schema id="zp" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
3
<xs:element name="zpb">
4
<xs:complexType>
5
<xs:sequence>
6
<xs:element name="zpdata" type="xs:base64Binary" minOccurs="0" />
7
</xs:sequence>
8
</xs:complexType>
9
</xs:element>
10
</xs:schema>
用代码为子报表创建数据源,子报表名称为Zp,strZp即是图片的文件名:
2

3

4

5

6

7

8

9

10









1
private byte[] GetFileStream(string FileName)
2
{
3
FileStream fstr = new FileStream(Server.MapPath("images/upload/zp/" + FileName), FileMode.Open);
4
BinaryReader brd = new BinaryReader(fstr);
5
byte[] b = new byte[fstr.Length];
6
b = brd.ReadBytes((int)fstr.Length);
7
fstr.Close();
8
return b;
9
}
10

2

3

4

5

6

7

8

9

10
