Showing posts with label detail. Show all posts
Showing posts with label detail. 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

Tuesday, February 21, 2012

report grouping

I have a report that shows/hides group detail with the + for expanding the
group. When the report first displays the detail is hidden (as it should be)
with the + showing. However ... the cursor will only change to a finger
(pointer ... whatever) when the cursor is placed to the left of the + sign.
The user will want to expand the detail by selecting on the + sign and they
cant. Why is this?
Example:
+ Client A
^ -- user must click to the left of the plus sign on Client A to expand
groupThis is a known bug in the report designer preview tab.
When the report is published to the report server, all should be fine and
good in the world.
Rob.
"MJ Taft" <MJTaft@.discussions.microsoft.com> wrote in message
news:28AF3C35-5277-407E-8646-C42F1D1D441E@.microsoft.com...
>I have a report that shows/hides group detail with the + for expanding the
> group. When the report first displays the detail is hidden (as it should
> be)
> with the + showing. However ... the cursor will only change to a finger
> (pointer ... whatever) when the cursor is placed to the left of the +
> sign.
> The user will want to expand the detail by selecting on the + sign and
> they
> cant. Why is this?
> Example:
> + Client A
> ^ -- user must click to the left of the plus sign on Client A to expand
> group
>|||Thanks Rob, another question has come up ... my use does not like how the
report has to be so wide when you are drilling down. Is there a way to nest
the drill levels so they appear to render slightly indented rather than
spreading across the page? If it involves expressions please elaborate as I
am struggling with that aspect a bit. Thanks in advance!
"Rob Labbe (Lowney)" wrote:
> This is a known bug in the report designer preview tab.
> When the report is published to the report server, all should be fine and
> good in the world.
> Rob.
> "MJ Taft" <MJTaft@.discussions.microsoft.com> wrote in message
> news:28AF3C35-5277-407E-8646-C42F1D1D441E@.microsoft.com...
> >I have a report that shows/hides group detail with the + for expanding the
> > group. When the report first displays the detail is hidden (as it should
> > be)
> > with the + showing. However ... the cursor will only change to a finger
> > (pointer ... whatever) when the cursor is placed to the left of the +
> > sign.
> > The user will want to expand the detail by selecting on the + sign and
> > they
> > cant. Why is this?
> > Example:
> >
> > + Client A
> > ^ -- user must click to the left of the plus sign on Client A to expand
> > group
> >
> >
>
>

Report formatting - green-bar effect

I'm trying to apply the green-bar effect to the detail rows in my report but
the alternating colours are not being applied correctly. The report uses a
table with 3 nested groups defined. For discussion purposes I'll call them
Group A, B and C. Group A is the outermost group, Group B is nested within
Group A, and Group C is nested within Group B. My result set is correctly
displayed so that I end up with 12 rows in Group C. However if I check the
number of rows using the RowNumber function, it tells me there are 20 rows
being returned for Group C.
I looked at the result set in SQL Query Analyzer and discovered that there
are 20 rows, but of these only 12 are unique. So I see why the alternating
colours aren't working, but am not sure how to fix it. Any ideas?
Thanks
--
DawnDawn,
The solution below assumes that you don't have much traffic, concurrent
sessions will cause problems.
Regards,
Cem
Shared ColorState as Boolean = True
Shared Function AlternateColor() as Boolean
if ColorState then
ColorState = False
Return False
else
ColorState = True
Return True
end if
End Function
In the report use IIF(Code.AlternateColor(),"Red","Green")
"Dawn" <Dawn@.discussions.microsoft.com> wrote in message
news:CBF95E44-4B54-4B8A-AFB4-3EEAC0D5B3B5@.microsoft.com...
> I'm trying to apply the green-bar effect to the detail rows in my report
> but
> the alternating colours are not being applied correctly. The report uses a
> table with 3 nested groups defined. For discussion purposes I'll call them
> Group A, B and C. Group A is the outermost group, Group B is nested within
> Group A, and Group C is nested within Group B. My result set is correctly
> displayed so that I end up with 12 rows in Group C. However if I check the
> number of rows using the RowNumber function, it tells me there are 20 rows
> being returned for Group C.
> I looked at the result set in SQL Query Analyzer and discovered that there
> are 20 rows, but of these only 12 are unique. So I see why the alternating
> colours aren't working, but am not sure how to fix it. Any ideas?
> Thanks
> --
> Dawn|||Dawn,
Also take a look at this example, it helped me immensely when trying to
accomplish the same thing- it's how to create a Green Bar Matrix
http://blogs.msdn.com/chrishays/archive/2004/08/30/223068.aspx
Bill Youngman
Anexinet, Inc.
"Dawn" <Dawn@.discussions.microsoft.com> wrote in message
news:CBF95E44-4B54-4B8A-AFB4-3EEAC0D5B3B5@.microsoft.com...
> I'm trying to apply the green-bar effect to the detail rows in my report
but
> the alternating colours are not being applied correctly. The report uses a
> table with 3 nested groups defined. For discussion purposes I'll call them
> Group A, B and C. Group A is the outermost group, Group B is nested within
> Group A, and Group C is nested within Group B. My result set is correctly
> displayed so that I end up with 12 rows in Group C. However if I check the
> number of rows using the RowNumber function, it tells me there are 20 rows
> being returned for Group C.
> I looked at the result set in SQL Query Analyzer and discovered that there
> are 20 rows, but of these only 12 are unique. So I see why the alternating
> colours aren't working, but am not sure how to fix it. Any ideas?
> Thanks
> --
> Dawn