Page 1 of 1

close & reopen the form to show report again

Posted: Sat Jan 08, 2011 6:31 am
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

close & reopen the form to show report again

Posted: Sat Jan 08, 2011 2:32 pm
by Alex K.
Hello,

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

Thank you.

close & reopen the form to show report again

Posted: Thu Jan 13, 2011 6:31 pm
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.

close & reopen the form to show report again

Posted: Fri Jan 14, 2011 12:13 am
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.