Question

Reporting Services 2008 Adding Totals of Row Groups

Asked by: rsober

I have a tablix with a row group on products and sub products and a column group on years.  My row group is filtered on excluding some product/sub product types and the detail rows are showing the correct values.  

I select the row group and select Add Total to add up all of the values for this group, but the total includes the values of the filtered criteria.

The reason I am filtering the row group is because I want to show values for all product/sub products excluding one type, subtotal, then show the total value for the excluded products and then a grand total.

products      2005       2006
bikes             10         5
big-wheels    100      110
Total              110     115
Tricycles        8         10
Total              118      125

the tricycle row is another row group that filters on the same product that was excluded in the first group.

When I try and total the first row group, the total is 118 and 125, not 110 and 115 even though the two rows in the row group add up.


This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.

Subscribe now for full access to Experts Exchange and get

Instant Access to this Solution

  • Plus...
  • 30 Day FREE access, no risk, no obligation
  • Collaborate with the world's top tech experts
  • Unlimited access to our exclusive solution database
  • Never be left without tech help again

Subscribe Now

Asked On
2009-06-01 at 14:05:47ID24454818
Tags

Reporting Services 2008

Topics

MS SQL Reporting

,

SQL Server 2008

Participating Experts
1
Points
125
Comments
14

Trusted by hundreds of thousands everyday for fast, accurate and reliable tech support.

  • "The time we save is the biggest benefit of Experts Exchange to Warner Bros. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange." Mike Kapnisakis, Warner Bros.
  • "Our team likes having a resource that is more secure than just using Google and most experts using this service really know their stuff. It's nice to look here first versus using Google." Dayna Sellner, Lockheed Martin
  • "Anytime that I've been stumped with a problem, 9 out of 10 times Experts Exchange has either the accepted solution or an open discussion of the potential solution to the problem." Kenny Red, eBay Inc.

See what Experts Exchange can do for you.

Got a question?

We've got the answer.

Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.

Screenshot of Experts Exchange Knowledgebase

Need individual assistance?

Our experts are ready to help.

If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.

Screenshot of Experts Exchange Knowledgebase

Want to learn from the best?

Read articles from industry experts.

Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.

Screenshot of an Article

Working on a long term project?

Store your work and research.

Save solutions to your questions, answers you’ve discovered through searching plus helpful articles in your personal knowledgebase for easy future access.

Screenshot of Experts Exchange Knowledgebase

Access the answers to your technology questions today.

Subscribe Now

30-day free trial. Register in 60 seconds.

What Makes Experts Exchange Unique?

Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Trusted by the world's most respected brands.

image of each brand's logo

Faithfully serving IT professionals since 1996.

Experts Exchange Logo

Try it out and discover for yourself.

Subscribe Now

30-day free trial. Register in 60 seconds.

