For example i want to display from 01/01/2014 to 02/01/2014. I currently have those two values in parameters, but how do i set the Maximum and Minimum of the scale to these paramaters? I have tried =Parameters.Start.Value ect... (Start is my datetime parameter)
Any suggestions?
7 Answers, 1 is accepted
thanks
The Scale.Minimum and Scale.Maximum properties of the Graph Axis do not support expressions. You can set static values for these properties, but cannot assign report parameter values.
A possible approach, as you mentioned, is to determine these values and set them programmatically in the report definition before the report is displayed in the viewer.
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.
Thank you for the quick and timely post. Unfortunately I have discovered that if multiple customers are using the same template and changing the xml properties at different times that there may be a time that two customers open the report up and save it at different times. This could mess up the scaling for them.
I came up with another ideal, maybe adding fake events to the maximum and minimum dates so the graph stretches out. Do you think this is possible?
Thanks
We believe the best approach would be to send us a small runnable sample project with dummy data, which demonstrates a similar scenario. We will review it and try to implement a solution to set the required scale minimum and maximum.
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.
How do I access the Maximum and Minimum values for the DateTime axis (programming language is C#)?
I'm using the ReportProcessor to print the report programmatically and would like to set the values before I print the report. My report contains a singe graph object (graph1). The name of the coordinate system is the standard (cartesianCoordinateSystem1)
Code part used for printing (report definition attached):
{
printerSettings.PrinterName = curveSheetRequests.printer_name;
printerSettings.DefaultPageSettings.Landscape = false;
printerSettings.DefaultPageSettings.Color = true;
Report testReport = new ReportLibrary1.Report1();
InstanceReportSource instanceReportSource = new InstanceReportSource();
instanceReportSource.ReportDocument = testReport;
testReport.ReportParameters["pFromDate"].Value = DateTime.Parse(curveSheetRequests.operation_start);
testReport.ReportParameters["pToDate"].Value = DateTime.Parse(curveSheetRequests.operation_end);
testReport.ReportParameters["pSheetSpecXML"].Value = curveSheetRequests.curvesheetxmlstring;
testReport.ReportParameters["pHeaderFooterXML"].Value = curveSheetRequests.headerfooterxmlstring;
Telerik.Reporting.Processing.ReportProcessor reportEngine = new Telerik.Reporting.Processing.ReportProcessor();
reportEngine.PrintController = printController;
reportEngine.PrintReport(instanceReportSource, printerSettings);
}
The Minimum and Maximum properties support Bindings, so you can set their values dynamically based on data or report parameters. You need to open the Bindings property editor of the coordinate system in order to do that.
Another option to set the values of these properties is programmatically using the API Reference.
Regards,
Nasko
Progress Telerik
Hi Nasko!
Thank's for a quick reply. I found out how to use bindings, bound items are even marked in the properties overview.
br. Carl Høgstedt