Click here to Skip to main content
15,888,351 members
Please Sign up or sign in to vote.
5.00/5 (1 vote)
See more:
Hi,

I have a RDLC report in which i show a Bar Chart in the last column of matrix. But my problem is i dont want to show chart in the total row how could i achieve this please provide some good solution.


Thanks & Regards
Chinkey
C#
<pre>
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Bar Chart in RDLC.aspx.cs" Inherits="Increments_Bar_Chart_in_RDLC" %>

<%@ Register Assembly="Microsoft.ReportViewer.WebForms, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"
    Namespace="Microsoft.Reporting.WebForms" TagPrefix="rsweb" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title>Untitled Page</title>
</head>
<body>
    <form id="form1" runat="server">
    <div>
    <rsweb:reportviewer id="ReportViewer1"  runat="server" sizetoreportcontent="True" tabindex="7" width="100%"> </rsweb:reportviewer>
         
    
    </div>
    </form>
</body>
</html>
C#
using System;
public partial class Increments_Bar_Chart_in_RDLC : System.Web.UI.Page
{
    OleDbConnection conn = new OleDbConnection(ConfigurationManager.AppSettings.Get("ConnStr"));
    string rFunction = "";
    string rGrade = "";
    string rLocation = "";
    //string gradePass = "";
    string querySort = "";
    OleDbDataReader dr;
    ClassDataLayer CDL = new ClassDataLayer();
    string str1 = "";
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            Get_Data();
        }
    }

    protected void Get_Data()
    {
        string Strsql = "";

        Strsql = "Exec Increment_Bar_Chart";
            //Response.Write(Strsql);
       
        ReportDataSource rds;
        DataSet Ds = new DataSet();
        Ds = CDL.dataset(Strsql);
        if (Ds.Tables[0].Rows.Count > 0)
        {
            //panelColor.Visible = true;         
            ReportParameter[] parms = new ReportParameter[1];
            parms[0] = new ReportParameter("param2", "500");

            ReportViewer1.LocalReport.DataSources.Clear();
            ReportViewer1.LocalReport.ReportPath = @"Increments\Bar_Chart.rdlc";
            this.ReportViewer1.LocalReport.SetParameters(parms);
            rds = new ReportDataSource("Bar_Chart_DataTable2", Ds.Tables[0]);
            ReportViewer1.LocalReport.DataSources.Clear();
            ReportViewer1.LocalReport.DataSources.Add(rds);
            ReportViewer1.LocalReport.Refresh();
            ReportViewer1.ShowRefreshButton = false;
           // lblDispMsg.Visible = false;
            ReportViewer1.Visible = true;
        }
        else
        {
            //lblDispMsg.Text = "Alert: No Record Found.";
        }
    }
}
Posted
Updated 20-Feb-13 22:50pm
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900