MS SSRS Report Builder - Semantic query compilation failed - reporting-services

Semantic query compilation failed: e InvalidParameterValueCardinality The parameter "Region1" requires a single value.
However, the value provided for the parameter is a set. (SemanticQuery ''). (rsSemanticQueryEngineError)
----------------------------
An error has occurred during report processing. (rsProcessingAborted)
I was getting this error on MS SSRS. I have two dropdowns which can select multiple values. It's working for single value. If I select multiple values I'm getting this error.

I was able to fix the issue by setting "equals" to "In a List".
here is the steps
In DataSets -> Query Designer -> Filter -> Any of section click on equals then select In a List

Related

SSRS (Sequel Server Reporting Services) subreports returning "Error: Subreport could not be shown.""

I am using SSMS 18.5 (fully patched).
I have a report with three (parameter selections; date which is used to select from a list of available items in the second parameter, which in turn is used to make a selection from the 3rd parameter. This report works! When I call it as a subreport from a master report (using the insert subreport), if there IS data found based on the three (03) parameters I pass it, I get the intended results. If no data is found, I receive the "Error: Subreport cannot be shown." Error. THIS IS OK.
My intent is to call this subreport multiple times with different parameters to list out the different result sets.
My question is how do I condition the subreport call in the master report to not show the error message?
Psuedo code for the visibility option:
(IIF(returned value = error message), true, false)
I have tried this directly in the subreport properties (Visibility). I have tried putting the subreport call in a rectangle and I have tried putting it in a table / matrix.
There is NO "field" to reference or rowcount that I am aware of. SSMS only allows reference to items at the same level or higher and not lower (the subreport).
A specific expression ( IIF() ) with an explanation would be appreciated. I have read numerous articles and tried them all with no results.

using RenderFormat.IsInteractive in SSRS query

I am creating a SSRS report where I require to call different queries based on some condition. mainly with Globals!RenderFormat.IsInteractive.
If Globals!RenderFormat.IsInteractive is true call 1st query block otherwise other query block.
In query itself it is not possible to create IF condition using Globals!RenderFormat.IsInteractive. so I tried creating report variable and parameter with default value of Globals!RenderFormat.IsInteractive but both giving error of query refers to the global variable RenderFormat, which is not valid for this type of report item expression.
Is there any workaround for it?

Reporting services, textbox message

I'm working with SQL Server Reporting Services 2005.
I have a report with a dataset that gets data from a SQL Server database. Also, I have two report parameters of type DateTime (StartDate_param and EndDate_param) which the user selects on the report.
I have set a restriction if the user picks dates with different months, for example june 1 and may 3, the process stops:
I have this code on the Report Properties-----Code section to manage the restriction:
Public Function ValidateDate(StartDate As DateTime, EndDate As DateTime) As DateTime
If (DateDiff(DateInterval.Month, StartDate, EndDate) <> 0) Then
Err.Raise(6,Report)
End If
End Function
and I have set a hidden parameter CheckDateRange which calls the ValidateDate function with this expression:
= Code.ValidateDate(Parameters!StartDate_param .Value, Parameters!EndDate_param .Value)
This stops the SQL processing and i get this error when entering dates with different months:
Error during processing of 'CheckDateRange' report parameter
But I would like to show a message on a Textbox instead of the message that's showing now, how can I do that?
if that is not possible, what could I do in that case?.
thanks..
What about instead of stopping the process, just show a different 'report' to the user. This error report would have the error message that you would want to show the user. You would then just set the conditional visibility of the reports depending on the evaluation of the parameters, you could also alter the SQL of your 'actual' report so that it doesn't even run when the error parameters are given by the user (this would prevent making a now useless query because this data won't be shown).
So if your report now is a tablix set the tablix's visibility condiiton to hide when the error parameters are given. Then create a text box outside that tablix that will store your error message and give it the opposite visibility condition logic. Then alter the SQL query so that it just returns a null row when the error params are given.

Error when executing report with Data-driven subscription due to invalid parameter value

After the report is executed by data-driven subscription, the following error is thrown to the Reporting Services LogFile:
ERROR: Throwing Microsoft.ReportingServices.Diagnostics.Utilities.InvalidReportParameterException: , Microsoft.ReportingServices.Diagnostics.Utilities.InvalidReportParameterException: Default value or value provided for the report parameter 'customer' is not a valid value.;
If I execute the report manually, it works completely fine since the customer parameter value is static.
Does anyone know a solution for this when values are dynamic from the data-driven subscription query results?

What are the best strategies to debugging SSRS?

I am looking for ways to track down where an SSRS error is occuring.
I have a report that is about 90 columns wide with multiple formulas. The problem that I am having is that on one of the formulas there is a divide by Zero error. I have implemented the answer from Robert Harvey in this question but I still get the error. I know that the answer works as I have tested it on a small report.
So the question is: How on earth do you identify where an error is occuring in SSRS when SSRS only reports that an error occured?
EDIT The error as displayed is
An error occured during local report processingAn error has occoured during report processingCannot read next data row for the dataset MainReportDivide By Zero error encounted
EDIT
Rather than use the IIF statements and others, I'd reccomend doing the following... Add a custom function to your report, go to report properties and the code tab. Create the following. To specifically identify the field that is throwing the error, you can change this to return a string and maybe "#OOOOOOPS" so it sticks out on the report.
Public Function SafeDivision(ByVal top As Decimal, ByVal bottom As Decimal) As Decimal
If bottom = 0 Then
Return 0
Else : Return top / bottom
End If
End Function
After adding this function, go to the expression view for all of the fields that you have where division will occur. You can execute this newly created function by typing in:
=Code.SafeDivivision(CDbl(1.24), CDbl(0))
ORIGINAL
If you run the report within visual studio, does it tell you which specific textbox/label/field the computation failed in? That should help pinpoint where the issue is coming from, but you could also make sure that you never perform the division with 0 in the denominator by looking at the code below...
//myBottom would be the value of the denominator
//myTop would be the value of the numerator
= IIF(myBottom <> 0, myTop / myBottom, "")
Follow Up
The problem ended up being the SQL Query. As part of the SQL query, I had as In clause like the following.
Select ID, Name, price/kg as unitpice from products where ID In (#ProductIds)
SSRS uses exec sp_executesql and string.replace to inject the ID's into the IN clause.
The problem I had was I would run the query in SQL Studio Manager. with all the variables entered and it would work as expected. but under SSRS it would fail with the divide by Zero error, and there was no real clear indication where the error occured.
After I made a copy of the report and deleted items one by one until there was litrally nothing left on the report to render and it still produced the error, I turned my attention to the SQL Query.
It was there that error was occuring. I only found it after using SQL Profiler to find out what SSRS was actually running.
After that it was relativly easy fix of deleting the offending line and returning the seperate parts of the divide and run it through the function that RSolberg suggested.