SSRS Visual Studio 2015 Limitations - reporting-services

I am currently using Visual Studio 2015 to export a report to Excel.
The stored procedure produces the results in seconds, however returns 588,851 rows.
When I try to export this, I receive a error message of;
"An error occurred during local report processing.
An unexpected error occurred in Report Processing.
Exception of type 'System.OutOfMemoryException' was thrown."
The export works in CSV format, but I would like to automate this report and I need it to use Excel format.
The report is very basic, only showing the rows of data. No graphs or images.
I removed timing out options and I have tried running it out of hours. There is no cache or history to the report.
Has anyone got any suggestions please?

Unfortunately, there are quite a few limitations to exporting data to Excel; the characters per cell being the biggest issue (32,767).
Here's some good documentation surrounding the limitations (earlier versions of SQL Server have similar limitations):
https://learn.microsoft.com/en-us/sql/reporting-services/report-builder/exporting-to-microsoft-excel-report-builder-and-ssrs?view=sql-server-2017
I often have to add some code to SSRS to truncate any cells that exceed the character limit with something like:
=iif(Globals!RenderFormat.Name= "EXCELOPENXML" OR Globals!RenderFormat.Name = "EXCEL" OR Globals!RenderFormat.Name = "CSV",
Left([Your Field or Parameter],32745) + "...Truncated for Excel",
[Your Field or Parameter] )

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!

SSRS RDL file - command Text - RAISE ERROR

Can we add RAISE ERROR in the command text of the RDL file for an SSRS Report?
My report is creating a blank PDF file due to missing data in the DB. I want to check the data, and if no data is found I need to raise the error. Is that possible?
Or after render call, how can we check the content data for the file? Is there any way to do that?
We are using SSRS-2008-R2 version.
and we are running thereports through a C#.net Application, so, i invoke the report through a Reporting Services's WebServices, and it return a byte array that represent the result of the reports, but the array byte always bring byte because, the reports has a header, hence occurs bytes.
i need to check the byte array to decide whether to generate the pdf or not.
How can i do that .?
There is a built-in function in SSRS that allows you to check if a DataSet has any rows.
=CountRows(“DataSet1”)
You can always check that and take appropriate action(s).
I like to use this in the Hidden property for a Tablix/Matrix, and hide it when the row count is 0.
=IIf(CountRows(“DataSet1”) = 0, True, False)
Also, I like to add a text box to the report that simply contains the words No data to report. Then I show that when the dataset is empty via it’s Hidden property.
=IIf(CountRows(“DataSet1”) <> 0, True, False)
No need to do a raise error, handle the problem with a little finesse. This works with all versions of SSRS.
EDIT:
Another way to do that is use a stored procedure for the dataset source. Handle all that logic there. Select the data into a temp/working table, check if the row count is 0, take whatever action you need to (send email, return data, or both).
Another way could be a data driven subscription; that is available if you are running SSRS enterprise edition. Then you could get a report that would alert you to any data anomalies you want to monitor for.

SSRS 2008 Error Exporting to Word - Body is too complex

I have a simple report that has been in production for several years but now is throwing an error when trying to export it to Word (no other reports get this error when exporting to Word, just this one).
The error is:
An error occurred during local report processing. The Body is too complex to export to Word. Please group the ReportItems together into rectangles to simplify.
Nothing has changed anywhere, and I cannot find an answer to this anywhere. The report has only 1 table on it, with 10 columns, and the rest is text boxes (it is a print of an order, so the order header info is at the top, and a table containing all the items on the order is below). Can anyone here help?

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.

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!