my ssrs is a bit rusty, it is just vb.net, but i don't remember the convention for a parameter
if @parameterShowDetails = -1 then
table.TotalBasePrice
else
if table.AccountCode.ToString.SubString(0,1) = "5" then
0
else
table.TotalBasePrice
end if
end if
would seem more economical to say
if @parameterShowDetails = -1 or table.AccountCode.ToString.SubString(0,1) <> "5" then
table.TotalBasePrice
else
0
end if
HTH