I have a very nice admin matrix report "Report Users by Site" that you can drill down from Site, to Category, to Report name.
Where is shows a report was run 7 times yesterday (for example) I would like to hover over that '7' and get a list of the 7 users who ran that report.
I can do [=Fields!UserName.Value] which races through the 7 names displaying just the last one. I tried Split etc with no luck.
Any ideas ?
You can use join() to join a list of things together. For the tooltip on the textbox, use something like:
=join(lookupset(Fields!Row.Value & "|" & Fields!Column.Value, Fields!Row.Value & "|" & Fields!Column.Value, Fields!Value.Value), ", ")
In this example, Fields!Row.Value is what my row is grouped on, and Fields!Column.Value is what my column is grouped on.
Related
Hi I am trying to construct SSRS report using multiple datasets. The report is about hotel details like hotel id, name, city, link to website and hotel specific details. Below is the screenshot of datasets:
BackupReport contains the hotel id, name, city, etc and BackupSubReport contains other hotel specific metadata.
Below is my report Design layout:
Now when I preview the report, I get hotel id, name and city for all hotels first, then hotel links for all hotels and then finally the hotel metadata like below:
The actual report should look like this:
Any idea on how to fix that. I am new to SSRS so not much familiar with all the design specifics. I checked this post here but that is about a specific function. I read about lookup and multilookup functions but not sure how can I apply them here to fix my issue?
Any comments will be helpful.
Well, your desired result is in SSRS normally a subreport, where you have in the main report all hotel Id´s and if you click one id you go to the subreport with the detaildata (like in your picture).
In SSRS you normally have all data for one hotel id in one row. If you have two datasets, you combine the data with Lookup(). Put a tablix in your report and add in the first two textboxes the fields Hotel ID and Vendor Name from the dataset BackupReport:
'Data from DataSet1
| APA-HotelParsing_HotelID | VendorName |
'Data from DataSet1 combined with DataSet2
| APA-HotelParsing_HotelID | VendorName | GoogleValue |
To get Google Value write the following expression in the third textbox:
=Lookup(Fields!APA-HotelParsing_HotelID.Value, Fields!APA-HotelParsing_HotelID.Value, Fields!GoogleValue.Value, "BackupSubReport")
Apply the lookup step again and get all your data in one row.
If you dont want to work with subreport and just display the data like in your picture you can do a workaround and put all data in one textbox. Thus it will look like your pictire. You have to write a expression like this in the tablix detail textbox:
="Hotel ID: " & Fields!APA-HotelParsing_HotelID.Value & Space(10) &
"AA Hotel Name: " & Fields!VendorName.Value & Space(10) &
"City Code: " & Fields!CityCode.Value & VbNewLine &
Lookup(Fields!APA-HotelParsing_HotelID.Value,
Fields!APA-HotelParsing_HotelID.Value,
Fields!GoogleValue.Value, "BackupSubReport"
)
And so on... This way you get all information in one textbox and because it is in the detail section it will get automatically repeated for each row.
Hello please can anyone assist
I have 2 datasets, one of them is filtered to bring back a set of numbers.
I have another dataset using the same data source which is filtered to bring back a different set of numbers.
I want to look up from one dataset to the other to have both sets of figures in the same matrix.
The Matrix is setup to have a name in a row, and month date in the colum.
I want to therefore look up the name from the 2nd dataset as well as the month number and return the value into the above.
Is there anyway to lookup against 2 conditions and return the value ?
Thanks !
Yes - you can combine the fields into one using a separator between the fields.
=Lookup(Fields!MonthNum.Value & "|" & Fields!aName.Value,
Fields!MonthNum.Value & "|" & Fields!aName.Value,
Fields!Number.Value, "Product")
The separator is used to keep values from the first field affecting values from the second.
Update:
For your issue when there is no month, you can try excluding them:
=IIF(ISNOTHING(Fields!MonthNum.Value), NOTHING,
Lookup(Fields!MonthNum.Value & "|" & Fields!aName.Value,
Fields!MonthNum.Value & "|" & Fields!aName.Value,
Fields!Number.Value, "Product") )
If MonthNum is NULL, it will return NULL (Nothing in SSRS).
I have a payslip main report with 3 subreports, all are linked through the employee's serialNumber:
rptPayslipPay -for displaying regular pay
rptPSDeds - for displaying deductions
rptPayslipOpay - for displaying supplementary payments. This
subreport is only showed for few selected employees.
I was able to show the total amounts of the 3 subreports on my main report's page footer. Since my last subreport rptPayslipOpay, may or may not have any data, I am displaying it in a text box named [txtOpay] like this:
=IIf([rptPayslipOPay].[Report].[HasData],[rptPayslipOPay].[Report]![sumOpay],"")
My problem is,the value of [txtOpay] shows even if the page has moved on to another employee, thus displaying the previous employee's supplementary payments to the next employee.
Is there a way to prevent this from happening?
Thank you very much.
You might be able to get it to work by fiddling around with the subreports, but assuming a 1:1 relationship between top-level report and subreport, and assuming serialNumber is a string; instead of your IIf statement, you might consider trying something along the lines of:
=DLookup("sumOpay", [rptPayslipOPay].Report.RecordSource, "serialNumber='" & [serialNumber] & "'")
I'm not sure exactly how your objects are named, but I think this should be close to what you're looking for.
By your description, it sounds like "sumOpay" might be a calculated field in the rptPayslipOPay report. If so, you can use:
=DSum("<field containing data to sum>", [rptPayslipOPay].Report.RecordSource, "serialNumber='" & [serialNumber] & "'")
Granted, these will run more slowly, but this might be an easier way to get it to work.
Another option is to left-join rptPayslipOPay's data from in your top-level query, and sum it.
I want to obtain a running sum in query. I'm using the following running sum formula
RunningSum: CCur(Nz(DSum("[Debit]","[Debit]","[CustomerID] =" & [CustomerID] & " AND [vDate] < " & [vDate] & "")))
But it is not working. My purpose is to obtain sum of Debit for all smaller than the current date field, something like this,
http://i.stack.imgur.com/0qoO7.jpg
After going through different threads, I could not find any solution for my problem. I don't know that how I can get the sum of older debit amounts if there is duplicate date.
I think the easiest thing will be to just refer to running sums for all the controls you want to add. For example "31 to 60 Days" is text29 on your report. Create a hidden control called, say, R31to60 and set to Running sum over group, then in the footer, put a text box and set the control source to:
=[R31to60]
It will show the last value for the running sum, that is, the total.
In design view, the highlight shows the running sum control and total. The control can be shrunk down and hidden.
In report view you can see the "total" field shows the last value for running sum.
I have an Access Report. In the footer section of my report I have a list of different totals. I am looking to create these totals based on a time criteron. For example:
Im looking for a count of the included records. I need to determine a count based on either current- 3 months, 4-6 months, 7-12 Months and 13+ Months.
I have created a DateDiff() expression to determine the amount of months. I have created another expression to assign a letter based on what group the result would belong to. For example:
A = Current - 3months
B = 4-6 Months
C = 7-12 Months
D = 13+ Months
How could I use the assigned letter as a count on my report? Could I make a statement in my control source for my display text box to accomplish this?
I'm not sure where to go next...
In the reports On_Open event write some VBA to store the values from your DateDiff into several different String Variables, and then if your footer is a simple text box just update the values e.g.
txtFooter = "3Mnths - " & str3Mnths & " - 4/6Mnths - " & str46Mnths