Announcements
Hello,
I have build a report in Visual Studio. I have put an expression for a row visibility. The report is run and extract the correct results. When the report is published in SSRS an error message appears.
the expression is
=IIF(Parameters!NRP_Status.Value ="Y" and Cint(Format(Fields!DATA_DISBURSIMIT.Value, "yyyyMMdd")) > Parameters!Close_date.Value, true ,
IIF(Parameters!NRP_Status.Value <>"Y" and Cint(Format(Fields!DATA_DISBURSIMIT.Value, "yyyyMMdd")) < Parameters!ORED.Value,true,
false))
Can you help please
thanks
Hi,
It definitely seems like an environment error. Did you compare the country and region settings of your local environment with the server? What is the Format(Fields!DATA_DISBURSIMIT.Value, "yyyyMMdd") part returning on the server if you have it separate on the report?
Hi Anton,
Yes , I have done this too. The CInt function returns the correct integer as I expect.
As I said upper, the report runs correctly when I run it locally. The errors appears after it is published to reporting server . Can be an environment issue?
thank you
Hi,
It's either the Cint or Format function that throwing the error. Probably the Cint function. Try to see what fhe format part is returning by adding that part the report and test it. See if that makes any sense. Perhaps it's returning something that the CInt function doesn't like.
Thank you GirishS, I tried it , also with switch but again it it the same error .
Hi Gent,
Can u try this expression.
IIF(Parameters!NRP_Status.Value ="Y" and Cint(Format(Fields!DATA_DISBURSIMIT.Value, "yyyyMMdd")) > Parameters!Close_date.Value AND
(Parameters!NRP_Status.Value <>"Y" and Cint(Format(Fields!DATA_DISBURSIMIT.Value, "yyyyMMdd")) < Parameters!ORED.Value,true,
false))
André Arnaud de Cal...
294,120
Super User 2025 Season 1
Martin Dráb
232,871
Most Valuable Professional
nmaenpaa
101,158
Moderator