SSRS Tablix strange behavior with lookup expression - reporting-services

I'm seeing some odd behavior with an SSRS report I'm working on. I have a 2 tablix elements that are are populated with the same dataset from a stored procedure. I have applied a filter on each tablix based on an Active field (Active and Inactive) in the dataset. Data looks fine and until I add an expression to the last textbox column field to do a simple calculation (see below). The values based on the data expression come back correct but the tablix now shows a duplicate row for one record (last record) in the tablix that has the filter set to Active. I'm not quite sure what is going on because the data is the same hasn't changed from when the expression is not there.
=Fields!Avg.Value/Lookup("Low Risk", Fields!RiskGroup.Value, Fields!Avg.Value, "ReportData")
Update:
So I haven't solve the problem but have more information. What looks to be happening is due to the order of the records coming back in SQL and how the tablix is filtering. The "Low Risk" record used in the lookup is the last record in the grouping. My 2 tablix I mentioned previous are identical with the exception of tablix filtering on Active field. If the Low Risk is the last record in the data set there are no data issues. However if the Low Risk is not the last record that is when the tablix goes awry. Anyway, still researching but anyone has any information it would be greatly appreciated.
Update:
Still haven't found the issue but found a workaround. I've extracted the lookup expression to a textbox and then reference that textbox in my tablix expressions and seems to do the trick....Still very odd behavior. I actually mocked up a simpler dataset and didn't see the same behavior so must be due to something in my dataset that I can't pinpoint.

Related

How to customize TaxReport_IT - report SSRS?

I would like to custom the Report SSRS TaxReport_IT, I need to add a new field in order to use in to SyntethicReport Design.
(for example)
The classes involved seems these:
TaxReport_IT
TaxReportDP_IT
TaxReportController_IT
TaxReportContract_IT
Tables involved:
TmpTaxReport_ITSummary
TmpTaxReport_IT
TaxReportTmp_IT
Are there others? Are there some Queries involved?'
I added the new fields in to table _TmpTaxReport_IT_, and I pupulated the related tables
I'm sure, in to the method I pupulated correctly the new Field (I have the values ​​that I expect), but when I print the Report I get a lower value. Seems like I don't take the total data set.
How can I add the new field and take the correctly total value?
I saved the data (about my custom field in a RegularTable) and the sum is correct, but I have mismatch when I print the report.
I think I skip some step to Report DataSet.
I use Dynamics AX 2012.
Thanks in advice!
I have an idea what could be wrong, but I'm making some assumptions. If they are not correct, please edit your question to clarify.
From your screenshot, it looks like you want to add your new custom field in the header section of the report design. I'm assuming the expression of that field looks similar to
=First(Fields!MyCustomFIELD.Value, "TaxReportDS_IT")
Note the First key word in that expression. This indicates that the value for that field should be taken from the first of the records of the report's dataset.
I'm assuming that you calculate the value of the field while the records in table TaxReportTmp_IT are being created so that each record has a different value. Maybe it is a sum of some other field, so the first record would have the smallest value and the last record the highest.
If all those assumptions are correct, you can fix this by changing the First keyword to Last. This indicates that you want to take the value of the last record of the report data set.
See also the documentation of the Last Function.

Combining multiple drill through reports into one

First time posting here so please be kind.
I've come from using PowerBI to achieve pretty much everything I need to with a couple of clicks to using SSRS 2008... and I'm having a hard time. Here's what I'm trying to do:
I have a main report that summarizes some data on how long it takes to close down help desk tickets. On that report I have a table with summary figures (ie 220 tickets were picked up after 5 working days, 18 tickets were reopened etc). I want to click the text-box that contains 220 and be taken to a drillthrough report that contain the same table with column headers and just different row sets in each case. There will be 8 drill through actions in total and I currently have 8 drill through reports. Only 2 of those are parameter based, the others just filter the dataset based on some conditions.
What I'm trying to work out is this: can my 8 drill-through reports be rolled into one, if they're just different views of the same dataset? I've created some calculated columns with values (Yes/No because boolean doesn't allow multiple values) which are easier to pass to parameters. I also have 8 parameters on my detail data set. I've set up actions (where parameter1 = yes for instance) to take me to my detail report and use the corresponding parameter each time. It should work... but it doesn't and I can't work out why. Currently its' complaining that I can't compare a boolean to an int16 - neither the value in my calculated column nor the default parameter value is boolean or int. So, am I trying to do something that just isn't possible? Has anyone else achieved this?
Edit: here's the parameter
The error I'm getting is
The calculated column that should be checked against the parameter is
=IIF(IsNothing(Fields!DatePickedUpByAgent.Value), "Yes", "No").
Here's how I defined the action to take me to the drill through report in this case
Here are the filters on the subreport dataset based on the parameters passed through from the main report. "NotYetPickedUpByAgent" is the example we've been discussing here. enter image description here
Could you please go through each of your parameters one by one.
I would suggest deleting all the filters and trying to run the report and subreport.
Then keep adding filter one by one.
I think issue can be any of the filter and not the one you think.