Related Solutions

    Free Tech Articles

    1. WARNING: 5 Reasons why you should NEVER fix a computer for free.
      It is in our nature to love the puzzle. We are obsessed. The lot of us. We love puzzles. We love the challenge. We thrive on finding the answer. We hate disarray. It bothers us deep in our soul. W...
    2. SCCM OSD Basic troubleshooting
      SCCM 2007 OSD is a fantastic way to deploy operating systems, however, like most things SCCM issues can sometimes be difficult to resolve due to the sheer volume of logs to sift through and the dispe...
    3. Migrate Small Business Server 2003 to Exchange 2010 and Windows 2008 R2
      This guide is intended to provide step by step instructions on how to migrate from Small Business Server 2003 to Windows 2008 R2 with Exchange 2010. For this migration to work you will need the fo...
    4. Create a Win7 Gadget
      This article shows you how to create a simple "Gadget" -- a sort of mini-application supported by Windows 7 and Vista. Gadgets can be dropped anywhere on the desktop to provide instant information, ...
    5. Outlook continually prompting for username and password
      There have been a lot of questions recently regarding Outlook prompting for a username and password whilst using Exchange 2007. There are a few reasons why this would happen and I will try to cover t...
    6. Backup Exchange 2010 Information Store using Windows Backup
      There seems to be quite a lot of confusion around the ability to backup Exchange 2010 using the built in Windows Backup feature. This stems from the omission of this feature prior to Exchange 2007 s...

    Cloud Class Webinars

    1. Avoiding Bugs in Microsoft Access
      Alison Balter takes and in-depth look at avoiding bugs in Access. In this webinar you will learn about using the immediate window to debug your applications, invoking the debugger, using breakpoints to troubleshoot, stepping through code, setting the next statement to execute, ...
    2. Top 10 Best New Features in Visio 2010
      Scott Helmers gives live demonstrations of the top 10 new features in Visio 2010. This webinar will teach you how to create compelling diagrams by adding shapes to the page with a single click, linking the shapes in a diagram to data in Excel (or SQL Server, or SharePoint), ...
    3. IT Consultant Business Secrets Revealed
      Michael Munger, Experts Exchange tech pro and IT consultant, pulls back the curtain on his very successful businesses and answers question on every IT consultant and business owner should know about. He shares secrets on what he did to solve the 5 most common problems in IT, ...
    4. Disaster Recovery and Business Continuity
      Quest CTO, Mike Billon, gives an overview of the steps involved in building a dunamic disaster recovery plan. Through case studies and an examination of software/hardware tooles for monitoring and testing, you'll gain a better understandin of where you are, where you want ...
    5. Organize Your Visio Diagrams with Containers and Lists
      Scott Helmers uses cross functional flowcharts, wireframe diagrams, data graphic legends and seating charts to teach you: how to ustilize all three new structured diagram components in Visio 2010, the best practices for organizeing shapes in previous version of Visio, how to organize ...
    6. How to Us Objects, Properties, Events and Methods in Microsoft Access
      Alison Dalter gives an in-depbth look at objects, properties, events and methods in Microsoft Access. In this webinar you will learn about using the object browser, referring to objects, working with properties and methods, working with object variables, understanding the ...

    Join the Community

    Give a Little. Get a Lot.

    Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.

    Join the Community

    Answers

     

    by: CGLuttrellPosted on 2009-06-01 at 17:08:28ID: 24523000

    The Add Total will add the group footer subtotal box and the default Sum(Fields!YourDataElement.Value) in it which will sum everything in the group scope, but includes everything in the group even it hidden or not showing duplicates, etc.  How did you filter the two row groups, maybe I can see what to change to get the totals to come out right?

     

    by: rsoberPosted on 2009-06-02 at 06:42:29ID: 24526635

    I have included screen captions of the tablix in design and preview mode.  I have two row groups.  The first one labeled emissiontyperowgroup is grouped on two columns.  I filter the rows to exclude any value when the second column of the group does not equal a certain value.  It does filter correctly because the rows in the first row group are correct.  I selected the row group and selected Add Total to show the total for this group, however, the total is is displaying includes the filtered row.  

     

    by: CGLuttrellPosted on 2009-06-02 at 12:41:27ID: 24530656

    On your two row groups you will have a filter expression on each one.  You will have to go to your Total Before Green subtotal expression and add an IIF around your current value with the filter expression for the check condition and the value for true and 0 for false.
    Sorry, without all the code I can not construct the exact syntax.  Let me know if this is not enough.  Maybe could you post the RDL file that would have the filters and groupings construct.

     

    by: rsoberPosted on 2009-06-02 at 13:02:13ID: 24530871

    I am not sure what you mean by adding the IIF around the current value.  My expression does work but it relies on referencing the ReportItem.  I was hoping to use the built in Add Total function for the report group.

    I attached the rdl.

    <?xml version="1.0" encoding="utf-8"?>
    <Report xmlns:rd="http://schemas.microsoft.com/SQLServer/reporting/reportdesigner" xmlns="http://schemas.microsoft.com/sqlserver/reporting/2008/01/reportdefinition">
      <DataSources>
        <DataSource Name="CCCCorporateInventoryDataSource">
          <DataSourceReference>CCCCorporateInventoryDataSource</DataSourceReference>
          <rd:DataSourceID>23316c39-415a-4a72-b109-a712c6b6be8b</rd:DataSourceID>
        </DataSource>
      </DataSources>
      <DataSets>
        <DataSet Name="ClientLookupDataSet">
          <Fields>
            <Field Name="client_id">
              <DataField>client_id</DataField>
              <rd:TypeName>System.Int32</rd:TypeName>
            </Field>
            <Field Name="client_name">
              <DataField>client_name</DataField>
              <rd:TypeName>System.String</rd:TypeName>
            </Field>
          </Fields>
          <Query>
            <DataSourceName>CCCCorporateInventoryDataSource</DataSourceName>
            <CommandText>select client_id, client_name from client_lookup order by client_name</CommandText>
            <rd:UseGenericDesigner>true</rd:UseGenericDesigner>
          </Query>
        </DataSet>
        <DataSet Name="EmissionTypeLookupDataSet">
          <Fields>
            <Field Name="emission_type_id">
              <DataField>emission_type_id</DataField>
              <rd:TypeName>System.Int32</rd:TypeName>
            </Field>
            <Field Name="emission_type_name">
              <DataField>emission_type_name</DataField>
              <rd:TypeName>System.String</rd:TypeName>
            </Field>
          </Fields>
          <Query>
            <DataSourceName>CCCCorporateInventoryDataSource</DataSourceName>
            <CommandText>select distinct emission_type_id, emission_type_name from emission_type
    order by emission_type_name</CommandText>
            <rd:UseGenericDesigner>true</rd:UseGenericDesigner>
          </Query>
        </DataSet>
        <DataSet Name="CarbonFootprintEmissionsDataSet">
          <Fields>
            <Field Name="Year">
              <DataField>Year</DataField>
              <rd:TypeName>System.Int32</rd:TypeName>
            </Field>
            <Field Name="location_id">
              <DataField>location_id</DataField>
              <rd:TypeName>System.Int32</rd:TypeName>
            </Field>
            <Field Name="location_name">
              <DataField>location_name</DataField>
              <rd:TypeName>System.String</rd:TypeName>
            </Field>
            <Field Name="segment_name">
              <DataField>segment_name</DataField>
              <rd:TypeName>System.String</rd:TypeName>
            </Field>
            <Field Name="client_name">
              <DataField>client_name</DataField>
              <rd:TypeName>System.String</rd:TypeName>
            </Field>
            <Field Name="country_name">
              <DataField>country_name</DataField>
              <rd:TypeName>System.String</rd:TypeName>
            </Field>
            <Field Name="business_unit_name">
              <DataField>business_unit_name</DataField>
              <rd:TypeName>System.String</rd:TypeName>
            </Field>
            <Field Name="emission_type_name">
              <DataField>emission_type_name</DataField>
              <rd:TypeName>System.String</rd:TypeName>
            </Field>
            <Field Name="division_name">
              <DataField>division_name</DataField>
              <rd:TypeName>System.String</rd:TypeName>
            </Field>
            <Field Name="scope">
              <DataField>scope</DataField>
              <rd:TypeName>System.Int32</rd:TypeName>
            </Field>
            <Field Name="usage_type_name">
              <DataField>usage_type_name</DataField>
              <rd:TypeName>System.String</rd:TypeName>
            </Field>
            <Field Name="sub_division_name">
              <DataField>sub_division_name</DataField>
              <rd:TypeName>System.String</rd:TypeName>
            </Field>
            <Field Name="Total_Emissions_CO2e">
              <DataField>Total Emissions CO2e</DataField>
              <rd:TypeName>System.Decimal</rd:TypeName>
            </Field>
            <Field Name="annex_b_flg">
              <DataField>annex_b_flg</DataField>
              <rd:TypeName>System.String</rd:TypeName>
            </Field>
            <Field Name="CO2_Emissions">
              <DataField>CO2 Emissions</DataField>
              <rd:TypeName>System.Decimal</rd:TypeName>
            </Field>
            <Field Name="CH4_Emissions">
              <DataField>CH4 Emissions</DataField>
              <rd:TypeName>System.Decimal</rd:TypeName>
            </Field>
            <Field Name="N2O_Emissions">
              <DataField>N2O Emissions</DataField>
              <rd:TypeName>System.Decimal</rd:TypeName>
            </Field>
            <Field Name="CO2e_Emissions">
              <DataField>CO2e Emissions</DataField>
              <rd:TypeName>System.Decimal</rd:TypeName>
            </Field>
            <Field Name="CH4e_Emissions">
              <DataField>CH4e Emissions</DataField>
              <rd:TypeName>System.Decimal</rd:TypeName>
            </Field>
            <Field Name="N2Oe_Emissions">
              <DataField>N2Oe Emissions</DataField>
              <rd:TypeName>System.Decimal</rd:TypeName>
            </Field>
            <Field Name="BIO_CO2e_Emissions">
              <DataField>BIO CO2e Emissions</DataField>
              <rd:TypeName>System.Decimal</rd:TypeName>
            </Field>
          </Fields>
          <Query>
            <DataSourceName>CCCCorporateInventoryDataSource</DataSourceName>
            <CommandText>select fiscal_year as [Year],a.location_id, case when  coalesce(a.location_name,'') = '' then 'Emissions at Entity' else a.location_name end as [location_name], a.client_name,
    a.segment_name, a.business_unit_name , a.division_name, a.sub_division_name,
    a.country_name, a.emission_type_name, case when a.usage_type_name = 'Green Purchase Power' then 'Green Purchase Power' else '' end  as [usage_type_name],  a.scope , a.annex_b_flg,
    sum(a.emission_total_CO2e) as [Total Emissions CO2e],
    sum(a.emission_CO2)as [CO2 Emissions], 
    sum(a.emission_CH4) as [CH4 Emissions], 
    sum(a.emission_N2O) as [N2O Emissions], 
    sum(a.emission_CO2e)as [CO2e Emissions], 
    sum(a.emission_CH4e) as [CH4e Emissions], 
    sum(a.emission_N2Oe) as [N2Oe Emissions], 
    sum(a.emission_biogenic_CO2e) as [BIO CO2e Emissions]
     
    from vw_emissions_org a
    where client_id = @ClientID
    and emission_type_id in (@EmissionType)
    and emission_to_unit = @toUnit
    and Fiscal_Year in (@FiscalYear)
    and scope in (@Scope)
    and business_unit_name in (@BusinessUnit)
     
     
    group by  fiscal_year, a.location_id, a.location_name, a.client_name,
    a.segment_name, a.business_unit_name , a.division_name, a.sub_division_name,
    a.country_name, a.emission_type_name, a.usage_type_name, a.scope, a.annex_b_flg</CommandText>
            <QueryParameters>
              <QueryParameter Name="@GroupBy">
                <Value>=Parameters!GroupBy.Value</Value>
                <rd:UserDefined>true</rd:UserDefined>
              </QueryParameter>
              <QueryParameter Name="@ClientID">
                <Value>=Parameters!ClientID.Value</Value>
              </QueryParameter>
              <QueryParameter Name="@EmissionType">
                <Value>=Parameters!EmissionType.Value</Value>
              </QueryParameter>
              <QueryParameter Name="@toUnit">
                <Value>=Parameters!toUnit.Value</Value>
              </QueryParameter>
              <QueryParameter Name="@FiscalYear">
                <Value>=Parameters!FiscalYear.Value</Value>
              </QueryParameter>
              <QueryParameter Name="@Scope">
                <Value>=Parameters!Scope.Value</Value>
              </QueryParameter>
              <QueryParameter Name="@BusinessUnit">
                <Value>=Parameters!BusinessUnit.Value</Value>
              </QueryParameter>
            </QueryParameters>
            <rd:UseGenericDesigner>true</rd:UseGenericDesigner>
          </Query>
        </DataSet>
        <DataSet Name="FiscalYear">
          <Fields>
            <Field Name="fiscal_year">
              <DataField>fiscal year</DataField>
              <rd:TypeName>System.Int32</rd:TypeName>
            </Field>
          </Fields>
          <Query>
            <DataSourceName>CCCCorporateInventoryDataSource</DataSourceName>
            <CommandText>select distinct year(a.end_date) as [fiscal year] 
    from metered_usage_org a inner join org_hierarchy_lookup b 
    on a.org_id = b.org_id and b.client_id = @ClientID
    order by [fiscal year]</CommandText>
            <QueryParameters>
              <QueryParameter Name="@ClientID">
                <Value>=Parameters!ClientID.Value</Value>
              </QueryParameter>
            </QueryParameters>
            <rd:UseGenericDesigner>true</rd:UseGenericDesigner>
          </Query>
        </DataSet>
        <DataSet Name="EmissionUnitLookupDataSet">
          <Fields>
            <Field Name="emission_to_unit">
              <DataField>emission_to_unit</DataField>
              <rd:TypeName>System.String</rd:TypeName>
            </Field>
          </Fields>
          <Query>
            <DataSourceName>CCCCorporateInventoryDataSource</DataSourceName>
            <CommandText>select distinct emission_to_unit from vw_onsite_transport_wo_usage
    where gwp_ccc_preference &lt;&gt; 0</CommandText>
            <rd:UseGenericDesigner>true</rd:UseGenericDesigner>
          </Query>
        </DataSet>
        <DataSet Name="BUListDataSet">
          <Fields>
            <Field Name="business_unit_name">
              <DataField>business_unit_name</DataField>
              <rd:TypeName>System.String</rd:TypeName>
            </Field>
          </Fields>
          <Query>
            <DataSourceName>CCCCorporateInventoryDataSource</DataSourceName>
            <CommandText>select distinct( business_unit_name ) from vw_org_hierarchy where client_id = @ClientID
    order by business_unit_name</CommandText>
            <QueryParameters>
              <QueryParameter Name="@ClientID">
                <Value>=Parameters!ClientID.Value</Value>
              </QueryParameter>
            </QueryParameters>
            <rd:UseGenericDesigner>true</rd:UseGenericDesigner>
          </Query>
        </DataSet>
      </DataSets>
      <Body>
        <ReportItems>
          <Tablix Name="Client_Emissions_Tablix">
            <TablixCorner>
              <TablixCornerRows>
                <TablixCornerRow>
                  <TablixCornerCell>
                    <CellContents>
                      <Textbox Name="Textbox124">
                        <CanGrow>true</CanGrow>
                        <KeepTogether>true</KeepTogether>
                        <Paragraphs>
                          <Paragraph>
                            <TextRuns>
                              <TextRun>
                                <Value />
                                <Style />
                              </TextRun>
                            </TextRuns>
                            <Style />
                          </Paragraph>
                        </Paragraphs>
                        <rd:DefaultName>Textbox124</rd:DefaultName>
                        <Style>
                          <Border>
                            <Color>LightGrey</Color>
                            <Style>None</Style>
                          </Border>
                          <PaddingLeft>2pt</PaddingLeft>
                          <PaddingRight>2pt</PaddingRight>
                          <PaddingTop>2pt</PaddingTop>
                          <PaddingBottom>2pt</PaddingBottom>
                        </Style>
                      </Textbox>
                    </CellContents>
                  </TablixCornerCell>
                </TablixCornerRow>
              </TablixCornerRows>
            </TablixCorner>
            <TablixBody>
              <TablixColumns>
                <TablixColumn>
                  <Width>1.13021in</Width>
                </TablixColumn>
                <TablixColumn>
                  <Width>1in</Width>
                </TablixColumn>
                <TablixColumn>
                  <Width>1in</Width>
                </TablixColumn>
              </TablixColumns>
              <TablixRows>
                <TablixRow>
                  <Height>0.28125in</Height>
                  <TablixCells>
                    <TablixCell>
                      <CellContents>
                        <Textbox Name="Total_Emissions_CO2e">
                          <CanGrow>true</CanGrow>
                          <KeepTogether>true</KeepTogether>
                          <Paragraphs>
                            <Paragraph>
                              <TextRuns>
                                <TextRun>
                                  <Value>=Sum(Fields!Total_Emissions_CO2e.Value)</Value>
                                  <Style>
                                    <Format>#,0;(#,0)</Format>
                                  </Style>
                                </TextRun>
                              </TextRuns>
                              <Style />
                            </Paragraph>
                          </Paragraphs>
                          <rd:DefaultName>Total_Emissions_CO2e</rd:DefaultName>
                          <Style>
                            <Border>
                              <Style>Solid</Style>
                            </Border>
                            <PaddingLeft>2pt</PaddingLeft>
                            <PaddingRight>2pt</PaddingRight>
                            <PaddingTop>2pt</PaddingTop>
                            <PaddingBottom>2pt</PaddingBottom>
                          </Style>
                        </Textbox>
                      </CellContents>
                    </TablixCell>
                    <TablixCell>
                      <CellContents>
                        <Textbox Name="First_year_emissions">
                          <CanGrow>true</CanGrow>
                          <KeepTogether>true</KeepTogether>
                          <Paragraphs>
                            <Paragraph>
                              <TextRuns>
                                <TextRun>
                                  <Value>=Sum(Fields!Total_Emissions_CO2e.Value)</Value>
                                  <Style />
                                </TextRun>
                              </TextRuns>
                              <Style />
                            </Paragraph>
                          </Paragraphs>
                          <Style>
                            <Border>
                              <Style>Solid</Style>
                            </Border>
                            <PaddingLeft>2pt</PaddingLeft>
                            <PaddingRight>2pt</PaddingRight>
                            <PaddingTop>2pt</PaddingTop>
                            <PaddingBottom>2pt</PaddingBottom>
                          </Style>
                        </Textbox>
                      </CellContents>
                    </TablixCell>
                    <TablixCell>
                      <CellContents>
                        <Textbox Name="Textbox149">
                          <CanGrow>true</CanGrow>
                          <KeepTogether>true</KeepTogether>
                          <Paragraphs>
                            <Paragraph>
                              <TextRuns>
                                <TextRun>
                                  <Value>= IIF(ReportItems!First_year_emissions.Value=0 ,"N/A", Code.CalcRatio((ReportItems!Total_Emissions_CO2e.Value-ReportItems!First_year_emissions.Value),ReportItems!First_year_emissions.Value))</Value>
                                  <Style>
                                    <Format>0%</Format>
                                  </Style>
                                </TextRun>
                              </TextRuns>
                              <Style>
                                <TextAlign>Right</TextAlign>
                              </Style>
                            </Paragraph>
                          </Paragraphs>
                          <rd:DefaultName>Textbox149</rd:DefaultName>
                          <Style>
                            <Border>
                              <Style>Solid</Style>
                            </Border>
                            <PaddingLeft>2pt</PaddingLeft>
                            <PaddingRight>2pt</PaddingRight>
                            <PaddingTop>2pt</PaddingTop>
                            <PaddingBottom>2pt</PaddingBottom>
                          </Style>
                        </Textbox>
                      </CellContents>
                    </TablixCell>
                  </TablixCells>
                </TablixRow>
                <TablixRow>
                  <Height>0.25in</Height>
                  <TablixCells>
                    <TablixCell>
                      <CellContents>
                        <Textbox Name="Textbox3">
                          <CanGrow>true</CanGrow>
                          <KeepTogether>true</KeepTogether>
                          <Paragraphs>
                            <Paragraph>
                              <TextRuns>
                                <TextRun>
                                  <Value>=Sum(Fields!Total_Emissions_CO2e.Value)</Value>
                                  <Style>
                                    <Format>#,0;(#,0)</Format>
                                  </Style>
                                </TextRun>
                              </TextRuns>
                              <Style />
                            </Paragraph>
                          </Paragraphs>
                          <rd:DefaultName>Textbox3</rd:DefaultName>
                          <Style>
                            <Border>
                              <Style>Solid</Style>
                            </Border>
                            <PaddingLeft>2pt</PaddingLeft>
                            <PaddingRight>2pt</PaddingRight>
                            <PaddingTop>2pt</PaddingTop>
                            <PaddingBottom>2pt</PaddingBottom>
                          </Style>
                        </Textbox>
                      </CellContents>
                    </TablixCell>
                    <TablixCell>
                      <CellContents>
                        <Textbox Name="Textbox4">
                          <CanGrow>true</CanGrow>
                          <KeepTogether>true</KeepTogether>
                          <Paragraphs>
                            <Paragraph>
                              <TextRuns>
                                <TextRun>
                                  <Value>=Sum(Fields!Total_Emissions_CO2e.Value)</Value>
                                  <Style />
                                </TextRun>
                              </TextRuns>
                              <Style />
                            </Paragraph>
                          </Paragraphs>
                          <rd:DefaultName>Textbox4</rd:DefaultName>
                          <Style>
                            <Border>
                              <Style>Solid</Style>
                            </Border>
                            <PaddingLeft>2pt</PaddingLeft>
                            <PaddingRight>2pt</PaddingRight>
                            <PaddingTop>2pt</PaddingTop>
                            <PaddingBottom>2pt</PaddingBottom>
                          </Style>
                        </Textbox>
                      </CellContents>
                    </TablixCell>
                    <TablixCell>
                      <CellContents>
                        <Textbox Name="Textbox5">
                          <CanGrow>true</CanGrow>
                          <KeepTogether>true</KeepTogether>
                          <Paragraphs>
                            <Paragraph>
                              <TextRuns>
                                <TextRun>
                                  <Value />
                                  <Style />
                                </TextRun>
                              </TextRuns>
                              <Style>
                                <TextAlign>Right</TextAlign>
                              </Style>
                            </Paragraph>
                          </Paragraphs>
                          <rd:DefaultName>Textbox5</rd:DefaultName>
                          <Style>
                            <Border>
                              <Style>Solid</Style>
                            </Border>
                            <PaddingLeft>2pt</PaddingLeft>
                            <PaddingRight>2pt</PaddingRight>
                            <PaddingTop>2pt</PaddingTop>
                            <PaddingBottom>2pt</PaddingBottom>
                          </Style>
                        </Textbox>
                      </CellContents>
                    </TablixCell>
                  </TablixCells>
                </TablixRow>
                <TablixRow>
                  <Height>0.25in</Height>
                  <TablixCells>
                    <TablixCell>
                      <CellContents>
                        <Textbox Name="Total_Emissions_GPP">
                          <CanGrow>true</CanGrow>
                          <KeepTogether>true</KeepTogether>
                          <Paragraphs>
                            <Paragraph>
                              <TextRuns>
                                <TextRun>
                                  <Value>=Sum(Fields!Total_Emissions_CO2e.Value)</Value>
                                  <Style>
                                    <FontWeight>Bold</FontWeight>
                                    <Format>#,0;(#,0)</Format>
                                  </Style>
                                </TextRun>
                              </TextRuns>
                              <Style>
                                <TextAlign>Right</TextAlign>
                              </Style>
                            </Paragraph>
                          </Paragraphs>
                          <Style>
                            <Border>
                              <Style>Solid</Style>
                            </Border>
                            <PaddingLeft>2pt</PaddingLeft>
                            <PaddingRight>2pt</PaddingRight>
                            <PaddingTop>2pt</PaddingTop>
                            <PaddingBottom>2pt</PaddingBottom>
                          </Style>
                        </Textbox>
                      </CellContents>
                    </TablixCell>
                    <TablixCell>
                      <CellContents>
                        <Textbox Name="first_year_emissions_gpp">
                          <CanGrow>true</CanGrow>
                          <KeepTogether>true</KeepTogether>
                          <Paragraphs>
                            <Paragraph>
                              <TextRuns>
                                <TextRun>
                                  <Value>=Sum(Fields!Total_Emissions_CO2e.Value)</Value>
                                  <Style>
                                    <FontWeight>Bold</FontWeight>
                                    <Format>#,0;(#,0)</Format>
                                  </Style>
                                </TextRun>
                              </TextRuns>
                              <Style>
                                <TextAlign>Right</TextAlign>
                              </Style>
                            </Paragraph>
                          </Paragraphs>
                          <Style>
                            <Border>
                              <Style>Solid</Style>
                            </Border>
                            <PaddingLeft>2pt</PaddingLeft>
                            <PaddingRight>2pt</PaddingRight>
                            <PaddingTop>2pt</PaddingTop>
                            <PaddingBottom>2pt</PaddingBottom>
                          </Style>
                        </Textbox>
                      </CellContents>
                    </TablixCell>
                    <TablixCell>
                      <CellContents>
                        <Textbox Name="Textbox68">
                          <CanGrow>true</CanGrow>
                          <KeepTogether>true</KeepTogether>
                          <Paragraphs>
                            <Paragraph>
                              <TextRuns>
                                <TextRun>
                                  <Value>= IIF(ReportItems!first_year_emissions_gpp.Value=0 ,"N/A", Code.CalcRatio((ABS(ReportItems!Total_Emissions_GPP.Value)-ABS(ReportItems!first_year_emissions_gpp.Value)),ABS(ReportItems!first_year_emissions_gpp.Value)))</Value>
                                  <Style>
                                    <FontWeight>Bold</FontWeight>
                                    <Format>0%</Format>
                                  </Style>
                                </TextRun>
                              </TextRuns>
                              <Style>
                                <TextAlign>Right</TextAlign>
                              </Style>
                            </Paragraph>
                          </Paragraphs>
                          <rd:DefaultName>Textbox68</rd:DefaultName>
                          <Style>
                            <Border>
                              <Style>Solid</Style>
                            </Border>
                            <PaddingLeft>2pt</PaddingLeft>
                            <PaddingRight>2pt</PaddingRight>
                            <PaddingTop>2pt</PaddingTop>
                            <PaddingBottom>2pt</PaddingBottom>
                          </Style>
                        </Textbox>
                      </CellContents>
                    </TablixCell>
                  </TablixCells>
                </TablixRow>
                <TablixRow>
                  <Height>0.25in</Height>
                  <TablixCells>
                    <TablixCell>
                      <CellContents>
                        <Textbox Name="Total_Emissions_CO2e_Net">
                          <CanGrow>true</CanGrow>
                          <KeepTogether>true</KeepTogether>
                          <Paragraphs>
                            <Paragraph>
                              <TextRuns>
                                <TextRun>
                                  <Value>=Sum(Fields!Total_Emissions_CO2e.Value)</Value>
                                  <Style>
                                    <FontWeight>Bold</FontWeight>
                                    <Format>#,0;(#,0)</Format>
                                  </Style>
                                </TextRun>
                              </TextRuns>
                              <Style>
                                <TextAlign>Right</TextAlign>
                              </Style>
                            </Paragraph>
                          </Paragraphs>
                          <Style>
                            <Border>
                              <Style>Solid</Style>
                            </Border>
                            <PaddingLeft>2pt</PaddingLeft>
                            <PaddingRight>2pt</PaddingRight>
                            <PaddingTop>2pt</PaddingTop>
                            <PaddingBottom>2pt</PaddingBottom>
                          </Style>
                        </Textbox>
                      </CellContents>
                    </TablixCell>
                    <TablixCell>
                      <CellContents>
                        <Textbox Name="First_Year_Total_Emissions_CO2e_Net">
                          <CanGrow>true</CanGrow>
                          <KeepTogether>true</KeepTogether>
                          <Paragraphs>
                            <Paragraph>
                              <TextRuns>
                                <TextRun>
                                  <Value>=Sum(Fields!Total_Emissions_CO2e.Value)</Value>
                                  <Style>
                                    <FontWeight>Bold</FontWeight>
                                    <Format>#,0;(#,0)</Format>
                                  </Style>
                                </TextRun>
                              </TextRuns>
                              <Style>
                                <TextAlign>Right</TextAlign>
                              </Style>
                            </Paragraph>
                          </Paragraphs>
                          <Style>
                            <Border>
                              <Style>Solid</Style>
                            </Border>
                            <PaddingLeft>2pt</PaddingLeft>
                            <PaddingRight>2pt</PaddingRight>
                            <PaddingTop>2pt</PaddingTop>
                            <PaddingBottom>2pt</PaddingBottom>
                          </Style>
                        </Textbox>
                      </CellContents>
                    </TablixCell>
                    <TablixCell>
                      <CellContents>
                        <Textbox Name="Textbox109">
                          <CanGrow>true</CanGrow>
                          <KeepTogether>true</KeepTogether>
                          <Paragraphs>
                            <Paragraph>
                              <TextRuns>
                                <TextRun>
                                  <Value>= IIF(ReportItems!First_Year_Total_Emissions_CO2e_Net.Value=0 ,"N/A", Code.CalcRatio((ReportItems!Total_Emissions_CO2e_Net.Value-ReportItems!First_Year_Total_Emissions_CO2e_Net.Value),ReportItems!First_Year_Total_Emissions_CO2e_Net.Value))</Value>
                                  <Style>
                                    <FontWeight>Bold</FontWeight>
                                    <Format>0%</Format>
                                  </Style>
                                </TextRun>
                              </TextRuns>
                              <Style>
                                <TextAlign>Right</TextAlign>
                              </Style>
                            </Paragraph>
                          </Paragraphs>
                          <rd:DefaultName>Textbox109</rd:DefaultName>
                          <Style>
                            <Border>
                              <Style>Solid</Style>
                            </Border>
                            <PaddingLeft>2pt</PaddingLeft>
                            <PaddingRight>2pt</PaddingRight>
                            <PaddingTop>2pt</PaddingTop>
                            <PaddingBottom>2pt</PaddingBottom>
                          </Style>
                        </Textbox>
                      </CellContents>
                    </TablixCell>
                  </TablixCells>
                </TablixRow>
              </TablixRows>
            </TablixBody>
            <TablixColumnHierarchy>
              <TablixMembers>
                <TablixMember>
                  <Group Name="YearColumnGroup2">
                    <GroupExpressions>
                      <GroupExpression>=Fields!Year.Value</GroupExpression>
                    </GroupExpressions>
                  </Group>
                  <SortExpressions>
                    <SortExpression>
                      <Value>=Fields!Year.Value</Value>
                    </SortExpression>
                  </SortExpressions>
                  <TablixHeader>
                    <Size>0.25in</Size>
                    <CellContents>
                      <Textbox Name="Group13">
                        <CanGrow>true</CanGrow>
                        <KeepTogether>true</KeepTogether>
                        <Paragraphs>
                          <Paragraph>
                            <TextRuns>
                              <TextRun>
                                <Value>=Fields!Year.Value</Value>
                                <Style>
                                  <FontWeight>Bold</FontWeight>
                                </Style>
                              </TextRun>
                            </TextRuns>
                            <Style>
                              <TextAlign>Center</TextAlign>
                            </Style>
                          </Paragraph>
                        </Paragraphs>
                        <rd:DefaultName>Group13</rd:DefaultName>
                        <Style>
                          <Border>
                            <Style>Solid</Style>
                          </Border>
                          <PaddingLeft>2pt</PaddingLeft>
                          <PaddingRight>2pt</PaddingRight>
                          <PaddingTop>2pt</PaddingTop>
                          <PaddingBottom>2pt</PaddingBottom>
                        </Style>
                      </Textbox>
                    </CellContents>
                  </TablixHeader>
                  <TablixMembers>
                    <TablixMember />
                  </TablixMembers>
                </TablixMember>
                <TablixMember>
                  <Group Name="First_year_emissions_hidden_group">
                    <GroupExpressions>
                      <GroupExpression>=Fields!Year.Value</GroupExpression>
                    </GroupExpressions>
                    <Filters>
                      <Filter>
                        <FilterExpression>=Fields!Year.Value</FilterExpression>
                        <Operator>Equal</Operator>
                        <FilterValues>
                          <FilterValue>=Parameters!FiscalYear.Value(0)</FilterValue>
                        </FilterValues>
                      </Filter>
                    </Filters>
                  </Group>
                  <SortExpressions>
                    <SortExpression>
                      <Value>=Fields!Year.Value</Value>
                    </SortExpression>
                  </SortExpressions>
                  <TablixMembers>
                    <TablixMember>
                      <TablixHeader>
                        <Size>0.25in</Size>
                        <CellContents>
                          <Textbox Name="Group12">
                            <CanGrow>true</CanGrow>
                            <KeepTogether>true</KeepTogether>
                            <Paragraphs>
                              <Paragraph>
                                <TextRuns>
                                  <TextRun>
                                    <Value>=Fields!Year.Value</Value>
                                    <Style>
                                      <FontWeight>Bold</FontWeight>
                                    </Style>
                                  </TextRun>
                                </TextRuns>
                                <Style>
                                  <TextAlign>Center</TextAlign>
                                </Style>
                              </Paragraph>
                            </Paragraphs>
                            <rd:DefaultName>Group12</rd:DefaultName>
                            <Style>
                              <Border>
                                <Style>Solid</Style>
                              </Border>
                              <PaddingLeft>2pt</PaddingLeft>
                              <PaddingRight>2pt</PaddingRight>
                              <PaddingTop>2pt</PaddingTop>
                              <PaddingBottom>2pt</PaddingBottom>
                            </Style>
                          </Textbox>
                        </CellContents>
                      </TablixHeader>
                      <TablixMembers>
                        <TablixMember />
                      </TablixMembers>
                    </TablixMember>
                  </TablixMembers>
                  <Visibility>
                    <Hidden>true</Hidden>
                  </Visibility>
                </TablixMember>
                <TablixMember>
                  <TablixHeader>
                    <Size>0.25in</Size>
                    <CellContents>
                      <Textbox Name="Textbox148">
                        <CanGrow>true</CanGrow>
                        <KeepTogether>true</KeepTogether>
                        <Paragraphs>
                          <Paragraph>
                            <TextRuns>
                              <TextRun>
                                <Value>="% Change from " &amp; Parameters!FiscalYear.Value(0)</Value>
                                <Style>
                                  <FontWeight>Bold</FontWeight>
                                </Style>
                              </TextRun>
                            </TextRuns>
                            <Style>
                              <TextAlign>Center</TextAlign>
                            </Style>
                          </Paragraph>
                        </Paragraphs>
                        <rd:DefaultName>Textbox148</rd:DefaultName>
                        <Style>
                          <Border>
                            <Style>Solid</Style>
                          </Border>
                          <PaddingLeft>2pt</PaddingLeft>
                          <PaddingRight>2pt</PaddingRight>
                          <PaddingTop>2pt</PaddingTop>
                          <PaddingBottom>2pt</PaddingBottom>
                        </Style>
                      </Textbox>
                    </CellContents>
                  </TablixHeader>
                  <TablixMembers>
                    <TablixMember />
                  </TablixMembers>
                </TablixMember>
              </TablixMembers>
            </TablixColumnHierarchy>
            <TablixRowHierarchy>
              <TablixMembers>
                <TablixMember>
                  <TablixMembers>
                    <TablixMember>
                      <TablixMembers>
                        <TablixMember>
                          <Group Name="EmissionTypeRowGroup">
                            <GroupExpressions>
                              <GroupExpression>=Fields!emission_type_name.Value</GroupExpression>
                              <GroupExpression>=Fields!usage_type_name.Value</GroupExpression>
                            </GroupExpressions>
                            <Filters>
                              <Filter>
                                <FilterExpression>=Fields!usage_type_name.Value</FilterExpression>
                                <Operator>NotEqual</Operator>
                                <FilterValues>
                                  <FilterValue>Green Purchase Power</FilterValue>
                                </FilterValues>
                              </Filter>
                            </Filters>
                          </Group>
                          <SortExpressions>
                            <SortExpression>
                              <Value>=Fields!emission_type_name.Value="Onsite Fuel"</Value>
                              <Direction>Descending</Direction>
                            </SortExpression>
                            <SortExpression>
                              <Value>=Fields!emission_type_name.Value="Transport Fuel"</Value>
                              <Direction>Descending</Direction>
                            </SortExpression>
                            <SortExpression>
                              <Value>=Fields!emission_type_name.Value="Refrigerants"</Value>
                              <Direction>Descending</Direction>
                            </SortExpression>
                            <SortExpression>
                              <Value>=Fields!emission_type_name.Value="Mobile Refrigerants"</Value>
                              <Direction>Descending</Direction>
                            </SortExpression>
                            <SortExpression>
                              <Value>=Fields!emission_type_name.Value="Purchased Energy"</Value>
                              <Direction>Descending</Direction>
                            </SortExpression>
                            <SortExpression>
                              <Value>=Fields!emission_type_name.Value="Business Air Travel"</Value>
                              <Direction>Descending</Direction>
                            </SortExpression>
                          </SortExpressions>
                          <TablixHeader>
                            <Size>1.71354in</Size>
                            <CellContents>
                              <Textbox Name="business_unit2">
                                <CanGrow>true</CanGrow>
                                <KeepTogether>true</KeepTogether>
                                <Paragraphs>
                                  <Paragraph>
                                    <TextRuns>
                                      <TextRun>
                                        <Value>=Fields!emission_type_name.Value</Value>
                                        <Style>
                                          <FontWeight>Bold</FontWeight>
                                          <Color>White</Color>
                                        </Style>
                                      </TextRun>
                                    </TextRuns>
                                    <Style />
                                  </Paragraph>
                                </Paragraphs>
                                <rd:DefaultName>business_unit</rd:DefaultName>
                                <Style>
                                  <Border>
                                    <Style>Solid</Style>
                                  </Border>
                                  <BackgroundColor>#5899d2</BackgroundColor>
                                  <PaddingLeft>2pt</PaddingLeft>
                                  <PaddingRight>2pt</PaddingRight>
                                  <PaddingTop>2pt</PaddingTop>
                                  <PaddingBottom>2pt</PaddingBottom>
                                </Style>
                              </Textbox>
                              <rd:Selected>true</rd:Selected>
                            </CellContents>
                          </TablixHeader>
                          <TablixMembers>
                            <TablixMember />
                          </TablixMembers>
                        </TablixMember>
                        <TablixMember>
                          <TablixHeader>
                            <Size>1.71354in</Size>
                            <CellContents>
                              <Textbox Name="Textbox2">
                                <CanGrow>true</CanGrow>
                                <KeepTogether>true</KeepTogether>
                                <Paragraphs>
                                  <Paragraph>
                                    <TextRuns>
                                      <TextRun>
                                        <Value>Total</Value>
                                        <Style>
                                          <FontWeight>Bold</FontWeight>
                                          <Color>White</Color>
                                        </Style>
                                      </TextRun>
                                    </TextRuns>
                                    <Style />
                                  </Paragraph>
                                </Paragraphs>
                                <rd:DefaultName>Textbox2</rd:DefaultName>
                                <Style>
                                  <Border>
                                    <Style>Solid</Style>
                                  </Border>
                                  <BackgroundColor>#5899d2</BackgroundColor>
                                  <PaddingLeft>2pt</PaddingLeft>
                                  <PaddingRight>2pt</PaddingRight>
                                  <PaddingTop>2pt</PaddingTop>
                                  <PaddingBottom>2pt</PaddingBottom>
                                </Style>
                              </Textbox>
                            </CellContents>
                          </TablixHeader>
                          <KeepWithGroup>Before</KeepWithGroup>
                        </TablixMember>
                      </TablixMembers>
                    </TablixMember>
                  </TablixMembers>
                </TablixMember>
                <TablixMember>
                  <Group Name="GreenPowerRowGroup">
                    <GroupExpressions>
                      <GroupExpression>=Fields!usage_type_name.Value</GroupExpression>
                    </GroupExpressions>
                    <Filters>
                      <Filter>
                        <FilterExpression>=Fields!usage_type_name.Value</FilterExpression>
                        <Operator>Equal</Operator>
                        <FilterValues>
                          <FilterValue>Green Purchase Power</FilterValue>
                        </FilterValues>
                      </Filter>
                    </Filters>
                  </Group>
                  <SortExpressions>
                    <SortExpression>
                      <Value>=Fields!emission_type_name.Value</Value>
                    </SortExpression>
                  </SortExpressions>
                  <TablixHeader>
                    <Size>1.71354in</Size>
                    <CellContents>
                      <Textbox Name="Textbox64">
                        <CanGrow>true</CanGrow>
                        <KeepTogether>true</KeepTogether>
                        <Paragraphs>
                          <Paragraph>
                            <TextRuns>
                              <TextRun>
                                <Value>Green Purchase Power</Value>
                                <Style>
                                  <FontWeight>Bold</FontWeight>
                                  <Color>White</Color>
                                </Style>
                              </TextRun>
                            </TextRuns>
                            <Style />
                          </Paragraph>
                        </Paragraphs>
                        <rd:DefaultName>Textbox64</rd:DefaultName>
                        <Style>
                          <Border>
                            <Style>Solid</Style>
                          </Border>
                          <BackgroundColor>#5899d2</BackgroundColor>
                          <PaddingLeft>2pt</PaddingLeft>
                          <PaddingRight>2pt</PaddingRight>
                          <PaddingTop>2pt</PaddingTop>
                          <PaddingBottom>2pt</PaddingBottom>
                        </Style>
                      </Textbox>
                    </CellContents>
                  </TablixHeader>
                </TablixMember>
                <TablixMember>
                  <TablixHeader>
                    <Size>1.71354in</Size>
                    <CellContents>
                      <Textbox Name="Textbox99">
                        <CanGrow>true</CanGrow>
                        <KeepTogether>true</KeepTogether>
                        <Paragraphs>
                          <Paragraph>
                            <TextRuns>
                              <TextRun>
                                <Value>Total (Adjusted for Green Purchase Power)</Value>
                                <Style>
                                  <FontWeight>Bold</FontWeight>
                                  <Color>White</Color>
                                </Style>
                              </TextRun>
                            </TextRuns>
                            <Style />
                          </Paragraph>
                        </Paragraphs>
                        <rd:DefaultName>Textbox99</rd:DefaultName>
                        <Style>
                          <Border>
                            <Style>Solid</Style>
                          </Border>
                          <BackgroundColor>#5899d2</BackgroundColor>
                          <PaddingLeft>2pt</PaddingLeft>
                          <PaddingRight>2pt</PaddingRight>
                          <PaddingTop>2pt</PaddingTop>
                          <PaddingBottom>2pt</PaddingBottom>
                        </Style>
                      </Textbox>
                    </CellContents>
                  </TablixHeader>
                </TablixMember>
              </TablixMembers>
            </TablixRowHierarchy>
            <DataSetName>CarbonFootprintEmissionsDataSet</DataSetName>
            <Top>1.78833in</Top>
            <Left>0.64395in</Left>
            <Height>1.28125in</Height>
            <Width>4.84375in</Width>
            <Style>
              <Border>
                <Style>None</Style>
              </Border>
              <Format>###,###,###</Format>
            </Style>
          </Tablix>
        </ReportItems>
        <Height>7.89958in</Height>
        <Style />
      </Body>
      <ReportParameters>
        <ReportParameter Name="ClientID">
          <DataType>String</DataType>
          <Prompt>Client Name:</Prompt>
          <ValidValues>
            <DataSetReference>
              <DataSetName>ClientLookupDataSet</DataSetName>
              <ValueField>client_id</ValueField>
              <LabelField>client_name</LabelField>
            </DataSetReference>
          </ValidValues>
        </ReportParameter>
        <ReportParameter Name="toUnit">
          <DataType>String</DataType>
          <DefaultValue>
            <Values>
              <Value>tons CO2e</Value>
            </Values>
          </DefaultValue>
          <Prompt>Usage Unit:</Prompt>
          <ValidValues>
            <DataSetReference>
              <DataSetName>EmissionUnitLookupDataSet</DataSetName>
              <ValueField>emission_to_unit</ValueField>
              <LabelField>emission_to_unit</LabelField>
            </DataSetReference>
          </ValidValues>
        </ReportParameter>
        <ReportParameter Name="FiscalYear">
          <DataType>Integer</DataType>
          <DefaultValue>
            <DataSetReference>
              <DataSetName>FiscalYear</DataSetName>
              <ValueField>fiscal_year</ValueField>
            </DataSetReference>
          </DefaultValue>
          <Prompt>Fiscal Year:</Prompt>
          <ValidValues>
            <DataSetReference>
              <DataSetName>FiscalYear</DataSetName>
              <ValueField>fiscal_year</ValueField>
              <LabelField>fiscal_year</LabelField>
            </DataSetReference>
          </ValidValues>
          <MultiValue>true</MultiValue>
        </ReportParameter>
        <ReportParameter Name="GroupBy">
          <DataType>String</DataType>
          <Prompt>Group By:</Prompt>
          <ValidValues>
            <ParameterValues>
              <ParameterValue>
                <Value>Client</Value>
                <Label>Client</Label>
              </ParameterValue>
              <ParameterValue>
                <Value>Segment</Value>
                <Label>Segment</Label>
              </ParameterValue>
              <ParameterValue>
                <Value>BU</Value>
                <Label>Business Unit</Label>
              </ParameterValue>
              <ParameterValue>
                <Value>Division</Value>
                <Label>Division</Label>
              </ParameterValue>
              <ParameterValue>
                <Value>Sub_Division</Value>
                <Label>Sub Division</Label>
              </ParameterValue>
              <ParameterValue>
                <Value>Location</Value>
                <Label>Location</Label>
              </ParameterValue>
              <ParameterValue>
                <Value>Country</Value>
                <Label>Country</Label>
              </ParameterValue>
            </ParameterValues>
          </ValidValues>
        </ReportParameter>
        <ReportParameter Name="BusinessUnit">
          <DataType>String</DataType>
          <DefaultValue>
            <DataSetReference>
              <DataSetName>BUListDataSet</DataSetName>
              <ValueField>business_unit_name</ValueField>
            </DataSetReference>
          </DefaultValue>
          <Prompt>Filter by BU:</Prompt>
          <ValidValues>
            <DataSetReference>
              <DataSetName>BUListDataSet</DataSetName>
              <ValueField>business_unit_name</ValueField>
              <LabelField>business_unit_name</LabelField>
            </DataSetReference>
          </ValidValues>
          <MultiValue>true</MultiValue>
        </ReportParameter>
        <ReportParameter Name="EmissionType">
          <DataType>String</DataType>
          <DefaultValue>
            <DataSetReference>
              <DataSetName>EmissionTypeLookupDataSet</DataSetName>
              <ValueField>emission_type_id</ValueField>
            </DataSetReference>
          </DefaultValue>
          <Prompt>Filter by Emission Type:</Prompt>
          <ValidValues>
            <DataSetReference>
              <DataSetName>EmissionTypeLookupDataSet</DataSetName>
              <ValueField>emission_type_id</ValueField>
              <LabelField>emission_type_name</LabelField>
            </DataSetReference>
          </ValidValues>
          <MultiValue>true</MultiValue>
        </ReportParameter>
        <ReportParameter Name="Scope">
          <DataType>Integer</DataType>
          <DefaultValue>
            <Values>
              <Value>1</Value>
              <Value>2</Value>
              <Value>3</Value>
            </Values>
          </DefaultValue>
          <Prompt>Filter by Scope:</Prompt>
          <ValidValues>
            <ParameterValues>
              <ParameterValue>
                <Value>1</Value>
                <Label>1</Label>
              </ParameterValue>
              <ParameterValue>
                <Value>2</Value>
                <Label>2</Label>
              </ParameterValue>
              <ParameterValue>
                <Value>3</Value>
                <Label>3</Label>
              </ParameterValue>
            </ParameterValues>
          </ValidValues>
          <MultiValue>true</MultiValue>
        </ReportParameter>
        <ReportParameter Name="AnnexB">
          <DataType>String</DataType>
          <DefaultValue>
            <Values>
              <Value>0</Value>
            </Values>
          </DefaultValue>
          <Prompt>Only Include Annex B Countries (Group by Country Only):</Prompt>
          <ValidValues>
            <ParameterValues>
              <ParameterValue>
                <Value>1</Value>
                <Label>Yes</Label>
              </ParameterValue>
              <ParameterValue>
                <Value>0</Value>
                <Label>No</Label>
              </ParameterValue>
            </ParameterValues>
          </ValidValues>
        </ReportParameter>
      </ReportParameters>
      <Code>Public Function CalcRatio(ByVal Numerator As Object, ByVal Denominator As object) As Object
     
     
     
       If Denominator &lt;&gt; 0 Then
            Return Numerator/Denominator
      Else
          Return 0
       End If
    End Function
     
     
     
     
     
     
     
     
    </Code>
      <Width>11.77937in</Width>
      <Page>
        <LeftMargin>0.5in</LeftMargin>
        <RightMargin>0.5in</RightMargin>
        <TopMargin>0.5in</TopMargin>
        <BottomMargin>0.5in</BottomMargin>
        <Style />
      </Page>
      <Language>en-US</Language>
      <ConsumeContainerWhitespace>true</ConsumeContainerWhitespace>
      <rd:ReportID>a4fa6d5f-a7ed-4a6e-bd14-c9adbfcc6f29</rd:ReportID>
      <rd:ReportUnitType>Inch</rd:ReportUnitType>
    </Report>
    
                                                  
    1:
    2:
    3:
    4:
    5:
    6:
    7:
    8:
    9:
    10:
    11:
    12:
    13:
    14:
    15:
    16:
    17:
    18:
    19:
    20:
    21:
    22:
    23:
    24:
    25:
    26:
    27:
    28:
    29:
    30:
    31:
    32:
    33:
    34:
    35:
    36:
    37:
    38:
    39:
    40:
    41:
    42:
    43:
    44:
    45:
    46:
    47:
    48:
    49:
    50:
    51:
    52:
    53:
    54:
    55:
    56:
    57:
    58:
    59:
    60:
    61:
    62:
    63:
    64:
    65:
    66:
    67:
    68:
    69:
    70:
    71:
    72:
    73:
    74:
    75:
    76:
    77:
    78:
    79:
    80:
    81:
    82:
    83:
    84:
    85:
    86:
    87:
    88:
    89:
    90:
    91:
    92:
    93:
    94:
    95:
    96:
    97:
    98:
    99:
    100:
    101:
    102:
    103:
    104:
    105:
    106:
    107:
    108:
    109:
    110:
    111:
    112:
    113:
    114:
    115:
    116:
    117:
    118:
    119:
    120:
    121:
    122:
    123:
    124:
    125:
    126:
    127:
    128:
    129:
    130:
    131:
    132:
    133:
    134:
    135:
    136:
    137:
    138:
    139:
    140:
    141:
    142:
    143:
    144:
    145:
    146:
    147:
    148:
    149:
    150:
    151:
    152:
    153:
    154:
    155:
    156:
    157:
    158:
    159:
    160:
    161:
    162:
    163:
    164:
    165:
    166:
    167:
    168:
    169:
    170:
    171:
    172:
    173:
    174:
    175:
    176:
    177:
    178:
    179:
    180:
    181:
    182:
    183:
    184:
    185:
    186:
    187:
    188:
    189:
    190:
    191:
    192:
    193:
    194:
    195:
    196:
    197:
    198:
    199:
    200:
    201:
    202:
    203:
    204:
    205:
    206:
    207:
    208:
    209:
    210:
    211:
    212:
    213:
    214:
    215:
    216:
    217:
    218:
    219:
    220:
    221:
    222:
    223:
    224:
    225:
    226:
    227:
    228:
    229:
    230:
    231:
    232:
    233:
    234:
    235:
    236:
    237:
    238:
    239:
    240:
    241:
    242:
    243:
    244:
    245:
    246:
    247:
    248:
    249:
    250:
    251:
    252:
    253:
    254:
    255:
    256:
    257:
    258:
    259:
    260:
    261:
    262:
    263:
    264:
    265:
    266:
    267:
    268:
    269:
    270:
    271:
    272:
    273:
    274:
    275:
    276:
    277:
    278:
    279:
    280:
    281:
    282:
    283:
    284:
    285:
    286:
    287:
    288:
    289:
    290:
    291:
    292:
    293:
    294:
    295:
    296:
    297:
    298:
    299:
    300:
    301:
    302:
    303:
    304:
    305:
    306:
    307:
    308:
    309:
    310:
    311:
    312:
    313:
    314:
    315:
    316:
    317:
    318:
    319:
    320:
    321:
    322:
    323:
    324:
    325:
    326:
    327:
    328:
    329:
    330:
    331:
    332:
    333:
    334:
    335:
    336:
    337:
    338:
    339:
    340:
    341:
    342:
    343:
    344:
    345:
    346:
    347:
    348:
    349:
    350:
    351:
    352:
    353:
    354:
    355:
    356:
    357:
    358:
    359:
    360:
    361:
    362:
    363:
    364:
    365:
    366:
    367:
    368:
    369:
    370:
    371:
    372:
    373:
    374:
    375:
    376:
    377:
    378:
    379:
    380:
    381:
    382:
    383:
    384:
    385:
    386:
    387:
    388:
    389:
    390:
    391:
    392:
    393:
    394:
    395:
    396:
    397:
    398:
    399:
    400:
    401:
    402:
    403:
    404:
    405:
    406:
    407:
    408:
    409:
    410:
    411:
    412:
    413:
    414:
    415:
    416:
    417:
    418:
    419:
    420:
    421:
    422:
    423:
    424:
    425:
    426:
    427:
    428:
    429:
    430:
    431:
    432:
    433:
    434:
    435:
    436:
    437:
    438:
    439:
    440:
    441:
    442:
    443:
    444:
    445:
    446:
    447:
    448:
    449:
    450:
    451:
    452:
    453:
    454:
    455:
    456:
    457:
    458:
    459:
    460:
    461:
    462:
    463:
    464:
    465:
    466:
    467:
    468:
    469:
    470:
    471:
    472:
    473:
    474:
    475:
    476:
    477:
    478:
    479:
    480:
    481:
    482:
    483:
    484:
    485:
    486:
    487:
    488:
    489:
    490:
    491:
    492:
    493:
    494:
    495:
    496:
    497:
    498:
    499:
    500:
    501:
    502:
    503:
    504:
    505:
    506:
    507:
    508:
    509:
    510:
    511:
    512:
    513:
    514:
    515:
    516:
    517:
    518:
    519:
    520:
    521:
    522:
    523:
    524:
    525:
    526:
    527:
    528:
    529:
    530:
    531:
    532:
    533:
    534:
    535:
    536:
    537:
    538:
    539:
    540:
    541:
    542:
    543:
    544:
    545:
    546:
    547:
    548:
    549:
    550:
    551:
    552:
    553:
    554:
    555:
    556:
    557:
    558:
    559:
    560:
    561:
    562:
    563:
    564:
    565:
    566:
    567:
    568:
    569:
    570:
    571:
    572:
    573:
    574:
    575:
    576:
    577:
    578:
    579:
    580:
    581:
    582:
    583:
    584:
    585:
    586:
    587:
    588:
    589:
    590:
    591:
    592:
    593:
    594:
    595:
    596:
    597:
    598:
    599:
    600:
    601:
    602:
    603:
    604:
    605:
    606:
    607:
    608:
    609:
    610:
    611:
    612:
    613:
    614:
    615:
    616:
    617:
    618:
    619:
    620:
    621:
    622:
    623:
    624:
    625:
    626:
    627:
    628:
    629:
    630:
    631:
    632:
    633:
    634:
    635:
    636:
    637:
    638:
    639:
    640:
    641:
    642:
    643:
    644:
    645:
    646:
    647:
    648:
    649:
    650:
    651:
    652:
    653:
    654:
    655:
    656:
    657:
    658:
    659:
    660:
    661:
    662:
    663:
    664:
    665:
    666:
    667:
    668:
    669:
    670:
    671:
    672:
    673:
    674:
    675:
    676:
    677:
    678:
    679:
    680:
    681:
    682:
    683:
    684:
    685:
    686:
    687:
    688:
    689:
    690:
    691:
    692:
    693:
    694:
    695:
    696:
    697:
    698:
    699:
    700:
    701:
    702:
    703:
    704:
    705:
    706:
    707:
    708:
    709:
    710:
    711:
    712:
    713:
    714:
    715:
    716:
    717:
    718:
    719:
    720:
    721:
    722:
    723:
    724:
    725:
    726:
    727:
    728:
    729:
    730:
    731:
    732:
    733:
    734:
    735:
    736:
    737:
    738:
    739:
    740:
    741:
    742:
    743:
    744:
    745:
    746:
    747:
    748:
    749:
    750:
    751:
    752:
    753:
    754:
    755:
    756:
    757:
    758:
    759:
    760:
    761:
    762:
    763:
    764:
    765:
    766:
    767:
    768:
    769:
    770:
    771:
    772:
    773:
    774:
    775:
    776:
    777:
    778:
    779:
    780:
    781:
    782:
    783:
    784:
    785:
    786:
    787:
    788:
    789:
    790:
    791:
    792:
    793:
    794:
    795:
    796:
    797:
    798:
    799:
    800:
    801:
    802:
    803:
    804:
    805:
    806:
    807:
    808:
    809:
    810:
    811:
    812:
    813:
    814:
    815:
    816:
    817:
    818:
    819:
    820:
    821:
    822:
    823:
    824:
    825:
    826:
    827:
    828:
    829:
    830:
    831:
    832:
    833:
    834:
    835:
    836:
    837:
    838:
    839:
    840:
    841:
    842:
    843:
    844:
    845:
    846:
    847:
    848:
    849:
    850:
    851:
    852:
    853:
    854:
    855:
    856:
    857:
    858:
    859:
    860:
    861:
    862:
    863:
    864:
    865:
    866:
    867:
    868:
    869:
    870:
    871:
    872:
    873:
    874:
    875:
    876:
    877:
    878:
    879:
    880:
    881:
    882:
    883:
    884:
    885:
    886:
    887:
    888:
    889:
    890:
    891:
    892:
    893:
    894:
    895:
    896:
    897:
    898:
    899:
    900:
    901:
    902:
    903:
    904:
    905:
    906:
    907:
    908:
    909:
    910:
    911:
    912:
    913:
    914:
    915:
    916:
    917:
    918:
    919:
    920:
    921:
    922:
    923:
    924:
    925:
    926:
    927:
    928:
    929:
    930:
    931:
    932:
    933:
    934:
    935:
    936:
    937:
    938:
    939:
    940:
    941:
    942:
    943:
    944:
    945:
    946:
    947:
    948:
    949:
    950:
    951:
    952:
    953:
    954:
    955:
    956:
    957:
    958:
    959:
    960:
    961:
    962:
    963:
    964:
    965:
    966:
    967:
    968:
    969:
    970:
    971:
    972:
    973:
    974:
    975:
    976:
    977:
    978:
    979:
    980:
    981:
    982:
    983:
    984:
    985:
    986:
    987:
    988:
    989:
    990:
    991:
    992:
    993:
    994:
    995:
    996:
    997:
    998:
    999:
    1000:
    1001:
    1002:
    1003:
    1004:
    1005:
    1006:
    1007:
    1008:
    1009:
    1010:
    1011:
    1012:
    1013:
    1014:
    1015:
    1016:
    1017:
    1018:
    1019:
    1020:
    1021:
    1022:
    1023:
    1024:
    1025:
    1026:
    1027:
    1028:
    1029:
    1030:
    1031:
    1032:
    1033:
    1034:
    1035:
    1036:
    1037:
    1038:
    1039:
    1040:
    1041:
    1042:
    1043:
    1044:
    1045:
    1046:
    1047:
    1048:
    1049:
    1050:
    1051:
    1052:
    1053:
    1054:
    1055:
    1056:
    1057:
    1058:
    1059:
    1060:
    1061:
    1062:
    1063:
    1064:
    1065:
    1066:
    1067:
    1068:
    1069:
    1070:
    1071:
    1072:
    1073:
    1074:
    1075:
    1076:
    1077:
    1078:
    1079:
    1080:
    1081:
    1082:
    1083:
    1084:
    1085:
    1086:
    1087:
    1088:
    1089:
    1090:
    1091:
    1092:
    1093:
    1094:
    1095:
    1096:
    1097:
    1098:
    1099:
    1100:
    1101:
    1102:
    1103:
    1104:
    1105:
    1106:
    1107:
    1108:
    1109:
    1110:
    1111:
    1112:
    1113:
    1114:
    1115:
    1116:
    1117:
    1118:
    1119:
    1120:
    1121:
    1122:
    1123:
    1124:
    1125:
    1126:
    1127:
    1128:
    1129:
    1130:
    1131:
    1132:
    1133:
    1134:
    1135:
    1136:
    1137:
    1138:
    1139:
    1140:
    1141:
    1142:
    1143:
    1144:
    1145:
    1146:
    1147:
    1148:
    1149:
    1150:
    1151:
    1152:
    1153:
    1154:
    1155:
    1156:
    1157:
    1158:
    1159:
    1160:
    1161:
    1162:
    1163:
    1164:
    1165:
    1166:
    1167:
    1168:
    1169:
    1170:
    1171:
    1172:
    1173:
    1174:
    1175:
    1176:
    1177:
    1178:
    1179:
    1180:
    1181:
    1182:
    1183:
    1184:
    1185:
    1186:
    1187:
    1188:
    1189:
    1190:
    1191:
    1192:
    1193:
    1194:
    1195:
    1196:
    1197:
    1198:
    1199:
    1200:
    1201:
    1202:
    1203:
    1204:
    1205:
    1206:
    1207:
    1208:
    1209:
    1210:
    1211:
    1212:
    1213:
    1214:
    1215:
    1216:
    1217:
    1218:
    1219:
    1220:
    1221:
    1222:
    1223:
    1224:
    1225:
    1226:
    1227:
    1228:
    1229:
    1230:
    1231:
    1232:
    1233:
    1234:
    1235:
    1236:
    1237:
    1238:
    1239:
    1240:
    1241:
    1242:
    1243:
    1244:
    1245:
    1246:
    1247:
    1248:
    1249:
    1250:
    1251:
    1252:
    1253:
    1254:
    1255:
    1256:
    1257:
    1258:
    1259:
    1260:
    1261:
    1262:
    1263:
    1264:
    1265:
    1266:
    1267:
    1268:
    1269:
    1270:
    1271:
    1272:
    1273:
    1274:
    1275:
    1276:
    1277:
    1278:
    1279:
    1280:
    1281:
    1282:
    1283:
    1284:
    1285:
    1286:
    1287:
    1288:
    1289:
    1290:
    

    Select allOpen in new window

     

    by: CGLuttrellPosted on 2009-06-02 at 13:34:12ID: 24531247

    Ok, first I had my syntax a little off, the IIF will go inside the sum, not around it.
    So in both of the intermediate Total boxes where you currently have just
    Sum(Fields!Total_Emissions_CO2e.Value)
    replace them both with
    =Sum(IIF(Fields!usage_type_name.Value <> "Green Purchase Power",Fields!Total_Emissions_CO2e.Value,0))
    That should do it, I could not test run your report because I dont have your database, but it worked on my test report that I applied the same logic to.
    I was not sure if on the line where you have Total (Adjusted for Green Purchase Power) is that total correct already with the grand total?  I think it is.  Let me know it you have any other questions.
    I posted back the rdl with the change in it in case you needed that.

    <?xml version="1.0" encoding="utf-8"?>
    <Report xmlns:rd="http://schemas.microsoft.com/SQLServer/reporting/reportdesigner" xmlns="http://schemas.microsoft.com/sqlserver/reporting/2008/01/reportdefinition">
      <DataSources>
        <DataSource Name="CCCCorporateInventoryDataSource">
          <DataSourceReference>CCCCorporateInventoryDataSource</DataSourceReference>
          <rd:DataSourceID>23316c39-415a-4a72-b109-a712c6b6be8b</rd:DataSourceID>
          <rd:SecurityType>None</rd:SecurityType>
        </DataSource>
      </DataSources>
      <DataSets>
        <DataSet Name="ClientLookupDataSet">
          <Fields>
            <Field Name="client_id">
              <DataField>client_id</DataField>
              <rd:TypeName>System.Int32</rd:TypeName>
            </Field>
            <Field Name="client_name">
              <DataField>client_name</DataField>
              <rd:TypeName>System.String</rd:TypeName>
            </Field>
          </Fields>
          <Query>
            <DataSourceName>CCCCorporateInventoryDataSource</DataSourceName>
            <CommandText>select client_id, client_name from client_lookup order by client_name</CommandText>
            <rd:UseGenericDesigner>true</rd:UseGenericDesigner>
          </Query>
        </DataSet>
        <DataSet Name="EmissionTypeLookupDataSet">
          <Fields>
            <Field Name="emission_type_id">
              <DataField>emission_type_id</DataField>
              <rd:TypeName>System.Int32</rd:TypeName>
            </Field>
            <Field Name="emission_type_name">
              <DataField>emission_type_name</DataField>
              <rd:TypeName>System.String</rd:TypeName>
            </Field>
          </Fields>
          <Query>
            <DataSourceName>CCCCorporateInventoryDataSource</DataSourceName>
            <CommandText>select distinct emission_type_id, emission_type_name from emission_type
    order by emission_type_name</CommandText>
            <rd:UseGenericDesigner>true</rd:UseGenericDesigner>
          </Query>
        </DataSet>
        <DataSet Name="CarbonFootprintEmissionsDataSet">
          <Fields>
            <Field Name="Year">
              <DataField>Year</DataField>
              <rd:TypeName>System.Int32</rd:TypeName>
            </Field>
            <Field Name="location_id">
              <DataField>location_id</DataField>
              <rd:TypeName>System.Int32</rd:TypeName>
            </Field>
            <Field Name="location_name">
              <DataField>location_name</DataField>
              <rd:TypeName>System.String</rd:TypeName>
            </Field>
            <Field Name="segment_name">
              <DataField>segment_name</DataField>
              <rd:TypeName>System.String</rd:TypeName>
            </Field>
            <Field Name="client_name">
              <DataField>client_name</DataField>
              <rd:TypeName>System.String</rd:TypeName>
            </Field>
            <Field Name="country_name">
              <DataField>country_name</DataField>
              <rd:TypeName>System.String</rd:TypeName>
            </Field>
            <Field Name="business_unit_name">
              <DataField>business_unit_name</DataField>
              <rd:TypeName>System.String</rd:TypeName>
            </Field>
            <Field Name="emission_type_name">
              <DataField>emission_type_name</DataField>
              <rd:TypeName>System.String</rd:TypeName>
            </Field>
            <Field Name="division_name">
              <DataField>division_name</DataField>
              <rd:TypeName>System.String</rd:TypeName>
            </Field>
            <Field Name="scope">
              <DataField>scope</DataField>
              <rd:TypeName>System.Int32</rd:TypeName>
            </Field>
            <Field Name="usage_type_name">
              <DataField>usage_type_name</DataField>
              <rd:TypeName>System.String</rd:TypeName>
            </Field>
            <Field Name="sub_division_name">
              <DataField>sub_division_name</DataField>
              <rd:TypeName>System.String</rd:TypeName>
            </Field>
            <Field Name="Total_Emissions_CO2e">
              <DataField>Total Emissions CO2e</DataField>
              <rd:TypeName>System.Decimal</rd:TypeName>
            </Field>
            <Field Name="annex_b_flg">
              <DataField>annex_b_flg</DataField>
              <rd:TypeName>System.String</rd:TypeName>
            </Field>
            <Field Name="CO2_Emissions">
              <DataField>CO2 Emissions</DataField>
              <rd:TypeName>System.Decimal</rd:TypeName>
            </Field>
            <Field Name="CH4_Emissions">
              <DataField>CH4 Emissions</DataField>
              <rd:TypeName>System.Decimal</rd:TypeName>
            </Field>
            <Field Name="N2O_Emissions">
              <DataField>N2O Emissions</DataField>
              <rd:TypeName>System.Decimal</rd:TypeName>
            </Field>
            <Field Name="CO2e_Emissions">
              <DataField>CO2e Emissions</DataField>
              <rd:TypeName>System.Decimal</rd:TypeName>
            </Field>
            <Field Name="CH4e_Emissions">
              <DataField>CH4e Emissions</DataField>
              <rd:TypeName>System.Decimal</rd:TypeName>
            </Field>
            <Field Name="N2Oe_Emissions">
              <DataField>N2Oe Emissions</DataField>
              <rd:TypeName>System.Decimal</rd:TypeName>
            </Field>
            <Field Name="BIO_CO2e_Emissions">
              <DataField>BIO CO2e Emissions</DataField>
              <rd:TypeName>System.Decimal</rd:TypeName>
            </Field>
          </Fields>
          <Query>
            <DataSourceName>CCCCorporateInventoryDataSource</DataSourceName>
            <CommandText>select fiscal_year as [Year],a.location_id, case when  coalesce(a.location_name,'') = '' then 'Emissions at Entity' else a.location_name end as [location_name], a.client_name,
    a.segment_name, a.business_unit_name , a.division_name, a.sub_division_name,
    a.country_name, a.emission_type_name, case when a.usage_type_name = 'Green Purchase Power' then 'Green Purchase Power' else '' end  as [usage_type_name],  a.scope , a.annex_b_flg,
    sum(a.emission_total_CO2e) as [Total Emissions CO2e],
    sum(a.emission_CO2)as [CO2 Emissions], 
    sum(a.emission_CH4) as [CH4 Emissions], 
    sum(a.emission_N2O) as [N2O Emissions], 
    sum(a.emission_CO2e)as [CO2e Emissions], 
    sum(a.emission_CH4e) as [CH4e Emissions], 
    sum(a.emission_N2Oe) as [N2Oe Emissions], 
    sum(a.emission_biogenic_CO2e) as [BIO CO2e Emissions]
     
    from vw_emissions_org a
    where client_id = @ClientID
    and emission_type_id in (@EmissionType)
    and emission_to_unit = @toUnit
    and Fiscal_Year in (@FiscalYear)
    and scope in (@Scope)
    and business_unit_name in (@BusinessUnit)
     
     
    group by  fiscal_year, a.location_id, a.location_name, a.client_name,
    a.segment_name, a.business_unit_name , a.division_name, a.sub_division_name,
    a.country_name, a.emission_type_name, a.usage_type_name, a.scope, a.annex_b_flg</CommandText>
            <QueryParameters>
              <QueryParameter Name="@GroupBy">
                <Value>=Parameters!GroupBy.Value</Value>
                <rd:UserDefined>true</rd:UserDefined>
              </QueryParameter>
              <QueryParameter Name="@ClientID">
                <Value>=Parameters!ClientID.Value</Value>
              </QueryParameter>
              <QueryParameter Name="@EmissionType">
                <Value>=Parameters!EmissionType.Value</Value>
              </QueryParameter>
              <QueryParameter Name="@toUnit">
                <Value>=Parameters!toUnit.Value</Value>
              </QueryParameter>
              <QueryParameter Name="@FiscalYear">
                <Value>=Parameters!FiscalYear.Value</Value>
              </QueryParameter>
              <QueryParameter Name="@Scope">
                <Value>=Parameters!Scope.Value</Value>
              </QueryParameter>
              <QueryParameter Name="@BusinessUnit">
                <Value>=Parameters!BusinessUnit.Value</Value>
              </QueryParameter>
            </QueryParameters>
            <rd:UseGenericDesigner>true</rd:UseGenericDesigner>
          </Query>
        </DataSet>
        <DataSet Name="FiscalYear">
          <Fields>
            <Field Name="fiscal_year">
              <DataField>fiscal year</DataField>
              <rd:TypeName>System.Int32</rd:TypeName>
            </Field>
          </Fields>
          <Query>
            <DataSourceName>CCCCorporateInventoryDataSource</DataSourceName>
            <CommandText>select distinct year(a.end_date) as [fiscal year] 
    from metered_usage_org a inner join org_hierarchy_lookup b 
    on a.org_id = b.org_id and b.client_id = @ClientID
    order by [fiscal year]</CommandText>
            <QueryParameters>
              <QueryParameter Name="@ClientID">
                <Value>=Parameters!ClientID.Value</Value>
              </QueryParameter>
            </QueryParameters>
            <rd:UseGenericDesigner>true</rd:UseGenericDesigner>
          </Query>
        </DataSet>
        <DataSet Name="EmissionUnitLookupDataSet">
          <Fields>
            <Field Name="emission_to_unit">
              <DataField>emission_to_unit</DataField>
              <rd:TypeName>System.String</rd:TypeName>
            </Field>
          </Fields>
          <Query>
            <DataSourceName>CCCCorporateInventoryDataSource</DataSourceName>
            <CommandText>select distinct emission_to_unit from vw_onsite_transport_wo_usage
    where gwp_ccc_preference &lt;&gt; 0</CommandText>
            <rd:UseGenericDesigner>true</rd:UseGenericDesigner>
          </Query>
        </DataSet>
        <DataSet Name="BUListDataSet">
          <Fields>
            <Field Name="business_unit_name">
              <DataField>business_unit_name</DataField>
              <rd:TypeName>System.String</rd:TypeName>
            </Field>
          </Fields>
          <Query>
            <DataSourceName>CCCCorporateInventoryDataSource</DataSourceName>
            <CommandText>select distinct( business_unit_name ) from vw_org_hierarchy where client_id = @ClientID
    order by business_unit_name</CommandText>
            <QueryParameters>
              <QueryParameter Name="@ClientID">
                <Value>=Parameters!ClientID.Value</Value>
              </QueryParameter>
            </QueryParameters>
            <rd:UseGenericDesigner>true</rd:UseGenericDesigner>
          </Query>
        </DataSet>
      </DataSets>
      <Body>
        <ReportItems>
          <Tablix Name="Client_Emissions_Tablix">
            <TablixCorner>
              <TablixCornerRows>
                <TablixCornerRow>
                  <TablixCornerCell>
                    <CellContents>
                      <Textbox Name="Textbox124">
                        <CanGrow>true</CanGrow>
                        <KeepTogether>true</KeepTogether>
                        <Paragraphs>
                          <Paragraph>
                            <TextRuns>
                              <TextRun>
                                <Value />
                                <Style />
                              </TextRun>
                            </TextRuns>
                            <Style />
                          </Paragraph>
                        </Paragraphs>
                        <rd:DefaultName>Textbox124</rd:DefaultName>
                        <Style>
                          <Border>
                            <Color>LightGrey</Color>
                            <Style>None</Style>
                          </Border>
                          <PaddingLeft>2pt</PaddingLeft>
                          <PaddingRight>2pt</PaddingRight>
                          <PaddingTop>2pt</PaddingTop>
                          <PaddingBottom>2pt</PaddingBottom>
                        </Style>
                      </Textbox>
                    </CellContents>
                  </TablixCornerCell>
                </TablixCornerRow>
              </TablixCornerRows>
            </TablixCorner>
            <TablixBody>
              <TablixColumns>
                <TablixColumn>
                  <Width>1.13021in</Width>
                </TablixColumn>
                <TablixColumn>
                  <Width>1in</Width>
                </TablixColumn>
                <TablixColumn>
                  <Width>1in</Width>
                </TablixColumn>
              </TablixColumns>
              <TablixRows>
                <TablixRow>
                  <Height>0.28125in</Height>
                  <TablixCells>
                    <TablixCell>
                      <CellContents>
                        <Textbox Name="Total_Emissions_CO2e">
                          <CanGrow>true</CanGrow>
                          <KeepTogether>true</KeepTogether>
                          <Paragraphs>
                            <Paragraph>
                              <TextRuns>
                                <TextRun>
                                  <Value>=Sum(Fields!Total_Emissions_CO2e.Value)</Value>
                                  <Style>
                                    <Format>#,0;(#,0)</Format>
                                  </Style>
                                </TextRun>
                              </TextRuns>
                              <Style />
                            </Paragraph>
                          </Paragraphs>
                          <rd:DefaultName>Total_Emissions_CO2e</rd:DefaultName>
                          <Style>
                            <Border>
                              <Style>Solid</Style>
                            </Border>
                            <PaddingLeft>2pt</PaddingLeft>
                            <PaddingRight>2pt</PaddingRight>
                            <PaddingTop>2pt</PaddingTop>
                            <PaddingBottom>2pt</PaddingBottom>
                          </Style>
                        </Textbox>
                      </CellContents>
                    </TablixCell>
                    <TablixCell>
                      <CellContents>
                        <Textbox Name="First_year_emissions">
                          <CanGrow>true</CanGrow>
                          <KeepTogether>true</KeepTogether>
                          <Paragraphs>
                            <Paragraph>
                              <TextRuns>
                                <TextRun>
                                  <Value>=Sum(Fields!Total_Emissions_CO2e.Value)</Value>
                                  <Style />
                                </TextRun>
                              </TextRuns>
                              <Style />
                            </Paragraph>
                          </Paragraphs>
                          <Style>
                            <Border>
                              <Style>Solid</Style>
                            </Border>
                            <PaddingLeft>2pt</PaddingLeft>
                            <PaddingRight>2pt</PaddingRight>
                            <PaddingTop>2pt</PaddingTop>
                            <PaddingBottom>2pt</PaddingBottom>
                          </Style>
                        </Textbox>
                      </CellContents>
                    </TablixCell>
                    <TablixCell>
                      <CellContents>
                        <Textbox Name="Textbox149">
                          <CanGrow>true</CanGrow>
                          <KeepTogether>true</KeepTogether>
                          <Paragraphs>
                            <Paragraph>
                              <TextRuns>
                                <TextRun>
                                  <Value>= IIF(ReportItems!First_year_emissions.Value=0 ,"N/A", Code.CalcRatio((ReportItems!Total_Emissions_CO2e.Value-ReportItems!First_year_emissions.Value),ReportItems!First_year_emissions.Value))</Value>
                                  <Style>
                                    <Format>0%</Format>
                                  </Style>
                                </TextRun>
                              </TextRuns>
                              <Style>
                                <TextAlign>Right</TextAlign>
                              </Style>
                            </Paragraph>
                          </Paragraphs>
                          <rd:DefaultName>Textbox149</rd:DefaultName>
                          <Style>
                            <Border>
                              <Style>Solid</Style>
                            </Border>
                            <PaddingLeft>2pt</PaddingLeft>
                            <PaddingRight>2pt</PaddingRight>
                            <PaddingTop>2pt</PaddingTop>
                            <PaddingBottom>2pt</PaddingBottom>
                          </Style>
                        </Textbox>
                      </CellContents>
                    </TablixCell>
                  </TablixCells>
                </TablixRow>
                <TablixRow>
                  <Height>0.25in</Height>
                  <TablixCells>
                    <TablixCell>
                      <CellContents>
                        <Textbox Name="Textbox3">
                          <CanGrow>true</CanGrow>
                          <KeepTogether>true</KeepTogether>
                          <Paragraphs>
                            <Paragraph>
                              <TextRuns>
                                <TextRun>
                                  <Value>=Sum(IIF(Fields!usage_type_name.Value &lt;&gt; "Green Purchase Power",Fields!Total_Emissions_CO2e.Value,0))</Value>
                                  <Style>
                                    <Format>#,0;(#,0)</Format>
                                  </Style>
                                </TextRun>
                              </TextRuns>
                              <Style />
                            </Paragraph>
                          </Paragraphs>
                          <rd:DefaultName>Textbox3</rd:DefaultName>
                          <Style>
                            <Border>
                              <Style>Solid</Style>
                            </Border>
                            <PaddingLeft>2pt</PaddingLeft>
                            <PaddingRight>2pt</PaddingRight>
                            <PaddingTop>2pt</PaddingTop>
                            <PaddingBottom>2pt</PaddingBottom>
                          </Style>
                        </Textbox>
                      </CellContents>
                    </TablixCell>
                    <TablixCell>
                      <CellContents>
                        <Textbox Name="Textbox4">
                          <CanGrow>true</CanGrow>
                          <KeepTogether>true</KeepTogether>
                          <Paragraphs>
                            <Paragraph>
                              <TextRuns>
                                <TextRun>
                                  <Value>=Sum(IIF(Fields!usage_type_name.Value &lt;&gt; "Green Purchase Power",Fields!Total_Emissions_CO2e.Value,0))</Value>
                                  <Style />
                                </TextRun>
                              </TextRuns>
                              <Style />
                            </Paragraph>
                          </Paragraphs>
                          <rd:DefaultName>Textbox4</rd:DefaultName>
                          <Style>
                            <Border>
                              <Style>Solid</Style>
                            </Border>
                            <PaddingLeft>2pt</PaddingLeft>
                            <PaddingRight>2pt</PaddingRight>
                            <PaddingTop>2pt</PaddingTop>
                            <PaddingBottom>2pt</PaddingBottom>
                          </Style>
                        </Textbox>
                        <rd:Selected>true</rd:Selected>
                      </CellContents>
                    </TablixCell>
                    <TablixCell>
                      <CellContents>
                        <Textbox Name="Textbox5">
                          <CanGrow>true</CanGrow>
                          <KeepTogether>true</KeepTogether>
                          <Paragraphs>
                            <Paragraph>
                              <TextRuns>
                                <TextRun>
                                  <Value />
                                  <Style />
                                </TextRun>
                              </TextRuns>
                              <Style>
                                <TextAlign>Right</TextAlign>
                              </Style>
                            </Paragraph>
                          </Paragraphs>
                          <rd:DefaultName>Textbox5</rd:DefaultName>
                          <Style>
                            <Border>
                              <Style>Solid</Style>
                            </Border>
                            <PaddingLeft>2pt</PaddingLeft>
                            <PaddingRight>2pt</PaddingRight>
                            <PaddingTop>2pt</PaddingTop>
                            <PaddingBottom>2pt</PaddingBottom>
                          </Style>
                        </Textbox>
                      </CellContents>
                    </TablixCell>
                  </TablixCells>
                </TablixRow>
                <TablixRow>
                  <Height>0.25in</Height>
                  <TablixCells>
                    <TablixCell>
                      <CellContents>
                        <Textbox Name="Total_Emissions_GPP">
                          <CanGrow>true</CanGrow>
                          <KeepTogether>true</KeepTogether>
                          <Paragraphs>
                            <Paragraph>
                              <TextRuns>
                                <TextRun>
                                  <Value>=Sum(Fields!Total_Emissions_CO2e.Value)</Value>
                                  <Style>
                                    <FontWeight>Bold</FontWeight>
                                    <Format>#,0;(#,0)</Format>
                                  </Style>
                                </TextRun>
                              </TextRuns>
                              <Style>
                                <TextAlign>Right</TextAlign>
                              </Style>
                            </Paragraph>
                          </Paragraphs>
                          <Style>
                            <Border>
                              <Style>Solid</Style>
                            </Border>
                            <PaddingLeft>2pt</PaddingLeft>
                            <PaddingRight>2pt</PaddingRight>
                            <PaddingTop>2pt</PaddingTop>
                            <PaddingBottom>2pt</PaddingBottom>
                          </Style>
                        </Textbox>
                      </CellContents>
                    </TablixCell>
                    <TablixCell>
                      <CellContents>
                        <Textbox Name="first_year_emissions_gpp">
                          <CanGrow>true</CanGrow>
                          <KeepTogether>true</KeepTogether>
                          <Paragraphs>
                            <Paragraph>
                              <TextRuns>
                                <TextRun>
                                  <Value>=Sum(Fields!Total_Emissions_CO2e.Value)</Value>
                                  <Style>
                                    <FontWeight>Bold</FontWeight>
                                    <Format>#,0;(#,0)</Format>
                                  </Style>
                                </TextRun>
                              </TextRuns>
                              <Style>
                                <TextAlign>Right</TextAlign>
                              </Style>
                            </Paragraph>
                          </Paragraphs>
                          <Style>
                            <Border>
                              <Style>Solid</Style>
                            </Border>
                            <PaddingLeft>2pt</PaddingLeft>
                            <PaddingRight>2pt</PaddingRight>
                            <PaddingTop>2pt</PaddingTop>
                            <PaddingBottom>2pt</PaddingBottom>
                          </Style>
                        </Textbox>
                      </CellContents>
                    </TablixCell>
                    <TablixCell>
                      <CellContents>
                        <Textbox Name="Textbox68">
                          <CanGrow>true</CanGrow>
                          <KeepTogether>true</KeepTogether>
                          <Paragraphs>
                            <Paragraph>
                              <TextRuns>
                                <TextRun>
                                  <Value>= IIF(ReportItems!first_year_emissions_gpp.Value=0 ,"N/A", Code.CalcRatio((ABS(ReportItems!Total_Emissions_GPP.Value)-ABS(ReportItems!first_year_emissions_gpp.Value)),ABS(ReportItems!first_year_emissions_gpp.Value)))</Value>
                                  <Style>
                                    <FontWeight>Bold</FontWeight>
                                    <Format>0%</Format>
                                  </Style>
                                </TextRun>
                              </TextRuns>
                              <Style>
                                <TextAlign>Right</TextAlign>
                              </Style>
                            </Paragraph>
                          </Paragraphs>
                          <rd:DefaultName>Textbox68</rd:DefaultName>
                          <Style>
                            <Border>
                              <Style>Solid</Style>
                            </Border>
                            <PaddingLeft>2pt</PaddingLeft>
                            <PaddingRight>2pt</PaddingRight>
                            <PaddingTop>2pt</PaddingTop>
                            <PaddingBottom>2pt</PaddingBottom>
                          </Style>
                        </Textbox>
                      </CellContents>
                    </TablixCell>
                  </TablixCells>
                </TablixRow>
                <TablixRow>
                  <Height>0.25in</Height>
                  <TablixCells>
                    <TablixCell>
                      <CellContents>
                        <Textbox Name="Total_Emissions_CO2e_Net">
                          <CanGrow>true</CanGrow>
                          <KeepTogether>true</KeepTogether>
                          <Paragraphs>
                            <Paragraph>
                              <TextRuns>
                                <TextRun>
                                  <Value>=Sum(Fields!Total_Emissions_CO2e.Value)</Value>
                                  <Style>
                                    <FontWeight>Bold</FontWeight>
                                    <Format>#,0;(#,0)</Format>
                                  </Style>
                                </TextRun>
                              </TextRuns>
                              <Style>
                                <TextAlign>Right</TextAlign>
                              </Style>
                            </Paragraph>
                          </Paragraphs>
                          <Style>
                            <Border>
                              <Style>Solid</Style>
                            </Border>
                            <PaddingLeft>2pt</PaddingLeft>
                            <PaddingRight>2pt</PaddingRight>
                            <PaddingTop>2pt</PaddingTop>
                            <PaddingBottom>2pt</PaddingBottom>
                          </Style>
                        </Textbox>
                      </CellContents>
                    </TablixCell>
                    <TablixCell>
                      <CellContents>
                        <Textbox Name="First_Year_Total_Emissions_CO2e_Net">
                          <CanGrow>true</CanGrow>
                          <KeepTogether>true</KeepTogether>
                          <Paragraphs>
                            <Paragraph>
                              <TextRuns>
                                <TextRun>
                                  <Value>=Sum(Fields!Total_Emissions_CO2e.Value)</Value>
                                  <Style>
                                    <FontWeight>Bold</FontWeight>
                                    <Format>#,0;(#,0)</Format>
                                  </Style>
                                </TextRun>
                              </TextRuns>
                              <Style>
                                <TextAlign>Right</TextAlign>
                              </Style>
                            </Paragraph>
                          </Paragraphs>
                          <Style>
                            <Border>
                              <Style>Solid</Style>
                            </Border>
                            <PaddingLeft>2pt</PaddingLeft>
                            <PaddingRight>2pt</PaddingRight>
                            <PaddingTop>2pt</PaddingTop>
                            <PaddingBottom>2pt</PaddingBottom>
                          </Style>
                        </Textbox>
                      </CellContents>
                    </TablixCell>
                    <TablixCell>
                      <CellContents>
                        <Textbox Name="Textbox109">
                          <CanGrow>true</CanGrow>
                          <KeepTogether>true</KeepTogether>
                          <Paragraphs>
                            <Paragraph>
                              <TextRuns>
                                <TextRun>
                                  <Value>= IIF(ReportItems!First_Year_Total_Emissions_CO2e_Net.Value=0 ,"N/A", Code.CalcRatio((ReportItems!Total_Emissions_CO2e_Net.Value-ReportItems!First_Year_Total_Emissions_CO2e_Net.Value),ReportItems!First_Year_Total_Emissions_CO2e_Net.Value))</Value>
                                  <Style>
                                    <FontWeight>Bold</FontWeight>
                                    <Format>0%</Format>
                                  </Style>
                                </TextRun>
                              </TextRuns>
                              <Style>
                                <TextAlign>Right</TextAlign>
                              </Style>
                            </Paragraph>
                          </Paragraphs>
                          <rd:DefaultName>Textbox109</rd:DefaultName>
                          <Style>
                            <Border>
                              <Style>Solid</Style>
                            </Border>
                            <PaddingLeft>2pt</PaddingLeft>
                            <PaddingRight>2pt</PaddingRight>
                            <PaddingTop>2pt</PaddingTop>
                            <PaddingBottom>2pt</PaddingBottom>
                          </Style>
                        </Textbox>
                      </CellContents>
                    </TablixCell>
                  </TablixCells>
                </TablixRow>
              </TablixRows>
            </TablixBody>
            <TablixColumnHierarchy>
              <TablixMembers>
                <TablixMember>
                  <Group Name="YearColumnGroup2">
                    <GroupExpressions>
                      <GroupExpression>=Fields!Year.Value</GroupExpression>
                    </GroupExpressions>
                  </Group>
                  <SortExpressions>
                    <SortExpression>
                      <Value>=Fields!Year.Value</Value>
                    </SortExpression>
                  </SortExpressions>
                  <TablixHeader>
                    <Size>0.25in</Size>
                    <CellContents>
                      <Textbox Name="Group13">
                        <CanGrow>true</CanGrow>
                        <KeepTogether>true</KeepTogether>
                        <Paragraphs>
                          <Paragraph>
                            <TextRuns>
                              <TextRun>
                                <Value>=Fields!Year.Value</Value>
                                <Style>
                                  <FontWeight>Bold</FontWeight>
                                </Style>
                              </TextRun>
                            </TextRuns>
                            <Style>
                              <TextAlign>Center</TextAlign>
                            </Style>
                          </Paragraph>
                        </Paragraphs>
                        <rd:DefaultName>Group13</rd:DefaultName>
                        <Style>
                          <Border>
                            <Style>Solid</Style>
                          </Border>
                          <PaddingLeft>2pt</PaddingLeft>
                          <PaddingRight>2pt</PaddingRight>
                          <PaddingTop>2pt</PaddingTop>
                          <PaddingBottom>2pt</PaddingBottom>
                        </Style>
                      </Textbox>
                    </CellContents>
                  </TablixHeader>
                  <TablixMembers>
                    <TablixMember />
                  </TablixMembers>
                </TablixMember>
                <TablixMember>
                  <Group Name="First_year_emissions_hidden_group">
                    <GroupExpressions>
                      <GroupExpression>=Fields!Year.Value</GroupExpression>
                    </GroupExpressions>
                    <Filters>
                      <Filter>
                        <FilterExpression>=Fields!Year.Value</FilterExpression>
                        <Operator>Equal</Operator>
                        <FilterValues>
                          <FilterValue>=Parameters!FiscalYear.Value(0)</FilterValue>
                        </FilterValues>
                      </Filter>
                    </Filters>
                  </Group>
                  <SortExpressions>
                    <SortExpression>
                      <Value>=Fields!Year.Value</Value>
                    </SortExpression>
                  </SortExpressions>
                  <TablixMembers>
                    <TablixMember>
                      <TablixHeader>
                        <Size>0.25in</Size>
                        <CellContents>
                          <Textbox Name="Group12">
                            <CanGrow>true</CanGrow>
                            <KeepTogether>true</KeepTogether>
                            <Paragraphs>
                              <Paragraph>
                                <TextRuns>
                                  <TextRun>
                                    <Value>=Fields!Year.Value</Value>
                                    <Style>
                                      <FontWeight>Bold</FontWeight>
                                    </Style>
                                  </TextRun>
                                </TextRuns>
                                <Style>
                                  <TextAlign>Center</TextAlign>
                                </Style>
                              </Paragraph>
                            </Paragraphs>
                            <rd:DefaultName>Group12</rd:DefaultName>
                            <Style>
                              <Border>
                                <Style>Solid</Style>
                              </Border>
                              <PaddingLeft>2pt</PaddingLeft>
                              <PaddingRight>2pt</PaddingRight>
                              <PaddingTop>2pt</PaddingTop>
                              <PaddingBottom>2pt</PaddingBottom>
                            </Style>
                          </Textbox>
                        </CellContents>
                      </TablixHeader>
                      <TablixMembers>
                        <TablixMember />
                      </TablixMembers>
                    </TablixMember>
                  </TablixMembers>
                  <Visibility>
                    <Hidden>true</Hidden>
                  </Visibility>
                </TablixMember>
                <TablixMember>
                  <TablixHeader>
                    <Size>0.25in</Size>
                    <CellContents>
                      <Textbox Name="Textbox148">
                        <CanGrow>true</CanGrow>
                        <KeepTogether>true</KeepTogether>
                        <Paragraphs>
                          <Paragraph>
                            <TextRuns>
                              <TextRun>
                                <Value>="% Change from " &amp; Parameters!FiscalYear.Value(0)</Value>
                                <Style>
                                  <FontWeight>Bold</FontWeight>
                                </Style>
                              </TextRun>
                            </TextRuns>
                            <Style>
                              <TextAlign>Center</TextAlign>
                            </Style>
                          </Paragraph>
                        </Paragraphs>
                        <rd:DefaultName>Textbox148</rd:DefaultName>
                        <Style>
                          <Border>
                            <Style>Solid</Style>
                          </Border>
                          <PaddingLeft>2pt</PaddingLeft>
                          <PaddingRight>2pt</PaddingRight>
                          <PaddingTop>2pt</PaddingTop>
                          <PaddingBottom>2pt</PaddingBottom>
                        </Style>
                      </Textbox>
                    </CellContents>
                  </TablixHeader>
                  <TablixMembers>
                    <TablixMember />
                  </TablixMembers>
                </TablixMember>
              </TablixMembers>
            </TablixColumnHierarchy>
            <TablixRowHierarchy>
              <TablixMembers>
                <TablixMember>
                  <TablixMembers>
                    <TablixMember>
                      <TablixMembers>
                        <TablixMember>
                          <Group Name="EmissionTypeRowGroup">
                            <GroupExpressions>
                              <GroupExpression>=Fields!emission_type_name.Value</GroupExpression>
                              <GroupExpression>=Fields!usage_type_name.Value</GroupExpression>
                            </GroupExpressions>
                            <Filters>
                              <Filter>
                                <FilterExpression>=Fields!usage_type_name.Value</FilterExpression>
                                <Operator>NotEqual</Operator>
                                <FilterValues>
                                  <FilterValue>Green Purchase Power</FilterValue>
                                </FilterValues>
                              </Filter>
                            </Filters>
                          </Group>
                          <SortExpressions>
                            <SortExpression>
                              <Value>=Fields!emission_type_name.Value="Onsite Fuel"</Value>
                              <Direction>Descending</Direction>
                            </SortExpression>
                            <SortExpression>
                              <Value>=Fields!emission_type_name.Value="Transport Fuel"</Value>
                              <Direction>Descending</Direction>
                            </SortExpression>
                            <SortExpression>
                              <Value>=Fields!emission_type_name.Value="Refrigerants"</Value>
                              <Direction>Descending</Direction>
                            </SortExpression>
                            <SortExpression>
                              <Value>=Fields!emission_type_name.Value="Mobile Refrigerants"</Value>
                              <Direction>Descending</Direction>
                            </SortExpression>
                            <SortExpression>
                              <Value>=Fields!emission_type_name.Value="Purchased Energy"</Value>
                              <Direction>Descending</Direction>
                            </SortExpression>
                            <SortExpression>
                              <Value>=Fields!emission_type_name.Value="Business Air Travel"</Value>
                              <Direction>Descending</Direction>
                            </SortExpression>
                          </SortExpressions>
                          <TablixHeader>
                            <Size>1.71354in</Size>
                            <CellContents>
                              <Textbox Name="business_unit2">
                                <CanGrow>true</CanGrow>
                                <KeepTogether>true</KeepTogether>
                                <Paragraphs>
                                  <Paragraph>
                                    <TextRuns>
                                      <TextRun>
                                        <Value>=Fields!emission_type_name.Value</Value>
                                        <Style>
                                          <FontWeight>Bold</FontWeight>
                                          <Color>White</Color>
                                        </Style>
                                      </TextRun>
                                    </TextRuns>
                                    <Style />
                                  </Paragraph>
                                </Paragraphs>
                                <rd:DefaultName>business_unit</rd:DefaultName>
                                <Style>
                                  <Border>
                                    <Style>Solid</Style>
                                  </Border>
                                  <BackgroundColor>#5899d2</BackgroundColor>
                                  <PaddingLeft>2pt</PaddingLeft>
                                  <PaddingRight>2pt</PaddingRight>
                                  <PaddingTop>2pt</PaddingTop>
                                  <PaddingBottom>2pt</PaddingBottom>
                                </Style>
                              </Textbox>
                            </CellContents>
                          </TablixHeader>
                          <TablixMembers>
                            <TablixMember />
                          </TablixMembers>
                        </TablixMember>
                        <TablixMember>
                          <TablixHeader>
                            <Size>1.71354in</Size>
                            <CellContents>
                              <Textbox Name="Textbox2">
                                <CanGrow>true</CanGrow>
                                <KeepTogether>true</KeepTogether>
                                <Paragraphs>
                                  <Paragraph>
                                    <TextRuns>
                                      <TextRun>
                                        <Value>Total</Value>
                                        <Style>
                                          <FontWeight>Bold</FontWeight>
                                          <Color>White</Color>
                                        </Style>
                                      </TextRun>
                                    </TextRuns>
                                    <Style />
                                  </Paragraph>
                                </Paragraphs>
                                <rd:DefaultName>Textbox2</rd:DefaultName>
                                <Style>
                                  <Border>
                                    <Style>Solid</Style>
                                  </Border>
                                  <BackgroundColor>#5899d2</BackgroundColor>
                                  <PaddingLeft>2pt</PaddingLeft>
                                  <PaddingRight>2pt</PaddingRight>
                                  <PaddingTop>2pt</PaddingTop>
                                  <PaddingBottom>2pt</PaddingBottom>
                                </Style>
                              </Textbox>
                            </CellContents>
                          </TablixHeader>
                          <KeepWithGroup>Before</KeepWithGroup>
                        </TablixMember>
                      </TablixMembers>
                    </TablixMember>
                  </TablixMembers>
                </TablixMember>
                <TablixMember>
                  <Group Name="GreenPowerRowGroup">
                    <GroupExpressions>
                      <GroupExpression>=Fields!usage_type_name.Value</GroupExpression>
                    </GroupExpressions>
                    <Filters>
                      <Filter>
                        <FilterExpression>=Fields!usage_type_name.Value</FilterExpression>
                        <Operator>Equal</Operator>
                        <FilterValues>
                          <FilterValue>Green Purchase Power</FilterValue>
                        </FilterValues>
                      </Filter>
                    </Filters>
                  </Group>
                  <SortExpressions>
                    <SortExpression>
                      <Value>=Fields!emission_type_name.Value</Value>
                    </SortExpression>
                  </SortExpressions>
                  <TablixHeader>
                    <Size>1.71354in</Size>
                    <CellContents>
                      <Textbox Name="Textbox64">
                        <CanGrow>true</CanGrow>
                        <KeepTogether>true</KeepTogether>
                        <Paragraphs>
                          <Paragraph>
                            <TextRuns>
                              <TextRun>
                                <Value>Green Purchase Power</Value>
                                <Style>
                                  <FontWeight>Bold</FontWeight>
                                  <Color>White</Color>
                                </Style>
                              </TextRun>
                            </TextRuns>
                            <Style />
                          </Paragraph>
                        </Paragraphs>
                        <rd:DefaultName>Textbox64</rd:DefaultName>
                        <Style>
                          <Border>
                            <Style>Solid</Style>
                          </Border>
                          <BackgroundColor>#5899d2</BackgroundColor>
                          <PaddingLeft>2pt</PaddingLeft>
                          <PaddingRight>2pt</PaddingRight>
                          <PaddingTop>2pt</PaddingTop>
                          <PaddingBottom>2pt</PaddingBottom>
                        </Style>
                      </Textbox>
                    </CellContents>
                  </TablixHeader>
                </TablixMember>
                <TablixMember>
                  <TablixHeader>
                    <Size>1.71354in</Size>
                    <CellContents>
                      <Textbox Name="Textbox99">
                        <CanGrow>true</CanGrow>
                        <KeepTogether>true</KeepTogether>
                        <Paragraphs>
                          <Paragraph>
                            <TextRuns>
                              <TextRun>
                                <Value>Total (Adjusted for Green Purchase Power)</Value>
                                <Style>
                                  <FontWeight>Bold</FontWeight>
                                  <Color>White</Color>
                                </Style>
                              </TextRun>
                            </TextRuns>
                            <Style />
                          </Paragraph>
                        </Paragraphs>
                        <rd:DefaultName>Textbox99</rd:DefaultName>
                        <Style>
                          <Border>
                            <Style>Solid</Style>
                          </Border>
                          <BackgroundColor>#5899d2</BackgroundColor>
                          <PaddingLeft>2pt</PaddingLeft>
                          <PaddingRight>2pt</PaddingRight>
                          <PaddingTop>2pt</PaddingTop>
                          <PaddingBottom>2pt</PaddingBottom>
                        </Style>
                      </Textbox>
                    </CellContents>
                  </TablixHeader>
                </TablixMember>
              </TablixMembers>
            </TablixRowHierarchy>
            <DataSetName>CarbonFootprintEmissionsDataSet</DataSetName>
            <Top>1.78833in</Top>
            <Left>0.64395in</Left>
            <Height>1.28125in</Height>
            <Width>4.84375in</Width>
            <Style>
              <Border>
                <Style>None</Style>
              </Border>
              <Format>###,###,###</Format>
            </Style>
          </Tablix>
        </ReportItems>
        <Height>7.89958in</Height>
        <Style />
      </Body>
      <ReportParameters>
        <ReportParameter Name="ClientID">
          <DataType>String</DataType>
          <Prompt>Client Name:</Prompt>
          <ValidValues>
            <DataSetReference>
              <DataSetName>ClientLookupDataSet</DataSetName>
              <ValueField>client_id</ValueField>
              <LabelField>client_name</LabelField>
            </DataSetReference>
          </ValidValues>
        </ReportParameter>
        <ReportParameter Name="toUnit">
          <DataType>String</DataType>
          <DefaultValue>
            <Values>
              <Value>tons CO2e</Value>
            </Values>
          </DefaultValue>
          <Prompt>Usage Unit:</Prompt>
          <ValidValues>
            <DataSetReference>
              <DataSetName>EmissionUnitLookupDataSet</DataSetName>
              <ValueField>emission_to_unit</ValueField>
              <LabelField>emission_to_unit</LabelField>
            </DataSetReference>
          </ValidValues>
        </ReportParameter>
        <ReportParameter Name="FiscalYear">
          <DataType>Integer</DataType>
          <DefaultValue>
            <DataSetReference>
              <DataSetName>FiscalYear</DataSetName>
              <ValueField>fiscal_year</ValueField>
            </DataSetReference>
          </DefaultValue>
          <Prompt>Fiscal Year:</Prompt>
          <ValidValues>
            <DataSetReference>
              <DataSetName>FiscalYear</DataSetName>
              <ValueField>fiscal_year</ValueField>
              <LabelField>fiscal_year</LabelField>
            </DataSetReference>
          </ValidValues>
          <MultiValue>true</MultiValue>
        </ReportParameter>
        <ReportParameter Name="GroupBy">
          <DataType>String</DataType>
          <Prompt>Group By:</Prompt>
          <ValidValues>
            <ParameterValues>
              <ParameterValue>
                <Value>Client</Value>
                <Label>Client</Label>
              </ParameterValue>
              <ParameterValue>
                <Value>Segment</Value>
                <Label>Segment</Label>
              </ParameterValue>
              <ParameterValue>
                <Value>BU</Value>
                <Label>Business Unit</Label>
              </ParameterValue>
              <ParameterValue>
                <Value>Division</Value>
                <Label>Division</Label>
              </ParameterValue>
              <ParameterValue>
                <Value>Sub_Division</Value>
                <Label>Sub Division</Label>
              </ParameterValue>
              <ParameterValue>
                <Value>Location</Value>
                <Label>Location</Label>
              </ParameterValue>
              <ParameterValue>
                <Value>Country</Value>
                <Label>Country</Label>
              </ParameterValue>
            </ParameterValues>
          </ValidValues>
        </ReportParameter>
        <ReportParameter Name="BusinessUnit">
          <DataType>String</DataType>
          <DefaultValue>
            <DataSetReference>
              <DataSetName>BUListDataSet</DataSetName>
              <ValueField>business_unit_name</ValueField>
            </DataSetReference>
          </DefaultValue>
          <Prompt>Filter by BU:</Prompt>
          <ValidValues>
            <DataSetReference>
              <DataSetName>BUListDataSet</DataSetName>
              <ValueField>business_unit_name</ValueField>
              <LabelField>business_unit_name</LabelField>
            </DataSetReference>
          </ValidValues>
          <MultiValue>true</MultiValue>
        </ReportParameter>
        <ReportParameter Name="EmissionType">
          <DataType>String</DataType>
          <DefaultValue>
            <DataSetReference>
              <DataSetName>EmissionTypeLookupDataSet</DataSetName>
              <ValueField>emission_type_id</ValueField>
            </DataSetReference>
          </DefaultValue>
          <Prompt>Filter by Emission Type:</Prompt>
          <ValidValues>
            <DataSetReference>
              <DataSetName>EmissionTypeLookupDataSet</DataSetName>
              <ValueField>emission_type_id</ValueField>
              <LabelField>emission_type_name</LabelField>
            </DataSetReference>
          </ValidValues>
          <MultiValue>true</MultiValue>
        </ReportParameter>
        <ReportParameter Name="Scope">
          <DataType>Integer</DataType>
          <DefaultValue>
            <Values>
              <Value>1</Value>
              <Value>2</Value>
              <Value>3</Value>
            </Values>
          </DefaultValue>
          <Prompt>Filter by Scope:</Prompt>
          <ValidValues>
            <ParameterValues>
              <ParameterValue>
                <Value>1</Value>
                <Label>1</Label>
              </ParameterValue>
              <ParameterValue>
                <Value>2</Value>
                <Label>2</Label>
              </ParameterValue>
              <ParameterValue>
                <Value>3</Value>
                <Label>3</Label>
              </ParameterValue>
            </ParameterValues>
          </ValidValues>
          <MultiValue>true</MultiValue>
        </ReportParameter>
        <ReportParameter Name="AnnexB">
          <DataType>String</DataType>
          <DefaultValue>
            <Values>
              <Value>0</Value>
            </Values>
          </DefaultValue>
          <Prompt>Only Include Annex B Countries (Group by Country Only):</Prompt>
          <ValidValues>
            <ParameterValues>
              <ParameterValue>
                <Value>1</Value>
                <Label>Yes</Label>
              </ParameterValue>
              <ParameterValue>
                <Value>0</Value>
                <Label>No</Label>
              </ParameterValue>
            </ParameterValues>
          </ValidValues>
        </ReportParameter>
      </ReportParameters>
      <Code>Public Function CalcRatio(ByVal Numerator As Object, ByVal Denominator As object) As Object
     
     
     
       If Denominator &lt;&gt; 0 Then
            Return Numerator/Denominator
      Else
          Return 0
       End If
    End Function
     
     
     
     
     
     
     
     
    </Code>
      <Width>11.77937in</Width>
      <Page>
        <LeftMargin>0.5in</LeftMargin>
        <RightMargin>0.5in</RightMargin>
        <TopMargin>0.5in</TopMargin>
        <BottomMargin>0.5in</BottomMargin>
        <Style />
      </Page>
      <Language>en-US</Language>
      <ConsumeContainerWhitespace>true</ConsumeContainerWhitespace>
      <rd:ReportID>a4fa6d5f-a7ed-4a6e-bd14-c9adbfcc6f29</rd:ReportID>
      <rd:ReportUnitType>Inch</rd:ReportUnitType>
    </Report>
    
                                                  
    1:
    2:
    3:
    4:
    5:
    6:
    7:
    8:
    9:
    10:
    11:
    12:
    13:
    14:
    15:
    16:
    17:
    18:
    19:
    20:
    21:
    22:
    23:
    24:
    25:
    26:
    27:
    28:
    29:
    30:
    31:
    32:
    33:
    34:
    35:
    36:
    37:
    38:
    39:
    40:
    41:
    42:
    43:
    44:
    45:
    46:
    47:
    48:
    49:
    50:
    51:
    52:
    53:
    54:
    55:
    56:
    57:
    58:
    59:
    60:
    61:
    62:
    63:
    64:
    65:
    66:
    67:
    68:
    69:
    70:
    71:
    72:
    73:
    74:
    75:
    76:
    77:
    78:
    79:
    80:
    81:
    82:
    83:
    84:
    85:
    86:
    87:
    88:
    89:
    90:
    91:
    92:
    93:
    94:
    95:
    96:
    97:
    98:
    99:
    100:
    101:
    102:
    103:
    104:
    105:
    106:
    107:
    108:
    109:
    110:
    111:
    112:
    113:
    114:
    115:
    116:
    117:
    118:
    119:
    120:
    121:
    122:
    123:
    124:
    125:
    126:
    127:
    128:
    129:
    130:
    131:
    132:
    133:
    134:
    135:
    136:
    137:
    138:
    139:
    140:
    141:
    142:
    143:
    144:
    145:
    146:
    147:
    148:
    149:
    150:
    151:
    152:
    153:
    154:
    155:
    156:
    157:
    158:
    159:
    160:
    161:
    162:
    163:
    164:
    165:
    166:
    167:
    168:
    169:
    170:
    171:
    172:
    173:
    174:
    175:
    176:
    177:
    178:
    179:
    180:
    181:
    182:
    183:
    184:
    185:
    186:
    187:
    188:
    189:
    190:
    191:
    192:
    193:
    194:
    195:
    196:
    197:
    198:
    199:
    200:
    201:
    202:
    203:
    204:
    205:
    206:
    207:
    208:
    209:
    210:
    211:
    212:
    213:
    214:
    215:
    216:
    217:
    218:
    219:
    220:
    221:
    222:
    223:
    224:
    225:
    226:
    227:
    228:
    229:
    230:
    231:
    232:
    233:
    234:
    235:
    236:
    237:
    238:
    239:
    240:
    241:
    242:
    243:
    244:
    245:
    246:
    247:
    248:
    249:
    250:
    251:
    252:
    253:
    254:
    255:
    256:
    257:
    258:
    259:
    260:
    261:
    262:
    263:
    264:
    265:
    266:
    267:
    268:
    269:
    270:
    271:
    272:
    273:
    274:
    275:
    276:
    277:
    278:
    279:
    280:
    281:
    282:
    283:
    284:
    285:
    286:
    287:
    288:
    289:
    290:
    291:
    292:
    293:
    294:
    295:
    296:
    297:
    298:
    299:
    300:
    301:
    302:
    303:
    304:
    305:
    306:
    307:
    308:
    309:
    310:
    311:
    312:
    313:
    314:
    315:
    316:
    317:
    318:
    319:
    320:
    321:
    322:
    323:
    324:
    325:
    326:
    327:
    328:
    329:
    330:
    331:
    332:
    333:
    334:
    335:
    336:
    337:
    338:
    339:
    340:
    341:
    342:
    343:
    344:
    345:
    346:
    347:
    348:
    349:
    350:
    351:
    352:
    353:
    354:
    355:
    356:
    357:
    358:
    359:
    360:
    361:
    362:
    363:
    364:
    365:
    366:
    367:
    368:
    369:
    370:
    371:
    372:
    373:
    374:
    375:
    376:
    377:
    378:
    379:
    380:
    381:
    382:
    383:
    384:
    385:
    386:
    387:
    388:
    389:
    390:
    391:
    392:
    393:
    394:
    395:
    396:
    397:
    398:
    399:
    400:
    401:
    402:
    403:
    404:
    405:
    406:
    407:
    408:
    409:
    410:
    411:
    412:
    413:
    414:
    415:
    416:
    417:
    418:
    419:
    420:
    421:
    422:
    423:
    424:
    425:
    426:
    427:
    428:
    429:
    430:
    431:
    432:
    433:
    434:
    435:
    436:
    437:
    438:
    439:
    440:
    441:
    442:
    443:
    444:
    445:
    446:
    447:
    448:
    449:
    450:
    451:
    452:
    453:
    454:
    455:
    456:
    457:
    458:
    459:
    460:
    461:
    462:
    463:
    464:
    465:
    466:
    467:
    468:
    469:
    470:
    471:
    472:
    473:
    474:
    475:
    476:
    477:
    478:
    479:
    480:
    481:
    482:
    483:
    484:
    485:
    486:
    487:
    488:
    489:
    490:
    491:
    492:
    493:
    494:
    495:
    496:
    497:
    498:
    499:
    500:
    501:
    502:
    503:
    504:
    505:
    506:
    507:
    508:
    509:
    510:
    511:
    512:
    513:
    514:
    515:
    516:
    517:
    518:
    519:
    520:
    521:
    522:
    523:
    524:
    525:
    526:
    527:
    528:
    529:
    530:
    531:
    532:
    533:
    534:
    535:
    536:
    537:
    538:
    539:
    540:
    541:
    542:
    543:
    544:
    545:
    546:
    547:
    548:
    549:
    550:
    551:
    552:
    553:
    554:
    555:
    556:
    557:
    558:
    559:
    560:
    561:
    562:
    563:
    564:
    565:
    566:
    567:
    568:
    569:
    570:
    571:
    572:
    573:
    574:
    575:
    576:
    577:
    578:
    579:
    580:
    581:
    582:
    583:
    584:
    585:
    586:
    587:
    588:
    589:
    590:
    591:
    592:
    593:
    594:
    595:
    596:
    597:
    598:
    599:
    600:
    601:
    602:
    603:
    604:
    605:
    606:
    607:
    608:
    609:
    610:
    611:
    612:
    613:
    614:
    615:
    616:
    617:
    618:
    619:
    620:
    621:
    622:
    623:
    624:
    625:
    626:
    627:
    628:
    629:
    630:
    631:
    632:
    633:
    634:
    635:
    636:
    637:
    638:
    639:
    640:
    641:
    642:
    643:
    644:
    645:
    646:
    647:
    648:
    649:
    650:
    651:
    652:
    653:
    654:
    655:
    656:
    657:
    658:
    659:
    660:
    661:
    662:
    663:
    664:
    665:
    666:
    667:
    668:
    669:
    670:
    671:
    672:
    673:
    674:
    675:
    676:
    677:
    678:
    679:
    680:
    681:
    682:
    683:
    684:
    685:
    686:
    687:
    688:
    689:
    690:
    691:
    692:
    693:
    694:
    695:
    696:
    697:
    698:
    699:
    700:
    701:
    702:
    703:
    704:
    705:
    706:
    707:
    708:
    709:
    710:
    711:
    712:
    713:
    714:
    715:
    716:
    717:
    718:
    719:
    720:
    721:
    722:
    723:
    724:
    725:
    726:
    727:
    728:
    729:
    730:
    731:
    732:
    733:
    734:
    735:
    736:
    737:
    738:
    739:
    740:
    741:
    742:
    743:
    744:
    745:
    746:
    747:
    748:
    749:
    750:
    751:
    752:
    753:
    754:
    755:
    756:
    757:
    758:
    759:
    760:
    761:
    762:
    763:
    764:
    765:
    766:
    767:
    768:
    769:
    770:
    771:
    772:
    773:
    774:
    775:
    776:
    777:
    778:
    779:
    780:
    781:
    782:
    783:
    784:
    785:
    786:
    787:
    788:
    789:
    790:
    791:
    792:
    793:
    794:
    795:
    796:
    797:
    798:
    799:
    800:
    801:
    802:
    803:
    804:
    805:
    806:
    807:
    808:
    809:
    810:
    811:
    812:
    813:
    814:
    815:
    816:
    817:
    818:
    819:
    820:
    821:
    822:
    823:
    824:
    825:
    826:
    827:
    828:
    829:
    830:
    831:
    832:
    833:
    834:
    835:
    836:
    837:
    838:
    839:
    840:
    841:
    842:
    843:
    844:
    845:
    846:
    847:
    848:
    849:
    850:
    851:
    852:
    853:
    854:
    855:
    856:
    857:
    858:
    859:
    860:
    861:
    862:
    863:
    864:
    865:
    866:
    867:
    868:
    869:
    870:
    871:
    872:
    873:
    874:
    875:
    876:
    877:
    878:
    879:
    880:
    881:
    882:
    883:
    884:
    885:
    886:
    887:
    888:
    889:
    890:
    891:
    892:
    893:
    894:
    895:
    896:
    897:
    898:
    899:
    900:
    901:
    902:
    903:
    904:
    905:
    906:
    907:
    908:
    909:
    910:
    911:
    912:
    913:
    914:
    915:
    916:
    917:
    918:
    919:
    920:
    921:
    922:
    923:
    924:
    925:
    926:
    927:
    928:
    929:
    930:
    931:
    932:
    933:
    934:
    935:
    936:
    937:
    938:
    939:
    940:
    941:
    942:
    943:
    944:
    945:
    946:
    947:
    948:
    949:
    950:
    951:
    952:
    953:
    954:
    955:
    956:
    957:
    958:
    959:
    960:
    961:
    962:
    963:
    964:
    965:
    966:
    967:
    968:
    969:
    970:
    971:
    972:
    973:
    974:
    975:
    976:
    977:
    978:
    979:
    980:
    981:
    982:
    983:
    984:
    985:
    986:
    987:
    988:
    989:
    990:
    991:
    992:
    993:
    994:
    995:
    996:
    997:
    998:
    999:
    1000:
    1001:
    1002:
    1003:
    1004:
    1005:
    1006:
    1007:
    1008:
    1009:
    1010:
    1011:
    1012:
    1013:
    1014:
    1015:
    1016:
    1017:
    1018:
    1019:
    1020:
    1021:
    1022:
    1023:
    1024:
    1025:
    1026:
    1027:
    1028:
    1029:
    1030:
    1031:
    1032:
    1033:
    1034:
    1035:
    1036:
    1037:
    1038:
    1039:
    1040:
    1041:
    1042:
    1043:
    1044:
    1045:
    1046:
    1047:
    1048:
    1049:
    1050:
    1051:
    1052:
    1053:
    1054:
    1055:
    1056:
    1057:
    1058:
    1059:
    1060:
    1061:
    1062:
    1063:
    1064:
    1065:
    1066:
    1067:
    1068:
    1069:
    1070:
    1071:
    1072:
    1073:
    1074:
    1075:
    1076:
    1077:
    1078:
    1079:
    1080:
    1081:
    1082:
    1083:
    1084:
    1085:
    1086:
    1087:
    1088:
    1089:
    1090:
    1091:
    1092:
    1093:
    1094:
    1095:
    1096:
    1097:
    1098:
    1099:
    1100:
    1101:
    1102:
    1103:
    1104:
    1105:
    1106:
    1107:
    1108:
    1109:
    1110:
    1111:
    1112:
    1113:
    1114:
    1115:
    1116:
    1117:
    1118:
    1119:
    1120:
    1121:
    1122:
    1123:
    1124:
    1125:
    1126:
    1127:
    1128:
    1129:
    1130:
    1131:
    1132:
    1133:
    1134:
    1135:
    1136:
    1137:
    1138:
    1139:
    1140:
    1141:
    1142:
    1143:
    1144:
    1145:
    1146:
    1147:
    1148:
    1149:
    1150:
    1151:
    1152:
    1153:
    1154:
    1155:
    1156:
    1157:
    1158:
    1159:
    1160:
    1161:
    1162:
    1163:
    1164:
    1165:
    1166:
    1167:
    1168:
    1169:
    1170:
    1171:
    1172:
    1173:
    1174:
    1175:
    1176:
    1177:
    1178:
    1179:
    1180:
    1181:
    1182:
    1183:
    1184:
    1185:
    1186:
    1187:
    1188:
    1189:
    1190:
    1191:
    1192:
    1193:
    1194:
    1195:
    1196:
    1197:
    1198:
    1199:
    1200:
    1201:
    1202:
    1203:
    1204:
    1205:
    1206:
    1207:
    1208:
    1209:
    1210:
    1211:
    1212:
    1213:
    1214:
    1215:
    1216:
    1217:
    1218:
    1219:
    1220:
    1221:
    1222:
    1223:
    1224:
    1225:
    1226:
    1227:
    1228:
    1229:
    1230:
    1231:
    1232:
    1233:
    1234:
    1235:
    1236:
    1237:
    1238:
    1239:
    1240:
    1241:
    1242:
    1243:
    1244:
    1245:
    1246:
    1247:
    1248:
    1249:
    1250:
    1251:
    1252:
    1253:
    1254:
    1255:
    1256:
    1257:
    1258:
    1259:
    1260:
    1261:
    1262:
    1263:
    1264:
    1265:
    1266:
    1267:
    1268:
    1269:
    1270:
    1271:
    1272:
    1273:
    1274:
    1275:
    1276:
    1277:
    1278:
    1279:
    1280:
    1281:
    1282:
    1283:
    1284:
    1285:
    1286:
    1287:
    1288:
    1289:
    1290:
    1291:
    

    Select allOpen in new window

     

    by: rsoberPosted on 2009-06-02 at 14:25:03ID: 24531717

    I changed the code as you did, but I get an error.  I replaced referencing the field value when the expression is true with 1 and the value it displayed was 2.  This seems strange.  It is finding two records since the sum is equal to 2.  I am not sure where this is coming from.  The first row group, EmissionTypeRowgroup has 5 lines.  

    I am not sure why I am having problems, but it worked for you.  When you select Add Total for a row group, why doesn't it add the total for that group?  It seems to be misleading.

     

    by: CGLuttrellPosted on 2009-06-02 at 16:31:21ID: 24532373

    Yes, it would be nice if it would apply the filter logic you had on a row group to the sum formula it puts in the total for that group automatically.  I guess it could be very complicated and too hard to automate.

    As to why you got a 2 when you put the hardcoded 1 in place of the value, that should have counted the number of detail records that you had, that is what it did for me.  In my test report I changed
    =Sum(IIF(Fields!SubGroup.Value <> "SG0",Fields!COGS.Value,0))
    to
    =Sum(IIF(Fields!SubGroup.Value <> "SG0",1,0))
    and got 876 which is the count of detail records that matches my <> "SG0" check.

    Did you try just reading back in the RDL I sent back?  Put it in another file name to not lose your original.  What are we doing different?

     

    by: rsoberPosted on 2009-06-03 at 06:59:11ID: 24536586

    I was able to get it to work, but only after I converted Fields.Total_emissions_CO2e.Value to an integer even though it already is a decimal.  If I try and convert it to a decimal, it returns an error.  Integer doesn't work because I want to round after it sums the records.  When I convert it to an integer first, the total sum does not equal the detail rows in the group because of the rounding difference.  


    =Sum(IIF(Fields!usage_type_name.Value <> "Green Purchase Power",CInt(Fields!Total_Emissions_CO2e.Value),0))

     

    by: CGLuttrellPosted on 2009-06-03 at 07:27:26ID: 24536923

    What is the datatype of Total_Emissions_CO2e naturally?  Mine was money. Maybe that is the difference.

     

    by: rsoberPosted on 2009-06-03 at 08:09:06ID: 24537399

    decimal.

     

    by: CGLuttrellPosted on 2009-06-03 at 08:43:50ID: 24537831

    sorry, back at the computer now and my data was int not money so changing it to decimals I did get an error.  It is becasue the default 0 in the Total statement is INT and conflicts with the Decmimal, so changing the statements to
    =Sum(IIF(Fields!usage_type_name.Value <> "Green Purchase Power",Fields!Total_Emissions_CO2e.Value,0.0))
    should not require Cint or loose your decimal values.

     

    by: rsoberPosted on 2009-06-03 at 09:02:36ID: 24538040

    that didn't do it, but if I convert convert the 0.0 to decimal  "CDec(0.0)"  it worked which is OK.

    thanks for your help.  I really appreciated it.

     

    by: CGLuttrellPosted on 2009-06-03 at 09:39:33ID: 24538402

    np, sorry it was being so picky about types.

     

    by: rsoberPosted on 2009-06-03 at 11:10:24ID: 31587590

    You need to convert the 0.0 to decimal

    20120131-EE-VQP-002

    3 Ways to Join

    30-Day Free Trial

    The Experts

    98% positive feedback on 31,087 answers since March 2000. angeliii is a Microsoft Most Valuable Professional for his work with MS SQL Server & Develoment.

    He has also proven his knowledge of Visual Basic Programming, PHP Scripting and Oracle Databases.

    The Experts

    97% positive feedback on 10,752 answers since July 2000. lrmoore has more than 18 years experience in the networking industry.

    The six-time Mircosoft MVPs specialties include firewalls, virtual private networking, and network management.

    Testimonials

    "...and excellent source for support... Kind of like having your very own IT dept." Electriciansnet

    Testimonials

    "I was apprehensive at signing up at first. However... it has already made my life as an IT administrator much easier." JaCrews

    Testimonials

    "WOW! You guys have great, active, and knowledgeable people on here." moore50

    Business Clients

    Business Clients

    In the Press

    "If you’ve got a question... Experts Exchange can supply an answer.”

    In the Press

    "...an invaluable aid for both IT professionals and those who require tech support."

    In the Press

    "where IT professionals provide quick answers on just about any topic"

    Business Account Plans

    Loading Advertisement...