I followed this articel store fast report template , to implement it but I cant save and load the report because the stream is empty !!!
Asked
Active
Viewed 1,517 times
1 Answers
0
Finally I figure out the problem , it is related to the SQLSERVER real available space to store in DB for varbinary field as my FASTREPORT template size was byte[616054] so it just save 50 byte in sql , check this link varbinarymax, So , I changed the data type to the ntext and convert stream to string for storing and do the reverse for retrieve mechanism
this command byte to string
byte[] blob = stream.ToArray();
string st= System.Text.Encoding.UTF8.GetString(blob);
and this one for retrieve
byte blob2 =Encoding.UTF8.GetBytes(this.TableAdapter.GetDataByID(key).Rows[0]["Report"].ToString());
also can try this one to use varbinary(max) check it out : Enable File Stream in SQL

Community
- 1
- 1

franchesco totti
- 582
- 1
- 7
- 28