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

Control LabelStep for DateTimeScale

1 Answer 80 Views
Report Designer (standalone)
This is a migrated thread and some comments may be shown as answers.
Ovidiu
Top achievements
Rank 1
Ovidiu asked on 26 May 2014, 03:40 PM
Hello,

I have the following situation:
- I use ".trdx" reports created with standalone Report Designer in ASP.Net MVC application
- I have a reserved space for a graph in a report,
- the report is parametrized to select from a database values within a date range, the size of the range could vary significantly from one week or less to one month, three months or even more.

Problem is that if my serie is with daily data then I get too many labels that overlaps over each other. I saw that I can configure LabelStep on the scale but that is a static setting. If I increase the LabelStep to have the labels properly displayed for one month then I remain short on labels.

Ideal solution for my problem would be to have a way to bind LabelStep to a report parameter so I can calculate how big it shall be from outside depending on selected range.
Another solution would be to have somehow a way to configure a maximum number of labels to be displayed for the XAxis and the LabelStep to be adjusted automatically based on that
The desperate solution I was considering also was to dinamically modify the ".trdx" XML report before it get loaded by the report viewer, but didn't found a way to intercept a component/interface that would allow me to do that.

Could you please suggest any option to address this issue?
Thank you,

Vasile


1 Answer, 1 is accepted

Sort by
0
Nasko
Telerik team
answered on 29 May 2014, 11:33 AM
Hello Vasile,

Thank you for contacting Telerik Support.

Unfortunately, the LabelStep property does not support expressions and it cannot be bound to a report parameter.
The only way to set this property is programmatically, before the report is processed. If you have data for the selected date range before the report is shown in the report viewer, then you can modify the report definition and change the LabelStep accordingly.
In case you use the HTML5 Report Viewer, you need to create a custom report resolver, which will allow you to deserialize the .trdx report to a report object and change its definition.

Regards,
Nasko
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
Report Designer (standalone)
Asked by
Ovidiu
Top achievements
Rank 1
Answers by
Nasko
Telerik team
Share this question
or