ssrs questions needing a specific field to be a field then another field from without that - reporting-services

I have an issue where I have a need to pull a field and then a field from whith in that. Problem is I have several different columns where the field i need it pull changes.
=IIF(Fields!a_deduction_code.Value="8310",Fields!a_salary_annual.Value, 0)
ded code 8305 then pull this field
ded code 8310 then pull this field
the problem is I do not know how to tell it in each column to pull a specific code even if I setup the parameters it still pull only the first code in each row..... this has beaten me. Any idea please help
=IIF(Fields!a_deduction_code.Value="8310",Fields!a_salary_annual.Value, 0)
I also added the parameters saying only pull the specific ded codes but they do pull in order to the columns fields

Related

flatten results onto one line in report builder

report example
i have a report that displays client contact details, but annoyingly for each different contact type it displays the results on a separate line! Can anyone advise if it possible to show the results on one line using an expression or some sort of filter, not using SQL.
as you can see from the image Miss S has both a mobile (MBL) and telephone (TEL) number but they show on different rows, if in my program i were to add an email address then it would add a third line, is it possible to flatten the results down to one row?
regards
You'll need to remove the Contact Type column from the tablix as this won't be valid once you put all the contact details on the same row.
Once this is removed, you will then need to edit the row group (under the main design window) and group by the first 5 columns only. There may already be grouping set, if so check that contact type is not in the group by list, if it is remove it.
Alternative
After saying all this, I can't help but think this report would be a whole lot easier, assuming the data was structured correctly (it may already be), to use a matrix control. That way all this and the answer to your previous question (asked recently) would be automatic. I won't go into detail but if you are interested, create a new question and show the output from your dataset query, the query code itself and the desired output. optionally, accept this answer ! :)

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.

Sorting error in one field of Report

I have encounter an odd problem with a specific field which has the Field Name: Billing and is Datatype: Short Text. When I try to sort alphabetically the result on the Report is actually based on a corresponding field that is datatype Autonumber and also serves as the tables primary key.
All other fields in the report sort just fine.
I would like to think I have tried the usual corrections, but may have missed one and I am hoping someone can point this out if that is the case.
Generally I would go into design view of the report, select the field on the Report, click the 'Group & Sort' button on the ribbon and make my selection for how I want to sort from there.
How I know that it is the Autonumber field that is being sorted is that when I switch from A-Z to Z-A, the top result when Z-A is in fact the final entry in the table and concurrently the highest number in the Autonumber and primary key field.
I cannot see how these two fields are linked or why the Billing field is sorting based on the Autonumber field. I have removed the primary key and still encountered the same problem.
A final note that may help point me in the right direction. When I go to the table that holds the field in question I've noticed on Datasheet View there is no option to sort this field. All other fields have the option to sort by clicking the black triangle, but this field does not have this option. I believe the sorting does take place on the Report, but I found it odd that all the other fields could be sorted in Datasheet View, but not this field. Any help is greatly appreciated. Thanks
UPDATE
So a (hopefully) short update to this situation. The solution I undertook was as follows.
Exported the table with the sorting problem to excel. From there undertook the process of duplicating the table with no data in it and then ran an append query to put the data back into the table.
This worked! … kind of.
I had suspected since I began trying to fix this issue that the sort was being affected by the primary key number. I feel this has been confirmed, but it has created a new issue.
What has occurred now is that a relationship query no longer functions because the fields are no longer the same type. One field is an autonumber primary key while the other field is short text. I can only conclude that the field prior to the excel export/import was data type number, even though the data within the field was all text and no numbers. But, it was necessary to have this field as a number so that the relationship to the autonumber field in the other table would function.
Overall it is a small victory in that the report that I first noticed the error on, the error being it would not sort in proper alphabetical order, is now sorting properly. This is an important report that is used often so I needed to get it working properly to move things forward. Unfortunately I have now entirely lost the use of a different report because of a ‘Type mismatch in expression’ which I am concluding is the autonumber to short text relationship.
So I am going to post a new question about relationships and datatypes to see if there is someone that can assist in getting this fully functioning again. I hope this helps others who have encountered this problem.

Adding Access totals cause report to not run

I am trying to add a few totals (sums and counts) using the wizard to an Access report. When I add them to the report and try to view the report, the report fails. Without the totals the report will display. The only thing I can figure that may be a factor is that the query being run to populate the report takes a bit to execute. The query runs a series of other queries which takes longer than normal to generate the report.
ETA: Thank you dmoody007 for your help in rooting out the problem and confirming my suspicions.
The question is a little vague. Any of these can either display errors or cause the report to not run.
Use Control Name in detail section of report for totals field (example: Name is Overtime so total of overtime should appear like =Sum([OverTime]))
Be careful not to name your controls the same. Detail control can be named Overtime. Your total of overtime should NOT be named overtime as well. Name it like Tot_OverTime otherwise you could end up with a circular reference.
If counting a text field, know that null fields are an issue. Suggest counting identity seeds or fields you know always have a value.
Make sure each control in detail you plan to sum, is formatted for numbers. If you look at the control property, format should be a number and you can assign decimal places. If not, you need to check your query or source table to ensure field is properly assigned a format.
One good tip. Add one field to total at a time. A little tedious but ensures one works before adding the next. Always recommend this to newbies until they get real comfortable making reports. Easier to debug.
Good Luck.

How to set picklist value using workflow

I'm creating a lead record using import function (System->Data Management-> Import), I have creatd a workflow for once the lead record is created, the contact record field 'Salutation' which is a dropdown list must be updated.
When I'm trying to do this, looking for lead doesn't appear to have any value coming on it. Don't know how to set picklist value for updating records using workflow. Please see the screnshot below
That seems odd, you should get all available options when updating a record with a workflow. Is the picklist populated with values? The salutation dropdown is not a standard field in CRM 4.0, it's a freetext field OOB.
Regards
I don't thing pick-list field value can be set dynamically on a record by the field of another entity.
What I did I check multiple cases and update the field manually to achieve this.
i.e. If lead(car1) == 2 update the pick-list value on workflow with your choice. But this is q dirty fix because conditions are more and is difficult to use multiple times for updating record.