Showing posts with label expression. Show all posts
Showing posts with label expression. Show all posts

Friday, March 23, 2012

RS2005- Pie Chart Percentages and Filter

I have a pie chart with the following filter expression:
=Parameters!Year.Value
The point labels for the pie chart are determined from the following
expression:
=sum(Fields!Expr1.Value)/sum(Fields!Expr1.Value, "SalesDM")
My problem is that the above calulation for percentage is incorrect for the
filtered dataset; the percentage is of the whole dataset. How do I get the
percentage to honor the filter?Hi,
welcome to the MSDN newsgroup.
From your description, I understand you're using the SSRS 2005 to create
some reports, and when using the Pie chart together with some filters on
the data, you found the pie chart always display the value from unfiltered
data, correct?
Based on my local testing, this is likely a project or environment specific
issue. I've tested a Pie chart report with filters setting in both Chart
region and in Dataset and both of them work. Are you using the filters in
chart region or in dataset? Or have you tried other report or datasource to
see whether this is a datasource specific issue.
Please feel free to let me know if there's anything I missed.
Regards,
Steven Cheng
Microsoft Online Community Support
==================================================
When responding to posts, please "Reply to Group" via your newsreader so
that others may
learn and benefit from your issue.
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.|||Thank you for responding, Steven.
My dataset, SalesDM, returns data for several categories over two years.
There are no filters on the dataset. The dataset is used for a table, and is
unfiltered- it returns results as expected. I then use the dataset for a pie
chart. I set up a chart filter for one year's worth of data from the
dataset.- it properly returns results. When I calculate the point labels for
the pie chart, I use the expression in my original post. That calculation
does not take into account the filter applied to the chart.
I'm guessing that I need to reformulate my expression, but I don't know what
the proper formulation should be.
"Steven Cheng[MSFT]" wrote:
> Hi,
> welcome to the MSDN newsgroup.
> From your description, I understand you're using the SSRS 2005 to create
> some reports, and when using the Pie chart together with some filters on
> the data, you found the pie chart always display the value from unfiltered
> data, correct?
> Based on my local testing, this is likely a project or environment specific
> issue. I've tested a Pie chart report with filters setting in both Chart
> region and in Dataset and both of them work. Are you using the filters in
> chart region or in dataset? Or have you tried other report or datasource to
> see whether this is a datasource specific issue.
> Please feel free to let me know if there's anything I missed.
>
> Regards,
> Steven Cheng
> Microsoft Online Community Support
>
> ==================================================> When responding to posts, please "Reply to Group" via your newsreader so
> that others may
> learn and benefit from your issue.
> ==================================================>
> This posting is provided "AS IS" with no warranties, and confers no rights.
>|||Thanks for your response.
Yes, I agree with you that the problem is specific to the Point Label's
data expression. And I think the problem is likely due to the denominator
in your expression.
the "sum(Fields!Expr1.Value)" will return the current item's sum value on
Expr1 field. However, as for the "sum(Fields!Expr1.Value, "SalesDM")", I'm
not sure what is "SalesDM" exactly, but I guess it is the Dataset's
name(which is bound to your chart), correct? If so, this will cause the
data be retrieved directly from DataSet which is not filtered by the filter
you defined in chart. If this is the case, you can consider specific the
Chart's name in the sum expression. e.g:
sum(Fields!Expr1.Value, "PieChart1")
this will make the data be retrieved from the chart's dataregion which is
filled by the chart's filters. Or alternatively, you can also define
another dataset which use the same filters like your chart control and make
the sum expression specified that dataset as the scope value.
Hope this helps,
Regards,
Steven Cheng
Microsoft Online Community Support
==================================================
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.|||Thank you, Steven! Referencing the chart's dataregion is exactly the answer
I was looking for.
"Steven Cheng[MSFT]" wrote:
> Thanks for your response.
> Yes, I agree with you that the problem is specific to the Point Label's
> data expression. And I think the problem is likely due to the denominator
> in your expression.
> the "sum(Fields!Expr1.Value)" will return the current item's sum value on
> Expr1 field. However, as for the "sum(Fields!Expr1.Value, "SalesDM")", I'm
> not sure what is "SalesDM" exactly, but I guess it is the Dataset's
> name(which is bound to your chart), correct? If so, this will cause the
> data be retrieved directly from DataSet which is not filtered by the filter
> you defined in chart. If this is the case, you can consider specific the
> Chart's name in the sum expression. e.g:
> sum(Fields!Expr1.Value, "PieChart1")
> this will make the data be retrieved from the chart's dataregion which is
> filled by the chart's filters. Or alternatively, you can also define
> another dataset which use the same filters like your chart control and make
> the sum expression specified that dataset as the scope value.
> Hope this helps,
> Regards,
> Steven Cheng
> Microsoft Online Community Support
>
> ==================================================> When responding to posts, please "Reply to Group" via your newsreader so
> that others may learn and benefit from your issue.
> ==================================================>
> This posting is provided "AS IS" with no warranties, and confers no rights.
>|||You're welcome!
Also glad that we've got the problem resolved.
Have a good day!
Regards,
Steven Cheng
Microsoft Online Community Support
==================================================
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.

Tuesday, March 20, 2012

RS2000 Matrix, Percent of subtotal

