How to customize TaxReport_IT - report SSRS? - reporting-services

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.

Related

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.

Add filter option on each column of the data displayed in SSRS

I am generating a table in SSRS based on the selection made by the user on two filters: Filter1 and Filter2 (say). The table so displayed has 10 columns and I wish to add filter option listing all available values for that column for all 10 columns.
Basically, I am trying to replicate the Excel functionality of filtering down data on each and every column.
Please note that I tried creating a new data set and a parameter taking all distinct values for a particular variable. However, I am still not able to get the desired results by filter the tablix on that parameter
Is there a way I can do that?
You'd need to make a new dataset that is a smaller version of your main dataset. It would need to return all potential values for the column(s) you want to filter in a single column to be used in a parameter.
Without seeing the design of the report or the dataset itself it's quite hard to be more specific.

SSRS dynamic data retrieval from another dataset

I want to get data(dynamic) according to the data in another dataset and put the result in textbox of the different dataset.
Right now, the data I get is static and I tried to use many expressions but no avail.
Problem lies in editing textbox expression. Since I am getting data from different dataset, it always ask me to have dataset aggregate function in my expression. If I specified the dataset from where I am getting the data, then, I cannot make it dynamic - and I get the undesired result.
And another way out that I attempted is merging the data sets into one rather than having multiples and use it only but this was unsuccessful.
How can I make it work to get the result that I want:
By the way, the textbox and the tables are in different scope. I have tried to combine them in one scope too.
Getting data from another dataset requires an aggregate function because it can't tell what data you want from that dataset so it forces you to aggregate it so it can return a specific value rather than an entire list of values.
I think what you are after is the Lookup function. Lookup allows you to look up a value from another dataset based on a value in the table's dataset. To give a simplistic example, let's say your table was of employees and you had a department id on that table and another dataset called "Departments" which had an id and a name. You could look up the department's name using the following expression:
=Lookup(Fields!DeptId.Value, Fields!Id.Value, Fields!Name.Value, "Departments")
This uses the current table's dataset's DeptId field to look up the Departments dataset by the Id field and return the Name field.
=Lookup(First(ReportItems!EmpID.Value),Fields!EmpID.Value,Fields!Dept.Value,"dataset_which_u_retrieve_the_data_from")
Problem solved!By using reportItems instead of Fields because I am retrieving one data only,not the whole field.
Thanks guys for helping me out.

SSRS Tablix strange behavior with lookup expression

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.

How to avoid summing of numbers in report model in SQL Server Reporting Services

In a report model I have some entities which have attributes which are integers (set to integer datatype) but should not be summed or aggregated in any way.
For examples ID's.
But when I create reports with the wizard, sometimes the report builder will try to sum the values even though it doesn't make sense to sum ID's.
For example let's say I have a list of cars sold in a month. In january I've sold 2 cars, one with the ID 101 and one with the ID 210. In report builder I will then - when using the wizard - get the number 311 for the summed values. I can remove it afterwards, but I would like this to not happen at all (since the end-users will be confused)
I need a way to say to the report model: This is an integer, but it is not really a number you should sum up
Well the wizard isn't perfect as you've found out. It does it's best in trying to figure out what to do. All that you can really do is remove =Sum(carID.value, "datasetname") when it automatically puts it there. Or if you don't need to sum anything at all delete the footer of the table. A workaround perhaps would be to do a Convert in your SQL to make your ID's a varchar.
If you drag an integer field onto the table it generates a sum by default. This is not always what you want - e.g. when the field is an Id or a status code that is the same for all rows shown.
Right-click the "<<Expr>>" and bring up the "Expression..." dialog. Replace "Sum" with "First" - e.g. =Sum(carID.value, "datasetname") becomes =First(carID.value, "datasetname") If the values are the same in all rows, then the first value will do. If not, there are also other functions like Last, Min, Max.
This is a bit of a kludge, but it works for me. I used my text editor to edit the RDL (XML) file and replace "Sum(" with "", then searched (carefully) for the ")" and replaced with "". I only replaced this inside of the ... Reopen in report builder without issues.