Sunday, February 19, 2012

Footer problems

Hi all,
I've got a couple of problems with some reports that I'm developing:
1) I'm trying to print a Group Footer at the bottom of the page in a fixed
position, regardless of how many detail records there are. Is there a way
to do this?
2) I have another report that is supposed to give page totals on each page,
as well as a grand total at the end of the report. Since I can't put any
fields in the Page Footer, and I can't use the Global Page variables in the
Body, how can I get these totals to appear correctly?
Thank you very much in advance,
JimJim wrote:
> Hi all,
> I've got a couple of problems with some reports that I'm developing:
> 1) I'm trying to print a Group Footer at the bottom of the page in a
> fixed position, regardless of how many detail records there are. Is
> there a way to do this?
> 2) I have another report that is supposed to give page totals on each
> page, as well as a grand total at the end of the report. Since I
> can't put any fields in the Page Footer, and I can't use the Global
> Page variables in the Body, how can I get these totals to appear
> correctly?
> Thank you very much in advance,
> Jim
I'll tackle number 2 first;
In a table footer you can use the 'RunningValue' function instead of
'Sum' and make sure the footer is set to 'Repeat on each page'.
Number 1 is not currently acheivable.
Rectangles are the key to semi-absolute positioning, but unless your
report is alway a one page report (i.e. an invoice) you won't be able
to do it.
Merry Christmas
Chris|||HI
I am also trying to do the same. But I cannot achieve it. Which scope do I
have to give' Can you please give me an example?
"Chris McGuigan" wrote:
> Jim wrote:
> > Hi all,
> >
> > I've got a couple of problems with some reports that I'm developing:
> >
> > 1) I'm trying to print a Group Footer at the bottom of the page in a
> > fixed position, regardless of how many detail records there are. Is
> > there a way to do this?
> >
> > 2) I have another report that is supposed to give page totals on each
> > page, as well as a grand total at the end of the report. Since I
> > can't put any fields in the Page Footer, and I can't use the Global
> > Page variables in the Body, how can I get these totals to appear
> > correctly?
> >
> > Thank you very much in advance,
> >
> > Jim
> I'll tackle number 2 first;
> In a table footer you can use the 'RunningValue' function instead of
> 'Sum' and make sure the footer is set to 'Repeat on each page'.
> Number 1 is not currently acheivable.
> Rectangles are the key to semi-absolute positioning, but unless your
> report is alway a one page report (i.e. an invoice) you won't be able
> to do it.
> Merry Christmas
> Chris
>|||Hey Soan,
I actually have found out how to do this stuff, although it was pretty
nasty. MS needs to come up with something better than it has thus far.
First off, the RunningValue function did not work for me in the table
footer. What I ended up doing was adding another Detail row, and added an
expression to the Hidden property of that row that hides it unless it goes
at the bottom of the page. I calculated the number of detail rows that fit
on each page, then used the Mod function of the RowNumber as such:
RowNumber(Nothing) Mod x = 0, where x is the number of rows that fit in a
page. I then added a TextBox to that new Detail row and included the
RunningValue function in it; that worked!
As for positioning on the page, well, that is similar. I have two stored
procedures, one of which calculates the total number of detail rows that
will show up on the report, then subtracts that from the (number of pages *
max rows per page). I then created a dummy table with no controls in the
detail row (no header or footer row either), and set the row source to that
extra row calculation sproc. This worked, but I hate it.
FYI, I tried Chris' solution of using rectangles, but I couldn't get the
Height property to accept an expression (according to BOL, it shouldn't
anyway), so I have no idea how he meant I could use rectangles.
Jim
"Soan" <Soan@.discussions.microsoft.com> wrote in message
news:01963902-278F-4A66-BE25-276F8115F8B1@.microsoft.com...
> HI
> I am also trying to do the same. But I cannot achieve it. Which scope do I
> have to give' Can you please give me an example?
>
> "Chris McGuigan" wrote:
>> Jim wrote:
>> > Hi all,
>> >
>> > I've got a couple of problems with some reports that I'm developing:
>> >
>> > 1) I'm trying to print a Group Footer at the bottom of the page in a
>> > fixed position, regardless of how many detail records there are. Is
>> > there a way to do this?
>> >
>> > 2) I have another report that is supposed to give page totals on each
>> > page, as well as a grand total at the end of the report. Since I
>> > can't put any fields in the Page Footer, and I can't use the Global
>> > Page variables in the Body, how can I get these totals to appear
>> > correctly?
>> >
>> > Thank you very much in advance,
>> >
>> > Jim
>> I'll tackle number 2 first;
>> In a table footer you can use the 'RunningValue' function instead of
>> 'Sum' and make sure the footer is set to 'Repeat on each page'.
>> Number 1 is not currently acheivable.
>> Rectangles are the key to semi-absolute positioning, but unless your
>> report is alway a one page report (i.e. an invoice) you won't be able
>> to do it.
>> Merry Christmas
>> Chris|||Hi Jim/Soan,
Soan, you asked about scope, generally I use 'Nothing' which instructs
RS to work it out for you! For basic reports you could use the dataset
name (in double quotes!).
You can set a group footer to repeat on each page (see 'Edit Group
Properties' and check 'Repeat Footer on each page')
Use the RunningValue function of the form
RunningValue(Fields!Amount.Value, Sum, Nothing), this should do it.
Note! This is not a page total but a running total!
Jim, your method is fine as long as you don't start grouping or have
conditionally hidden lines, then tracking where you are on the page
becomes a nightmare.
The rectangle solution only really works if can get prints on one page.
You place a rectangle exactly where you want it on the page and how big
you want, then place a data region inside it and make the data region
display what you want, i.e. the totals.
As Jim said, Microsoft haven't really provided an adequate way of
achieving this.
Regards
Chris
Jim wrote:
> Hey Soan,
> I actually have found out how to do this stuff, although it was
> pretty nasty. MS needs to come up with something better than it has
> thus far.
> First off, the RunningValue function did not work for me in the table
> footer. What I ended up doing was adding another Detail row, and
> added an expression to the Hidden property of that row that hides it
> unless it goes at the bottom of the page. I calculated the number of
> detail rows that fit on each page, then used the Mod function of the
> RowNumber as such: RowNumber(Nothing) Mod x = 0, where x is the
> number of rows that fit in a page. I then added a TextBox to that
> new Detail row and included the RunningValue function in it; that
> worked!
> As for positioning on the page, well, that is similar. I have two
> stored procedures, one of which calculates the total number of detail
> rows that will show up on the report, then subtracts that from the
> (number of pages * max rows per page). I then created a dummy table
> with no controls in the detail row (no header or footer row either),
> and set the row source to that extra row calculation sproc. This
> worked, but I hate it.
> FYI, I tried Chris' solution of using rectangles, but I couldn't get
> the Height property to accept an expression (according to BOL, it
> shouldn't anyway), so I have no idea how he meant I could use
> rectangles.
> Jim
> "Soan" <Soan@.discussions.microsoft.com> wrote in message
> news:01963902-278F-4A66-BE25-276F8115F8B1@.microsoft.com...
> > HI
> >
> > I am also trying to do the same. But I cannot achieve it. Which
> > scope do I have to give' Can you please give me an example?
> >
> >
> > "Chris McGuigan" wrote:
> >
> >> Jim wrote:
> > >
> >> > Hi all,
> >> >
> >> > I've got a couple of problems with some reports that I'm
> developing: >> >
> >> > 1) I'm trying to print a Group Footer at the bottom of the page
> in a >> > fixed position, regardless of how many detail records there
> are. Is >> > there a way to do this?
> >> >
> >> > 2) I have another report that is supposed to give page totals on
> each >> > page, as well as a grand total at the end of the report.
> Since I >> > can't put any fields in the Page Footer, and I can't use
> the Global >> > Page variables in the Body, how can I get these
> totals to appear >> > correctly?
> >> >
> >> > Thank you very much in advance,
> >> >
> >> > Jim
> > >
> >> I'll tackle number 2 first;
> >> In a table footer you can use the 'RunningValue' function instead
> of >> 'Sum' and make sure the footer is set to 'Repeat on each page'.
> > >
> >> Number 1 is not currently acheivable.
> >> Rectangles are the key to semi-absolute positioning, but unless
> your >> report is alway a one page report (i.e. an invoice) you won't
> be able >> to do it.
> > >
> >> Merry Christmas
> >> Chris
> >>

No comments:

Post a Comment