close & reopen the form to show report again

Stimulsoft Reports.NET discussion
Post Reply
michael
Posts: 4
Joined: Fri Jan 07, 2011 8:13 am

close & reopen the form to show report again

Post by michael »

Hello :)
During my coding, I am using this code:

Code: Select all

        Dim dap As SqlDataAdapter = New SqlDataAdapter("SELECT student_id, student_name, Student_family FROM students", Conn)
        Dim dst As DataSet = New DataSet

        Conn.Open()
        dap.Fill(dst, "studentreporttable")
        Conn.Close()

        stu.RegData(dst)
        stu.Render()
        stu.Show()
But only once can see the report.
After closing the report,I should close and open the form to report display again.
thanks
Alex K.
Posts: 6488
Joined: Thu Jul 29, 2010 2:37 am

close & reopen the form to show report again

Post by Alex K. »

Hello,

Sorry, maybe we did not exactly understand your question. Could you explain your issue in more details?

Thank you.
michael
Posts: 4
Joined: Fri Jan 07, 2011 8:13 am

close & reopen the form to show report again

Post by michael »

thanks for your reply
i said when i see report, after i'm closing it, i want open last report that i saw.
but, i have to close and reopen the form that my report on it, to i can see report again.
plz help, best regards.
Jan
Posts: 1265
Joined: Thu Feb 19, 2009 8:19 am

close & reopen the form to show report again

Post by Jan »

Hello,

If I correct understand you need save rendered report for showing in next time? You can use following code:

Code: Select all

report.Render();
string str = report.SaveDocumentToString();

//next time

StiReport report = new StiReport();
report.LoadDocumentFromString(str);
report.Show();
Thank you.
Post Reply