load report from binary data

Stimulsoft Reports.NET discussion
Post Reply
SayedOthman
Posts: 24
Joined: Sun Dec 29, 2013 7:10 am

load report from binary data

Post 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
HighAley
Posts: 8430
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Re: load report from binary data

Post 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.
SayedOthman
Posts: 24
Joined: Sun Dec 29, 2013 7:10 am

Re: load report from binary data

Post 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
HighAley
Posts: 8430
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Re: load report from binary data

Post 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.
SayedOthman
Posts: 24
Joined: Sun Dec 29, 2013 7:10 am

Re: load report from binary data

Post by SayedOthman »

Thank you very much
Now every thing OK
HighAley
Posts: 8430
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Re: load report from binary data

Post by HighAley »

Hello.

We are always glad to help you.

Thank you.
Post Reply