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

Page support for Telerik Table based layout

5 Answers 80 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Kailash
Top achievements
Rank 1
Kailash asked on 04 Jan 2013, 11:52 AM
Hello Everyone,

I am using a Telerik Report Control and it solved lots of Technical problems while dealing with complex report data.
However after some time we got one major issue related to layout and alignments of the data.
The textboxes were getting miss aligned when there is a huge data in some fields which was looking quite messy in the web browser.

After release of Q3 2012, we decided to go with the Table based layout provided by telerik and we hope it will solve our problem for sure.
Ref:  http://www.telerik.com/help/reporting/table-working-with-table-cross-table-list-items.html
While working with the trial version of the Q3 we assumed that Table based layout will solve the issue and we will be able to get a well aligned data from the Telerik Report in browser. But here we got another issue related to paging.
As the Table renders all records on the one page and doesn't presents the data with multiple pages irrespective of row count.
I set all Page Settings properly for the report but still not getting the expected results.
It seems telerik renders paging on the basis of repeated details section in it but in my case i have added a Table Control on the details Section it self and have assigned Datasource property of Table control.
Can anybody suggest how to make it to display data page wise :) Or how to get rid of this Miss alignment issue in the report viewer?

Also is there any way we can have command over rendering HTML for report fields? So it will be easy to customize the rendered output and add some Html in it?

I am adding two Screenshots 
1) Miss aligned stuffs: to show the existing report which is miss aligned due to excess data
2) table based trial : to show the things which i tried along with the output which contains data of about 100 Rows but getting displayed on single page in report

Please Help,

Thank You

5 Answers, 1 is accepted

Sort by
0
Stef
Telerik team
answered on 09 Jan 2013, 02:46 PM
Hi Kailash,

About the misaligned textBox items, can you check if the items are not overlapping, or there aren't any additional style rules on your page which may affect the element's width, overflow, etc( for more details please refer to Design Considerations for HTML Rendering). As I see you have opened a support ticket on the same matter, if the issue is none of the suggested, please send us there a sample project that we can test and details about the used Telerik Reporting version.
On your second question about the table, my colleague has elaborated on our considerations for the Web ReportViewer in the following thread: all the table data in one page! and provided information on how to get the look you need by setting the ReportViewer ViewMode property to PrintPreview.
In addition, messing with the report rendered HTML is not recommended, better set all your logic in the report itself.

I hope this helps.

Regards,
Stef
the Telerik team

HAPPY WITH REPORTING? Do you feel that it is fantastic? Or easy to use? Or better than Crystal Reports? Tell the world, and help fellow developers! Write a short review about Telerik Reporting and Telerik Report Designer in Visual Studio Gallery today!

0
Kailash
Top achievements
Rank 1
answered on 16 Jan 2013, 09:40 AM
Hi Stef ,

Thank you i got the workaround for the issue from your solution proposed by you.
Can you please provide one more help.
When we change the view mode to print preview, it renders with all print related UI which includes page margines, borders too.
Though i got the paging by changing the mode, can we also get rid of these extra margin and unwanted borders so it will look better in the browser?
0
Steve
Telerik team
answered on 18 Jan 2013, 04:42 PM
Hello Kailash,

You can use the following javascript to remove the border and margins from Print Preview:

<script type="text/javascript">
    ReportViewer.prototype.OnReportLoadedOriginal = ReportViewer.prototype.OnReportLoaded;
 
    ReportViewer.prototype.OnReportLoaded = function () {
        this.OnReportLoadedOriginal();
 
        var iframeID = this.clientID + "ReportFrame";
        var iframe = document.getElementById(iframeID);
        var doc = iframe.contentDocument || iframe.contentWindow.document;
        var body = doc.getElementsByTagName('BODY')[0];
        var page = body.getElementsByTagName('DIV')[0];
 
        page.style.marginLeft = page.style.marginRight = "0px";
        page.style.borderStyle = "none";
    }
</script>

Additionally if you do not like the rendering in the viewer, you can remove it and export programmatically to PDF instead forcing the browser to display the PDF file, for more info see Exporting a report to PDF programmatically.

Regards,
Steve
the Telerik team

HAPPY WITH REPORTING? Do you feel that it is fantastic? Or easy to use? Or better than Crystal Reports? Tell the world, and help fellow developers! Write a short review about Telerik Reporting and Telerik Report Designer in Visual Studio Gallery today!

0
eamon
Top achievements
Rank 1
answered on 12 Mar 2013, 02:01 AM

So if I use a row of text boxes in the detail section I get a paging grid effect potentially but need to spend hours tweaking them so they align properly

If I use the table I get great alignment but lose the paging

unless I use the print preview mode and hide the print preview button from the end user  …and then I lose any interactivity

I would expect a table to dock into the detail section and pick up the report's data source, allowing for perfect alignment and paging

I'm a huge telerik fan but this does seem like a bug, any chance of it going on the future fix list?


0
Stef
Telerik team
answered on 14 Mar 2013, 04:57 PM
Hello,

The report form is a template which once prepared is reusable with any data you pass (consistent with the created report definition). When you use the report designer there are grid lines, rulers, zoom option and other helpful elements to set the item at the desired place. Whenever there is an issue with overlapping items or such exceeding the available space within the report, there is a message pointing the problem. The rest of the report items setting can be achieved by styling them to have for example the same text alignment, color using the Context Menu and its Copy/Paste Style features which can be applied even on multiple selection of items.

If you need help on a particular case, let us know more details or open a support ticket where you can send us a sample project illustrating your questions.

Regards,
Stef
the Telerik team

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

Tags
General Discussions
Asked by
Kailash
Top achievements
Rank 1
Answers by
Stef
Telerik team
Kailash
Top achievements
Rank 1
Steve
Telerik team
eamon
Top achievements
Rank 1
Share this question
or