myGreenBird


how do i get pagenumber and total pages when i try to put on the page header i get error:

=Globals.PageNumber & " of " & Globals.TotalPages

error:

[rsPageNumberInBody] The Value expression for the textbox ¡®textbox17¡¯ refers to the global variable PageNumber or TotalPages. These global variables can be used only in the page header and page footer.

Build complete -- 1 errors, 0 warnings

any help please




Re: =Globals.PageNumber & " of " & Globals.TotalPages

JrDevRon


Hiya!!

I dont know if this has been solved, or if this will help but try the following...

= Globals!PageNumber & " of " & Globals!TotalPages

Hope it helps!!







Re: =Globals.PageNumber & " of " & Globals.TotalPages

myGreenBird

does not help either




Re: =Globals.PageNumber & " of " & Globals.TotalPages

Jarret

Are you sure your textbox is in the page header region of the report layout The textbox expression should have this:

=Globals!PageNumber & " of " & Globals!TotalPages

Jarret





Re: =Globals.PageNumber & " of " & Globals.TotalPages

myGreenBird

yes sir, here is the error message im getting.

Error 1 [rsPageNumberInBody] The Value expression for the textbox ¡®textbox16¡¯ refers to the global variable PageNumber or TotalPages. These global variables can be used only in the page header and page footer. c:\visual studio 2005\projects\myreportproj\Name.rdl 0 0





Re: =Globals.PageNumber & " of " & Globals.TotalPages

mallyk

The error message [rsPageNumberInBody] clear mentions that you are using the Global Variables in the body of the report layout.



Re: =Globals.PageNumber & " of " & Globals.TotalPages

Jarret

myGreenBird,

Can you do something for me real quick

Right click on the textbox where you have your expression for the page number and total pages. Do you see "Select 'Page Header'" or do you see "Select 'Body'" in the context menu that pops up

Jarret





Re: =Globals.PageNumber & " of " & Globals.TotalPages

myGreenBird

Jarret wrote:

myGreenBird,

Can you do something for me real quick

Right click on the textbox where you have your expression for the page number and total pages. Do you see "Select 'Page Header'" or do you see "Select 'Body'" in the context menu that pops up

Jarret

thank you, i understood what you were trying to ask and i fixed that. :)





Re: =Globals.PageNumber & " of " & Globals.TotalPages

turkaum

How can i do to change these something

When i did this test, in my context menu appear "Select Body" and i don¡¯t know how to do to display "Select 'Page Header'" or "Select 'Page Footer'"...
anybody help me

Turkaum





Re: =Globals.PageNumber & " of " & Globals.TotalPages

Jarret

Hello Turkaum,

First you need to have the Page Header/Footer showing, then you can add items to it. To show it, right click in the pale yellow area of the Layout view. Then select Page Header and/or Page Footer, this will create another section on your report where you can add items. Or, you can go to the Report menu option and enable the Page Header/Footer from there.

Hope this helps.

Jarret





Re: =Globals.PageNumber & " of " & Globals.TotalPages

turkaum

it¡¯s ok now..

Thx Jarret.