Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 Development Tools
 Reporting Services Development
 How to total an <<expr>> field

Author  Topic 

Vack
Aged Yak Warrior

530 Posts

Posted - 2013-10-21 : 14:38:19
I have an expression with the following:

=switch(
Fields!qty_inv.Value=0,Fields!exp_unit_cost.Value*Fields!qty_ordered.Value,
Fields!qty_inv.Value>0,(Fields!dollars_inv.Value/Fields!qty_inv.Value)*Fields!qty_inv.Value
)



In the report it shows as <<expr>>
How do I total this field?

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2013-10-21 : 14:49:20
just appluy sum over it.
right click on cell and select expression
this will open expression editor with above expression. Just add SUM over it

=SUM(switch(
Fields!qty_inv.Value=0,Fields!exp_unit_cost.Value*Fields!qty_ordered.Value,
Fields!qty_inv.Value>0,(Fields!dollars_inv.Value/Fields!qty_inv.Value)*Fields!qty_inv.Value
))


------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/
https://www.facebook.com/VmBlogs
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2013-10-21 : 14:49:22
just appluy sum over it.
right click on cell and select expression
this will open expression editor with above expression. Just add SUM over it

=SUM(switch(
Fields!qty_inv.Value=0,Fields!exp_unit_cost.Value*Fields!qty_ordered.Value,
Fields!qty_inv.Value>0,(Fields!dollars_inv.Value/Fields!qty_inv.Value)*Fields!qty_inv.Value
))


------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/
https://www.facebook.com/VmBlogs
Go to Top of Page
   

- Advertisement -