Showing posts with label portrait. Show all posts
Showing posts with label portrait. Show all posts

Monday, March 26, 2012

Report not using pagination properly

I have a portrait report that has 1 table with 1 hidden group header (for the Page Header to reference fields from) and 36 detail rows. My problem is that pagination is not working properly. Depending on the length of data in the detail rows, the report tends to push majority of data on the next page(s) which leaves a lot of blank lines or blank page at the beginning of each group of data. I want the data to complete the first page before rolling over to the next page. That's why I have 36 individual detail rows instead of all the data in 1 detail row. I've tried adjusting the page length, but it doesn't seem to work all that well. I either get all the report on one page (which is fine when viewing online, but data is cut off when printing) or inadequate pagination. I do not have any white space at the bottom of the table and the page footer. Anyone have any ideas?

Thanks,

T

Have you tried setting KeepTogether=false on your table? The behavior your describing sounds like it's set to true, which would mean that if the table can't fit completely on the current page, but will fit on the next page, it will move the table to the next page.

You shouldn't need to specify the detail rows individually if you're populating from a data source!|||Yes, KeepTogether is false and yes I am using a shared data source and data is queried using Stored Procedure.|||Well it seems the problem lies within the Group Header row. I removed that row and pagination works properly now, but I lose the ability to call fields in my page header when the report spans more than one page.|||

Ok, I found a solution for showing Field values in Page Header even when the report spans more than one page(but you don't know at what point the report spans to the next page). It's a combination of several solutions:

1) Create hidden textbox(es) with the field value you're wanting on every line where the page might span to the next page.

textbox1

textbox2

textbox3

2) Create a function in code that will reference each hidden textbox(es) by name

Shared Function Header(reportItems as ReportItems) as string
Dim final as string
If ReportItems!textbox1.value <> "" Then
final = ReportItems!textbox1.value
Else If ReportItems!textbox2.value <> "" Then
final = ReportItems!textbox2.value
Else If ReportItems!textbox3.value <> "" Then
final = ReportItems!textbox3.value
End If
Return final
End Function

3) In Page Header call function, pass (ReportItems)

=Code.Header(ReportItems)

The reason for the function is because you can't reference multiple ReportItems in Page Header textbox, so you have to determine which hidden textbox has a value on that page and return that value to the calling Header textbox. Hope this helps....

sql

Wednesday, March 7, 2012

Report Layout

I must be missing something really obvious, but, how can I specify whether a report (.rdlc) if being designed for landscape or portrait paper? It would be nice to have some sort of mark on the guides or the grid to show where the edge of the selected paper type is.

Regards

GrahamI agree on the markers but we couldn't get it in. If you go to the report properties dialog, you will see the page width and height. If your width is more than your height, you will be in landscape, otherwise portrait.|||

Not true (for me).

I have already set those, set the body size to at least 1/2" + smaller, and the L and R margins to .2 each. The report previews in Landscape and prints or PDF's in portrait.

What should I be looking for?

MDM

Report Layout

I must be missing something really obvious, but, how can I specify whether a report (.rdlc) if being designed for landscape or portrait paper? It would be nice to have some sort of mark on the guides or the grid to show where the edge of the selected paper type is.

Regards

Graham
I agree on the markers but we couldn't get it in. If you go to the report properties dialog, you will see the page width and height. If your width is more than your height, you will be in landscape, otherwise portrait.|||

Not true (for me).

I have already set those, set the body size to at least 1/2" + smaller, and the L and R margins to .2 each. The report previews in Landscape and prints or PDF's in portrait.

What should I be looking for?

MDM