Problem: Subtotal is not calculated correct in a Matrix expression.
Need some help with an expression in a matrix that should calculate percent
of subtotal for a measure.
The matrix look like this
Column_OrderYear
RowGroup1 | RowGroup2 | Sales
% Share
I want % Share to calculate as sales / subtotal on RowGroup1(per
Column_OrderYear). If I use RowGroup1 in the scope it summerize the subtotal
for all Column_Year (all years) on that row.
I have included a modified version of Company Sales.rdl that is included in
samples for RS2000. In this example, for the first group Component and Bottom
Bracket, % Share should be calculated as 37977.81 / 6778096.94. Instead its
calculated as 37977.81/11233756.04.
--
<?xml version="1.0" encoding="utf-8"?>
<Report
xmlns="http://schemas.microsoft.com/sqlserver/reporting/2003/10/reportdefinition"
xmlns:rd="http://schemas.microsoft.com/SQLServer/reporting/reportdesigner">
<rd:GridSpacing>0.0625in</rd:GridSpacing>
<RightMargin>0.5in</RightMargin>
<Body>
<ReportItems>
<Matrix Name="matrix1">
<Corner>
<ReportItems>
<Textbox Name="textbox2">
<Style>
<PaddingLeft>2pt</PaddingLeft>
<PaddingBottom>2pt</PaddingBottom>
<PaddingTop>2pt</PaddingTop>
<PaddingRight>2pt</PaddingRight>
</Style>
<ZIndex>13</ZIndex>
<rd:DefaultName>textbox2</rd:DefaultName>
<CanGrow>true</CanGrow>
<Value />
</Textbox>
</ReportItems>
</Corner>
<Height>5.73232cm</Height>
<ZIndex>1</ZIndex>
<Style />
<MatrixRows>
<MatrixRow>
<MatrixCells>
<MatrixCell>
<ReportItems>
<Textbox Name="Share">
<Style>
<PaddingLeft>2pt</PaddingLeft>
<BackgroundColor>White</BackgroundColor>
<TextAlign>Right</TextAlign>
<PaddingBottom>2pt</PaddingBottom>
<PaddingTop>2pt</PaddingTop>
<PaddingRight>2pt</PaddingRight>
</Style>
<ZIndex>8</ZIndex>
<CanGrow>true</CanGrow>
<Value>=sum(Fields!Sales.Value)</Value>
</Textbox>
</ReportItems>
</MatrixCell>
</MatrixCells>
<Height>0.68068cm</Height>
</MatrixRow>
<MatrixRow>
<MatrixCells>
<MatrixCell>
<ReportItems>
<Textbox Name="textbox9">
<Style>
<PaddingLeft>2pt</PaddingLeft>
<Format>P</Format>
<BackgroundColor>White</BackgroundColor>
<TextAlign>Right</TextAlign>
<PaddingBottom>2pt</PaddingBottom>
<PaddingTop>2pt</PaddingTop>
<PaddingRight>2pt</PaddingRight>
</Style>
<ZIndex>6</ZIndex>
<rd:DefaultName>textbox9</rd:DefaultName>
<CanGrow>true</CanGrow>
<Value>=sum(Fields!Sales.Value) /
sum(Fields!Sales.Value, "matrix1_ProdCat")</Value>
</Textbox>
</ReportItems>
</MatrixCell>
</MatrixCells>
<Height>0.54454cm</Height>
</MatrixRow>
<MatrixRow>
<MatrixCells>
<MatrixCell>
<ReportItems>
<Textbox Name="textbox12">
<Style>
<PaddingLeft>2pt</PaddingLeft>
<PaddingBottom>2pt</PaddingBottom>
<PaddingTop>2pt</PaddingTop>
<PaddingRight>2pt</PaddingRight>
</Style>
<ZIndex>4</ZIndex>
<rd:DefaultName>textbox12</rd:DefaultName>
<CanGrow>true</CanGrow>
<Value>=sum(Fields!Sales.Value, "matrix1_ProdCat")</Value>
</Textbox>
</ReportItems>
</MatrixCell>
</MatrixCells>
<Height>0.67072cm</Height>
</MatrixRow>
<MatrixRow>
<MatrixCells>
<MatrixCell>
<ReportItems>
<Textbox Name="textbox11">
<Style>
<PaddingLeft>2pt</PaddingLeft>
<BackgroundColor>White</BackgroundColor>
<TextAlign>Right</TextAlign>
<PaddingBottom>2pt</PaddingBottom>
<PaddingTop>2pt</PaddingTop>
<PaddingRight>2pt</PaddingRight>
</Style>
<ZIndex>2</ZIndex>
<rd:DefaultName>textbox11</rd:DefaultName>
<CanGrow>true</CanGrow>
<Value>=sum(Fields!Sales.Value, "matrix1_SubCat")</Value>
</Textbox>
</ReportItems>
</MatrixCell>
</MatrixCells>
<Height>0.67072cm</Height>
</MatrixRow>
</MatrixRows>
<MatrixColumns>
<MatrixColumn>
<Width>5.09452cm</Width>
</MatrixColumn>
</MatrixColumns>
<DataSetName>Sales</DataSetName>
<ColumnGroupings>
<ColumnGrouping>
<DynamicColumns>
<Grouping Name="matrix1_OrderYear">
<GroupExpressions>
<GroupExpression>=Fields!OrderYear.Value</GroupExpression>
</GroupExpressions>
</Grouping>
<ReportItems>
<Textbox Name="OrderYear_1">
<Style>
<PaddingLeft>2pt</PaddingLeft>
<BackgroundColor>Green</BackgroundColor>
<TextAlign>Right</TextAlign>
<Color>White</Color>
<PaddingBottom>2pt</PaddingBottom>
<PaddingTop>2pt</PaddingTop>
<PaddingRight>2pt</PaddingRight>
</Style>
<ZIndex>12</ZIndex>
<rd:DefaultName>OrderYear_1</rd:DefaultName>
<CanGrow>true</CanGrow>
<Value>=Fields!OrderYear.Value</Value>
</Textbox>
</ReportItems>
</DynamicColumns>
<Height>0.599cm</Height>
</ColumnGrouping>
</ColumnGroupings>
<Width>12.90389cm</Width>
<Top>2.85714cm</Top>
<Left>0.15873cm</Left>
<RowGroupings>
<RowGrouping>
<DynamicRows>
<Grouping Name="matrix1_ProdCat">
<GroupExpressions>
<GroupExpression>=Fields!ProdCat.Value</GroupExpression>
</GroupExpressions>
</Grouping>
<ReportItems>
<Textbox Name="ProdCat">
<Style>
<PaddingLeft>2pt</PaddingLeft>
<BackgroundColor>Green</BackgroundColor>
<Color>White</Color>
<PaddingBottom>2pt</PaddingBottom>
<PaddingTop>2pt</PaddingTop>
<PaddingRight>2pt</PaddingRight>
</Style>
<ZIndex>11</ZIndex>
<rd:DefaultName>ProdCat</rd:DefaultName>
<CanGrow>true</CanGrow>
<Value>=Fields!ProdCat.Value</Value>
</Textbox>
</ReportItems>
<Subtotal>
<ReportItems>
<Textbox Name="textbox4">
<Style>
<PaddingLeft>2pt</PaddingLeft>
<BackgroundColor>Crimson</BackgroundColor>
<Color>White</Color>
<PaddingBottom>2pt</PaddingBottom>
<PaddingTop>2pt</PaddingTop>
<PaddingRight>2pt</PaddingRight>
</Style>
<ZIndex>1</ZIndex>
<rd:DefaultName>textbox4</rd:DefaultName>
<CanGrow>true</CanGrow>
<Value>Total</Value>
</Textbox>
</ReportItems>
</Subtotal>
</DynamicRows>
<Width>2.69841cm</Width>
</RowGrouping>
<RowGrouping>
<DynamicRows>
<Grouping Name="matrix1_SubCat">
<GroupExpressions>
<GroupExpression>=Fields!SubCat.Value</GroupExpression>
</GroupExpressions>
</Grouping>
<Sorting>
<SortBy>
<SortExpression>=Fields!SubCat.Value</SortExpression>
<Direction>Ascending</Direction>
</SortBy>
</Sorting>
<ReportItems>
<Textbox Name="textbox3">
<Style>
<PaddingLeft>2pt</PaddingLeft>
<BackgroundColor>Green</BackgroundColor>
<Color>White</Color>
<PaddingBottom>2pt</PaddingBottom>
<PaddingTop>2pt</PaddingTop>
<PaddingRight>2pt</PaddingRight>
</Style>
<ZIndex>10</ZIndex>
<rd:DefaultName>textbox3</rd:DefaultName>
<CanGrow>true</CanGrow>
<Value>=Fields!SubCat.Value</Value>
</Textbox>
</ReportItems>
<Subtotal>
<ReportItems>
<Textbox Name="textbox14">
<Style>
<PaddingLeft>2pt</PaddingLeft>
<BackgroundColor>Crimson</BackgroundColor>
<Color>White</Color>
<PaddingBottom>2pt</PaddingBottom>
<PaddingTop>2pt</PaddingTop>
<PaddingRight>2pt</PaddingRight>
</Style>
<rd:DefaultName>textbox14</rd:DefaultName>
<CanGrow>true</CanGrow>
<Value>Total</Value>
</Textbox>
</ReportItems>
</Subtotal>
</DynamicRows>
<Width>2.80455cm</Width>
</RowGrouping>
<RowGrouping>
<Width>2.30641cm</Width>
<StaticRows>
<StaticRow>
<ReportItems>
<Textbox Name="textbox7">
<Style>
<PaddingLeft>2pt</PaddingLeft>
<BackgroundColor>Green</BackgroundColor>
<TextAlign>Right</TextAlign>
<Color>White</Color>
<PaddingBottom>2pt</PaddingBottom>
<PaddingTop>2pt</PaddingTop>
<PaddingRight>2pt</PaddingRight>
</Style>
<ZIndex>9</ZIndex>
<rd:DefaultName>textbox7</rd:DefaultName>
<CanGrow>true</CanGrow>
<Value>Sales</Value>
</Textbox>
</ReportItems>
</StaticRow>
<StaticRow>
<ReportItems>
<Textbox Name="textbox8">
<Style>
<PaddingLeft>2pt</PaddingLeft>
<BackgroundColor>Green</BackgroundColor>
<TextAlign>Right</TextAlign>
<Color>White</Color>
<PaddingBottom>2pt</PaddingBottom>
<PaddingTop>2pt</PaddingTop>
<PaddingRight>2pt</PaddingRight>
</Style>
<ZIndex>7</ZIndex>
<rd:DefaultName>textbox8</rd:DefaultName>
<CanGrow>true</CanGrow>
<Value> % Share </Value>
</Textbox>
</ReportItems>
</StaticRow>
<StaticRow>
<ReportItems>
<Textbox Name="textbox10">
<Style>
<PaddingLeft>2pt</PaddingLeft>
<BackgroundColor>Green</BackgroundColor>
<TextAlign>Right</TextAlign>
<Color>White</Color>
<PaddingBottom>2pt</PaddingBottom>
<PaddingTop>2pt</PaddingTop>
<PaddingRight>2pt</PaddingRight>
</Style>
<ZIndex>5</ZIndex>
<rd:DefaultName>textbox10</rd:DefaultName>
<CanGrow>true</CanGrow>
<Value>subtotal 1 </Value>
</Textbox>
</ReportItems>
</StaticRow>
<StaticRow>
<ReportItems>
<Textbox Name="textbox5">
<Style>
<PaddingLeft>2pt</PaddingLeft>
<BackgroundColor>Green</BackgroundColor>
<TextAlign>Right</TextAlign>
<Color>White</Color>
<PaddingBottom>2pt</PaddingBottom>
<PaddingTop>2pt</PaddingTop>
<PaddingRight>2pt</PaddingRight>
</Style>
<ZIndex>3</ZIndex>
<rd:DefaultName>textbox5</rd:DefaultName>
<CanGrow>true</CanGrow>
<Value>subtotal 2</Value>
</Textbox>
</ReportItems>
</StaticRow>
</StaticRows>
</RowGrouping>
</RowGroupings>
</Matrix>
<Textbox Name="Title">
<Style>
<FontFamily>Tahoma</FontFamily>
<FontSize>18pt</FontSize>
<Color>DarkSlateBlue</Color>
<FontWeight>800</FontWeight>
</Style>
<Height>0.9375in</Height>
<Width>3.125in</Width>
<Top>0.0625in</Top>
<Value>Adventure Works
2002 - 2003
Sales - Modified</Value>
<Left>0.0625in</Left>
</Textbox>
</ReportItems>
<Style>
<BackgroundImage>
<Source>Embedded</Source>
<Value>logoback</Value>
</BackgroundImage>
</Style>
<Height>6.80507in</Height>
</Body>
<TopMargin>0.5in</TopMargin>
<DataSources>
<DataSource Name="AdventureWorks">
<rd:DataSourceID>25d3314c-0d4f-49cc-9c22-10194e825490</rd:DataSourceID>
<DataSourceReference>AdventureWorks</DataSourceReference>
</DataSource>
</DataSources>
<Width>15.87302cm</Width>
<DataSets>
<DataSet Name="Sales">
<Fields>
<Field Name="ProdCat">
<DataField>ProdCat</DataField>
<rd:TypeName>System.String</rd:TypeName>
</Field>
<Field Name="SubCat">
<DataField>SubCat</DataField>
<rd:TypeName>System.String</rd:TypeName>
</Field>
<Field Name="OrderYear">
<DataField>OrderYear</DataField>
<rd:TypeName>System.Int32</rd:TypeName>
</Field>
<Field Name="OrderQtr">
<DataField>OrderQtr</DataField>
<rd:TypeName>System.String</rd:TypeName>
</Field>
<Field Name="Sales">
<DataField>Sales</DataField>
<rd:TypeName>System.Decimal</rd:TypeName>
</Field>
</Fields>
<Query>
<DataSourceName>AdventureWorks</DataSourceName>
<CommandText>SET DATEFORMAT mdy
SELECT ProductCategory.Name AS ProdCat,
ProductSubCategory.Name AS SubCat, DATEPART(yy, SalesOrderHeader.OrderDate)
AS OrderYear,
'Q' + DATENAME(qq,
SalesOrderHeader.OrderDate) AS OrderQtr, SUM(SalesOrderDetail.UnitPrice *
SalesOrderDetail.OrderQty)
AS Sales
FROM ProductSubCategory INNER JOIN
SalesOrderHeader INNER JOIN
SalesOrderDetail ON
SalesOrderHeader.SalesOrderID = SalesOrderDetail.SalesOrderID INNER JOIN
Product ON
SalesOrderDetail.ProductID = Product .ProductID ON
ProductSubCategory.ProductSubCategoryID = Product .ProductSubCategoryID INNER
JOIN
ProductCategory ON
ProductSubCategory.ProductCategoryID = ProductCategory.ProductCategoryID
WHERE (SalesOrderHeader.OrderDate BETWEEN
'1/1/2002' AND '12/31/2003')
GROUP BY DATEPART(yy,
SalesOrderHeader.OrderDate), ProductCategory.Name, ProductSubCategory.Name,
'Q' + DATENAME(qq,
SalesOrderHeader.OrderDate),
ProductSubCategory.ProductSubCategoryID</CommandText>
<Timeout>30</Timeout>
</Query>
</DataSet>
</DataSets>
<EmbeddedImages>
<EmbeddedImage Name="logoback">
<MIMEType>image/jpeg</MIMEType>
<ImageData>/9j/4AAQSkZJRgABAQEAYABgAAD/2wBDAAgGBgcGBQgHBwcJCQgKDBQNDAsLDBkSEw8UHRofHh0aHBwgJC4nICIsIxwcKDcpLDAxNDQ0Hyc5PTgyPC4zNDL/2wBDAQkJCQwLDBgNDRgyIRwhMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjL/wAARCADCAbYDASIAAhEBAxEB/8QAHwAAAQUBAQEBAQEAAAAAAAAAAAECAwQFBgcICQoL/8QAtRAAAgEDAwIEAwUFBAQAAAF9AQIDAAQRBRIhMUEGE1FhByJxFDKBkaEII0KxwRVS0fAkM2JyggkKFhcYGRolJicoKSo0NTY3ODk6Q0RFRkdISUpTVFVWV1hZWmNkZWZnaGlqc3R1dnd4eXqDhIWGh4iJipKTlJWWl5iZmqKjpKWmp6ipqrKztLW2t7i5usLDxMXGx8jJytLT1NXW19jZ2uHi4+Tl5ufo6erx8vP09fb3+Pn6/8QAHwEAAwEBAQEBAQEBAQAAAAAAAAECAwQFBgcICQoL/8QAtREAAgECBAQDBAcFBAQAAQJ3AAECAxEEBSExBhJBUQdhcRMiMoEIFEKRobHBCSMzUvAVYnLRChYkNOEl8RcYGRomJygpKjU2Nzg5OkNERUZHSElKU1RVVldYWVpjZGVmZ2hpanN0dXZ3eHl6goOEhYaHiImKkpOUlZaXmJmaoqOkpaanqKmqsrO0tba3uLm6wsPExcbHyMnK0tPU1dbX2Nna4uPk5ebn6Onq8vP09fb3+Pn6/9oADAMBAAIRAxEAPwD3+iiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAoo
ooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKAEJxWHdazJ5pWAKFHGSMk1tsNykeoxXIzwvBM0bggg/nQBtadqjTyiGYAMfukd61s1y1hbvPPkZCqCWI+lRC5nQ/LM4x/tGgDrqK5Qahdr0nf8TUo1a8H/LTP1FAHTUVzq61cggsEYfTFb8MnmwpJjG4ZxQA+iiigAoqGW5jicKx5PtUqkMoIOQaLALRRRQAUUUUAFFFFABRRRQAUUUUAFFFFABRRRQAUUUUAFFFFABRRRQAUUUUAFFFFABRRRQAUUUUAFFFFABRRRQAUUUUAFFFFABRRRQAUUUUAFFFFABRRRQAVDNFC6lpUVgBnLDpU1ZOs3eyMW6Hl+Wx6UAQ2+qM12sSRIIWbaFUYP1qw2hwMxO9xk+1V9FtMk3LDpwv9TW5QBz95YWlmvzTSFyOFGKzURpHCopLHoBW5q1i8xE8fJAwV9azbG9Nm5PlhgepPUUAX7PSUiAluiCeoXsPrWl9qgXjeOPSoYYRcKJZJPMB5AB4qwIIh0jX8qegCxzJLnYwOKfTVREJ2qBn0pJJBEhdug6UgM28x9pb8Kv2oItkz6VQjRrmck9Cck1pM6RJliABVydlYErklJVCXUgOI1z7mq5nup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UAFFFFABRRRQAUUUUAFFFFABRRRQAUUUUAFFFFAH/2Q==</ImageData>
</EmbeddedImage>
</EmbeddedImages>
<LeftMargin>0.5in</LeftMargin>
<rd:SnapToGrid>true</rd:SnapToGrid>
<rd:DrawGrid>true</rd:DrawGrid>
<Description>Adventure Works sales by quarter and product category. This
report illustrates the use of a matrix data region that provides drilldown
from summary data into detail data by showing and hiding rows. This report
also illustrates the use of background images.</Description>
<rd:ReportID>312657d4-5053-4f4c-b4fa-c580a92fd43b</rd:ReportID>
<BottomMargin>0.5in</BottomMargin>
</Report>
--I suspect you need use the column scope not the row scope.
If you can't get that to work, build the year total into each row of
the dataset then you can do Sum(Fields!Amount.Value) /
First(Fields!Total.Value) instead. NB: note the use of FIRST.
--
Regards
Chris
Riccardo wrote:
> Problem: Subtotal is not calculated correct in a Matrix expression.
> Need some help with an expression in a matrix that should calculate
> percent of subtotal for a measure.
> The matrix look like this
> Column_OrderYear
> RowGroup1 | RowGroup2 | Sales
> % Share
> I want % Share to calculate as sales / subtotal on RowGroup1(per
> Column_OrderYear). If I use RowGroup1 in the scope it summerize the
> subtotal for all Column_Year (all years) on that row.
> I have included a modified version of Company Sales.rdl that is
> included in samples for RS2000. In this example, for the first group
> Component and Bottom Bracket, % Share should be calculated as
> 37977.81 / 6778096.94. Instead its calculated as 37977.81/11233756.04.
>
> --
> <?xml version="1.0" encoding="utf-8"?>
> <Report
> xmlns="http://schemas.microsoft.com/sqlserver/reporting/2003/10/report
> definition"
> xmlns:rd="http://schemas.microsoft.com/SQLServer/reporting/reportdesig
> ner"> <rd:GridSpacing>0.0625in</rd:GridSpacing>
> <RightMargin>0.5in</RightMargin> <Body>
> <ReportItems>
> <Matrix Name="matrix1">
> <Corner>
> <ReportItems>
> <Textbox Name="textbox2">
> <Style>
> <PaddingLeft>2pt</PaddingLeft>
> <PaddingBottom>2pt</PaddingBottom>
> <PaddingTop>2pt</PaddingTop>
> <PaddingRight>2pt</PaddingRight>
> </Style>
> <ZIndex>13</ZIndex>
> <rd:DefaultName>textbox2</rd:DefaultName>
> <CanGrow>true</CanGrow>
> <Value />
> </Textbox>
> </ReportItems>
> </Corner>
> <Height>5.73232cm</Height>
> <ZIndex>1</ZIndex>
> <Style />
> <MatrixRows>
> <MatrixRow>
> <MatrixCells>
> <MatrixCell>
> <ReportItems>
> <Textbox Name="Share">
> <Style>
> <PaddingLeft>2pt</PaddingLeft>
> <BackgroundColor>White</BackgroundColor>
> <TextAlign>Right</TextAlign>
> <PaddingBottom>2pt</PaddingBottom>
> <PaddingTop>2pt</PaddingTop>
> <PaddingRight>2pt</PaddingRight>
> </Style>
> <ZIndex>8</ZIndex>
> <CanGrow>true</CanGrow>
> <Value>=sum(Fields!Sales.Value)</Value>
> </Textbox>
> </ReportItems>
> </MatrixCell>
> </MatrixCells>
> <Height>0.68068cm</Height>
> </MatrixRow>
> <MatrixRow>
> <MatrixCells>
> <MatrixCell>
> <ReportItems>
> <Textbox Name="textbox9">
> <Style>
> <PaddingLeft>2pt</PaddingLeft>
> <Format>P</Format>
> <BackgroundColor>White</BackgroundColor>
> <TextAlign>Right</TextAlign>
> <PaddingBottom>2pt</PaddingBottom>
> <PaddingTop>2pt</PaddingTop>
> <PaddingRight>2pt</PaddingRight>
> </Style>
> <ZIndex>6</ZIndex>
> <rd:DefaultName>textbox9</rd:DefaultName>
> <CanGrow>true</CanGrow>
> <Value>=sum(Fields!Sales.Value) /
> sum(Fields!Sales.Value, "matrix1_ProdCat")</Value>
> </Textbox>
> </ReportItems>
> </MatrixCell>
> </MatrixCells>
> <Height>0.54454cm</Height>
> </MatrixRow>
> <MatrixRow>
> <MatrixCells>
> <MatrixCell>
> <ReportItems>
> <Textbox Name="textbox12">
> <Style>
> <PaddingLeft>2pt</PaddingLeft>
> <PaddingBottom>2pt</PaddingBottom>
> <PaddingTop>2pt</PaddingTop>
> <PaddingRight>2pt</PaddingRight>
> </Style>
> <ZIndex>4</ZIndex>
> <rd:DefaultName>textbox12</rd:DefaultName>
> <CanGrow>true</CanGrow>
> <Value>=sum(Fields!Sales.Value,
> "matrix1_ProdCat")</Value> </Textbox>
> </ReportItems>
> </MatrixCell>
> </MatrixCells>
> <Height>0.67072cm</Height>
> </MatrixRow>
> <MatrixRow>
> <MatrixCells>
> <MatrixCell>
> <ReportItems>
> <Textbox Name="textbox11">
> <Style>
> <PaddingLeft>2pt</PaddingLeft>
> <BackgroundColor>White</BackgroundColor>
> <TextAlign>Right</TextAlign>
> <PaddingBottom>2pt</PaddingBottom>
> <PaddingTop>2pt</PaddingTop>
> <PaddingRight>2pt</PaddingRight>
> </Style>
> <ZIndex>2</ZIndex>
> <rd:DefaultName>textbox11</rd:DefaultName>
> <CanGrow>true</CanGrow>
> <Value>=sum(Fields!Sales.Value,
> "matrix1_SubCat")</Value> </Textbox>
> </ReportItems>
> </MatrixCell>
> </MatrixCells>
> <Height>0.67072cm</Height>
> </MatrixRow>
> </MatrixRows>
> <MatrixColumns>
> <MatrixColumn>
> <Width>5.09452cm</Width>
> </MatrixColumn>
> </MatrixColumns>
> <DataSetName>Sales</DataSetName>
> <ColumnGroupings>
> <ColumnGrouping>
> <DynamicColumns>
> <Grouping Name="matrix1_OrderYear">
> <GroupExpressions>
> <GroupExpression>=Fields!OrderYear.Value</GroupExpression>
> </GroupExpressions> </Grouping>
> <ReportItems>
> <Textbox Name="OrderYear_1">
> <Style>
> <PaddingLeft>2pt</PaddingLeft>
> <BackgroundColor>Green</BackgroundColor>
> <TextAlign>Right</TextAlign>
> <Color>White</Color>
> <PaddingBottom>2pt</PaddingBottom>
> <PaddingTop>2pt</PaddingTop>
> <PaddingRight>2pt</PaddingRight>
> </Style>
> <ZIndex>12</ZIndex>
> <rd:DefaultName>OrderYear_1</rd:DefaultName>
> <CanGrow>true</CanGrow>
> <Value>=Fields!OrderYear.Value</Value>
> </Textbox>
> </ReportItems>
> </DynamicColumns>
> <Height>0.599cm</Height>
> </ColumnGrouping>
> </ColumnGroupings>
> <Width>12.90389cm</Width>
> <Top>2.85714cm</Top>
> <Left>0.15873cm</Left>
> <RowGroupings>
> <RowGrouping>
> <DynamicRows>
> <Grouping Name="matrix1_ProdCat">
> <GroupExpressions>
> <GroupExpression>=Fields!ProdCat.Value</GroupExpression>
> </GroupExpressions> </Grouping>
> <ReportItems>
> <Textbox Name="ProdCat">
> <Style>
> <PaddingLeft>2pt</PaddingLeft>
> <BackgroundColor>Green</BackgroundColor>
> <Color>White</Color>
> <PaddingBottom>2pt</PaddingBottom>
> <PaddingTop>2pt</PaddingTop>
> <PaddingRight>2pt</PaddingRight>
> </Style>
> <ZIndex>11</ZIndex>
> <rd:DefaultName>ProdCat</rd:DefaultName>
> <CanGrow>true</CanGrow>
> <Value>=Fields!ProdCat.Value</Value>
> </Textbox>
> </ReportItems>
> <Subtotal>
> <ReportItems>
> <Textbox Name="textbox4">
> <Style>
> <PaddingLeft>2pt</PaddingLeft>
> <BackgroundColor>Crimson</BackgroundColor>
> <Color>White</Color>
> <PaddingBottom>2pt</PaddingBottom>
> <PaddingTop>2pt</PaddingTop>
> <PaddingRight>2pt</PaddingRight>
> </Style>
> <ZIndex>1</ZIndex>
> <rd:DefaultName>textbox4</rd:DefaultName>
> <CanGrow>true</CanGrow>
> <Value>Total</Value>
> </Textbox>
> </ReportItems>
> </Subtotal>
> </DynamicRows>
> <Width>2.69841cm</Width>
> </RowGrouping>
> <RowGrouping>
> <DynamicRows>
> <Grouping Name="matrix1_SubCat">
> <GroupExpressions>
> <GroupExpression>=Fields!SubCat.Value</GroupExpression>
> </GroupExpressions> </Grouping>
> <Sorting>
> <SortBy>
> <SortExpression>=Fields!SubCat.Value</SortExpression>
> <Direction>Ascending</Direction> </SortBy>
> </Sorting>
> <ReportItems>
> <Textbox Name="textbox3">
> <Style>
> <PaddingLeft>2pt</PaddingLeft>
> <BackgroundColor>Green</BackgroundColor>
> <Color>White</Color>
> <PaddingBottom>2pt</PaddingBottom>
> <PaddingTop>2pt</PaddingTop>
> <PaddingRight>2pt</PaddingRight>
> </Style>
> <ZIndex>10</ZIndex>
> <rd:DefaultName>textbox3</rd:DefaultName>
> <CanGrow>true</CanGrow>
> <Value>=Fields!SubCat.Value</Value>
> </Textbox>
> </ReportItems>
> <Subtotal>
> <ReportItems>
> <Textbox Name="textbox14">
> <Style>
> <PaddingLeft>2pt</PaddingLeft>
> <BackgroundColor>Crimson</BackgroundColor>
> <Color>White</Color>
> <PaddingBottom>2pt</PaddingBottom>
> <PaddingTop>2pt</PaddingTop>
> <PaddingRight>2pt</PaddingRight>
> </Style>
> <rd:DefaultName>textbox14</rd:DefaultName>
> <CanGrow>true</CanGrow>
> <Value>Total</Value>
> </Textbox>
> </ReportItems>
> </Subtotal>
> </DynamicRows>
> <Width>2.80455cm</Width>
> </RowGrouping>
> <RowGrouping>
> <Width>2.30641cm</Width>
> <StaticRows>
> <StaticRow>
> <ReportItems>
> <Textbox Name="textbox7">
> <Style>
> <PaddingLeft>2pt</PaddingLeft>
> <BackgroundColor>Green</BackgroundColor>
> <TextAlign>Right</TextAlign>
> <Color>White</Color>
> <PaddingBottom>2pt</PaddingBottom>
> <PaddingTop>2pt</PaddingTop>
> <PaddingRight>2pt</PaddingRight>
> </Style>
> <ZIndex>9</ZIndex>
> <rd:DefaultName>textbox7</rd:DefaultName>
> <CanGrow>true</CanGrow>
> <Value>Sales</Value>
> </Textbox>
> </ReportItems>
> </StaticRow>
> <StaticRow>
> <ReportItems>
> <Textbox Name="textbox8">
> <Style>
> <PaddingLeft>2pt</PaddingLeft>
> <BackgroundColor>Green</BackgroundColor>
> <TextAlign>Right</TextAlign>
> <Color>White</Color>
> <PaddingBottom>2pt</PaddingBottom>
> <PaddingTop>2pt</PaddingTop>
> <PaddingRight>2pt</PaddingRight>
> </Style>
> <ZIndex>7</ZIndex>
> <rd:DefaultName>textbox8</rd:DefaultName>
> <CanGrow>true</CanGrow>
> <Value> % Share </Value>
> </Textbox>
> </ReportItems>
> </StaticRow>
> <StaticRow>
> <ReportItems>
> <Textbox Name="textbox10">
> <Style>
> <PaddingLeft>2pt</PaddingLeft>
> <BackgroundColor>Green</BackgroundColor>
> <TextAlign>Right</TextAlign>
> <Color>White</Color>
> <PaddingBottom>2pt</PaddingBottom>
> <PaddingTop>2pt</PaddingTop>
> <PaddingRight>2pt</PaddingRight>
> </Style>
> <ZIndex>5</ZIndex>
> <rd:DefaultName>textbox10</rd:DefaultName>
> <CanGrow>true</CanGrow>
> <Value>subtotal 1 </Value>
> </Textbox>
> </ReportItems>
> </StaticRow>
> <StaticRow>
> <ReportItems>
> <Textbox Name="textbox5">
> <Style>
> <PaddingLeft>2pt</PaddingLeft>
> <BackgroundColor>Green</BackgroundColor>
> <TextAlign>Right</TextAlign>
> <Color>White</Color>
> <PaddingBottom>2pt</PaddingBottom>
> <PaddingTop>2pt</PaddingTop>
> <PaddingRight>2pt</PaddingRight>
> </Style>
> <ZIndex>3</ZIndex>
> <rd:DefaultName>textbox5</rd:DefaultName>
> <CanGrow>true</CanGrow>
> <Value>subtotal 2</Value>
> </Textbox>
> </ReportItems>
> </StaticRow>
> </StaticRows>
> </RowGrouping>
> </RowGroupings>
> </Matrix>
> <Textbox Name="Title">
> <Style>
> <FontFamily>Tahoma</FontFamily>
> <FontSize>18pt</FontSize>
> <Color>DarkSlateBlue</Color>
> <FontWeight>800</FontWeight>
> </Style>
> <Height>0.9375in</Height>
> <Width>3.125in</Width>
> <Top>0.0625in</Top>
> <Value>Adventure Works
> 2002 - 2003
> Sales - Modified</Value>
> <Left>0.0625in</Left>
> </Textbox>
> </ReportItems>
> <Style>
> <BackgroundImage>
> <Source>Embedded</Source>
> <Value>logoback</Value>
> </BackgroundImage>
> </Style>
> <Height>6.80507in</Height>
> </Body>
> <TopMargin>0.5in</TopMargin>
> <DataSources>
> <DataSource Name="AdventureWorks">
> <rd:DataSourceID>25d3314c-0d4f-49cc-9c22-10194e825490</rd:DataSourceID
> > <DataSourceReference>AdventureWorks</DataSourceReference>
> </DataSource> </DataSources>
> <Width>15.87302cm</Width>
> <DataSets>
> <DataSet Name="Sales">
> <Fields>
> <Field Name="ProdCat">
> <DataField>ProdCat</DataField>
> <rd:TypeName>System.String</rd:TypeName>
> </Field>
> <Field Name="SubCat">
> <DataField>SubCat</DataField>
> <rd:TypeName>System.String</rd:TypeName>
> </Field>
> <Field Name="OrderYear">
> <DataField>OrderYear</DataField>
> <rd:TypeName>System.Int32</rd:TypeName>
> </Field>
> <Field Name="OrderQtr">
> <DataField>OrderQtr</DataField>
> <rd:TypeName>System.String</rd:TypeName>
> </Field>
> <Field Name="Sales">
> <DataField>Sales</DataField>
> <rd:TypeName>System.Decimal</rd:TypeName>
> </Field>
> </Fields>
> <Query>
> <DataSourceName>AdventureWorks</DataSourceName>
> <CommandText>SET DATEFORMAT mdy
> SELECT ProductCategory.Name AS ProdCat,
> ProductSubCategory.Name AS SubCat, DATEPART(yy,
> SalesOrderHeader.OrderDate) AS OrderYear,
> 'Q' + DATENAME(qq,
> SalesOrderHeader.OrderDate) AS OrderQtr,
> SUM(SalesOrderDetail.UnitPrice * SalesOrderDetail.OrderQty)
> AS Sales
> FROM ProductSubCategory INNER JOIN
> SalesOrderHeader
> INNER JOIN
> SalesOrderDetail ON SalesOrderHeader.SalesOrderID => SalesOrderDetail.SalesOrderID INNER JOIN
> Product ON SalesOrderDetail.ProductID = Product .ProductID ON
> ProductSubCategory.ProductSubCategoryID = Product
> .ProductSubCategoryID INNER JOIN
> ProductCategory ON
> ProductSubCategory.ProductCategoryID => ProductCategory.ProductCategoryID WHERE
> (SalesOrderHeader.OrderDate BETWEEN '1/1/2002' AND '12/31/2003')
> GROUP BY DATEPART(yy,
> SalesOrderHeader.OrderDate), ProductCategory.Name,
> ProductSubCategory.Name, 'Q' + DATENAME(qq,
> SalesOrderHeader.OrderDate),
> ProductSubCategory.ProductSubCategoryID</CommandText>
> <Timeout>30</Timeout>
> </Query>
> </DataSet>
> </DataSets>
> <EmbeddedImages>
> <EmbeddedImage Name="logoback">
> <MIMEType>image/jpeg</MIMEType>
> <ImageData>/9j/4AAQSkZJRgABAQEAYABgAAD/2wBDAAgGBgcGBQgHBwcJCQgKDBQNDAs
> LDBkSEw8UHRofHh0aHBwgJC4nICIsIxwcKDcpLDAxNDQ0Hyc5PTgyPC4zNDL/2wBDAQkJC
> QwLDBgNDRgyIRwhMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjI
> yMjIyMjIyMjL/wAARCADCAbYDASIAAhEBAxEB/8QAHwAAAQUBAQEBAQEAAAAAAAAAAAECA
> wQFBgcICQoL/8QAtRAAAgEDAwIEAwUFBAQAAAF9AQIDAAQRBRIhMUEGE1FhByJxFDKBkaE
> II0KxwRVS0fAkM2JyggkKFhcYGRolJicoKSo0NTY3ODk6Q0RFRkdISUpTVFVWV1hZWmNkZ
> WZnaGlqc3R1dnd4eXqDhIWGh4iJipKTlJWWl5iZmqKjpKWmp6ipqrKztLW2t7i5usLDxMX
> Gx8jJytLT1NXW19jZ2uHi4+Tl5ufo6erx8vP09fb3+Pn6/8QAHwEAAwEBAQEBAQEBAQAAA
> AAAAAECAwQFBgcICQoL/8QAtREAAgECBAQDBAcFBAQAAQJ3AAECAxEEBSExBhJBUQdhcRM
> iMoEIFEKRobHBCSMzUvAVYnLRChYkNOEl8RcYGRomJygpKjU2Nzg5OkNERUZHSElKU1RVV
> ldYWVpjZGVmZ2hpanN0dXZ3eHl6goOEhYaHiImKkpOUlZaXmJmaoqOkpaanqKmqsrO0tba
> 3uLm6wsPExcbHyMnK0tPU1dbX2Nna4uPk5ebn6Onq8vP09fb3+Pn6/9oADAMBAAIRAxEAP
> wD3+iiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACii
> igAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooo
> oAKKKKACiiigAooooAKKKKACiiigAoo
> ooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKKKACiiigAooooAKKK
> KACiiigAooooA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LtlQM
> O3qKzpNCjJ+SZl/wB4ZrXooAyI9BjB/eTO30GP8a0ILaK2XbEgX37mp6KAM19Ft5HZ2eXL
> Ek8j/Cp7TT4rNmaNnO4YO4j/AAq3RQAx0EilWUFT1B5rOl0SBzmNnj9uorUooAxl0FQfmu
> CR7Jj+tWl0m3SJkXeCwwXz82P6VfooAoW2lwWswlTcWHA3YwP0q1NCJ4mjYsobuOCKlooA
> x/7BTdxO23028/n/APWrTggS3iEca4UVLRQAUUUUAFFFFABRRRQAUUUUAFFFFABRRRQAUU
> UUAFFFFABRRRQAUUUUAFFFFABRRRQAUUUUAFFFFABRRRQAUUUUAFFFFABRRRQAUUUUAFFF
> FABRRRQAUUUUAFFFFABRRRQAUUUUAFFFFABRRRQAUUUUAFFFFABRRRQAUUUUAFFFFABRRR
> QAUUUUAFFFFABRRRQAUUUUAFFFFABRRRQAUUUUAFFFFABRRRQAUUUUAFFFFABRRRQAUUUU
> AFFFFABRRRQAUUUUAFFFFABRRRQAUUUUAFFFFABRRRQAUUUUAFFFFABRRRQAUUUUAFFFFA
> BRRRQAUUUUAFFFFABRRRQAUUUUAFFFFABRRRQAUUUUAFFFFABRRRQAUUUUAFFFFABRRRQA
> UUUUAFFFFABRRRQAUUU
> UAFFFFABRRRQAUUUUAFFFFABRRRQAUUUUAFFFFABRRRQAUUUUAFFFFABRRRQAUUUUAFFFF
> ABRRRQAUUUUAFFFFABRRRQAUUUUAFFFFABRRRQAUUUUAFFFFABRRRQAUUUUAFFFFABRRRQ
> AUUUUAFFFFABRRRQAUUUUAFFFFABRRRQAUUUUAFFFFABRRRQAUUUUAFFFFABRRRQAUUUUA
> FFFFABRRRQAUUUUAFFFFABRRRQAUUUUAFFFFAH/2Q==</ImageData>
> </EmbeddedImage> </EmbeddedImages> <LeftMargin>0.5in</LeftMargin>
> <rd:SnapToGrid>true</rd:SnapToGrid> <rd:DrawGrid>true</rd:DrawGrid>
> <Description>Adventure Works sales by quarter and product category.
> This report illustrates the use of a matrix data region that provides
> drilldown from summary data into detail data by showing and hiding
> rows. This report also illustrates the use of background
> images.</Description>
> <rd:ReportID>312657d4-5053-4f4c-b4fa-c580a92fd43b</rd:ReportID>
> <BottomMargin>0.5in</BottomMargin> </Report>
> --
>|||Thanks for your reply!
Well, the scope for the column is not working, since then it only summerize
for all rowgroups.
There must be an other solution than suggested calculating the subtotals in
the dataset and using "First(Fields!Total.Value)" , since my real case has
several rowgroups and columngroups and measures, subcalculating will do the
dataset to complex and maybe to slow.
"Chris McGuigan" wrote:
> I suspect you need use the column scope not the row scope.
> If you can't get that to work, build the year total into each row of
> the dataset then you can do Sum(Fields!Amount.Value) /
> First(Fields!Total.Value) instead. NB: note the use of FIRST.
> --
> Regards
> Chris
>
> Riccardo wrote:
> > Problem: Subtotal is not calculated correct in a Matrix expression.
> >
> > Need some help with an expression in a matrix that should calculate
> > percent of subtotal for a measure.
> >
> > The matrix look like this
> > Column_OrderYear
> >
> > RowGroup1 | RowGroup2 | Sales
> > % Share
> >
> > I want % Share to calculate as sales / subtotal on RowGroup1(per
> > Column_OrderYear). If I use RowGroup1 in the scope it summerize the
> > subtotal for all Column_Year (all years) on that row.
> >
> > I have included a modified version of Company Sales.rdl that is
> > included in samples for RS2000. In this example, for the first group
> > Component and Bottom Bracket, % Share should be calculated as
> > 37977.81 / 6778096.94. Instead its calculated as 37977.81/11233756.04.
> >
> >
> > --
> > <?xml version="1.0" encoding="utf-8"?>
> > <Report
> > xmlns="http://schemas.microsoft.com/sqlserver/reporting/2003/10/report
> > definition"
> > xmlns:rd="http://schemas.microsoft.com/SQLServer/reporting/reportdesig
> > ner"> <rd:GridSpacing>0.0625in</rd:GridSpacing>
> > <RightMargin>0.5in</RightMargin> <Body>
> > <ReportItems>
> > <Matrix Name="matrix1">
> > <Corner>
> > <ReportItems>
> > <Textbox Name="textbox2">
> > <Style>
> > <PaddingLeft>2pt</PaddingLeft>
> > <PaddingBottom>2pt</PaddingBottom>
> > <PaddingTop>2pt</PaddingTop>
> > <PaddingRight>2pt</PaddingRight>
> > </Style>
> > <ZIndex>13</ZIndex>
> > <rd:DefaultName>textbox2</rd:DefaultName>
> > <CanGrow>true</CanGrow>
> > <Value />
> > </Textbox>
> > </ReportItems>
> > </Corner>
> > <Height>5.73232cm</Height>
> > <ZIndex>1</ZIndex>
> > <Style />
> > <MatrixRows>
> > <MatrixRow>
> > <MatrixCells>
> > <MatrixCell>
> > <ReportItems>
> > <Textbox Name="Share">
> > <Style>
> > <PaddingLeft>2pt</PaddingLeft>
> > <BackgroundColor>White</BackgroundColor>
> > <TextAlign>Right</TextAlign>
> > <PaddingBottom>2pt</PaddingBottom>
> > <PaddingTop>2pt</PaddingTop>
> > <PaddingRight>2pt</PaddingRight>
> > </Style>
> > <ZIndex>8</ZIndex>
> > <CanGrow>true</CanGrow>
> > <Value>=sum(Fields!Sales.Value)</Value>
> > </Textbox>
> > </ReportItems>
> > </MatrixCell>
> > </MatrixCells>
> > <Height>0.68068cm</Height>
> > </MatrixRow>
> > <MatrixRow>
> > <MatrixCells>
> > <MatrixCell>
> > <ReportItems>
> > <Textbox Name="textbox9">
> > <Style>
> > <PaddingLeft>2pt</PaddingLeft>
> > <Format>P</Format>
> > <BackgroundColor>White</BackgroundColor>
> > <TextAlign>Right</TextAlign>
> > <PaddingBottom>2pt</PaddingBottom>
> > <PaddingTop>2pt</PaddingTop>
> > <PaddingRight>2pt</PaddingRight>
> > </Style>
> > <ZIndex>6</ZIndex>
> > <rd:DefaultName>textbox9</rd:DefaultName>
> > <CanGrow>true</CanGrow>
> > <Value>=sum(Fields!Sales.Value) /
> > sum(Fields!Sales.Value, "matrix1_ProdCat")</Value>
> > </Textbox>
> > </ReportItems>
> > </MatrixCell>
> > </MatrixCells>
> > <Height>0.54454cm</Height>
> > </MatrixRow>
> > <MatrixRow>
> > <MatrixCells>
> > <MatrixCell>
> > <ReportItems>
> > <Textbox Name="textbox12">
> > <Style>
> > <PaddingLeft>2pt</PaddingLeft>
> > <PaddingBottom>2pt</PaddingBottom>
> > <PaddingTop>2pt</PaddingTop>
> > <PaddingRight>2pt</PaddingRight>
> > </Style>
> > <ZIndex>4</ZIndex>
> > <rd:DefaultName>textbox12</rd:DefaultName>
> > <CanGrow>true</CanGrow>
> > <Value>=sum(Fields!Sales.Value,
> > "matrix1_ProdCat")</Value> </Textbox>
> > </ReportItems>
> > </MatrixCell>
> > </MatrixCells>
> > <Height>0.67072cm</Height>
> > </MatrixRow>
> > <MatrixRow>
> > <MatrixCells>
> > <MatrixCell>
> > <ReportItems>
> > <Textbox Name="textbox11">
> > <Style>
> > <PaddingLeft>2pt</PaddingLeft>
> > <BackgroundColor>White</BackgroundColor>
> > <TextAlign>Right</TextAlign>
> > <PaddingBottom>2pt</PaddingBottom>
> > <PaddingTop>2pt</PaddingTop>
> > <PaddingRight>2pt</PaddingRight>
> > </Style>
> > <ZIndex>2</ZIndex>
> > <rd:DefaultName>textbox11</rd:DefaultName>
> > <CanGrow>true</CanGrow>
> > <Value>=sum(Fields!Sales.Value,
> > "matrix1_SubCat")</Value> </Textbox>
> > </ReportItems>
> > </MatrixCell>
> > </MatrixCells>
> > <Height>0.67072cm</Height>
> > </MatrixRow>
> > </MatrixRows>
> > <MatrixColumns>
> > <MatrixColumn>
> > <Width>5.09452cm</Width>
> > </MatrixColumn>
> > </MatrixColumns>
> > <DataSetName>Sales</DataSetName>
> > <ColumnGroupings>
> > <ColumnGrouping>
> > <DynamicColumns>
> > <Grouping Name="matrix1_OrderYear">
> > <GroupExpressions>
> >
> > <GroupExpression>=Fields!OrderYear.Value</GroupExpression>
> > </GroupExpressions> </Grouping>
> > <ReportItems>
> > <Textbox Name="OrderYear_1">
> > <Style>
> > <PaddingLeft>2pt</PaddingLeft>
> > <BackgroundColor>Green</BackgroundColor>
> > <TextAlign>Right</TextAlign>
> > <Color>White</Color>
> > <PaddingBottom>2pt</PaddingBottom>
> > <PaddingTop>2pt</PaddingTop>
> > <PaddingRight>2pt</PaddingRight>
> > </Style>
> > <ZIndex>12</ZIndex>
> > <rd:DefaultName>OrderYear_1</rd:DefaultName>
> > <CanGrow>true</CanGrow>
> > <Value>=Fields!OrderYear.Value</Value>
> > </Textbox>
> > </ReportItems>
> > </DynamicColumns>
> > <Height>0.599cm</Height>
> > </ColumnGrouping>
> > </ColumnGroupings>
> > <Width>12.90389cm</Width>
> > <Top>2.85714cm</Top>
> > <Left>0.15873cm</Left>
> > <RowGroupings>
> > <RowGrouping>
> > <DynamicRows>
> > <Grouping Name="matrix1_ProdCat">
> > <GroupExpressions>
> >
> > <GroupExpression>=Fields!ProdCat.Value</GroupExpression>
> > </GroupExpressions> </Grouping>
> > <ReportItems>
> > <Textbox Name="ProdCat">
> > <Style>
> > <PaddingLeft>2pt</PaddingLeft>
> > <BackgroundColor>Green</BackgroundColor>
> > <Color>White</Color>
> > <PaddingBottom>2pt</PaddingBottom>
> > <PaddingTop>2pt</PaddingTop>
> > <PaddingRight>2pt</PaddingRight>
> > </Style>
> > <ZIndex>11</ZIndex>
> > <rd:DefaultName>ProdCat</rd:DefaultName>
> > <CanGrow>true</CanGrow>
> > <Value>=Fields!ProdCat.Value</Value>
> > </Textbox>
> > </ReportItems>
> > <Subtotal>
> > <ReportItems>
> > <Textbox Name="textbox4">
> > <Style>
> > <PaddingLeft>2pt</PaddingLeft>
> > <BackgroundColor>Crimson</BackgroundColor>
> > <Color>White</Color>
> > <PaddingBottom>2pt</PaddingBottom>
> > <PaddingTop>2pt</PaddingTop>
> > <PaddingRight>2pt</PaddingRight>
> > </Style>
> > <ZIndex>1</ZIndex>
> > <rd:DefaultName>textbox4</rd:DefaultName>
> > <CanGrow>true</CanGrow>
> > <Value>Total</Value>
> > </Textbox>
> > </ReportItems>
> > </Subtotal>
> > </DynamicRows>
> > <Width>2.69841cm</Width>
> > </RowGrouping>
> > <RowGrouping>
> > <DynamicRows>
> > <Grouping Name="matrix1_SubCat">
> > <GroupExpressions>
> >
> > <GroupExpression>=Fields!SubCat.Value</GroupExpression>
> > </GroupExpressions> </Grouping>
> > <Sorting>
> > <SortBy>
> >
> > <SortExpression>=Fields!SubCat.Value</SortExpression>
> > <Direction>Ascending</Direction> </SortBy>
> > </Sorting>
> > <ReportItems>
> > <Textbox Name="textbox3">
> > <Style>
> > <PaddingLeft>2pt</PaddingLeft>
> > <BackgroundColor>Green</BackgroundColor>
> > <Color>White</Color>
> > <PaddingBottom>2pt</PaddingBottom>
> > <PaddingTop>2pt</PaddingTop>
> > <PaddingRight>2pt</PaddingRight>
> > </Style>
> > <ZIndex>10</ZIndex>
> > <rd:DefaultName>textbox3</rd:DefaultName>
> > <CanGrow>true</CanGrow>
> > <Value>=Fields!SubCat.Value</Value>
> > </Textbox>
> > </ReportItems>
> > <Subtotal>
> > <ReportItems>
> > <Textbox Name="textbox14">
> > <Style>
> > <PaddingLeft>2pt</PaddingLeft>
> > <BackgroundColor>Crimson</BackgroundColor>
> > <Color>White</Color>
> > <PaddingBottom>2pt</PaddingBottom>
> > <PaddingTop>2pt</PaddingTop>
> > <PaddingRight>2pt</PaddingRight>
> > </Style>
> > <rd:DefaultName>textbox14</rd:DefaultName>
> > <CanGrow>true</CanGrow>
> > <Value>Total</Value>
> > </Textbox>
> > </ReportItems>
> > </Subtotal>
> > </DynamicRows>
> > <Width>2.80455cm</Width>
> > </RowGrouping>
> > <RowGrouping>
> > <Width>2.30641cm</Width>
> > <StaticRows>
> > <StaticRow>
> > <ReportItems>
> > <Textbox Name="textbox7">
> > <Style>
> > <PaddingLeft>2pt</PaddingLeft>
> > <BackgroundColor>Green</BackgroundColor>
> > <TextAlign>Right</TextAlign>
> > <Color>White</Color>
> > <PaddingBottom>2pt</PaddingBottom>
> > <PaddingTop>2pt</PaddingTop>
> > <PaddingRight>2pt</PaddingRight>

