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

Report issues in rendering larger table

5 Answers 469 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Mazhar Islamraja
Top achievements
Rank 1
Mazhar Islamraja asked on 17 May 2012, 10:59 PM
I am experiencing a very peculiar issue using the Telerik Reports(version 2012 Q1) on an ASP.NET 3.5 web application . The same reports as well as the other controls on the ASP.Net page function properly when there is less data but when there are a lot of rows(1000 or so) on the report's table it does not get rendered properly. Some of the data appears at random position in the report viewer. Even the header gets shifted to the bottom of the report. Besides this the rest of the ASP.NET page controls stop functioning correctly for example the buttons do not interact normally any longer.

It seems like the data in the report viewer is not getting formatted properly because of the large number of rows resulting in corruption of HTML output. Can you please help us troubleshoot and resolve this issue? As I understand there is no in-built paging on the report viewer leading to all the data being pulled at once is there any way to develop the report to render fewer items at a time?

5 Answers, 1 is accepted

Sort by
0
Steve
Telerik team
answered on 21 May 2012, 01:57 PM
Hello Mazhar,

Can you confirm this happens only with Internet Explorer browser? If that is the case we are aware of that problem which occurs whenever one big page occurs ( > ~20k items on a single page) and the browser itself cannot take the load.
Setting the report viewer to start/run in PrintPreview (ViewMode property) should resolve the problem, as the report would be paged and there would not be so many items shown at once. 
If changing the view mode is not desired, then you would have to replace repeater controls (table, crosstab, list) because in Interactive Layout they wont break and will be kept on one page. You can simulate a table with SubReport and textboxes. Also if you use grouping in a table, you can move the grouping outside and use the table for the inner records only.

If the described problem is not the one you experience, please provide more information.

Kind regards,
Steve
the Telerik team

BLOGGERS WANTED! Write a review about Telerik Reporting or the new Report Designer, post it on your blog and get a complimentary license for Telerik Reporting. We’ll even promote your blog and help bring you a few fresh readers. Yes, it’s that simple. And it’s free. Get started today >

0
Shahzada
Top achievements
Rank 1
answered on 18 Jul 2012, 09:35 AM
Dear Steve,

Can you suggest any work around; other than the above mentioned?

I have to load a report with 1000 plus records in table, but this is not rendering properly in IE. (other browser showing fine).
What is the actual problem??

And what your suggestion for the solution?

Advance Thankyou

0
Shahzada
Top achievements
Rank 1
answered on 09 Aug 2012, 05:56 AM
still waiting for your reply ........
0
IvanY
Telerik team
answered on 13 Aug 2012, 04:24 PM
Hi Shahzada,

The actual problem as described above is related to IE - the browser itself is not able to handle so much information and therefore starts messing around the rows. Because of that what you have to do is prevent displaying so many items in the browser - otherwise you will always get your data messed up. Consider one of the solutions above provided by my colleague as showing small amounts of data per page is the only workaround available.

All the best,
IvanY
the Telerik team

BLOGGERS WANTED! Write a review about Telerik Reporting or the new Report Designer, post it on your blog and get a complimentary license for Telerik Reporting. We’ll even promote your blog and help bring you a few fresh readers. Yes, it’s that simple. And it’s free. Get started today >

0
Robert Michels
Top achievements
Rank 1
answered on 26 Nov 2012, 11:26 PM
Hi,

We are experiencing the same issue in IE9 when attempting to display a table with >500 rows.  The table has dynamically generated columns (usually around 30 columns).  Changing the ViewMode to PrintPreview prevents the display errors, but the columns are spread across many pages and this is not a workable solution for us.  I don't think we can replace the table control as you suggest since we need to dynamically define the columns.  The table also does not use any grouping.  It is a simple, flat data structure.

The report displays correctly in the ReportViewer for small datasets.  Since this works, we would like to retain the standard functionality for these small datasets, but In ReportViewer Preview, we would like to limit the number of rows or display a message if the rows exceed a certain count.  For Export functionality, we would like to display ALL of the records.

