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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Creating Trends

Status
Not open for further replies.

astorre

Technical User
Jul 4, 2005
24
0
0
GB
We have been assigned the task of creating a report with trends in it. We have no experience of SSRS. We would like to display an image depending on the trend of two data fields, calculated differently by using a marker in another field.
eg:
if field 1 = "lower" and field 2 > field3 then
display arrow up
else
arrow down
end if

Please can anybody help we have been unable to get a simple if statement to work in the expression builder.
 
I don't think SSRS expression builder will handle IF statements. You would need to use a custom code for that. BUT I do know that SSRS expression builder DOES handle IIF statements. In you case that should work just fine.

IIF(field1 = "lower" And field2 > field 3, uparrow, downarrow)

I don't think you will be able to use that to show an arrow though. What you will want to do is something like the following.

Place the two arrow images on the report. Place them approximately where you want them. You will need to place your evaluation formulas in the visibility -> hidden property of the two arrows...for the up arrow you define the function, for the down arrow use the same function but you negate it on the front using a NOT before it. If you need some help building the formula for that, let me know...



=======================================
People think it must be fun to be a super genius, but they don't realize how hard it is to put up with all the idiots in the world. (Calvin from Calvin And Hobbs)

Robert L. Johnson III
CCNA, CCDA, MCSA, CNA, Net+, A+, CHDP
VB/Access Programmer
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top