Skip to content
This repository was archived by the owner on Mar 26, 2024. It is now read-only.

Commit

Permalink
Converted solution for new ReportViewer
Browse files Browse the repository at this point in the history
  • Loading branch information
Simon Carpentier committed Jan 8, 2013
1 parent 8b5c729 commit cd2acc7
Show file tree
Hide file tree
Showing 13 changed files with 80 additions and 71 deletions.
14 changes: 8 additions & 6 deletions RezNetUsage.Web/Default.aspx
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
<%@ Page Title="" Language="C#" MasterPageFile="~/Default.Master" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="RezNetUsage.Web.Default1" %>
<%@ Register Assembly="Microsoft.ReportViewer.WebForms, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"
Namespace="Microsoft.Reporting.WebForms" TagPrefix="rsweb" %>
<%@ Register Assembly="Microsoft.ReportViewer.WebForms, Version=11.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91" Namespace="Microsoft.Reporting.WebForms" TagPrefix="rsweb" %>
<%@ Register src="Usercontrols/ErrorInvalidAppart.ascx" tagname="ErrorInvalidAppart" tagprefix="uc1" %>
<%@ OutputCache Duration="30" VaryByParam="phase; appart; mois" %>

Expand Down Expand Up @@ -59,7 +58,7 @@
ShowBackButton="False" ShowExportControls="False" ShowFindControls="False"
ShowPageNavigationControls="False" ShowPrintButton="False"
ShowRefreshButton="False" ShowZoomControl="False" Height="200px" Width="350px" ShowToolBar="False"
SizeToReportContent="True">
SizeToReportContent="True" KeepSessionAlive="True" InteractivityPostBackMode="AlwaysAsynchronous" AsyncRendering="False">
<LocalReport ReportPath="Reports\SummaryPie.rdlc">
</LocalReport>
</rsweb:ReportViewer>
Expand Down Expand Up @@ -101,7 +100,7 @@
ShowFindControls="False" ShowPageNavigationControls="False"
ShowPrintButton="False" ShowPromptAreaButton="False" ShowRefreshButton="False"
ShowToolBar="False" ShowZoomControl="False" WaitMessageFont-Names="Verdana"
WaitMessageFont-Size="14pt" SizeToReportContent="True">
WaitMessageFont-Size="14pt" SizeToReportContent="True" KeepSessionAlive="False" AsyncRendering="False" InteractivityPostBackMode="AlwaysAsynchronous">
<LocalReport ReportPath="Reports\ForecastRatio.rdlc">
</LocalReport>
</rsweb:ReportViewer></td>
Expand All @@ -117,7 +116,7 @@
ShowBackButton="False" ShowExportControls="False" ShowFindControls="False"
ShowPageNavigationControls="False" ShowPrintButton="False"
ShowRefreshButton="False" ShowZoomControl="False" Width="700px"
ShowToolBar="False" SizeToReportContent="True">
ShowToolBar="False" SizeToReportContent="True" InteractivityPostBackMode="AlwaysAsynchronous" KeepSessionAlive="True" AsyncRendering="False">
<LocalReport ReportPath="Reports\Users.rdlc">
</LocalReport>
</rsweb:ReportViewer>
Expand All @@ -128,7 +127,7 @@
ShowPageNavigationControls="False" ShowPrintButton="False"
ShowRefreshButton="False" ShowZoomControl="False"
WaitMessageFont-Names="Verdana" WaitMessageFont-Size="14pt" Width="700px"
ShowToolBar="False" SizeToReportContent="True">
ShowToolBar="False" SizeToReportContent="True" KeepSessionAlive="True" InteractivityPostBackMode="AlwaysAsynchronous" AsyncRendering="False">
<LocalReport ReportPath="Reports\ThisMonth.rdlc">
</LocalReport>
</rsweb:ReportViewer>
Expand Down Expand Up @@ -167,4 +166,7 @@
<div class="footer">
Source:
<asp:HyperLink ID="hlSource" runat="server"></asp:HyperLink></div>
<!--
<asp:Label runat="server" ID="lblDebug"></asp:Label>
-->
</asp:Content>
21 changes: 10 additions & 11 deletions RezNetUsage.Web/Default.aspx.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
namespace RezNetUsage.Web
using System.Data;

namespace RezNetUsage.Web
{
using System.Globalization;
using System;
Expand Down Expand Up @@ -36,10 +38,7 @@ public partial class Default1 : System.Web.UI.Page

protected void Page_Load(object sender, EventArgs e)
{
if (IsPostBack)
{
return;
}
if (IsPostBack) return;

bool isok = ParseAppartParameters(
this.Request.QueryString["phase"], this.Request.QueryString["appart"], this.Request.QueryString["mois"]);
Expand Down Expand Up @@ -89,6 +88,7 @@ protected void Page_Load(object sender, EventArgs e)
} else
{
lblPhaseAppartMois.Text = "Oops! Quelque chose d'étrange c'est produit: " + ex.Message;
lblDebug.Text = ex.ToString();
}

lblPhaseAppartMois.ForeColor = System.Drawing.Color.Red;
Expand All @@ -111,14 +111,13 @@ private void LoadForecast()
return;
}

