or
using
System.Linq;
using
Bentley.SelectServer.Database;
using
System;
namespace
Bentley.SelectServer.Reporting
{
/// /*------------------------------------------------------------------------------------------------------*/
/// <summary>
/// Summary description for MonthlyPeakUsage.
/// </summary>
/// <author>marcus.kellermann</author> <date>7/23/2013</date>
/// /*------------------------------------------------------------------------------------------------------*/
//public partial class MonthlyPeakUsage : Telerik.Reporting.Report, iBaseReport
public
partial
class
MonthlyPeakUsage : BaseReport, iBaseReport
{
public
MonthlyPeakUsage()
{
InitializeComponent();
this
.DocumentName = GetReportName();
this
.crosstab1.NeedDataSource +=crosstab1_NeedDataSource;
}
///*--------------------------------------------------------------------------------------**/
/// <summary>
/// Report Name used for Display in the report and parameters name
/// </summary>
/// <returns></returns>
/// <author>Marcus.Kellermann</author> <date>07/2011</date>
/*==============+===============+===============+===============+===============+==========*/
public
string
GetReportName()
{
return
ReportingStrings.MonthlyPeakUsageReport;
}
///*--------------------------------------------------------------------------------------**/
/// <summary>
/// Creates the Report Configuration Object used to configure the reporting GUI
/// </summary>
/// <returns>Report Configuration</returns>
/// <author>Marcus.Kellermann</author> <date>07/2011</date>
/*==============+===============+===============+===============+===============+==========*/
public
ReportConfiguration GetReportConfiguration()
{
return
new
ReportConfiguration
{
ShowGeneralParametersTab=
true
,
ShowMachineParametersTab=
false
,
ShowUserParametersTab=
false
,
ShowVirtualSites =
false
,
ReportName = ReportingStrings.MonthlyPeakUsageReport,
ShowIncludeDetails =
false
,
ShowCAGOption =
false
};
}
/// /*------------------------------------------------------------------------------------------------------*/
/// <summary>
/// Handles the NeedDataSource event of the crosstab1 control.
/// </summary>
/// <param name="sender">The source of the event.</param>
/// <param name="e">The <see cref="EventArgs"/> instance containing the event data.</param>
/// <author>marcus.kellermann</author> <date>7/23/2013</date>
/// /*------------------------------------------------------------------------------------------------------*/
private
void
crosstab1_NeedDataSource(
object
sender, EventArgs e)
{
Telerik.Reporting.Processing.Table table = (Telerik.Reporting.Processing.Table)sender;
Telerik.Reporting.Processing.Report rpt = table.Report;
DateTime startDate = (DateTime)rpt.Parameters[ReportParameterNames.StartDate].Value;
DateTime endDate = (DateTime)rpt.Parameters[ReportParameterNames.EndDate].Value;
String userID = (String)rpt.Parameters[ReportParameterNames.UserID].Value;
string
reportID = (String)rpt.Parameters[ReportParameterNames.ReportID].Value;
Boolean includeWeekends = (
bool
)rpt.Parameters[ReportParameterNames.IncludeWeekends].Value;
//Jiao: Add UltimateID to ReportParameter
long
ultimateID =
long
.Parse ((
string
)rpt.Parameters[ReportParameterNames.UltimateID].Value);
var reportDataSet = Reports.MonthlyPeakUsage(startDate, endDate, userID,
new
Guid(reportID), includeWeekends, ultimateID);
ReportUtils.CheckReportSize(reportDataSet.MonthlyPeakUsage.Count());
table.DataSource = reportDataSet.MonthlyPeakUsage;
}
private
void
MonthlyPeakUsage_NeedDataSource(
object
sender, EventArgs e)
{
RPTLogger.Log.trace(
"In Report Need DataSource"
);
}
I am having an issue when I have multiple page reports. The first 2 pages show at the correct height but when I hit the third page the height is about 150px with a scrollbar. I only see the issue in IE10. Also if I go into compatibility mode I see no pages.
https://www.fashioncabinet.com/dealer/printinvoice.aspx?inv=AC1649&Row=26246
There is a link to the report