This is a migrated thread and some comments may be shown as answers.

Telerik report First page is blank when exported to pdf

4 Answers 125 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Satyanarayana
Top achievements
Rank 1
Satyanarayana asked on 20 Mar 2013, 11:13 AM
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();
         }

4 Answers, 1 is accepted

Sort by
0
Squall
Top achievements
Rank 1
answered on 22 Mar 2013, 02:48 PM
Hi, 
You may have to set the table groups GroupKeepTogether to false. For this you can use the group explorer.
Another thing to try is to set the textbox items keeptogether to false too.
SN
0
pradeep
Top achievements
Rank 1
answered on 25 Mar 2013, 06:03 AM
Hi Squall,
We tried by GroupKeepTogether to false.It didnot work.
We also did try keeping textbox keeptogether as false nothin worked :(


0
IvanY
Telerik team
answered on 27 Mar 2013, 12:19 PM
Hi Pradeep,

It seems that in your case the table row is too high. What you have to know is that table rows cannot be split even if the KeepTogether property is set to false. Therefore our suggestion is to redesign your report so that your table rows are smaller or if you want you can create it even without tables.

Kind regards,
IvanY
the Telerik team

Telerik Reporting Q1 2013 available for download with impressive new visualizations. Download today from your account.

0
Channah Miriam
Top achievements
Rank 1
answered on 07 Jun 2020, 11:10 AM
I had the same issue. What solved it for me was to slightly shorten the table's column widths.
Tags
General Discussions
Asked by
Satyanarayana
Top achievements
Rank 1
Answers by
Squall
Top achievements
Rank 1
pradeep
Top achievements
Rank 1
IvanY
Telerik team
Channah Miriam
Top achievements
Rank 1
Share this question
or