Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to convert a statement done in Crystal Reports to SSRS 1

Status
Not open for further replies.

spiego

MIS
Aug 16, 2004
80
US
I need to be able to do the following statement in SSRS. What is the best way to do it?

Code:
Select  Sum {ARM340L1.Qty}

   Case 0: 
" "
   Case 60: 
"24/36"
   Case 72:
"24/48"
   Case 84:
"36/48"
   Case 96:
"48/48"
   Case 108:
"36/36/36"
   Case 120:
"24/48/48"
   Case 132:
"36/48/48"
   Case 144:
"48/48/48"
   Case 156:
"24/36/48/48"
   Case 168:
"24/48/48/48"
   Case 180:
"36/48/48/48"
   Case 192:
"48/48/48/48"
   Case 204:
"24/36/48/48/48"
   Case 216:
"24/48/48/48/48"
   Case 228:
"36/48/48/48/48"
   Case 240:
"48/48/48/48/48"
   Case 252:
"24/36/48/48/48/48"
   Case 264:
"36/36/48/48/48/48"   
Case 288:
"48/48/48/48/48/48"   
    Case 300:
"24/36/48/48/48/48/48"
    Case 360:
"24/48/48/48/48/48/48/48"
    Case 420:
"36/48/48/48/48/48/48/48/48"
 
Couple of ways i can think of...

Switch expression in cell
=switch(
sum(Fields!whatever.value)=0," ",
sum(Fields!whatever.value)=60,"24/36"
.....
)

or write a custom function in the report based on vb Select Case, and then call the function from the cell, passing in the sum() value - may be worth doing this if you need to re-use.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top