Reporting Services problem. Forward dependencies are not valid - reporting-services

I have a problem with a Reporting Services report. My report has two datasets, one that fetches the actual report data and one that fetches translated resource strings for displaying wherever literal text is used on the report. This dataset requires three parameters, a language set id, a language code and a string to match against resource names.
Following an example I found here (the reply by Miguel Catalão) I have created a multivalue parameter #Resources that will be populated from the resource dataset and a code function that looks up specific values from the multivalue query. This function will then be called from expressions wherever literal strings are used.
I think that this should work but I have run into a problem that I can't quite figure out a workaround for. There is a dependency problem in the #Resources parameter being dependent on the Resources dataset which in turn is dependent on three parameters; #LanguageSetID, #LanguageCode and #ResourceNameLookup. I have read that the order of declaring parameters is important so I have made sure that the last three parameters appear above the #Resources one and that all three of them have default values that will result in data being retrieved by the dataset.
Yet I am still getting the following errors when previewing the report; any advice or guidance would be most appreciated.
The report parameter ‘Resources’ has a DefaultValue or a ValidValue that depends on the report parameter “LanguageCode”. Forward dependencies are not valid.
The report parameter ‘Resources’ has a DefaultValue or a ValidValue that depends on the report parameter “ResourceNameLookup”. Forward dependencies are not valid.

I had the same error but it was due to something else. What I had done was created a Parameter in my report, then linked the Default Values to a Dataset.
This in turn added the parameters needed in the Dataset. Somehow, the order of the parameters in my list were changed. This is when I stared getting the 'Forward Dependencies are not Valid' error.
I then looked at another report that used the same process to link a Parameter to a Dataset. I noticed that the order of my Parameters were different. I simply went back to my new report, and used the up and down arrows until my Parameters were in the same order as the working report. This seemed to fix the error and work fine. Apparently the the Parameter that was using the Dataset needs to be below the Parameters that are used in the SPROC.
I this helps someone in the long run.
C/N: Parameter was being filled by a Dataset(Stored Procedure). The Parameter that was being filled was above some of the Parameters that it was expecting for the SPROC.

This was all caused by a stupid error I made. I copied and modified the code function from the post I mention but neglected to change the data type of the argument from integer to string, which mine is.
It seems rather odd that the error manifested in the way it did but I have gotten past that problem now, only to run into another that I ask about in another question.

Related

I have 3 parameters and I keep getting the forward dependencies are not valid error

The report parameter 'ServicePriorityNameParameter' has a DefaultValue
or a ValidValue that depends on the report parameter
"ServicePriorityNameParameter". Forward dependencies are not valid.
This is the error I keep receiving when trying to use this parameter.
I also have a WorkCategoryParameter which I specified the values for. Also a RequestNumberParameter in which a request number can be typed into.
I have tried reordering my parameters and also adding a separate dataset in which to run each parameter off of. I'm pretty new to SSRS so any words of advice will help. Thanks!
Reordering the parameters in the designer does not actually reorder them. If you open the report's rdl file (if using visual studio just right-click the report in the solution explorer and select View Code). In there, look for the ReportParameters section and reorder the parameters from there. Basically you need to make sure that any parameters that are dependent on other parameters are listed after the thing they are dependant on.
E.g. If you had a parameter called #Countries to list countries based on continent and the dataset that supplied the values to that parameter read something like SELECT * FROM dbo.MyCountryTable WHERE Continent = #continent then the #continent parameter would have to appear first in the list as #Countries depends on it.

ssrs subscription multi value - parameter not saved

I didn't create the report, but there is a (not data-driven) subscription. There is one parameter with a default value (no issues). Then there are two multi-value parameters. When modifying the (mysteriously empty) multi-value parms (after the report failed to run) I can select ALL for each and set to run once--and the process succeeds. A file is written out to the folder per my intentions.
But when the date to run is set to the next morning, the execution fails with a message about invalid parm values. When I go in to check, those multi parms are empty again.
How do I fix this? (dumb question, I know)
What am I doing wrong? (also, very non-specific)
What am I leaving out? (of this question)
How do I search for this issue on SO? (I tried, but I couldn't find anything similar; maybe I'm missing some terminology; my search terms were "ssrs subscription multi value parameter not saved")

