hi,
I created a telerik report with table in which a row is having very large text.When the report is exported to pdf the first page of report is blank and table is shown from the second page.although i kept together as false still i am unable to fix this issue.
here is the code i am using to set datasource to table
private static Random random = new Random((int)DateTime.Now.Ticks);
private string RandomString(int size)
{
StringBuilder builder = new StringBuilder();
char ch;
for (int i = 0; i < size; i++)
{
ch = Convert.ToChar(Convert.ToInt32(Math.Floor(26 * random.NextDouble() + 65)));
builder.Append(ch);
}
return builder.ToString();
}
DataTable GetTable()
{
DataTable table = new DataTable();
table.Columns.Add("Dosage", typeof(int));
table.Columns.Add("Drug", typeof(string));
table.Columns.Add("Patient", typeof(string));
table.Columns.Add("Date", typeof(DateTime));
table.Columns.Add("Desc", typeof(string));
string test = RandomString(10000);
table.Rows.Add(25, "Indocin", "David", DateTime.Now, test);
return table;
}
private void Report1_NeedDataSource(object sender, EventArgs e)
{
this.table1.DataSource = GetTable();
}
I created a telerik report with table in which a row is having very large text.When the report is exported to pdf the first page of report is blank and table is shown from the second page.although i kept together as false still i am unable to fix this issue.
here is the code i am using to set datasource to table
private static Random random = new Random((int)DateTime.Now.Ticks);
private string RandomString(int size)
{
StringBuilder builder = new StringBuilder();
char ch;
for (int i = 0; i < size; i++)
{
ch = Convert.ToChar(Convert.ToInt32(Math.Floor(26 * random.NextDouble() + 65)));
builder.Append(ch);
}
return builder.ToString();
}
DataTable GetTable()
{
DataTable table = new DataTable();
table.Columns.Add("Dosage", typeof(int));
table.Columns.Add("Drug", typeof(string));
table.Columns.Add("Patient", typeof(string));
table.Columns.Add("Date", typeof(DateTime));
table.Columns.Add("Desc", typeof(string));
string test = RandomString(10000);
table.Rows.Add(25, "Indocin", "David", DateTime.Now, test);
return table;
}
private void Report1_NeedDataSource(object sender, EventArgs e)
{
this.table1.DataSource = GetTable();
}