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

scaling html5 report horizontally only

1 Answer 193 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
cp
Top achievements
Rank 1
cp asked on 30 Sep 2014, 12:50 PM
Hi,
I was wondering if it was possible to only scale a report horizontally to where it will fill the entire width of the container, so it will basically behave like a table with columns that have a percentage width and not a fixed one. I am trying to avoid any height changes for any of the controls on the report as well as the font size.

Currently I am generating the reports programatically using the html5 interactive mode, is there perhaps a different mode I should be using to achieve the above requirements?

Secondly, while using RenderReport like so: 
var report = new T { DataSource = data };
var instanceReportSource = new InstanceReportSource { ReportDocument = report };
System.Collections.Hashtable deviceInfo = new System.Collections.Hashtable();
deviceInfo["ContentOnly"] = true;
Telerik.Reporting.Processing.ReportProcessor reportProcessor = new Telerik.Reporting.Processing.ReportProcessor();

reportProcessor.RenderReport(
"HTML5Interactive", instanceReportSource, deviceInfo, this.CreateStream, out documentName);

the second stream, which is the css stream, appears to close before this call returns, which means that it can no longer be used. As a workaround, I am keeping track of the temp files used for each stream and parsing those in order to get the contents. Is there perhaps a setting I am missing?

Thanks,

1 Answer, 1 is accepted

Sort by
0
Stef
Telerik team
answered on 02 Oct 2014, 03:08 PM
Hi,

You can use the HTML5 Report Viewer, which is a client-side widget served by a running Reporting REST service, dedicated to work with the viewer. It is the service that manages the report state and resources. For more details, please check  this forum thread. The viewer will display the report in HTML format.

The viewer has a scaleMode and scale options, allowing you to specify the zoom in the viewer's DIV element. If you set the scaleMode to SPECIFIC, you can set a number indicating the scale. The scale can be controlled with Javascript through the exposed viewer's method.



On your second question, to export the report in HTML you can use the approach described in the Exporting Report Programmatically article (Exporting a report to a multi document format:). On storing the rendered content files are written with their extensions, which can help you to distinguish them.
If you need further help, please elaborate on what functionality you are searching for and the reason for it


Regards,
Stef
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

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