Saturday, February 25, 2012

RS doesn't works under ASP.NET 2.0?

Hi,
when I switch my reportserver virtual folder to the ASp.net2.0 I receive
this error:
"Failed to load expression host assembly"
this error appears only when I try to render a report, I can list reports or
I can access the webservice without any error.
any solution?
thanks.
Jerome.RS 2000 is not a ASP.Net 2.0 app. It uses the 1.1 framework. RS 2005 is a
ASP.Net 2.0 app.
Bruce Loehle-Conger
MVP SQL Server Reporting Services
"Jéjé" <willgart@.BBBhotmailAAA.com> wrote in message
news:%23ndrIwI9FHA.1332@.tk2msftngp13.phx.gbl...
> Hi,
> when I switch my reportserver virtual folder to the ASp.net2.0 I receive
> this error:
> "Failed to load expression host assembly"
> this error appears only when I try to render a report, I can list reports
> or I can access the webservice without any error.
> any solution?
> thanks.
> Jerome.
>|||I know, but, for example Sharepoint works fine under ASP.NET 2.0 and its a
1.1 software.
but if I switch the reportserver virtual directory from v1.1 to v2.0,
rendering a report stop working.
"Bruce L-C [MVP]" <bruce_lcNOSPAM@.hotmail.com> wrote in message
news:%232wwe4P9FHA.1248@.TK2MSFTNGP14.phx.gbl...
> RS 2000 is not a ASP.Net 2.0 app. It uses the 1.1 framework. RS 2005 is a
> ASP.Net 2.0 app.
>
> --
> Bruce Loehle-Conger
> MVP SQL Server Reporting Services
> "Jéjé" <willgart@.BBBhotmailAAA.com> wrote in message
> news:%23ndrIwI9FHA.1332@.tk2msftngp13.phx.gbl...
>> Hi,
>> when I switch my reportserver virtual folder to the ASp.net2.0 I receive
>> this error:
>> "Failed to load expression host assembly"
>> this error appears only when I try to render a report, I can list reports
>> or I can access the webservice without any error.
>> any solution?
>> thanks.
>> Jerome.
>>
>|||If you want RS to work, leave it alone at 1.1 or upgrade to RS 2005. Note
that you can leave SQL Server as 2000 and still upgrade RS to 2005. You do
need a 2005 license though. Beside additional features I noticed significant
performance improvements with RS 2005.
Bruce Loehle-Conger
MVP SQL Server Reporting Services
"Jéjé" <willgart_A_@.hotmail_A_.com> wrote in message
news:OrI6xeR9FHA.500@.TK2MSFTNGP15.phx.gbl...
>I know, but, for example Sharepoint works fine under ASP.NET 2.0 and its a
>1.1 software.
> but if I switch the reportserver virtual directory from v1.1 to v2.0,
> rendering a report stop working.
> "Bruce L-C [MVP]" <bruce_lcNOSPAM@.hotmail.com> wrote in message
> news:%232wwe4P9FHA.1248@.TK2MSFTNGP14.phx.gbl...
>> RS 2000 is not a ASP.Net 2.0 app. It uses the 1.1 framework. RS 2005 is a
>> ASP.Net 2.0 app.
>>
>> --
>> Bruce Loehle-Conger
>> MVP SQL Server Reporting Services
>> "Jéjé" <willgart@.BBBhotmailAAA.com> wrote in message
>> news:%23ndrIwI9FHA.1332@.tk2msftngp13.phx.gbl...
>> Hi,
>> when I switch my reportserver virtual folder to the ASp.net2.0 I receive
>> this error:
>> "Failed to load expression host assembly"
>> this error appears only when I try to render a report, I can list
>> reports or I can access the webservice without any error.
>> any solution?
>> thanks.
>> Jerome.
>>
>>
>