Is there a way to make a rectangle not appear in the first page in ssrs? - reporting-services

I am creating a report on ssrs.
I have a rectangle with a textbox inside of it, that I want to hide on the first page. This is because I have another description of the item, with an image next to it, that only appears in the first page. Below this there is a tablix with details of the item, it can contain a variable number of rows.
The problem is I'm not able to hide the rectangle with the textbox in the first page only. I tried using global variables like PageNumber but you can't use it in the report body ( I tried many workarounds for this but none worked). I also can't just place the two rectangles I need to show on the report header because that only shows the first item (can't link it to dataset).
So what I'm asking is how to hide the rectangle? In the Image I linked the rectangle I want to hide on the first page is the grey one and the one that only shows in the first page is the pink one.
Thank you for you replies.

Related

Labels in fields within an SSRS report

I am attempting to reproduce a form within SSRS and fill it with data. The original form has blocks with small labels inside of each box that identifies the entry requested.
I "thought" I could simply use two different tablixes: one for the blocks with borders and labels, and the other one with the actual datafields or expressions, and align the 2nd tablix directly over the first one so that it appears as though the fields are presenting data inside of the labeled boxes.
It looked as I wanted it in design view, but when I went to preview the report, it pushed the 2nd tablix below the first tablix, in effect creating two tablixes, one stacked on top of the other one (not displaying as how I intended).
So, how do I accomplish the form design in the manner that I am seeking?
You should be using a type other than tablix for your report. Use a 'List' instead and you can free float objects as you need them and also nest a tablix as well. A little explanation on list:
You can float images with text boxes and then even change syntax or draw boxes around them and decorate those.
The call out for a field in SSRS is [(value)] with the [] meaning: "Data Column in recognized Dataset"
You can call out Variables with an '#' in front of them [#Test] would be a variable a user would put in called 'Test'.
Whatever size 'List' element is will determine how large it is when it repeats. If you want a strict form ensure the length and width are set correctly on the properties of that element.
If you want it to break every page you can click on the 'List' > Right Click the top left corner > Properties > 'Add a page break before' checkbox.
My example shows a super simple textbox with a dataset that only has three ideas repeat as many times as there are id's, three times. You can apply this to your form as needed.
It looks like you could reproduce that form header quite easily with a single tablix. If you envisage the form as a set of tablix cells like so:
then all you need to do is set the Border properties for each cell to hide the borders as needed (or you could merge the cells e.g those for Applicant and Location).
You can use a tablix with only Header rows, deleting the detail row. If you need multiple forms per report, then put the tablix inside a List region.

Get rid of group icon without hiding column

We have a report that gets populated by stored procedure. In the datatable we have a column "RowType" which is set to either 1, 2 or 3.
1 : Normal data row
2 : Important data row (In the picture this is the 1st row of data, the bold one)
3 : Devider rows. These are the rows with which we are having some issues. They are the two rows at the bottom of the image with the grey background.
The entire report is styled by either the "RowType" value or some of the other items in the datatable.
The Problem:
We have decided to change our report to make use of grouping, instead of drill down reports. I'm not going to go into the reasons for this decision.
The grouped rows each have a little icon to the left of it (Generated by report server) which is used to view the details of that row.(Sorry about that, pretty sure you know all this).
I have coded the "expand icon" to be hidden on rows that does not have detailed/grouped data, but that left me with the problem that the grey column would now also be hidden which leaves me with a blank white space instead of the grey cell.
Obviously this makes my report look horrible. Is there any way to remove the icon for a particular row without setting the Hidden property to True?
If not, is there a way to have the report row fill the background of a hidden cell with a defined colour?
The bottom right corner contains an example of what it looks like when one of the grey cells have been hidden. The bottom left shows the report with the unwanted icons in the grey cells
I think you could cut your current textbox out (the one with the +- icon, then add a rectangle from the toolbox into that cell, then paste your textbox back in. That way the texbox becomes a child of the rectangle. Then you can move your grey formatting to the rectangle, which will never be hidden.

First Textbox in Tablix cell defeats CanGrow of other Textboxes if it spans page break

I'm having a problem with the way SSRS handles long text in Textboxes inside a Tablix when the first Textbox is broken by a page break. Here's the simplified setup:
Create a Tablix with a single cell.
Add a Rectangle to that cell.
Add 2 Textboxes to that Rectangle, one below the other.
Ensure CanGrow = True for both Textboxes.
Add data to each Textbox such that each one contains multiple lines and the first contains enough lines to force some of it's lines past the end of the page. It helps to set the Page height to something ridiculous like 1 inch for testing purposes.
It's necessary to preview the report in Print Layout mode or export it to PDF to see that all the lines in the first Textbox print, but the second Textbox only prints the first line. Taking enough lines out of the first Textbox to avoid splitting it across a page will allow the second Textbox to print all of its lines.
Am I missing something? Is there a way to get the Tablix to behave properly across page breaks? It's the Tablix because moving the Rectangle and Textboxes outside of the Tablix fixes the problem. I don't see a CanGrow or similar property on the Rectangle or Tablix. A workaround is to put each Textbox into its own Tablix row, but that's not ideal in my situation.
I was able to reproduce the problem, but looks like there is an easy workaround:
If you nest a second rectangle in the first, and then nest the second text box within that rectangle, my pdf came out correctly. I tried this with BIDS 2008R2, 11x8.5 (landscape) pages.

SSRS show the same objects in the second page

I have a Report in SSRS that displays some logos at the top of the first page. I just got a requirement to add the possibility to also show the logos in the second page -- The report is only two pages. Is there a way to repeat the same Image objects in the second page?
If your report is specifically laid out to span multiple pages, you can use a repeating page header. If not (i.e., the second page is caused by content overflow), and you know it will always be two pages or less, you can use a page header and select "print on first page" and "print on last page" in report properties. Otherwise, if you have tablix controls causing the page span, and your page design allows, you can put the logos in the tablix header and enable repeat header on all pages for the tablix. If none of those work, you'll be stuck, as far as I know.
See also this question.
If you are showing Image in the header then you need to following things:
Adding a Data-Bound Image to a Header or Footer
You can use image data stored in a database in a header or footer. However, you cannot reference database fields from the Image report item directly. Instead, you must add a text box in the body of the report and then set the text box to the data field that contains the image (note that the value must be base64 encoded). You can hide the text box in the body of the report to avoid showing the base64-encoded image. Then, you can reference the value of the hidden text box from the Image report item in the page header or footer.
For example, suppose you have a report that consists of product information pages. In the header of each page, you want to display a photograph of the product. To print a stored image in the report header, define a hidden text box named TXT_Photo in the body of the report that retrieves the image from the database and use an expression to give it a value:
=Convert.ToBase64String(Fields!Photo.Value)
In the header, add an Image report item which uses the TXT_Photo text box, decoded to show the image:
=Convert.FromBase64String(ReportItems!TXT_Photo.Value)
http://technet.microsoft.com/en-us/library/dd220421(v=sql.105).aspx
TO repeat image on every page
IN addition to this, to repeat this image into everyt page, Go to property of TXT_Photo textbox In General tab, tick the check box "Repeat report item with data region on every page" and select your region.
Thanks

How to keep List contents on the first page? (SSRS 2005 - PDF Export)

I've got the following report setup:
1. Letterhead (not in the header, since i only want it on the first page)
2. List control with some data
when i export the report to PDF, and the contents of the List are less that one full page - my letterhead is displayed on the first page (the rest of the page is empty) and the List content gets moved to the second page.
if the List grows over 1 page - reports is showing up just fine (Letterhead and portion of the list on the first page - the rest on the second page)
It looks like it tries to keep the list on 1 page as long as its contents fit on the page - but when you add the letterhead to the contents it overflows the page, and the list gets bumped down to the next page.
Is there any way to keep the list on the first page regardless of its size.
Putting the letterhead in the list is my last resort, I'd like to hear some other solutions.
uploaded a sample .rdl to illustrate the problem
got rid of the list for simplicity, the problem seems to be with a textbox wanting to show up on 1 page
p.s. see this question for more details
What is the source of your text? Is it coming from a dataset? If so, Add a paragraph id in it, set your table to group on the paragraph id and show only the group header. In the group, add a bottom padding value of say 5. The table will handle the paragraph breaks for you, and if it grows more the a page it will handle it for you. Make sure that keep together is set to false. The paragraph id will be used to sort the dataset by id ascending.
sorry I didn't notice your comment at the end. The only other thing that i can think of is to shift your list up closer to the header and eliminate all empty space at the end. Also, make sure the KeepTogether option in the list is set to false. This way it will break up your list rather than move it to the next page.
you can put both the letterhead and the list inside a rectangle so they are always grouped together.
Reporting services also tries to keep the relative spaces you have in the designer, so if you list is aligned to the bottom of the page and there is a space form the header; it will keep the space on top and align everything to the bottom of the page.