this.ReportForecastRatio.LocalReport.DataSources.Clear();
this.ReportForecastRatio.LocalReport.DataSources.Add(new ReportDataSource("DataSet1", _usage.Tables[0]));
//this.ReportForecastRatio.LocalReport.DataSources.Clear();
this.ReportForecastRatio.LocalReport.DataSources.Add(new ReportDataSource("DataSet1", new DataTable()));

var paramList = new List<ReportParameter>
{new ReportParameter("Ratio", _usage.UsageRateRatio.ToString(), false)};
//var paramList = new List<ReportParameter> { new ReportParameter("Ratio", _usage.UsageRateRatio.ToString(), false) };

this.ReportForecastRatio.LocalReport.SetParameters(paramList);
this.ReportForecastRatio.LocalReport.Refresh();
this.ReportForecastRatio.LocalReport.SetParameters(new ReportParameter("Ratio", _usage.UsageRateRatio.ToString())); ;
//this.ReportForecastRatio.LocalReport.Refresh();

bool depasse = (_usage.Maximum < _usage.ForecastUsage);

Expand Down
9 changes: 9 additions & 0 deletions RezNetUsage.Web/Default.aspx.designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

23 changes: 22 additions & 1 deletion RezNetUsage.Web/RezNetUsage.Web.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
<OutputPath>bin\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<WarningLevel>3</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
Expand All @@ -47,8 +47,29 @@
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="Microsoft.ReportViewer.Common, Version=11.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\..\..\..\Windows\assembly\GAC_MSIL\Microsoft.ReportViewer.Common\11.0.0.0__89845dcd8080cc91\Microsoft.ReportViewer.Common.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Microsoft.ReportViewer.DataVisualization, Version=11.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\..\..\..\Windows\assembly\GAC_MSIL\Microsoft.ReportViewer.DataVisualization\11.0.0.0__89845dcd8080cc91\Microsoft.ReportViewer.DataVisualization.DLL</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Microsoft.ReportViewer.ProcessingObjectModel, Version=11.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\..\..\..\Windows\assembly\GAC_MSIL\Microsoft.ReportViewer.ProcessingObjectModel\11.0.0.0__89845dcd8080cc91\Microsoft.ReportViewer.ProcessingObjectModel.DLL</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Microsoft.ReportViewer.WebForms, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\..\..\..\Program Files (x86)\Microsoft Visual Studio 11.0\ReportViewer\Microsoft.ReportViewer.WebForms.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Microsoft.SqlServer.Types, Version=11.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\..\..\..\Windows\assembly\GAC_MSIL\Microsoft.SqlServer.Types\11.0.0.0__89845dcd8080cc91\Microsoft.SqlServer.Types.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="System.Web.DataVisualization">
Expand Down
72 changes: 31 additions & 41 deletions RezNetUsage.Web/Web.config
Original file line number Diff line number Diff line change
Expand Up @@ -4,44 +4,34 @@
http://go.microsoft.com/fwlink/?LinkId=169433
-->
<configuration>
<appSettings>
<add key="ChartImageHandler" value="storage=file;timeout=20;dir=c:\TempImageFiles\;"/>
</appSettings>
<system.web>
<globalization
culture="fr-CA"
uiCulture="fr-CA"
/>
<pages>
<controls>
<add tagPrefix="asp" namespace="System.Web.UI.DataVisualization.Charting" assembly="System.Web.DataVisualization, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
</controls>
</pages>
<httpHandlers>
<add path="Reserved.ReportViewerWebControl.axd" verb="*" type="Microsoft.Reporting.WebForms.HttpHandler, Microsoft.ReportViewer.WebForms, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" validate="false"/>
<add path="ChartImg.axd" verb="GET,HEAD,POST" type="System.Web.UI.DataVisualization.Charting.ChartHttpHandler, System.Web.DataVisualization, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" validate="false"/>
</httpHandlers>
<compilation debug="true" targetFramework="4.0">
<assemblies>
<add assembly="Microsoft.ReportViewer.WebForms, Version=10.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>
<add assembly="Microsoft.ReportViewer.Common, Version=10.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>
<add assembly="Microsoft.Build.Framework, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>
<add assembly="System.Management, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>
<add assembly="System.Web.DataVisualization, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
<add assembly="System.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>
<add assembly="System.Web.Extensions.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
<add assembly="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/></assemblies>
<buildProviders>
<add extension=".rdlc" type="Microsoft.Reporting.RdlBuildProvider, Microsoft.ReportViewer.WebForms, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"/>
</buildProviders>
</compilation>
</system.web>
<system.webServer>
<validation validateIntegratedModeConfiguration="false"/>
<handlers>
<remove name="ChartImageHandler"/>
<add name="ReportViewerWebControlHandler" preCondition="integratedMode" verb="*" path="Reserved.ReportViewerWebControl.axd" type="Microsoft.Reporting.WebForms.HttpHandler, Microsoft.ReportViewer.WebForms, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"/>
<add name="ChartImageHandler" preCondition="integratedMode" verb="GET,HEAD,POST" path="ChartImg.axd" type="System.Web.UI.DataVisualization.Charting.ChartHttpHandler, System.Web.DataVisualization, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
</handlers>
</system.webServer>
</configuration>
<appSettings>
<add key="ChartImageHandler" value="storage=file;timeout=20;dir=c:\TempImageFiles\;"/>
</appSettings>
<system.web>
<customErrors mode="Off"/>
<globalization culture="fr-CA" uiCulture="fr-CA"/>
<pages>
<controls>
<add tagPrefix="asp" namespace="System.Web.UI.DataVisualization.Charting" assembly="System.Web.DataVisualization, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
</controls>
</pages>
<compilation debug="true" targetFramework="4.0">
<assemblies>
<add assembly="Microsoft.Build.Framework, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>
<add assembly="System.Management, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>
<add assembly="System.Web.DataVisualization, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
<add assembly="System.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>
<add assembly="System.Web.Extensions.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
<add assembly="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
<add assembly="Microsoft.ReportViewer.WebForms, Version=11.0.0.0, Culture=neutral, PublicKeyToken=89845DCD8080CC91"/>
<add assembly="Microsoft.ReportViewer.Common, Version=11.0.0.0, Culture=neutral, PublicKeyToken=89845DCD8080CC91"/>
</assemblies>
</compilation>
</system.web>
<system.webServer>
<validation validateIntegratedModeConfiguration="false"/>
<handlers>
<add name="ReportViewerWebControlHandler" preCondition="integratedMode" verb="*" path="Reserved.ReportViewerWebControl.axd" type="Microsoft.Reporting.WebForms.HttpHandler, Microsoft.ReportViewer.WebForms, Version=11.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91" />
</handlers>
</system.webServer>
</configuration>
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file modified RezNetUsage.Web/bin/Microsoft.ReportViewer.WebForms.dll
Binary file not shown.
Binary file not shown.
Binary file not shown.
12 changes: 0 additions & 12 deletions RezNetUsage.sln
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "RezNetUsage.Web", "RezNetUs
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "RezNetUsage.DataFetcher", "DataFetcher\RezNetUsage.DataFetcher.csproj", "{E1605538-6A9F-4B2B-8CC6-F5CA664FF1DC}"
EndProject
Project("{CC5FD16D-436D-48AD-A40C-5A424C6E3E79}") = "RezNetUsage.Web.Azure", "RezNetUsage.Web.Azure\RezNetUsage.Web.Azure.ccproj", "{9AA344BF-2F4C-459B-8216-00CBC0C4EB0E}"
EndProject
Global
GlobalSection(TestCaseManagementSettings) = postSolution
CategoryFile = RezNetUsage.vsmdi
Expand Down Expand Up @@ -52,16 +50,6 @@ Global
{E1605538-6A9F-4B2B-8CC6-F5CA664FF1DC}.Release|Mixed Platforms.Build.0 = Release|x86
{E1605538-6A9F-4B2B-8CC6-F5CA664FF1DC}.Release|x86.ActiveCfg = Release|x86
{E1605538-6A9F-4B2B-8CC6-F5CA664FF1DC}.Release|x86.Build.0 = Release|x86
{9AA344BF-2F4C-459B-8216-00CBC0C4EB0E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{9AA344BF-2F4C-459B-8216-00CBC0C4EB0E}.Debug|Any CPU.Build.0 = Debug|Any CPU
{9AA344BF-2F4C-459B-8216-00CBC0C4EB0E}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
{9AA344BF-2F4C-459B-8216-00CBC0C4EB0E}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
{9AA344BF-2F4C-459B-8216-00CBC0C4EB0E}.Debug|x86.ActiveCfg = Debug|Any CPU
{9AA344BF-2F4C-459B-8216-00CBC0C4EB0E}.Release|Any CPU.ActiveCfg = Release|Any CPU
{9AA344BF-2F4C-459B-8216-00CBC0C4EB0E}.Release|Any CPU.Build.0 = Release|Any CPU
{9AA344BF-2F4C-459B-8216-00CBC0C4EB0E}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
{9AA344BF-2F4C-459B-8216-00CBC0C4EB0E}.Release|Mixed Platforms.Build.0 = Release|Any CPU
{9AA344BF-2F4C-459B-8216-00CBC0C4EB0E}.Release|x86.ActiveCfg = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand Down
Binary file modified RezNetUsage.v11.suo
Binary file not shown.

0 comments on commit cd2acc7

Please sign in to comment.