SSRS Field Data Based On Other Field - reporting-services

I have a field on an SSRS report running this expression:
=First(Fields!Record_Notes.Value)
I need this to only display data from the Record_Notes field if another field (Note_Service_Index) on this same table has a specific value.
I'm very new to SSRS and am rusty in terms of VB language.
Is there any way to make this work?

If you're using SSRS 2008 R2 and not just plain '08, check out the Lookup/LookupSet/MultiLookup functions:
http://technet.microsoft.com/en-us/library/ee210531.aspx

Related

Crystal Vs SSRS - Click fields to filter

How do we make some fields in Crystal report so when user clicks, whole report is filtered based on that value. How can we achieve same behavior in SSRS. I have some converted reports from crystal to SSRS but some converted reports do not have this behavior and BA wants the same thing in SSRS. Can someone please tell me how to do this in SSRS?
Dynamic filtering is not possible in SSRS. What you can do is an action on that field Text box) so that it runs the same report but passes the field as a filter parameter. set the default value of the parameter as -1 or something that the field value cannot possibly be. This is so when the report runs initially, there are no filters. Hope that made sense

SSRS value not reflecting what is in the DB/DataSet

I have a situation in an SSRS Report wherein the report is not reflecting what is in the data.
The field in question is company-paid Long Term Disability. The value is calculated in a Stored Procedure as 0.0018 of a person's Gross Wages. The Stored Procedure is run by the report and it populates a table with the data the report will use. The report, then, does a straight "select" of values from that pre-populated table.
Let's use a concrete example:
Tom Thumb has a LTD value in the DataSet of 86.3077. I'm looking at
it as I type this, so I know that is the value in the source data.
Next, I run the query in SSRS Report Designer that populates my report's DataSet, and I see the same value of 86.3077 for the field LTDInsurance. That's the correct value. So far, so good.
In the Design View, I can drag the field [LTDInsurance] into the
textfield of the report, or I can use an expression. Neither approach works correctly.
=Fields!LTDInsurance.Value
Formatting on the field is #,##0
When I run the report, the value in that field shows 8,631 instead of 86 (Rounded 86.31). I have deleted and recreated the field. I've closed and reopened Visual Studio (VS 2010 can go wonky on you at times.). I've rebooted. I have tried a whole variety of Properties on that textfield.
Why is it showing this incorrect value?
Delete the data file (rdl.data) from the folder your rdl is in

SSRS reports from multiple queries

I am trying work on a requirement using SSRS 2008 R2. The requirement is to create a detailed report which has main query(dataset1). And a column in this main query is used as a join or input to another query(dataset2).
I am trying to create a parameter and get the value for this from the main query or dataset1. How do I assign this parameter to dataset2? Also I will have similar situation to create dataset3, dataset4 etc and all this sub queries needs to be joined to dataset1.
Can you please help me what is the best way to do this?
In Dataset2, use a SQL variable in your query. SSRS will create a report parameter for you. Then go into this new report parameter and tell it that its available values should come from Dataset1.
Then repeat for the other datasets. :)

SSRS 2008 Calendar Selector

I'm still getting used to migrating from SSRS 2005 to 2008, in 2005 when you set a parameter up inside the report and pointed it to being a date/time the report gave you a calendar to chose your dates (as in a visual cal). I cant for the life of me get it to work in 2008? it just always shows the date/time of the field??
The data source is in the datetime format.
As you mention in a comment, you're populating this data with a DataSet.
The screenshot shows normal behaviour in SSRS 2005 and SSRS 2008.
I created a report in 2005 and 2008 with 4 parameters; two with type Text and two with type DateTime.
Two are populated with a DataSet based on:
select date1 = cast('01-jan-2013' as datetime)
union all select date1 = cast('01-feb-2013' as datetime)
The other two have a default value of =Today().
You can see that behaviour is almost identical between versions.
2005:
2008:
The only difference is that the Text parameter doesn't convert a date implicitly.
From your perspective the main things to note are that when the parameter is populated by a DataSet, you can only choose from a dropdown of the available values (i.e. what you're seeing in your screenshot), but if the parameter is not popluated from a DataSet (dropdown) you can choose from the calendar picker as expected.

Possible to do a lookup on a db table within a SSRS Expression?

I would like to make a lookup within a SSRS expression, is that possible ?
The idea behind that: for a check report I have to decide if a value on the report is ok,
if not it should be shown with a red background color. However instead of keeping the values that are ok in the expression I would like to use lookup in a sql table where these values are centrally stored.
You could do this through custom code or assemblies, but I'd look for a way to do it in the data source query instead. Is your data source the same SQL database?
In Report Builder 3.0 and SSRS for SQL Server 2008R2, you can use the Lookup() function:
Lookup(source_expression, destination_expression, result_expression, dataset)
MSDN documentation here
Also, a couple of sites with examples I found helpful:
http://sqlcircuit.blogspot.com/2012/03/ssrs-2008-r2-lookup-how-to-use-multiple.html#!/2012/03/ssrs-2008-r2-lookup-how-to-use-multiple.html
and
http://blog.jontav.com/post/23229005764/ssrs-lookup
Be sure to use shared datasets!