Page 1 of 1

Programmaticaly built report

Posted: Mon Jun 04, 2012 4:55 am
by Mixxxa
Hello!

I have dynamic report which looks like following:

Code: Select all

                    source.TableName = "DataSource1";
                    report.DataSources.Clear();
                    report.RegData("DataSource1",source);
                    report.Dictionary.Synchronize();

                    StiPage page = report.Pages[0];

                    //Create Databand
                    StiDataBand dataBand = new StiDataBand();
                    dataBand.DataSourceName = "Customers";
                    dataBand.Height = 0.5;
                    dataBand.Name = "DataBand";
                    page.Components.Add(dataBand);

                    //Create text
                    StiText dataText = new StiText(new RectangleD(0, 0, 5, 0.5));
                    dataText.Text = "{Line}.{Customers.CompanyName}";
                    dataText.Name = "DataText";
                    dataBand.Components.Add(dataText);

                    //Create FooterBand
                    StiFooterBand footerBand = new StiFooterBand();
                    footerBand.Height = 0.5;
                    footerBand.Name = "FooterBand";
                    page.Components.Add(footerBand);

                    //Create text on footer
                    StiText footerText = new StiText(new RectangleD(0, 0, 5, 0.5));
                    footerText.Text = "Count - {Count()}";
                    footerText.HorAlignment = StiTextHorAlignment.Right;
                    footerText.Name = "FooterText";
                    footerText.Brush = new StiSolidBrush(Color.LightGreen);
                    footerBand.Components.Add(footerText);
                    StiWebViewerFx1.Report = report;
but as I am trying to generate I get empty list.
Did I forget anything?

Thank you

Programmaticaly built report

Posted: Mon Jun 04, 2012 9:45 am
by Alex K.
Hello,

Please see the sample project in attachment.

Thank you.