Cannot access temporary tables from within a function

by ebarcza 12/29/2009 7:40:00 AM

use a table variable instead. Works like a chahm

So instead of this:

 

create table #TempFees
(
 DealCompPriceID int,
 DealCompID int,
 Tier tinyint,
 FeeName varchar(50),
 FeeType varchar(50),
 Vol int,
 estprice decimal(18,6),
 FeeTypeID int,
 rate decimal(18,6),
 tierActual int,
 ActualPrice decimal(18,6),
 pct decimal(18,6)
)

Use this:

declare @TempFees table
(
 DealCompPriceID int,
 DealCompID int,
 Tier tinyint,
 FeeName varchar(50),
 FeeType varchar(50),
 Vol int,
 estprice decimal(18,6),
 FeeTypeID int,
 rate decimal(18,6),
 tierActual int,
 ActualPrice decimal(18,6),
 pct decimal(18,6)
)

 

 

Tags:

SQL SERVER

RDLC Matrix Variance and Total Columns and SubTotals with InScope()

by rbellantoni 12/18/2009 5:35:00 AM

The matrix control inside of the RDLC can be one of the more confusing controls to work with. In order to get totals you need to use the "SubTotal" function of the matrix. Click on a grouping level and select SubTotal. This will sum up all the items in that group. The problem with this is there is no way to control what you would like to calculate inside the SubTotal columns.

 

For that we need to use the InScope() method. The InScope method can be used to indentify whether you are inside a grouping area or not. So we can use this function on the detail level of the report to do custom calculations in the total columns. For example, in the detail cell, you set the value to an expression and could do something like this: IIF(InScope("matrix_ColumnGroup1"), {detail logic here}, {total logic here}). Using this you can now alter the calculations used in the total columns. In my case, I wanted a variance in the total column. So you could do something like this:

IIF(InScope("matrix_ColumnGroup1"), Fields!DetailNumber.Value, SUM(IIF(Fields!VarianceIndicator.Value = "SubtractThisOne", Fields!DetailNumber.Value * -1, Fields!DetailNumber)))


That will give you your variance, the same InScope logic can also be applied to any Color Expressions or other expressions in the detail cells to allow you to modify the colors of the total columns. Also the properties for the SubTotals themselves can be accessed by clicking on the green arrow in the upper right hand corner of the cell.

GOOD LUCK!

Tags:

ASP.NET menu get rid of the arrow

by ebarcza 12/17/2009 4:16:00 AM

utilize the StaticEnableDefaultPopOutImage property, which when set to false, disables the little black arrow and makes it disappear. You can also use your own image here 

Tags:

.NET

Setting properties on a subtotal in an RDLC Matrix

by rbellantoni 12/2/2009 8:30:00 AM

Ever wonder how to get a nice border across your subtotal or change the background color, well low and behold, there is a little green arrow in the upper right corner of the cell. If you right click it and select properties you can edit the properties for the subtotal!

Tags: , , ,

Powered by BlogEngine.NET 1.5.0.7
Theme by Mads Kristensen

About the author

Name of author Author name
Something about me and what I do.

E-mail me Send mail

Calendar

<<  September 2017  >>
MoTuWeThFrSaSu
28293031123
45678910
11121314151617
18192021222324
2526272829301
2345678

View posts in large calendar

Recent comments

Tags

Disclaimer

The opinions expressed herein are my own personal opinions and do not represent my employer's view in anyway.

© Copyright 2017

Sign in