SSRS export to Excel only shows top few rows - reporting-services

I've got an SSRS (2014) report with a few expandable groups. They expand and contract just fine in the report viewer. But if they are hidden when I export to Excel, the Excel file will have the plus signs on the sign to expand the groups, but when you click on them, it only will reveal the first few rows; the rest seem to be in some inaccessible no-man's land. After searching around for awhile, the only possible thing I could find was changing DataElementOutput in the boxes, but that didn't do anything. For example the list is clients, clicking on client expands the list of projects for that client. Client #2 is at row 62, Client #3 at row 195. I expand Client #2 and it shows the first project(row 63) and I expand that for project details (rows 64-65), but the rest of the projects and details for this client(rows 66-194) remains hidden and inaccessible.

Related

SSRS - generating blank slide, when exporting to PPT

I'm working on report in SQL Server Data Tools. I've got 2 Datasets (Tablixes) that can be generated in Excel / PPT. When I generate the report into Excel, there are no issues, but when I generate it to PPT, it generates me blank slides after every data slides. The strange thing is that it does only for 1st Tablix, for the 2nd one, it generates everything without any blank slides. The red line on the screen divides end of 1st data sets and 2nd datasets:
I thought that the trigger is in wider canvas, but the wide of both datasets are the same:
Could you share any ideas, how to avoid generating blank slides, please?
Many thanks!

Don't produce report if there is no data - PDF

I have a report for which there is sometimes no data to output. This report is run along with several other reports and all are then output to PDF. However, this report still produces the header and footer with a blank page even tho there is no data.
I can move the header and footer into the report and have tried to hide those elements with =if(rownumber("PersonalProfile")=0, True, False) in the Hidden property of those elements. It hides everything so now the page is blank, but it will will output a blank PDF. Is there a way to completely suppress the report?
I'm using 2008 and I don't see a Report Visibility property. All the data for the report is inside a single Tablix which is inside a rectangle.
There are 3 datasets: PersonalProfile which contains the meat of the data; BoardNames which just produces the name of the board for the report; BoardMeetings which allows the user to pick a date parameter.
If you are distributing your report using subscriptions and you have Enterprise Edition, then you can look at using Data Driven Subscriptions which will give you control over how and when reports are distributed based on whatever logic you need. Otherwise, there is no way to do what you are asking - as trubs says, Reporting Services must first render the report before it has any knowledge of whether there is any data to display.
You haven't explained how you are "running the reports" (e.g. manually in Report Manager, report subscription, third party app using URL access) - if you do perhaps someone can suggest a workaround.
There is no way to do what you want. ssrs has to produce the report in order to determine there is nothing to display.

First page of SSRS report not rendering on initial load

I've created an SSRS report in Report Builder 3 which contains a single-rowed Tablix that holds a sub report which produces a single report per page. The problem is that when I run the report it doesn't render the first page.
Within Report Builder I can never get this first page to display within the executed report and within the web forms ReportViewer control (v10.0.0.0) I can get this first page to appear when I page away and then back to it. Exporting the report also displays all of the correct data.
This issue has only started occurring since I made some slight changes to the layout of the sub report. I've checked the visibility on the tablix, group, row, sub report and all the other settings that I thought might be responsible, but they haven't changed since it was previously working.
I've also tried recreating both the tablix and the entire outer report based on an answer to a similar question and this didn't make a difference.
Any help with this issue would be much appreciated.
I was passing the data for my sub reports through as parameters to prevent the need to call 5000+ single line select statements, and it looks like they need a data set to execute to render correctly on the initial load. Previously, I had mistakenly left a data set within the report, which I must have removed when making the layout changes.
Creating a dummy data set with SELECT ' ' AS Dummy and then using that to populate a text box seemingly fixed the issue. It's not a clean solution but it works.

SSRS 2008 Rendering to Word from URL gives different output to Exporting from Report already rendered on screen

