Dynamics CRM Online - Can't open subreport with conditional expression - reporting-services

I created a report using Visual Studio.
I have a table with one column that contains total won opportunity per account. If an account has total won opportunity more than zero, I want to link the text to a sub report (account detail report). But if it is zero, then I don't want to link it anywhere. So I create an action for 'Go To Report', and put expression in 'Specify a report' like this :
=IIF(Count(Fields!opportunity_name.Value) > 0, "AccountDetailReport", Nothing)
It works well in Preview section, if I clicked on total won opportunity with value more than 0, it will directed to the subreport. But when I uploaded the report to Dynamics CRM online, and tried to click on total won opportunity, it throws an error says : "Details are not available because subreport is missing".
I guess it because the conditional expression when I specified a report. Because if I changed the Specifiy a Report using only AccountDetailReport (without expression), it works fine

Try creating two placeholders in your tables column, both in the same cell. The value expression will be the same (whatever you currently have in the column) .
You can then set the 1st placeholder to be visible when the total won > 0 and this placeholder can have an action to go to the sub report. The 2nd placeholder can be set to hidden when the total won value > 0 and have no action assigned.

Related

SSRS Printing sub report for each record

Is there a SSRS guru that can help me please?
I have a report that generates a tabular list of Claims as follows:
The dataset contains a single table and multiple records with a RecordID, Carnet Number and Claim Number. The RecordID is not shown on the report.
I then have a different report, lets call it "LETTER", that is in a letter format:
The LETTER report prints a letter containing information for a single Claim and its content is extracted from the database by using the RecordID.
I have added the LETTER report as a sub report and it is linked to the main report via the RecordID.
Requirment
The first report must generate as normal and list all the Claims in the dataset. The subreport LETTER must then generate for EVERY claim shown on the first report. Each LETTER must be on a seperate page as it will be printed on an official company letterhead. No direct printing to a printer is allowed which means the reports must be shown as a single report for the user. The default SSRS page navigation etc functions will be available.
Problem
The subreport LETTER must be generated for each RecordID. Currently it is only generating for the first RecordID.
How do I ensure that there is a LETTER for each claim that is listed?
Thank you in advance.
It sounds like you're going to need to add all of the elements of the letter into a list item and group by the RecordID field. I did something similar for a small report in the image below. Basically, add a list item and set the dataset to match your claims dataset in the Tablix Properties. Then, open the Group Properties, group on RecordID, navigate to the Page Breaks tab and add a page break between each instance of a group. This should produce a new letter for each RecordID.

SSRS report pass multiple VALUES to drill through report parameter

