×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

Windows Forms RDLC Page Totals In Page Footer

Windows Forms RDLC Page Totals In Page Footer

Windows Forms RDLC Page Totals In Page Footer

(OP)
I'm trying to put page totals on a Windows Form 2008 RDLC report using

CODE

=SUM(Fields!buyprice.Value) 
for the textbox, but I get the following error.
"The Value expression for the textbox ‘textbox17’ refers to a field. Fields cannot be used in page headers or footers."
Is there anyway around this? I want the totals for each page, not a running total.

On another note, why did they make these reports so that you can't use the fields in the page header or footer without resorting to using Report Items? Am I going to have to use some sort of code to sum these?

Auguy
Sylvania/Toledo Ohio

RE: Windows Forms RDLC Page Totals In Page Footer

Just change the textbox expression to this:

=SUM(ReportItems!buyprice.Value)

I confirmed that this does produce per-page totals, not running totals.

I used to rock and roll every night and party every day. Then it was every other day. Now I'm lucky if I can find 30 minutes a week in which to get funky. - Homer Simpson

Arrrr, mateys! Ye needs ta be preparin' yerselves fer Talk Like a Pirate Day!

RE: Windows Forms RDLC Page Totals In Page Footer

(OP)
Yes that does work, thanks. I was going down that path when I saw your post. The only problem I have is that I used

CODE

=IIF(Fields!buyprice.Value = 0, "-", Fields!buyprice.Value) 
for some of the fields to print a Dash instead of zero. I made a separate detail row to hold just the field names, but you cannot hide the row because then the report items don't work and you can only set the row height to a minimum of 0.03125in and make the individual cells hidden. That's not bad but does add space between the visible detail rows. Is there a way to format zero values as a Dash? I also cannot figure out how to get a record count per page.

Late Update: I figured out how to do the Dashes. I can set the Format to

CODE

=IIF(Fields!buyprice.Value = 0, "-", "n2") 
and it works. Still working on Record Count per page.

Auguy
Sylvania/Toledo Ohio

RE: Windows Forms RDLC Page Totals In Page Footer

To get record count per page, do the same as with the totals. Add a textbox in the page footer and add this for the expression:

=Count(ReportItem!buyprice.Value)

I have confirmed that this gives the count of rows on each page of the report.

I used to rock and roll every night and party every day. Then it was every other day. Now I'm lucky if I can find 30 minutes a week in which to get funky. - Homer Simpson

Arrrr, mateys! Ye needs ta be preparin' yerselves fer Talk Like a Pirate Day!

RE: Windows Forms RDLC Page Totals In Page Footer

(OP)
Thought I tried that, must of done something wrong. I was getting the correct count on some pages but count + 1 on others. I will try again. Thanks

Auguy
Sylvania/Toledo Ohio

RE: Windows Forms RDLC Page Totals In Page Footer

(OP)
Tried the row count again, works now. Thanks

Auguy
Sylvania/Toledo Ohio

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close