Hashed field not displaying in SSRS - reporting-services

I have a query that is using this convert function that correctly displays the data when I preview it in the SSRS Dataset:
CONVERT(varchar(255), HashedFileNum, 1) AS HashedFileNum
returns values like
0x7BB9D2F1A8A1B39832B95B932DD73A31
However when I try to add that field to my report I get #ERROR in the field instead of the value.
Any suggestions on getting the value to show in my report?

Try converting to nvarchar instead of varchar; I've had a similar issues in the past.

Related

SSRS expression not working properly while using formatcurrency function

I have small expression on value fields in SSRS report. Source data type of value is NVARCHAR. It has some numeric value as well which I want to convert into currency and else should be display as it is.
=IIF(Fields!Description.Value LIKE "Blank*","",
IIF(IsNumeric(Fields!Value.Value)=True,FormatCurrency(Fields!Value.Value,0),Fields!Value.Value)
)
Report displays the numeric values in currency format but where it has string values it showing #Error.
I don't think you can use LIKE in an SSRS expression.. you need to use something like this:
=IIF(InStr(Fields!Description.Value,"Blank")>0,"",
IIF(IsNumeric(Fields!Value.Value)=True,FormatCurrency(Fields!Value.Value,0),Fields!Value.Value)
)

SSRS expression not working properly

I have one expression in my SSRS report which use to display currency data in the report. When there is no data NULL in the particular row it should display $0. However, it is displaying #Error.
=IIF(Fields!Value.Value="Nothing","$0",FormatCurrency(Fields!Value.Value,0))
I tried with IsNothing function as well but getting same result.
Take the quotes off Nothing..
=IIF(Fields!Value.Value=Nothing,"$0",FormatCurrency(Fields!Value.Value,0))

#Error in Column With both Text and Numeric Values in ssrs reports

In my report for one field i have both numeric and text values.( i.e 10.546 and "vary")
So when i apply CDec function for this field values i get #error where i have filed value as "Vary" .
10.6572 10.6572
Vary #Error
i tried expression "
=IIf(IsNumeric(Fields!price.Value),
CDec(Fields!price.Value),
"Fields!price.Value)"
but it is not working.
i checked in net in most of the cases all telling to write function, unfortunately in my project that is not allowed.
so is their any way i can resolve this "#Error" using expression.
I got solution.
=iif(IsNumeric(Fields!EUnit.Value), VAL(Fields!EUnit.Value),Fields!EUnit.Value)
this is working fine to me.
Ref : https://social.msdn.microsoft.com/Forums/sqlserver/en-US/ac2c9db4-85a5-44a8-909b-1ee09791542e/ssrs-check-if-the-field-value-is-numeric-or-not?prof=required

Check null and split value in textbox in SSRS report

I am facing very simple issue but not getting solution over it.
I have textbox in my ssrs report, I am passing value "1;prashant" or null to it. Now, if I pass value "1;prashant" to textbox then textbox should show only "prashant" and If I am passing nothing then it should be blank.
I have tried following IIF condition:
=IIF(IsNothing(FieldS!WIAPPORVER.Value),"",Split(Fields!WIAPPORVER.Value,"#")(1).ToString())
But, I above code is giving an error ["#error" shows in textbox] if I am passing blank value.
Please let me know, where I am wrong in this.
Thanks
There are probably better ways of doing this, but this is what my head came up with at the time:
=IIF(
IsNothing(Fields!WIAPPROVER.Value)
,""
,Right(Fields!WIAPPROVER.Value,Len(Fields!WIAPPROVER.Value) -InStr(Fields!WIAPPROVER.Value,";"))
)
I believe SSRS is trying to compute everything in the report at runtime, so in your case it is still trying to fetch index 1 from an array even though there is nothing in it and it crashes.
Edit: Changed parameters to Fields. I created a parameter to remake the issue at my side.
Just get the split out of the iif. Then in your iif, if field is nothing create a string that when split will return ""
=Split(IIF(IsNothing(FieldS!WIAPPORVER.Value),"#", Fields!WIAPPORVER.Value),"#")(1)
You are relying on the IIf expression short circuiting, but SSRS IIf expressions do not short circuit - the expression will try and work out Split(Fields!WIAPPORVER.Value,"#")(1).ToString() for all rows and fail when this value doesn't exist.
You can get this going by using text expressions, which don't get this error.
With test data:
And a simple table:
I have added columns with both your existing expression and a new expression:
=Right(Fields!WIAPPORVER.Value, Len(Fields!WIAPPORVER.Value) - InStr(Fields!WIAPPORVER.Value, "#"))
This new expression works for NULL values, empty strings and strings with no delimiter present:

How to pass a date parameter to 2005 SSRS report through URL

I am trying to create a URL link for a report and pass in a date parameter.
The report has an InDate parameter that maps to a dropdown populated by a SQL query. The query returns a datetime (value) and an expression (label) that outputs the date value in a {month}-{year} format. Actual label values that appear in the dropdown are "Jun-2012","Mar-2012", etc. The InDate parameter is also used as an input to drive two other date dropdown lists.
The current iteration of the report URL is as follows:
dadsql04/ReportServer/Pages/ReportViewer.aspx?%2fRED+Data+Warehouse/RRMemo&rs%3aCommand=Render&rc%3aParameters=false&InDate=06/30/2012
When I load the URL I get the following error message:
The InDate parameter is missing a value
I have tried using different values for the InDate parameter, escaping the slashes, etc. and nothing seems to work. Any help or code sample would be appreciated.
It turns out the problem was that the InDate parameter was defined as a string instead of a datetime value. Once the parameter was changed from string to datetime the URL worked without an issue.
Date parameter format looks good, but the URL you're trying to use is referencing the Report Manager component.
Use this URL to query the report web service directly:
http://dadsql04/ReportServer?/RED+Data+Warehouse/RRMemo&rc:Parameters=false&InDate=06/30/2012