Programmaticaly built report
Posted: Mon Jun 04, 2012 4:55 am
Hello!
I have dynamic report which looks like following:
but as I am trying to generate I get empty list.
Did I forget anything?
Thank you
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;
Did I forget anything?
Thank you