for (int i = 1; i <= objDS.Tables.Count-1; i++)
{
string strTableName = "Table" + Convert.ToString(i);
string strPanelName = "Panel" + Convert.ToString(i);
// Creating a dynamic panel for adding the Table.
var panel = MyClass.Panel.CreatePanel(strPanelName);
//creating the dynamic table for each table from the result set
var table = MyClass.Table.CreateTable(strTableName,
unitType: UnitType.Pixel,
locationX: 1,
locationY: 1,
width: 200,
height: 20,
rowHeight: 20,
dataTable: objDS.Tables[i]);
//Creating the columns dynamically
for (int k = 0; k <= objDS.Tables[i].Columns.Count - 1; k++)
{
table.WithColumn(objDS.Tables[i].Columns[k].ToString(),objDS.Tables[i].Columns[k].ToString(), 120);
}
// Creating the header group and body group data dynamically
for (int k = 0; k <= objDS.Tables[i].Columns.Count - 1; k++)
{
table.HeaderTextBoxes[objDS.Tables[i].Columns[k].ToString()].Style.BackgroundColor = Color.YellowGreen;
table.HeaderTextBoxes[objDS.Tables[i].Columns[k].ToString()].Style.BorderStyle.Default = BorderType.Solid;
table.BodyTextBoxes[objDS.Tables[i].Columns[k].ToString()].Style.BackgroundColor = Color.Yellow;
table.BodyTextBoxes[objDS.Tables[i].Columns[k].ToString()].Style.BorderStyle.Default = BorderType.Solid;
}
//adding the dynamically created table to the dynamically created panel.
panel.Items.Add(table);
//adding the panel along with table to the static panel created from report designer
this.reportPanel.Items.Add(panel);
The reason why i am creating dynamic panels is i dont know how many tables i will get as part of result set and i dont dont even know how many columns each table contains i.e. 1st table may have only 5 columns and the Nth table may have 10 columns. And i dont even know the position of the Dynamically created table to place in the report.
after table is generated i am adding the table to the dynamically created panel and all the dynamically created panels i am adding them to the panel which is from Reporting front end.
the code is getting executed perfectly can see the columns created and data binded with no exceptions, but in the report the table is showing this error
"An error has occurred while processing Table 'Table1': Missing operator before 'Required' operand"
no clue about this error, need help on this or if there is some other alrernative approach for my requirement please suggest.
Thanks,
NeelaKrishna
salesSeries.Appearance.FillStyle.FillType = Telerik.Reporting.Charting.Styles.FillType.Gradient;
salesSeries.Appearance.FillStyle.MainColor = Color.White;
salesSeries.Appearance.FillStyle.SecondColor = Color.Black;
resultChart.Appearance.FillStyle.FillType = Telerik.Reporting.Charting.Styles.FillType.Solid;
resultChart.Appearance.FillStyle.MainColor = Color.White;
Hello
I am using Telerik Reporting for Silverlight. In the report viewer once the report is generated, I want to print it by clicking on the "print" icon in the menu bar on top of the report.
After clicking on that button the popup showing the progress for the print generation is displayed as expected. Both "print" and "cancel" work fine in most cases. However, when a report is "big" (here I have a 38 pages report as per the report viewer or enough data in the report to generate a 2MB PDF file if it helps), the increment of the percent in that same popup does not start right away. If I click on the "Cancel" button before the percents start to increase, the popup does not close as it would otherwise. The "cancel" button becomes greyed out and the printing process keeps going until it reaches 100%. Once the process is over, there is no choice but to print the report (the "print" button is no more greyed out) or close the whole report viewer as the "Cancel" button remains greyed out.
We are using Silverlight 4 and the version of Telerik reporting we are using is the 6.0.12.215. Let me know if you need more information for your investigation.