We are following logic similar to that indicated in these posts, but for a table item:

http://www.telerik.com/community/forums/reporting/telerik-reporting/detect-type-of-export.aspx
http://www.telerik.com/community/forums/reporting/telerik-reporting/show-report-item-only-in-export-to-excel.aspx

In our code, the data is bound to the table in the table's ItemDataBinding event.  We can detect the querystring values for optype and ExportFormat when the report is Previewed, but the table's ItemDataBinding event does not fire on Export and the full dataset is not displayed.  Is there a better way to detect the Preview vs. Export events for this scenario?  Or a way to trigger the table's ItemDataBinding on export?

Any help would be much appreciated!  Here is a simplified version of our code for the table's ItemDataBinding event:

private void tblDetails_ItemDataBinding(object sender, EventArgs e)
{
    DataTable dtData = SomeMethodToGetData();
             
    string opType = System.Web.HttpContext.Current.Request.QueryString["optype"];
    string exportFormat = System.Web.HttpContext.Current.Request.QueryString["ExportFormat"];
 
    if (
        (dtData.Rows.Count > 500)
        && (opType == "Report")
    )
    {
        this.detail.Visible = false; // detail contains the table, we are hiding it if rowcount exceeds some value
        this.groupFooterSection1.Visible = true; // groupFooter1 contains an error message
    }
    else
    {
        this.detail.Visible = true;
        this.groupFooterSection1.Visible = false;
 
        //get the processing table object since we're in the context of event
        Telerik.Reporting.Processing.Table processingTable = (sender as Telerik.Reporting.Processing.Table);
        processingTable.DataSource = dtCampaignStatsData;
 
        //create two HtmlTextBox items (one for header and one for data) which would be added to the items collection of the table
        Telerik.Reporting.HtmlTextBox textboxGroup;
        Telerik.Reporting.HtmlTextBox textBoxTable;
 
        //we do not clear the Rows collection, since we have a details row group and need to create columns only
        this.tblDetails.ColumnGroups.Clear();
        this.tblDetails.Body.Columns.Clear();
        this.tblDetails.Body.Rows.Clear();
        int i = 0;
        this.tblDetails.ColumnHeadersPrintOnEveryPage = true;
        foreach (DataColumn dc in dtData.Columns)
        {
            Telerik.Reporting.TableGroup tableGroupColumn = new Telerik.Reporting.TableGroup();
            this.tblDetails.ColumnGroups.Add(tableGroupColumn);
            this.tblDetails.Body.Columns.Add(new Telerik.Reporting.TableBodyColumn(Unit.Inch(1)));
 
            textboxGroup = new Telerik.Reporting.HtmlTextBox();
            textboxGroup.Style.BorderColor.Default = Color.Black;
            textboxGroup.Style.BorderStyle.Default = BorderType.Solid;
            textboxGroup.Value = dc.ColumnName.ToString();
            textboxGroup.Size = new SizeU(Unit.Inch(1.1), Unit.Inch(0.3));
            tableGroupColumn.ReportItem = textboxGroup;
 
            textBoxTable = new Telerik.Reporting.HtmlTextBox();
            textBoxTable.Style.BorderColor.Default = Color.Black;
            textBoxTable.Style.BorderStyle.Default = BorderType.Solid;
            textBoxTable.Value = "=[" + dc.ColumnName + "]";
            textBoxTable.Size = new SizeU(Unit.Inch(1.1), Unit.Inch(0.3));
            this.tblDetails.Body.SetCellContent(0, i++, textBoxTable);
            this.tblDetails.Items.AddRange(new ReportItemBase[] { textBoxTable, textboxGroup });
        }
    }
}

Tags
General Discussions
Asked by
Mazhar Islamraja
Top achievements
Rank 1
Answers by
Steve
Telerik team
Shahzada
Top achievements
Rank 1
IvanY
Telerik team
Robert Michels
Top achievements
Rank 1
Share this question
or