Report fails when is build in VS but doesn't fail with MSBuild - reporting-services

I am trying to create deployment job that would checkout from git and builds all the reports in the solution. If it can't build then I want that job to fail. I've created the simple report with dataset as "select 1 as one" and then added 1 non existing column reference in the report. When I tried to build it with Visual Studio it is failing, however it is successfully build with the MSBuild ... What can be the issue?
Severity Code Description Project File Line Suppression State
Error [rsFieldReference] The Value expression for the text box ‘one’
refers to the field ‘one1’. Report item expressions can only refer to
fields within the current dataset scope or, if inside an aggregate,
the specified dataset scope. Letters in the names of fields must use
the correct case. C:\Users\kultasev\Repos\mfi-online-reports\MFI
Online Reports\broken_report.rdl 0

Related

SSRS: [rsFieldReference] Error. Visual Studio 2017

When I run a report that has run for a few years with no problems, the report runs but I get the following error:
[rsFieldReference] The Value expression for the text box 'FieldName' refers to the field 'FieldName'.
Report item expressions can only refer to fields within the current dataset scope or, if inside an aggregate, the specified dataset scope. Letters in the names of fields must use the correct case.
However, the Value and the field name are identical ['FieldName']. And, the report runs correctly in Visual Studio [in spite of the error] and on the Report Server when it is deployed.
How do I get the error to stop showing up?
I suspect it is a 'residual' error that is persisting even though I can't see an actual 'error'.
We recently switched to a newer version of Visual Studio [2017] and I have made a slight change to the SQL in the Dataset [nothing to do with 'FieldName'].
Thanks!

How can I scope use of First to get only the first value in a group?

I have a report structured as:
Org
Project
Version
Each of Org and Project are groups. Version is the detail row and there can be multiple Versions per Project. I need the aggregates at the Project level to be the First value of Version. I tried using "First(Fields!name.value)" and I get first in the dataset scope. I tried "First(Fields!name.value,"table1_project")" where table1_project is the name of the Project group, and I get an error saying the scope parameter is invalid.
Is there a way to scope this so I get the "first" value of Version in the Project row?
SSRS 2012 with VS 2012
This is what the report looks like:
These are the groups:
Error message I'm getting:
table1_project Properties:
So this worked:
=First(Fields!baseline.Value,"table1_project")
which is what I tried a dozen times before I posted the original question. I have no idea what happened but it's working now.

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!

Reporting Services problem. Forward dependencies are not valid

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.