none
Textbox Grouping Scope Error RRS feed

  • Question

  • Hi, I have a Textbox in the Body of my Report that refers to another TextBox in the Footer of the Report. I want the Textbox in the Body to show the same value as the Textbox in the Footer (very simple). I can do this if both Textboxes are in the Footer, or if both Textboxes are in the Body, but I cannot make it work if I split the Textboxes in different "grouping scopes" (ie the Body and the Footer). 

    Does anyone know how to get around this issue? There is no way I can have the two Textboxes in the same group, so finding a way to make them work in different grouping scopes is a must for what I want to do.

    The error I get is below:

    >>"The Value expression for the textbox ‘textbox7’ refers to the report item ‘textbox8’.  Report item expressions can only refer to other report items within the same grouping scope or a containing grouping scope."<<

    Thanks for the help,
    Fulano
    • Edited by Mr_Fulano Saturday, August 8, 2009 6:10 AM
    Saturday, August 8, 2009 6:09 AM

Answers

All replies

  • Hi, Fulano,
    When you say "footer", do you mean footer of the group, or footer of the report?

    Long

    Friday, August 14, 2009 9:46 PM
  • Hi Long_Xue, I mean footer of "report." I want to add a textbox to the body of my report and one to the report's footer.  As the page numbers change in the footer, I want to reflect the value for that page in my report body's textbox.

    So if my report's page number is 13 (as shown in the footer), I want the textbox in the body of the report to also say 13.

    However, I'm getting the error below:

    >>"The Value expression for the textbox ‘textbox7’ refers to the report item ‘textbox8’.  Report item expressions can only refer to other report items within the same grouping scope or a containing grouping scope."<<

    ReportViewer is not allowing me to reference page numbers out of the reports footer, because they are not in "scope." If I place another textbox in the report's footer and try to refernce it to my page number, then that will work.

    Any suggestions or workarounds?

    Thanks,
    Fulano
    Friday, August 14, 2009 10:18 PM
  • Hi, Fulano,
    as far as I know, there is no way to do that directly.

    Is it realy important for you to show it in the body? (You can show it on header and footer)

    Long
    Friday, August 14, 2009 10:40 PM
  • Hi Long,

    Yes, its essential for what I want to do. I'm trying to develop a Table of Contents section in my report. My report has multiple SubReports within it and is many pages long, so I need a way to allow the reader to look up a page number for a specific section and go straight to that section (i.e. "Report C"....p 45), rather than thumbing through pages or scrolling down until they find the section they need to review. [...I really can't believe the developers of ReportViewer never thought of the need for this...I guess they didn't spend much time in the business world]. 

    In any event, I know I can establish page numbering and a total page count. So, if I could set up two textboxes, one to be a place holder just before the subreport section in question (a "Carrot") and one in the table of contents area, I can send the page number to the Carrot of where that report begins and the Carrot can send the page number to the Table of Contents textbox.

    Its a rather simplistic way to do it, but its the only way I can figure out that will allow me to show page number for where each section can be found.


    This is an example of what I want to do:

             Table of Contents

    SubReport 1..................p 3
    SubReport 2..................p 22
    SubReport 3..................p 34
    SubReport 4..................p 56

    [22]             <<--- Carrot
    SubReprt 2
    .
    .
    .
    .

                  Page 22 of 65



    Thanks for your help,
    Fulano

    Saturday, August 15, 2009 5:52 AM
  • OK...I think I found the answer to my question about how to get the page numbers out of the footer in the thread below. Now, I can place the page number anywhere in the body of the report. My next challenge is to get the numbering to be accurate -- but I always knew that would be Step #2.


    http://social.msdn.microsoft.com/Forums/en-US/sqlreportingservices/thread/c2047eee-41a8-4d79-ae58-dbf60f6e7554


    I think this question is complete, so I'll close it out and ask an new question if I run into issues.

    Thanks,
    Fulano
    • Marked as answer by Mr_Fulano Saturday, August 15, 2009 3:46 PM
    Saturday, August 15, 2009 3:46 PM