Page 1 of 1

load report from binary data

Posted: Sat Jan 11, 2014 3:50 pm
by SayedOthman
hello every body ,
if I save a report in sql database as binary data how I can load at run time and view report data
your support highly appreciated

Re: load report from binary data

Posted: Mon Jan 13, 2014 5:37 am
by HighAley
Hello.
SayedOthman wrote:if I save a report in sql database as binary data how I can load at run time and view report data
your support highly appreciated
The answer depends on how do you do this.
Please, send us code of how do you save report.
Could you also specify which version do you use?

Thank you.

Re: load report from binary data

Posted: Mon Jan 13, 2014 1:09 pm
by SayedOthman
thank u for reply

i am using this method to insert the report into database

Code: Select all

 
 Function ConvertFileToBinary(ByVal Path As String) As Byte()
        Dim data As Byte() = Nothing
        Dim finfo As New FileInfo(Path)
        Dim numbyte As Long = finfo.Length
        Dim fstream As FileStream = New FileStream(Path, FileMode.Open, FileAccess.Read)
        Dim br As BinaryReader = New BinaryReader(fstream)
        data = br.ReadBytes(numbyte)
        br.Close()
        fstream.Close()
        Return data
    End Function
also i have stimulsoft 2011.1
and i want which better method to save and call report in and from database because i am recently begin to utilize stimulsoft report
thank you for support

Re: load report from binary data

Posted: Mon Jan 13, 2014 1:29 pm
by HighAley
Hello.

You could load the report with Load method:

Code: Select all

StiReport report = new StiReport();
report.Load(new MemoryStream(byte[] data));
For more detailed answer, please, write to support@stimulsoft.com

Thank you.

Re: load report from binary data

Posted: Mon Jan 13, 2014 2:28 pm
by SayedOthman
Thank you very much
Now every thing OK

Re: load report from binary data

Posted: Tue Jan 14, 2014 7:22 am
by HighAley
Hello.

We are always glad to help you.

Thank you.