Why would an SSRS report produce different data when run from SQL Server Reporting Services than when run using the Preview tab? - sql-server

I've got a report running the data I want - from the Preview tab, that is, or when run using F5 in VS 2010. But when I upload the report (.rdl file) to SQL Server Reporting Services, and run the updated report from there, it still shows the old bunch of (restricted) data.
Am I missing a step - does something need to be done other than uploading the .rdl file from the project? It did tell me the DataSource was wrong, but once I specified the right one, it ran without a hitch (except for the missing data).
I made sure that the updated report was truly being used by SQL Server Reporting Services by adding a bogus addition to a label, and sure enough, I do see that when I run the report, so the updated report is getting there.
I also verified that both the design time and runtime reports (same file, but copied to a different location) use the same data source: the SharedDataSource reference in the project, which I see when I select View > Report Data > Data Sources is the same being used In SQL Server Reporting Services, where I set the data source by selecting the yellow right down-arrow on the report name, then "Manage" > "Data Sources" > "A shared data source" > Browse > Home > Data Sources > and selected the shared data source with the same name as the one seen in the project. Finally, I selected OK > Apply in SQL Server Reporting Services, but only a subset of the data is generated.
Why would that be? What can I do to retrieve all the data?
UPDATE
To clarify what happens, in answer to yelxe's comment:
When I delete the previous version of the report in SSRS and upload a "new" one (.rdl file - the new version of the report just deleted), and then click the report link to try to run it, I get, "The report server cannot process the report or shared dataset. The shared data source 'CPSData' for the report server or SharePoint site is not valid. Browse to the server or site and select a shared data source. (rsInvalidDataSourceReference)"
So I click the yellow down-arrow to the right of the report and select Manage.
From there, I select Data Sources > A shared data source > Browse > Home/Data Sources/CPSData ("CPSData" is the same Shared datasource selected in the project) > OK > Apply, and then run the report.
This is where I do that:
It runs, but the data returned to the report is a subset of what I get when I run it from the IDE (VS 2010).
UPDATE 2
As for the data that is there when the report is run from SSRS, it is identical - IOW, the rows that are common to both the superset and the subset of data are identical; it's just that many rows are missing from the subset. And there doesn't appear to be anything "odd" about the data that exists in the superset - it's not 0 or negative or anything special or striking.
UPDATE 3
To reply to Eric's comment in more detail, the report's "Subscriptions", "Cache Refresh Options" and "Report History" pages shows "There are no items to show in this view. Click Help for more information about this page."
The report's Processing Options page shows
...and the report's "Snapshot Options" page shows
UPDATE 4
I noticed that the name of my Data Source was the same name as the name of my primary Dataset (they were both "CPSData"). The dataset name is just a label (it could be named "duckbilledplatypus" or whatever) but still I wondered if this confusing/misleading name for the dataset might have been problematic. So, I changed the name of the dataset to something more reasonable (I renamed it "VPM_V_RockBottom" as the Stored Procedure is named "sp_ViewPriceMatrix_Variance_RockBottom").
This made no difference, though. I replaced the new version of the report (.rdl file) in SSRS, re-ran the report, and still (don't) see the missing data.
Using the same parameters (date range and Unit name), this is what I see when run from my project's Preview tab:
...and here it is when run in SSRS:
So the "Hass"* Avocados show 18 members when run from VS 2010 (as it should be), and only 3 when run from SSRS. In both cases/places, "Asparagus Standard 11/1#" show 18 members, as they should.
Why would there be a difference, and how can I rectify this anomaly?
(sic - should be "Haas", not "Hass" (the German word for "hate"))

I have tried to remove the Dataset in SSRS and again create a new one same as the previous one.
It worked for me.

Related

Is it possible to restrict an SSRS report on Report Manager to one user at a time?

I have an SSRS report published to Report Manager, available to all Domain Users. The report's stored procedure executes a xp_cmdshell which outputs SQL data to an excel file in a shared file location. The issue is the report can't handle being run concurrently - anyone trying to run the report simultaneously with another user gets a blank file, or, worse, a file with missing data. I can't redevelop the solution right now, what I'm hoping to do is restrict the report to one user at a time, either within the SSRS report, via report manager config or the SharePoint link on our intranet (which users access the report by). Everything is on-prem.
I've tried the report config, RM config, our SharePoint developer and Google and none are helping. Thanks.

JasperReport in Netbeans + java

I'm able to call my report via my program in Netbeans. Right now, when I call my report, it displays all the data from the database with 6 or more pages. My program goes like the user would choose a date and JTable will display the data (entered beforehand and saved in database) associated with that date. My question is how do I show the report to display only the specific data chosen by the user from database (date-wise)? I thought at first that changing the SQL statement to fetch the specific date from the database would do the trick, but it did not and still shows the whole database in the report.

passing GUID from CRM on premise to SSRS report

I have uploaded report to CRM which I created in SSRS, when I go into CRM and then run it from Report section it runs successfully, only thing is it's looking for GUID in order to show reports with value.
I want to automate this somthing like whenever I go to each client Profile in CRM and click on run reports it should fetch it's GUID and pass it to that report as parameter and show the report.
Please help.
Try following,
1) change your report's datasource to embedded and then add button to the ribbon in Dynamics CRM( see following link)
http://mahadeomatre.blogspot.ca/2015/04/run-report-from-custom-ribbon-button.html?_sm_au_=iVV7VjqJnWZTNR0P