I have a report created in VS2008 on SQL Server 2008 (SP3).
The report comprises of several sub reports nested 3 or 4 levels down in some instances. Document Maps are used extensively so that Word Tables of Contents can be generated further down the line.
Now here's the problem.
If I render to screen either in the development environment or rendered the deployed report from the reporting services server, then everything is OK. If I export the report in any format (tested with Word, PDF & Excel) then the output is as expected.
However, if I create a URL including all the parameters something like
http://MYSERVERNAME/ReportServer/Pages/ReportViewer.aspx?%2fMYPATH%2fMYREPORTNAME&PARAM1=999&PARAM2=999&PARAM3=999&rs:Command=Render&rs:Format=HTML4.0
then paste this into an IE window, the output is incorrect.
Well let me clarify that.
If I render as above using the HTML4.0 rendering extension then the report renders on screen as expected, all the content is shown.
If I render to Word by changing the rs:Format parameter to Word then the report renders but the first page is missing (see note about this content below)
If I render to PDF, the same part of the report is missing.
If I render to Excel, the document map generated on the first workbook sheet shows an entry for the missing section of report but clicking the click gives and 'invalid reference' error and indeed that part of the report is again not rendered.
Note that the 'master' report for want of a better term is made up of 3 subreports, each of these contain other sub reports.
Its the content of the first subreport, that also happens to only every show on the first page (as it is just less than a page long) that is missing.
In Word there is something rendered but it looks like an empty table with a width that is the full width of the page but a heigh of just a few millimetres.
I'm really at a loss as to why the section does not render when it works perfectly if rendered to screen and then exported. I had assumed they would use the same rendering process but I'm not sure.
I'll continue to experiment, maybe add some blank content before the problem section or something and see where I get but I'm puzzled as to why this happens, other reports do not suffer the problem (however I have only tested 3 or 4 or the hundreds that I have written).
I've not used the URL method much in the past but I got to this point as I was writing a c# application to run the same report with varying parameters to produce over 1200 word documents, each of which takes about 2 mins to run. the output was incorrect there so I worked my way back to creating a manual URL and the problem was still apparent, the rest is history!
I finally found the answer.
The subreport that was causing the problems takes parameters that are subsequently passed on to other child subreports. While I was testing these, I had datasets that provided the available values for the parameters (list of countries and their associated ID's for example).
My normal method of working is to remove all datasets that are only used to populate parameters in all subreports as this improves performance (the report does not have to query the database to get a list of countries for example).
However, on this occasion I had removed all the datasets (which in itself was fine) but I had left the datasource in place (visible in the report data pane).
Once I removed this redundant entry, the report rendered as expected.
Now I'm still not sure why it rendered OK to HTML4.0 but it would appear that when rendering to other formats there is some process going on that looks at the datasource perhaps and as there is no data (as there are no datasets) then the report is not rendered. That's a bit of a guess but it's the only thing that makes sense to me at the moment.

First page of MS Access Report does not seem to call On Page Event

I have coded a MS Access 2000 report that displays a calendar with one month per page and projects added to particular days. The only data in the underlying record source is a list of months. The structure is created via the On Page event, which also reads in other data.
When this report is opened, I've noticed that the On Page event does not seem to be triggered for the first page. (I attribute this to the fact that On Page in reports is activated when a page is cached rather than when a page is displayed, such as On Current for Access forms.)
When the report is displayed my work around is to use the On Activate event to force the On Page subroutine to run even though that event has not been called. However when the report is exported it does not trigger the On Activate event and the first page of the export is in one of two formats:
1) if the report was open in Access (ie On Activate had been triggered previously) the first page is identical to either the page after the one being displayed or the last page, except with the correct month (which comes from the underlying record source)
2) if the report was not open in Access the first page contains just the structure within the report design view (ie lots of empty boxes)
My best workaround is to force a (otherwise pointless) cover page to ensure the first page contains nothing that needs code to run, but this is far from ideal. Can I force the code to run for the first page of an export? Or maybe I'm misunderstanding how On Page works and I need to restructure my code? (I've also noticed that On Page seems to run twice for the last page).
I would recommend restructuring your code so that you build your data in one query, multiple queries, or in VBA, and then open the report with the new datasource. I might still have Access 2000 at home to check, but at work I can test both 2003 and 2007, and in both versions, the OnPage event fired before each page was displayed. If you are experiencing different behavior, I suspect it's because Access isn't sure how to handle what you are asking it to do.
Typically a report like the one you are describing would be designed the other way around: the datasource for the report would contain all the project information. Is there something about the data you're trying to display that prevents you from building a query that would contain all of it?
Have you considered the Format event for the various sections, especially the Detail section? Format or Print are a more usual events for manipulating reports.