How to show/hide specific pages of an Access report? - ms-access

I'm creating a per-employee report that will be output to PDF and some pages of the report will only be applicable to specific employees. Ideally I would like to not show those pages when the report is run or when it is output to PDF.
Each page of the report would be pulling from different data, so I was looking into sub-reports as a potential option.
The other thing that might complicate this is that I need to be able to perform a batch output of the report for multiple employees to individual PDF files.
What is the best way to go about achieving this? Sub reports that I show or hide based on the available data? I've searched pretty extensively and haven't found any suggestions on how best to accomplish this.
Thanks in advance!

Reportfields have a CanShrink Option. If its empty and nothing else is on that line horizontally it shrinks to nothing. If you set all fields of a page to CanShrink it disappears in Reports where all the fields of that page are empty.

Related

SSRS report ignores grouping when downloading

I have created an SSRS report that allows expanding (+ sign) when rendered to a report accessible through a URL. Initially each group is collapsed when viewing the report.
However, when I download it as an MHTML format, it "loses" all the data that initially is hidden, only downloading the first line of data from each grouping.
Any ideas how to fix this? I'm comfortable working with expressions to achieve what is needed, I just need to know what to write in it. I'm guessing it needs to include some kind of "render" command, but not sure what to write.
Thank you.

SSRS Reports Export to PDF and append other documents

I am having a requirement where in I am creating some sort of packages. There could be one or two SSRS reports (RDLs per say) part of the package and then there could be some other pdf files included in that.
So in turn the requirement is to merge one or more RDL and one or more pdf files together and make it a single pdf and allow the user to download it.
I am not sure if this can be achieved as it is asked in SSRS itself. My question is specifically if this kind of things can be achieved in SSRS.
I have the other approach where in I export the reports store them some where, pick the couple of PDF files in question and store them in the same folder and then zip it and go from there but thats something is not really wanted.
Could you help me on this or guide me to some resources/approaches?
thanks.
You may need to play around a bit but one way to make it work is to place all your reports as sub reports into your main report.. so when you run the main report.. it runs all the other sub reports.. when you export this, it should export as one document. What is not clear here is, if they have different parameters etc for different reports (sub reports) or if they have any parameters at all.

Access Subreport Shows In Print Preview But Doesn't Print/Export

I can't figure out what is going on with my report in Access 2010. When I run it, all the queries and recordsources are generated and the report shows up, perfectly full of data and formatted in print preview. If I try and print a hard copy or export to PDF, the subreports don't print. I have done compact and repair, closed and opened, and check everything I know, but it's not working. The only thing that I can think of is that the subreports are based on temp tables I generate and set within VBA after I pull all the parameters I need. But I don't see why this would cause it to preview but not print? Any help would be greatly appreciated!!
Here's the solution I found... when I moved the table creation code to the button that prompted the report rather than having it use the openargs in the open event of the subreport, it worked. Don't know why exactly it liked it one place better than the other, but I'm glad that it works now!
After many hours in research and experimentation the only solution was a third party print function: http://www.lebans.com/reporttopdf.htm. Leben’s function always produces a printable PDF with visible subreports.
No modification of the report’s properties was of any value, though this is suggested by various posts; it failed to work for me. Similarly, compact and repair failed to help, as did the creation of a wholly new MDB file and importing all the forms/tables/queries. I ran the MDB in Access 2003 and in Access 2010 on another machine and had the same failure.
This points of course to the issue being embedded within Access. Research shows this has been an issue plaguing Access for many years; in its inimitable lack of care for users getting work done Microsoft has failed to even comment on this, much less fix it.
I had a similar issue and thought that I should post my fix in case someone else runs into the same problem.
I had a report with two subreports on it. From a form, I would select from several combo boxes and then hit the button to run the report. When the report opened (in preview and in report-view) it looked fine, and the subreports worked fine. However, when I tried to print or save, the subreports would not show up.
My solution was in my queries and in the form. The report's source queries were pulling criteria from the combo boxes on the form. Once the report was run, the combo boxes would clear, thus clearing the criteria for the queries. After the report is run, the report looks at the queries again when you try to print/save.
If you have a similar setup, I would suggest checking your source queries again after the report is run to see if you are still getting results. You should see the same data in your queries and in your report. If not, there's where to start looking. Hope this helps anyone else struggling with the same issue.

Reporting in MS Access

I am looking for some advice on strategically embedding reports in forms to allow for optimal end-user usage.
In particular, i would like to know if it is possible to have a report embedded into a form but so that the header of the report changes as you scroll down to show the title of the current type of record you are looking at.. As an example, i have a report with about 1000 lines of information relating to 5 category types.. I made a report so that the category type is Always in the header of the report. Is it possible when viewing this report embedded into a form to have this functionality??
Thank you,
A
A quick Google search indicates that Microsoft does have an ActiveX control available which does allow you to embed reports inside forms. It's called the Microsoft ActiveX Snapshot Viewer. Most of the search results indicate that there are vulnerabilities with it, which is often the case with old ActiveX controls.
Even if you do utilize it (which I do not recommend), you're going to run into a problem where you won't know what category the user is viewing, since I'm not aware that Access gives you any way to get that information.
I suggest you use forms instead. Reports are for printing, and in my opinion, for nothing more than that. A preview should allow the user to see very quickly what it will look like, and then print it.
It isn't that hard to build forms that allow users to search/filter. I find that when I build proper searching/filtering forms, my users don't need reports unless they really do need to print something. Forms can be built as read only so they can't change data.
Be aware that even with forms, I don't think it's possible to know what the user is viewing. If they click into a record you would be able to use the OnCurrent event to know what record they are viewing and could likely derive the category from that, but that requires them clicking around in forms. A much more standard way of doing this would be to give them a dropdown which would allow them to select a category and apply a filter to the form (or a subform) to view only that category.

Dynamically loading SubReport data in SSRS

This is in SSRS 2008.
I've created a report with a tablix, embedded in the tablix there is a subreport. This subreport contains a lot of information (and I mean a lot – it takes more than 45 sec to load it).
I don’t want to show it, or to be more precise – to process/load the data when the report initially runs. Note that I dont want to just not display it - because then all the data is still processed at initial load time.
Instead, I only want the subreport to be processed (and the data pulled down), individually, when I display it (e.g. clicking a + sign to toggle it, or any other option such as clicking an image/ link, while staying in the same report). I also don’t want to open the subreport in a different tab or something like that....
Does anyone know a solution? Maybe there is an onLoad method, dynamic subreport or something like that?
I tried looking into the DataElementOutput attribute, but that's readOnly... anything else?
Before you jump through a lot of hoops to implement a workaround, have you analyzed the execution plan for the query which is delivers the data for the subreport? If you haven't, it's worth it to see if performance can be improved by adding a covering index which will help the query optimizer to deliver the data quickly.
Hope this helps,
Bill
So, as it turns out, the problem was in fact because I had the subreport repeated for each row in the parent report. Thus, the subreport was called numerous times...
And according to MS, there is no way to dynamically process individual subreports. Had to solve this issue by splitting out the subreport (at least the data-heavy parts) to a seperate page. :(