Microsoft VS2012 Report with sub-report working in Dev but not live

A windows application that I wrote some years ago required some changes recently (originally written in VS2005, modified using VS2008, and now updated/modified as a VS2012 project).
The application contains a Microsoft report that contains two sub-reports. The sub report data is a dataset, populated during a ReportViewer1.LocalReport.SubreportProcessing event.
A new field was added to the main report, but the sub-reports were not modified. The report works as expected on the development PC, but when installed on the client laptop, the sub-reports fail with the message:-
Data retrieval failed for the sub-report, <report name>, located at <report...rdlc>. Please check the log files for more information
No log files are produced on the client laptop
I tried to manually install the CTP 2012 Microsoft Report viewer, but the install fails, reporting that a newer version is already present (possibly from SQL Server Express 2012, also installed at the same time).
The database used for testing is restored from a live backup, so the data is the same. The sub-report event that adds the ReportDataSource to the sub-reports contains a try-catch block which doesn't raise any exceptions
During development, when I opened the reports in VS2012, a dialog opened that asked if they should be updated to the 2012 format, which I allowed, althoug this probably has no bearing on the fault.
Has anyone come across this issue? Is there a way to force the physical output of a log file on the client laptop?
UPDATE
Putting some MessagesBoxes in the code I have found the reason that sub-reports do not process, but I now need to find out why.
The 'LocalReport_SubreportProcessing' event fires twice for my report - once for each sub-report.
In order to identify which sub-report needs the additional data source, I check the value of 'SubreportProcessingEventArgs.ReportPath'. In my dev system it has the name of the report (minus the .rdlc extension) but, on the client laptop the value is empty.
I can't see how the reports get built into the output. Tthe main report shows OK on the laptop (just missing the sub-reports), although from where it is displayed I don't know at present - more investigation required!
I have just stumbled upon the same problem. Don't you hate Microsoft sometimes for doing it to us?
Anyway I think that the best solution is to check SubreportProcessingEventArgs.DataSourceNames[0] instead of checking SubreportProcessingEventArgs.ReportPath. This will (I checked) have the name of the data source for the subreport.
If you name your datasources uniquely you can identify which subreport is calling an event and set the data source properly. I usualy name my data sources as {SubreportName}DataSet, so all my data source names have the subreport name in them. Good luck.

SSRS Report will not display in Landscape

I have a report in SQL 2005 reporting services. It is a server side report and the width is set to 11 inches and the height is set to 8 inches. When I run in in the VS designer, it works fine. However, when I display it in the report viewer control of my Windows application, it appears in portrait mode, not landscape mode like it should. I have another report that is 14 x 8 inches, and that displays correctly. I can't seem to figure out why the one works and the other does not. Any ideas?
The problem turned out to be a bug with Linked Reports. The report I was using was a linked report to another source report. Apparently, when you create a linked report, the properties for the source report that are contained in the ReportServer database (including page size) are not copied to the record for the linked report.
When the server executes the report, instead of reading the properties from the source report when no properties are found on the linked report, it just leaves the properties blank. The viewer then renders the report using the default values for page size, etc. I simply ran an update command against the ReportServer database to copy the properties to the linked report from the source report record.
Another solution to this problem can be found here:
http://blogs.msdn.com/bwelcker/archive/2005/09/07/461758.aspx
I believe there is a report property you can set on the RDL that allows you so specify Portrait or Landscape. I don't have VS 2005 any longer, but in VS 2008, just select Report Properties, and it's one of the first options. I would bet it is similar in VS 2005.

Resources