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.
Related
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] )
I am trying to build an SSRS report to be put in Dynamics CRM and run from a record in the Account entity. My initial query to pull the data is pretty simple, but the functionality of the SSRS report and filtered view aren't working as expected. I'm using the custom report data source from the CRM data source folder, so I know that's not the issue (see here).
Here's my query (which is very basic):
SELECT Name
,Address1_Line1
,Address1_Line2
,Address1_City
,Address1_StateOrProvince
,Address1_PostalCode
,kore_salespersonidName
,kore_coordinatoridName
,client_FulfillmentContactName
,OpenDeals
,OpenRevenue
,client_ActivationBalance
,client_SponsorLevel
,client_PreviousSeasonSpend
,client_CurrentSeasonSpend
,Description
,kore_industryidName
FROM FilteredAccount AS CRMAF_FilteredAccount
I've also tried to use a another one as a filter for the report using a where clause on the end of the first query, but that just returns a random list of results as well.
Here's the one I've used for the filter:
SELECT CRMAF_FilteredAccount.AccountId
,CRMAF_FilteredAccount.Name
FROM FilteredAccount as CRMAF_FilteredAccount
WHERE CRMAF_FilteredAccount.statecode = 0
This is a similar issue I have, but no resolution: Similar issue.
Any help is appreciated.
Looks like my issue was just a bug with CRM. If you originally upload the report and don't specify in the "Display In" that it needs to be in "Forms for related record types" then it doesn't look like it'll change even if you change that value and the report will always run for all records. I found this link where it suggested that I delete the report and reupload it, which solved the issue.
I have an SSRS master report which includes multiple sub reports (with few parameters passed from Main report, sub reports have graph and tablix)
One of the combination of parameter's on sub reports results in no results in dataset on sub-reports. I have set no data message on these individual sub reports.
The problem is that when i run the main report with this combination it doesn't display this no data message but instead throws "An internal error occurred on the report server. See the error log for more details. (rsInternalError)" message
When I run these individual reports with same combination of parameters, I get the no data message displayed correctly.
I tried my best to find solution online, but couldn't find any.
Any help would be useful. Thanks in advance!!
My sub report was not having a data-set and as a result it was throwing an error on main report.
I added a dummy data set in my sub-reports, using an existing data-source with query.
SELECT ' ' AS DUMMY
and then added text box in my sub-report to display this dummy field.
=First(Fields!DUMMY.Value, "DUMMY")
and it worked after that. Basically I am forcing SSRS to display sub-report even if there is no data.
I'm working on a complex SSRS report that contains a number of subreport, with a total of five levels of nested sub-reports. This is a lot, but necessary due to the complicated nature of the top level report.
I've encountered an odd error with the last subreport I've added:
Warning 1 [rsErrorExecutingSubreport] An error occurred while executing the subreport 'ThingRateQuotaWrapper' (Instance: T0R0S0S1T0R0x0S0): Object reference not set to an instance of an object. C:\Users\mmxxxxxxx\Documents\Visual Studio 2012\ThingsReporting\ThingsReporting\Thing 2014 Consolidated Report.rdl 0 0
The problem here is that when I run the second level report (one of the reports contained in the top level "consolidated" report), everything works fine. But in the top level report, I get this unepected error.
The specific subreport mentioned is four levels down from the top report, so I would expected the second level report to fail if there was an issue, however as just mentioned that works perfectly.
In addition, the RDL and line number mentioned in the error message tells me nothing useful.
I've tried everything I can think of to solve this problem, including deleting, saving, re-inserting and configuring all the subreports from the ThingRateQuotaWrapper upwards. At this point I can think of nothing else to try that makes any sense.
How can a report fail because of a sub report four levels down, when other reports in between work correctly?
Anyone got any ideas or tips? I'm using SQL Server 2012 Business Intelligence and Visual Studio Premium 2012.
I've solved this problem, however I don't entirely understand the solution so I welcome any comments which might expand on it.
My approach was to look through each expression in the set of reports and subreports that make up my consolidated report, looking for any that might fail for any reason. I discovered that the visibility expression for the tablix row which contains the ThingRateQuotaWrapper subreport had the dreaded red squiggly line beneath it.
I believe the cause of the field warning is that the visibility expressed used a dataset other than the primary dataset of the tablix. I reworked the tablix dataset to contain the required column to determine visibility of the subreport, then updated the visibility expression to use the new column in the primary dataset. This fixed the problem.
This issue still impact SSRS in Visual Studio 2017 when renaming a sub-report.
Delete all the object in the \bin\ folder and VS will rebuild it without the error.
In my case, sub report's name had been changed (params and everything were correct) just name had been changed. Lead to this error.
This tends to happen when you change the names on reports. I accomplished this by deleting the .data files in my project directory as this stores the cached data of your reports. Then restart visual studios and the problem should be resolved.
In short:
Delete .DATA files in directory
Restart Visual Studios
Hope this helps.
Thanks
Gavin
To anyone coming to this old thread, I had the exact same error message with the following configuration:
Main report (top parent level report) calls 5 sub report hierarchy deep
The sub report is crashing only when generating from the Main report. Everything is fine when calling from each sub report level (all!) including the sub report itself
Pre-requisite explanation
The business wants me to show either a Bar chart OR a textbox on a dedicated condition.
To avoid empty spaces produced by a ReportItem (my subReport outputing a bar chart) that is hidden, I usually put them inside a Tablix and manage the Row visibility. Like that, no empty spaces is generated !
Old structure causing issue
I have one tablix with two rows :
The first one contains my sub report outputting a bar chart
The second one contains a simple TextBox
The tablix's dataset is a dataset containing the Textbox's text value (and that's the key of the problem !)
New structure fixing the issue
I have now 2 tablix :
One tablix with a dummy dataset ("SELECT 1 as 'Dummy') associated to the tablix. This tablix calls the bar chart's sub report
A second tablix with the same dataset as before (containing the Textbox's text value)
UPDATE 29.06.2022
The solution described above worked without RowVisibility condition. As soon as I've added my expression it fails again :
=IIF(RowNumber("myDataSetName")=0, True, False)
Solution: replace by this condition instead :
=IIF(Count(Fields!MyFieldName.Value) = 0, True, False)
This produces the same : When there the SQL query returns no row, I want to hide it.
It's very strange that SSRS doesn't tell my expression is wrong somehow, and last but not least, it's very weird that the expression works in all report levels except from the Main report. Either an expression is wrong or not.
Looks like a bug in SSRS (SQL Server 2017...maybe it's fixed in SQL Server 2019)
I am building a report that I would like to accept two values from the user, feed those into a query, and find the data associated with those entries.
For example, if you had a list of employees, performance measures, and values associated with those; then the user would select an employee name / performance measure, and they would get the scoring information on that employee for that measure.
I have two parameters, each being populated from SQL queries getting a distinct list of employee names and measures, and a table below that just pulls up information based on ~ 'WHERE name = #Name AND measure = #Measure' but when I click 'Preview' to run the report locally I get the error: "one or more parameters required to run the report have not been specified"
I know the parameters are working properly because I can feed their values directly into a textbox and the values populate correctly. Also, if I change the query to just accept one parameter (i.e. WHERE measure = #Measure) the query works.
I'm confused as to why this error is occurring since I know my parameters are functioning and being populated properly.
I experienced this behavior in .NET 4.0 using Local Reports (in .rdlc files), when one of the parameter's values was containing an emtpy string. Although setting the parameter was correct:
report.SetParameters(
new List<ReportParameter> {
new ReportParameter("Title", Messages.Title),
new ReportParameter("SubTitle", Messages.Subtitle))
}
);
It worked only as long as both parameters actually contained some characters, otherwise the mentioned exception was thrown.
This error is caused when you either
A) the parameter is spelled wrong in the actual report. Meaning that the query is expecting #Name but the report is passing #Names (or some other spelling).
or
B) Is it possible you are attempting to run the report with a default value on the parameter of NULL for #Name but the stored procedure requires an actual value?
This might be happening if you are building the report in Visual Studio and gave the #Name parameter a default value of (null).
Try removing the default value or making sure you #Name parameter has an actual value, even if it's just ''.
I had similar issue. Issue happened when you use SharedDataSource with parameters that are to have null value. If you use same query in embeded data source, there is no problem.
Unlike embebed data source, you have to define if parameters used in query of shared data sources are allowed to have null value as highlighted in screenshot here. In my case, there are two parameters in query of shared data source, that can have null value.
So after setting them to allow null, problem fixed!
This caused me many hours of pain. Turns out that it's to do with using a shared dataset.
Embed the dataset within your report instead and it works fine.
For me, setting the value of the parameter makes problem. I don't know why, but the parameter value was not able to accept a string.Empty or null. So i just gave a " " as value solves the error.
Sample
ReportParameter[] parameters = new ReportParameter[4];
parameters[0] = new ReportParameter("Name", EName);
parameters[1] = new ReportParameter("ShiftName", CurrentShift);
parameters[2] = new ReportParameter("Date", LoginDate);
if(ValidateReportData())//some condition
{
parameters[3] = new ReportParameter("Date1", LoginDate);
}
else
{
//parameters[3] = new ReportParameter("Date1", string.Empty);//this makes exception while calling Render function.
parameters[3] = new ReportParameter("Date1", " ");//Solves the issue.
}
I was having the same problem, it is now sorted on sql server 2008 r2.
I know this is now an old question,
but just to help others:
It was very simple really, just making sure the spelling including the case is the same and the use of #.
I have a shared dataset called currentSpaceByDrive with the following code:
SELECT
[DRIVE]
,[Volume_Size_GB]
,[VolumeSpaceAvailable_GB]
,[VolumePercentAvailable]
FROM monitoring.dbo.currentSpaceByDrive(#ServerID)
I add the shared dataset currentSpaceByDrive to my report and I give it the same name.
when I right click on it, the one on my report, dataset properties, the parameter is #ServerID.
#ServerID value comes from another dataset, called the_servers (where the user selects a serverID)
I have a report parameter also called #ServerID that gets its value from the_servers and is used to feed the #ServerID parameter on currentSpaceByDrive.
Too many #ServerID, I understand, but if you do your own test based on this, you will get it done.
See the image attached.
hope this helps
marcelo
check DataSet In Report Server , I had Similar Problem , I was Editing Shared Dataset in Visual Studio , but it didn't work , after an hour of frustration I checked dataset in report server and I found out it Is not updating with changes I made in visual studio , I Delete it and Redeploy Dataset Again from visual studio . it works .
Actually I had to:
Delete the SubReport object from the report.
Drag new object from Toolbox
Setup the SubReport name and report
In Paramateres "Add", and choose each parameter, and related value.
Then is works for me.
I think I have same issue my Parameter Supervisor is blank when I choose "Select All" which causes the error "One or more parameters were not specified for the subreport", but if I select a few supervisor name then the sub-report appears. It is puzzling because the Manager parameter value shows all value when "Select All" is checked, but it is not working on my Supervisor parameter. Note that Supervisor parameter is dependent on manager parameter.
I'm using shared DataSets for several reports, and the root cause of this issue was not mapping the input parameters from the report itself to the parameters of the shared dataset.
To fix, I navigated to the "Report Data" panel, opened the dataset (which is really linking to a shared dataset), clicked the "Parameter" tab, and then mapped the report parameters to the parameters of the shared dataset.