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

CrossTab need Datasource not fired in Azure

2 Answers 28 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Marcus Kellermann
Top achievements
Rank 1
Marcus Kellermann asked on 06 Nov 2013, 08:24 PM
OK, this is an odd one but I have a CrossTab report that when run locally on my dev machine under IIS runs perfectly fine.

However when run in Azure the needDataSource event for the CrossTab isn't raise.  I have attached a remote debugger, I can see the report initialize, and the Reports NeedDataSource event is raised however CrossTab1_NeedDataSource is never executed.  

No errors are thrown, no error statements in the console during debugging.

Is there another way to force the NeedDataSource even to fire?  Or a way to bind the cross tab(s) from the reports datasource.

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");
    }

2 Answers, 1 is accepted

Sort by
0
Marcus Kellermann
Top achievements
Rank 1
answered on 06 Nov 2013, 08:50 PM
I just noticed that I have another report that has a table inside of a group header section which, this table doesn't have its NeedDataSource Event raised when running in Azure either.

This must be configuration related, but I have not idea where to look for such a configuration issue.
0
Stef
Telerik team
answered on 08 Nov 2013, 09:24 PM
Hi,

This is a quote from your support ticket:

"To run your project in Azure you need custom session state provider as AppFabricCacheSessionStoreProvider. Thus you are running with out-proc session state configuration and need to follow the rules listed in the Design Considerations for Out-proc Session State help article."

Regards,
Stef
Telerik

New HTML5/JS REPORT VIEWER with MOBILE AND TOUCH SUPPORT available in Telerik Reporting Q3 2013! Get the new Reporting version from your account or download a trial.

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