SSRS ignore a field result

I guys
I'm having a slight problem with a report im currently writing.
So when i run this report it gives me a list of outcomes from a data source.
One of results is 'Closed' I want to exclude this outcome in my report. I cant exclude this in my SQL code as it doesn't bring back the null values. ( when no outcome has been given to a task yet i.e no one has had the time to do it yet i have set that in the expression to 'No Outcome'.)
So i want to know if anyone can edit my expression so it does not bring back the value of 'Closed'
=IIF(IsNothing(Fields!OutcomeDescription.Value),"No outcome",Fields!OutcomeDescription.Value)
Any Help on this would be great sorry if iv not explained this well.
Rusty
To do this, you'll want to add a filter to either your dataset or your table object - whichever is most appropriate for your needs.
For a dataset filter, merely open your dataset properties, and look for the filters tab. For a table, you'll need to go into the tablix properties. Setting up a filter from there is simple.
Filtering at the dataset level will drop all of the filtered records before any controls on the report could access them. Filtering at the object level would drop the filtered records from the control, but they would still be available to other controls. If your report only consists of a single table, and no additional objects, I'd recommend filtering on the dataset.

SSRS 2008 R2 Subreport Will Not Display

I've looked through all the other topics on this subject but I cannot find an answer. I have a report that utilizes a dataset that runs a stored procedure. That SP returns two rows, both of which I can display in a table in the report. So far so good.
Next, I added a tablix which uses the same dataset. In the (only cell in the) detail row of the tablix I added a subreport. I added the parameters to the subreport (four of which come from the dataset and one of which comes from a main report parameter). I created a row group tied to an Id column on the dataset.
What I expect to see when I run the main report: two instances of the subreport, one for each of the two rows returned by the SP.
What I actually see: In ReportBuilder I only get the first instance of the subreport. If I call the report service from an application (rendering it as a .PDF) nothing of the subreport shows at all. In either environment, there are no errors showing in the report.
What I've checked: I made sure all the various visibility options in the tablix, the row group, the subreport, etc. were set to always show. I also added some text to the subreport's NoRowsMessageproperty. That text is shown (one for each row) for the subreport when I try to run it from the Report Service. Why this would happen I also don't know, as the parameter values I supply are identical in both cases.
My guess is that I've got something wrong in the way I'm doing the row group, but I don't know what it is.
In the end I just created a new (blank) report and recreated the tablix. Even though I used the same data source/row group/parameters, etc. it worked just fine. I have no idea why. I copied the working tablix in to the broken report and it still didn't render correctly. Again, I have no idea why. However, I got it working by just starting over. Thanks for all the answers.
Try putting the subreport in a rectangle, I did a report that way in which the subreport pagebreaked after each instance.
I would make sure the rectangle with the subreport in it is under the group row in your tablix.
Cheers!

SSRS 2008 Sorting Not working

I can't figure out why sorting is not working in my SSRS Report. I have a Tablix on the report that groups by column A.
When I preview the report, Columns B - N have sort handles at the top (little black triangles, one pointing up, one pointing down)
When I click one of these SSRS pretends to sort the data, but when it finishes, the data is still in the original unsorted order. Why?
Edit - These columns are within a grouping. When I take the grouping out, they will sort as they should.
When I try checking "Apply this sorting to all groups and data regions" and setting it to the name of the grouping I get the following error"
The tablix ‘tablename’ has an invalid SortTarget “group_name”. The scope must be the current scope, a peer scope, which is a data region, or an ancestor scope. If the current scope and target scope are groupings, then both scopes must be along the same axis.
What does this mean? I have tried every option in the dropdown and it either results in the error message or the same non-functioning sort I was originally dealing with.
For the column headers that have the sort triangles, check the Text Box Properties. Under Interactive Sorting, check to see that the Sort by: expression is set as expected. You probably want to be sorting the Detail Rows for "Choose what to sort:"
For sorts groups, click on "Rows Groups" and select row what you want sort and click on "Group Properties" and go to "Sorting" and then select your column.