Combined task, print out again

Stimulsoft Reports.NET discussion
Post Reply
lampson
Posts: 42
Joined: Wed Dec 30, 2009 4:28 am

Combined task, print out again

Post by lampson »

Code: Select all

            stiReport1.Load(@"5.mrt");
            stiReport1.Compile();
            stiReport1.CompiledReport.DataStore.Clear();

            DataTable dt1 = new DataTable();
            for (int i = 100; i < 110; i++)
            {
                dt1 = GetTable(@"select '" + i + "' as qt1 from dual ");

                stiReport1.CompiledReport.DataStore.Clear();
                stiReport1.CompiledReport.RegData(dt1.DefaultView);
                stiReport1.CompiledReport.Render();
            }
            
            stiReport1.CompiledReport.Print();
This print is 10 tasks, I would like to print with a task to complete,how to do it ??

thank you .
Jan
Posts: 1265
Joined: Thu Feb 19, 2009 8:19 am

Combined task, print out again

Post by Jan »

Hello,

Try to use following code:

Code: Select all

StiReport temp = new StiReport();
temp.Render(false);

stiReport1.Load(@"5.mrt");
stiReport1.Compile();
stiReport1.CompiledReport.DataStore.Clear();

DataTable dt1 = new DataTable();
for (int i = 100; i < 110; i++)
{
     dt1 = GetTable(@"select '" + i + "' as qt1 from dual ");
     stiReport1.CompiledReport.DataStore.Clear();
     stiReport1.CompiledReport.RegData(dt1.DefaultView);
     stiReport1.CompiledReport.Render();

     foreach (StiPage page in stiReport1.CompiledReport.RenderedPages)
    {
        temp.RenderedPages.Add(page);
    }
}

temp.Print();
Thank you.
lampson
Posts: 42
Joined: Wed Dec 30, 2009 4:28 am

Combined task, print out again

Post by lampson »

I will try it.

Thank you ..:biggrin:
Post Reply