I created a report with 5 fields in a hierarchical order:
Order Date
Time of Day (AM/PM)
Parent Name (aka customer)
Product Line
BIC Part Number (aka Item)
Each field expands down to the next level, so order date expands to time of day, etc.
I want to create a drill through report so that the user can click on each level of the hierarchy and see the detail.
This works fine at the lowest level - Item - because only 1 values from each field has to be passed to the drill through report parameter. However, when I try, for example, to drill through based on Product Line, there will usually be 3 or 4 Items within this product line. In the Go To action, I have the drill through parameter "bic_part" set to the main report FIELD value "BIC Part Number".
I have the tablix on the drill through report set where "BIC Part Number" IN [#bic_part].
I just want to be clear, I am passing a set of report field values to the drill through report parameter, not parameter to parameter.
I have tried using expressions with =Split(Join(field value),","),",") and all variations on that. I can't seem to get the child report filters to accept multiple values from the BIC Part Number field from the parent report.
I also tried omitting the BIC Part Number value in the go to report section, but it would not let me.
All of the parameters in the child report are set to accept multiple values. My data source for both reports is the same stored proc, so I can add a query filter. I would appreciate any help.
I think each sub report link needs to be slightly different.
In the subreport, each parameter needs to accept null and your query needs to look for
(FieldName = #FieldNameParameter or #FieldNameParameter is null)
This will allow you to pass the lowest possible solid value, then null for all child values.
If we're looking at the Parent_Number level, on that subreport link you would pass Fields!Parent_Number.Value and then Nothing for each of the lower parameters (Product_Line, BIC_Part_Number).
This will allow you to filter on the lower common denominator in your sub report - Part_Number for this link, Product_Line for the next one down, etc.
I've used this logic in reports before, so it does work. Let me know if my explanation needs clarification - it's Friday afternoon..

passing multi valued parameter to sub report in SSRS

I have built a report which lists all the loans that are available for a specified date range(below is the screen shot of the report).There are a number of filters and data logic involved in pulling this report.The numbers high-lighted in yellow are the total no of loans in each bucket.When the user clicks on the totals I need to open a sub report with all loans falling in that bucket.I have created a sub report which accepts loan numbers as a parameter and set it to allow multiple values. Set the text box properties on the main report to go to the subreport when clicked on the totals.But I am unaware of how to pass multiple loan numbers from the main report to sub report.
Any help would be much appreciated.
What I am currently doing is passing required filters/details to the sub report , so that it can reevaluate. Reevaluating the report takes a lot of of time as there are many condition that need to be evaluated. It would be quicker if I could send the list of loan numbers.
Rather than pass a list, you'll need to pass in enough detail so your subreport can reevaluate and come back with the same set of loans.
This might be a little simplistic but base on your screen show you would pass in the Date Range column value. I'll assume for now (as I have no more information on your data) that the column is just a text column as it appears above.
So you sub-report would accept a daterange parameter and you would pass this as =Fields!DateRange.Value. The subreport would then do something like..
SELECT * FROM myLoansTable WHERE DateRange = #daterange
If there are more parameters set in the main report, you may need to pass those too so your subreport gives the same set of loans as displayed in the main report.
Hope that makes sense.

SSRS Visibility expression to hide certain Tablix, after parameter selection

Hi All I have a ssrs report with 6 tablix and all 6 using the same dataset1, but with tablix filtering for 6 unique service provider, one for each tablix.
The user selects a country from the parameter. And based on which country the user selected: Out of the 6 service provider, some of them may not be available in that country and will display a blank tablix table with only the column headers.
What I want: Is there a way to change the visibility settings so that whichever service provider tablix is empty, they would become invisible?
For example: User selects Canada:
Provider1: Available in Canada, Show Tablix
Provider2: Available in Canada, Show Tablix
Provider3: Not available in Canada results in blank tablix - Turn visibility to hide
Provider4: Not available in Canada results in blank tablix - Turn visibility to hide
Provider5: Available in Canada, Show Tablix
Provider6: Not available in Canada results in blank tablix - Turn visibility to hide
So only Tablixs for Provider 1, 2, and 5 will show on the report.
I am assuming this will use the IIF expression? I just need some guidance on what would be the best way to accomplish this.
Thank you
You can use a similar expression to set Hidden property of a Tablix:
=IIf(CountRows("YourTablixName") = 0, True, False)
The NoRowsMessage property of a Tablix may be useful to your needs. If the filters result in the tablix having no data to use, this will show a message instead of displaying the column/row headers. This can be static or an expression:
="No Provider3 data available for " & Parameters!Country.Value
The Font properties of a tablix (rather than the properties of it's cells) control how the No Rows Message displays.

ssrs dril through to another report from matrix collapsed mode

I created a matrix report table with the option to drill down in that matrix with the + sign in both columns and rows.
The user can also click on any text-box in the matrix and it actions to a different report with parameters to view details.
Both tables are 1 report and 1 matrix table in different settings of hide/show groups.
In the right table I sent the number marked red is an example for drill through with parameters sales+mary, and aria1+product 2.
On the left, the drill through always sends with sales-david as parameter because he was first.
How can I drill-through with a parameter that represents the entire group of sales?
You should be able to use InScope("SalesPerson") or simialr to test the scope of the cell you click on. If it's inscope of the detail column group you can pass the actual SalesPerson to the drill down report, if not then pass some arbitrary value (say -1) and have you sub-report ignore SalesPerson if the parameter is -1
InScope("SalesPerson") will return true if the group is expanded or false if it's not.
You can read about InScope here
https://technet.microsoft.com/en-us/library/ms156490(v=sql.100).aspx