Getting a "one or more parameters required to run the report have not been specified" error

I am building a report that I would like to accept two values from the user, feed those into a query, and find the data associated with those entries.
For example, if you had a list of employees, performance measures, and values associated with those; then the user would select an employee name / performance measure, and they would get the scoring information on that employee for that measure.
I have two parameters, each being populated from SQL queries getting a distinct list of employee names and measures, and a table below that just pulls up information based on ~ 'WHERE name = #Name AND measure = #Measure' but when I click 'Preview' to run the report locally I get the error: "one or more parameters required to run the report have not been specified"
I know the parameters are working properly because I can feed their values directly into a textbox and the values populate correctly. Also, if I change the query to just accept one parameter (i.e. WHERE measure = #Measure) the query works.
I'm confused as to why this error is occurring since I know my parameters are functioning and being populated properly.
I experienced this behavior in .NET 4.0 using Local Reports (in .rdlc files), when one of the parameter's values was containing an emtpy string. Although setting the parameter was correct:
report.SetParameters(
new List<ReportParameter> {
new ReportParameter("Title", Messages.Title),
new ReportParameter("SubTitle", Messages.Subtitle))
}
);
It worked only as long as both parameters actually contained some characters, otherwise the mentioned exception was thrown.
This error is caused when you either
A) the parameter is spelled wrong in the actual report. Meaning that the query is expecting #Name but the report is passing #Names (or some other spelling).
or
B) Is it possible you are attempting to run the report with a default value on the parameter of NULL for #Name but the stored procedure requires an actual value?
This might be happening if you are building the report in Visual Studio and gave the #Name parameter a default value of (null).
Try removing the default value or making sure you #Name parameter has an actual value, even if it's just ''.
I had similar issue. Issue happened when you use SharedDataSource with parameters that are to have null value. If you use same query in embeded data source, there is no problem.
Unlike embebed data source, you have to define if parameters used in query of shared data sources are allowed to have null value as highlighted in screenshot here. In my case, there are two parameters in query of shared data source, that can have null value.
So after setting them to allow null, problem fixed!
This caused me many hours of pain. Turns out that it's to do with using a shared dataset.
Embed the dataset within your report instead and it works fine.
For me, setting the value of the parameter makes problem. I don't know why, but the parameter value was not able to accept a string.Empty or null. So i just gave a " " as value solves the error.
Sample
ReportParameter[] parameters = new ReportParameter[4];
parameters[0] = new ReportParameter("Name", EName);
parameters[1] = new ReportParameter("ShiftName", CurrentShift);
parameters[2] = new ReportParameter("Date", LoginDate);
if(ValidateReportData())//some condition
{
parameters[3] = new ReportParameter("Date1", LoginDate);
}
else
{
//parameters[3] = new ReportParameter("Date1", string.Empty);//this makes exception while calling Render function.
parameters[3] = new ReportParameter("Date1", " ");//Solves the issue.
}
I was having the same problem, it is now sorted on sql server 2008 r2.
I know this is now an old question,
but just to help others:
It was very simple really, just making sure the spelling including the case is the same and the use of #.
I have a shared dataset called currentSpaceByDrive with the following code:
SELECT
[DRIVE]
,[Volume_Size_GB]
,[VolumeSpaceAvailable_GB]
,[VolumePercentAvailable]
FROM monitoring.dbo.currentSpaceByDrive(#ServerID)
I add the shared dataset currentSpaceByDrive to my report and I give it the same name.
when I right click on it, the one on my report, dataset properties, the parameter is #ServerID.
#ServerID value comes from another dataset, called the_servers (where the user selects a serverID)
I have a report parameter also called #ServerID that gets its value from the_servers and is used to feed the #ServerID parameter on currentSpaceByDrive.
Too many #ServerID, I understand, but if you do your own test based on this, you will get it done.
See the image attached.
hope this helps
marcelo
check DataSet In Report Server , I had Similar Problem , I was Editing Shared Dataset in Visual Studio , but it didn't work , after an hour of frustration I checked dataset in report server and I found out it Is not updating with changes I made in visual studio , I Delete it and Redeploy Dataset Again from visual studio . it works .
Actually I had to:
Delete the SubReport object from the report.
Drag new object from Toolbox
Setup the SubReport name and report
In Paramateres "Add", and choose each parameter, and related value.
Then is works for me.
I think I have same issue my Parameter Supervisor is blank when I choose "Select All" which causes the error "One or more parameters were not specified for the subreport", but if I select a few supervisor name then the sub-report appears. It is puzzling because the Manager parameter value shows all value when "Select All" is checked, but it is not working on my Supervisor parameter. Note that Supervisor parameter is dependent on manager parameter.
I'm using shared DataSets for several reports, and the root cause of this issue was not mapping the input parameters from the report itself to the parameters of the shared dataset.
To fix, I navigated to the "Report Data" panel, opened the dataset (which is really linking to a shared dataset), clicked the "Parameter" tab, and then mapped the report parameters to the parameters of the shared dataset.

Lookup function works, until deployment

I'm working with Visual Studio Reporting Services 2008, and I've come across an irritating problem. I have a cell in a table that uses a Lookup from one dataset to find the information to display in another. The code is as follows:
=Lookup(Fields!place_id.Value,
Fields!id.Value,
Fields!name.Value,
"Centres")
The place_id and id are from one dataset (Dataset1) and the other is from the dataset "Centres". This works fine in the preview, but not after deployment. When I try to deploy, I get an error message (where textbox22 is the cell in question):
The Value expression for the text box ‘Textbox22’ refers to the field ‘name’. Report item expressions can only refer to fields within the current dataset scope or, if inside an aggregate, the specified dataset scope.
Surely, by having "Centres" there in the expression, that is the specified scope. Any ideas?
Based on your shared information, I can say that your SSRS development version is SSRS2008R2 and your report server version is SSRS2008. Since Lookup function is not supported in SSRS2008 and lower version. This is the reason that you are getting this error in deployment whereas preview in working fine.
For any additional information regarding Lookup Function, you can take a look into Lookup Function

SSRS Report Dataset Parameter format discovery when querying Tfs 2010 SSAS Cube

I'm very new to SSRS and Report Builder, and I'm trying to throw together a simple report that shows data for a single changeset. I've created a different report already that takes date paramaters, and thanks to some lucky googling, I learned that instead of feeding date strings to the report parameters, it was necessary to use expressions such as:
="[DATE].[Date].&[" & Format(CDate(Parameters!FromDateDate.Value),"yyyy-MM-dd") + "T00:00:00]"
Finding this post was like winning the lottery because I would have never been able to figure that out for myself. Hence, for my changeset report, I figured I could use the following expression for my changeset parameter.
="[Version Control Changeset].[Changeset ID].&[" & Parameters!VersionControlChangesetChangesetID.Value + "]"
For my report, the VersionControlChangesetChangesetID parameter is just an integer. I got the dimension names by using the "Copy" context menu item in the query designer, assuming that these would be the correct identifiers.
However, I get the following error when running the reoprt:
The Value expression for the query parameter ‘VersionControlChangesetChangesetID’ contains an error: Input string was not in a correct format. (rsRuntimeErrorInExpression)
I have two questions about this.
Why isn't the expression I wrote working?
How can I learn better how to format these values, and how they're formatted inside the cube, so that I'm not just guessing when I run into these formatting errors?
Thanks!