SSRS 2008 R2 - DynamicWidth does not work - reporting-services

I am building a report in SSRS with chart in which I have set the following DynamicWidth expression:
=Iif(UCase(Globals!RenderFormat.Name) = "PDF", "26", "10") & " cm"
However, when exporting to PDF from report manager the chart size does not change.
Any ideas?
EDIT: I placed a textbox to look up Globals!RenderFormat.Name and it turns out it is giving #ERROR, and is marked as 'unrecognized identifier' in expression editor. Is there a way to fix it?

Try this
=IIF(UCASE(Globals!RenderFormat.Name)="PDF","26","10 ")+"CM"
UPDATE
I Have tested on SSRS 2008 it works fine

I have found the solution - turns out the server is in vanilla 2008 version, not R2.

Related

SSRS report fails to load in browser report manager - rsFilterEvaluationError

The ssrs report uses a filter in the tablix properties.
The report is successfully generated in the visual studio preview but when i try to generate the preview in browser (chrome, IE) via the reporting manager, i receive the following error.
Failed to evaluate the FilterExpression Tablix "Tablix2". (rsFilterEvaluationError)
Might not be the 100% correct error message bc i got them in german.
Expression (date type): =Cdate(Format(CDate(Right(Trim(Fields!CustomerReqDate.Value),2) & "." & Mid(Trim(Fields!CustomerReqDate.Value),5,2) & "." & Left(Trim(Fields!CustomerReqDate.Value), 4)), "dd.MM.yyyy"))
Operator: <=
Value: =Cdate(Format(DateAdd("d",42,Now), "dd.MM.yyyy"))
Since it works in preview but not the browser it may have to do with localization settings. I'm assuming CustomerReqDate is a string in the form of "YYYYMMDD". Try using this expression instead:
=DateSerial(Left(Trim(Fields!CustomerReqDate.Value), 4)
, Mid(Trim(Fields!CustomerReqDate.Value),5,2)
, Right(Trim(Fields!CustomerReqDate.Value),2))
And just use the DateAdd function, don't worry about formatting and conversions.
=DateAdd("d",42,Now)
This should allow SSRS to compare a date to a date regardless of the local format.

SSRS 2012 expression cauing errors

After an upgrade from SSRS 2005 to SSRS 2012, one of our reports no longer renders and gives the following error:
Microsoft.ReportingServices.ReportProcessingException: The specified operation is not valid
I've narrowed it down to a textbox with the following expression:
=CountDistinct(Fields!field1.Value) / (CountDistinct(Fields!field2.Value) - CountDistinct(Fields!field3.Value))
Why would this no longer work, and is there an alternative i can use? The text box is to show a percentage and has format P1 assigned to it.
Many thanks in advance for any help.
Tunrs out that field3 was a calculated field. I've updated the SQL to populate field3 and all works fine now.

SSRS - Could not generate chart in sub report

I have a job to create sub report using chart by parsing parameter value from master report. I have checked there was no different data type and ensure that there is no null value. So at the first, I tried to make test case by creating sub report using standard table, and it works.
But, when I tried to use chart report in sub report with the same data and I run it from master report, it didn't work and the notice is
"Data retrieval failed for the subreport,'subrptqtybyasset', located at:/rptAssetQtyByType. Please check the log files for more information."
Then I try to look at sub report and running this chart alone and it works. Same result when I tried running sub report using standard table (not using chart).
So, my questions : First, why SSRS give different result when I execute sub report using chart, meanwhile it works by using table?. Second, is there any solution to make it work with chart on subreport?, because I really need using chart in my subreport.
Thank you very much.
You should check the SSRS log file for a better description of what has errored.
The default log file location in SQL Server 2008 is
C:\Program Files\Microsoft SQL Server\MSRS10.MSSQLSERVER\Reporting Services\LogFiles
A similar path is used for other versions.
In the rare case that the SSRS log file doesn't reveal the cause of the error, you can run a SQL Profiler trace to the database specific in the report data source to try to work out what is going wrong when the report runs.
Thanks Josh for the answer,
I have just run the program today and I see in the SSRS log file and there is no error statement,maybe you can see from this link :
www.herryyulianto.com/images/stackoverflow/Response01.jpg
The error statement only appear in Visual Studio Reporting. Still same result as yesterday.
Here are the last log that I got :
9/2/2014 9:46:11 AM spid56 Starting up database 'ReportServer$SQLEXPRESSTempDB'.
9/2/2014 9:36:11 AM spid52 Starting up database 'ReportServer$SQLEXPRESSTempDB'.
And this is master report that contains sub report chart when I execute :
www.herryyulianto.com/images/stackoverflow/UsingChart.jpg
But if the master report contains sub report with standard table and I got :
www.herryyulianto.com/images/stackoverflow/UsingStandardTable.jpg
Well, I don't know how to solve this problem. Thanks.

AX 2012 CU2 Conditional action for drill through reports

I am trying to show one of the two simple reports on a click event. I have three report designs in a single Dynamics SSRS reporting project. One pie and two table designs. I want to show one of the table based on the user selection on pie slice. When I try to add conditional function for report action on the pie series I get compile time error stating that it is not allowed.
Action on series properties is set to "Go to report" and expression is set to ReportPrj.AutoDesign1 only this works, if I try to use a conditional query for my expression this fails to compile.
[=IIf(Parameters!pvalue.Value = 1, "ReportPrj.AutoDesign1", "ReportPrj.AutoDesign2")]
Matter of fact anything other than ReportPrj.Design format fails to compile. Is this some kind of limitation on AX SSRS reports. If that is the case what are my other options.
Here is the compile error.
ReportPrj.AutoDesign1Pie.: Could not resolve drillthrough target report =IIf(Parameters!pvalue.Value = 1,
"ReportPrj.AutoDesign1",
"ReportPrj.AutoDesign2"
).
I am running Dynamics AX 2012 CU2, SQL Server 2008 R2, and Visual Studio 2010 on a Windows 2008 Server.
All you help is greatly appreciated.
Thank you,
mm
Is that a valid expression with the starting "[" and ending "]"?
Does this work?
=IIf(Parameters!pvalue.Value = 1, "ReportPrj.AutoDesign1", "ReportPrj.AutoDesign2")

In SSRS, is it possible to set the AutoRefresh value to an expression?

I've set up a report using SSRS and would like it to AutoRefresh constantly as data will continuously be added. Simple solution was to set the value to a constant which is easy enough. However, the report is an error log so I would like for the user to be able to shut it off or delay the refresh while they read the messages. I've tried adding a parameter Refresh as an Integer but I cannot set the AutoRefresh value to an expression via
=Parameters!Refresh.Value
and
=[#Refresh]
SSRS yells at me saying the "Property value is not valid. PARAM is not a valid value for Int32."
I appreciate any help.
Yes, AutoRefresh can use an expression in SSRS 2012.
I was able to set this up correctly on SSRS 2012 and make it work. The data type of the parameter must be Integer. What data type are you using? What version of SSRS are you using?
Edit: I have confirmed it does NOT work in SSRS 2008. However, if you are using SSRS 2008 R2, change the project property TargetServerVersion to SQL Server 2008 R2, and it will work. I have it working in a test environment.