Tuesday, February 19, 2013 6:42 PM
How can I remove blank lines caused by one or more empty sub-reports?
In some cases there will be 10+ empty sub-reports prior to a populated sub-report resulting in a large blank
area about the first report.
Is there any way to eliminate those blank lines?
This is an example where the first 10 sub-reports are blank.
Tuesday, February 19, 2013 9:10 PM
Please check this link. There is already a solution discussed in forum
Please Mark posts as answers or helpful so that others can more easily find the answers they seek.
- Edited by Sachi_SG Tuesday, February 19, 2013 9:10 PM More links
Wednesday, February 20, 2013 11:26 AM
I found that forum discussion last Friday.
I tried, "In the properties change the HideIfNoRows property to True." without any success.
The "Remove Extra Blanklines" thread looks like it can only be used in an application rather than in SSRS.
I still need help.
Wednesday, February 20, 2013 12:23 PM
have you tried the No row message for sub report in main report ?
in sub report you can handle your tablix visibility
= Iif (CountRows("yourdatast") > 0, false, true)
Hope this will help you !!!
Wednesday, February 20, 2013 11:02 PM
Yes... I'm doing both Isnothing and IIF MAX(Fields!TitleCode.Value = 0 then Hide.
The problem is that an empty sub-report that I hide creates a blank line.
Thursday, February 21, 2013 5:30 AMOk, so assuming that the sub report is being suppressed now, have you tried setting visibility conditionally on the entire row in the main report itself? I'm assuming you've embedded this sub report in a table or some other control in your main report ? If this is the case, one way to set the visibilty for this row would be based on a value in the main report that you are sending to the sub report as a paramter. If that value always results in a blank sub report, them hide the row. If you don't have an obvious value to key off of in your existing data set, then you may need to create one. This could be done in your main query by left joining to the source of your sub report data - just need return a single column or something to tell you that there are rows there. Back in your report, base the visibility of the row containing the sub report on the value of this field - if it's null/nothing, then hide the row, if it has some value, show the row.
Thursday, February 21, 2013 8:20 AM
The main report is just sub-reports and that all it has.
I hide each sub-report that have no records.
Thursday, February 21, 2013 5:35 PM
I don't know what to do. The client will not accept the SSRS application with those white lines.
Can I put code in here to delete white lines? I have no idea what code to use.
If someone has the solution, please answer the question in detail.
- Edited by nagshead_obx Thursday, February 21, 2013 5:36 PM
Thursday, February 21, 2013 8:35 PM
The background on your screen is interesting...
It appears (from what I can see) that you are instantiating many separate sub report objects to display the data in this main report? Each of these objects, when placed straight onto the body of the report, create a sort of place holder in the layout of the document. So, regardless of their visibility setting, the white space is going to show up when your render the report.
Generally, sub report objects should only be instantiated once in the design layout of your report. Often, sub reports are embedded within a row on a table or matrix. This way, when the main report is rendered, the sub report will automatically repeat (and the underlying data of the sub report will change) depending on the parameters being passed to it by each row of data that a table or matrix is representing.
Resolving your problem could be a matter of redesigning your report a bit. Can you describe to us what type of data your main report and sub reports are displaying? Are these sub report objects all referencing the same report and just passing in different parameters?
Thursday, February 21, 2013 9:24 PM
All 40 subreports have the same query, except for a unique code that identifies the query.
Three arguments are passed from a SharePoint web page using C# to the main page and then into the subreports. Each report has different arguments, with one used to identify the subreport.
If you can lead me to an example that would be great.
Thursday, February 21, 2013 11:42 PM
If I'm understanding correctly, all of your sub reports are generated off of the same query, therefore they are all sharing the same base data set?
If this is the case, you would be better served by creating a single data set in your main report that is based off the query you are using across all of your sub reports. From this data set, you should be able to represent the information that is currently contained in your 40 sub reports within a single table, which may utilize grouping, nested data regions, etc. to achieve the desired result.
While your technical details were helpful, I can't lead you to a specific example without having a little more insight into some of the concepts of your current report. If you can explain from a business standpoint what the nature/purpose of the main report is, and perhaps give some examples of the what types of data your sub reports are displaying (how they are different from each other - filtering? different aggregates?, etc.) that would be helpful.
If it helps, here is a video tutorial on grouping, among other things: Reporting Services (SSRS) - Grouping in Tables
Friday, February 22, 2013 11:41 AM
Thanks for trying to help, but the body of the reports cannot be grouped by. I knew how to do the grouping months ago, but the reporting criteria is a set output and the code that would be the group by is actually in the header.
Figuring out the best solution will be my cross to bear.
Again, thanks for trying to help.
Friday, February 22, 2013 5:59 PM
Thinking about the probem all day, is this scenerio possible?
From SharePoint I pass to the main report 3 parameters. Then use a query via a loop array to get value(s) that launched each sub-report. In this way, I can have one sub-report that takes in the 3 parameters that was chosen from SharePoint and then each value via the loop to run report.
The report would then be in in the order of the values and the placeholder issue would no longer cause a white line.
Tuesday, February 26, 2013 2:56 AMModerator
Based on your scenario, one close approach you can try is to decrease the size of the subreport controls greatly in the main report. Besides, in each subreport, resize the report body to eliminate the white space in the report body. In this way, there will be little white space when the subreports return no results.
Hope this helps.
TechNet Community Support
Tuesday, February 26, 2013 10:12 AM
When executing those 40 sub-reports within the main report, if the code that triggers each sub-report is not present within the main report a white space is shown on the output. The client does to want to see even one white space.
I have no idea if it is possible to create one sub-report in the main report and then creating a loop of one to many codes to generate a oerfect looking report. That is what the client wants.
Let's say that my Master page has 4 parameters with one parameter that varies.
The one subreport inside the master page will take 3 parameters that are constant and the 4th parameter will change by way of a loop. The output will create many reports generated from the 4th parameter .
How do you create a loop from the Master page changing the value of the 4th parameter to run the subreport as many times as there are values in the 4th parameter?
Thanks for your help.
- Edited by nagshead_obx Tuesday, February 26, 2013 1:39 PM Trying to explain the problem in a simple way