Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
Last post Jun 03, 2010 03:13 AM by spidercool
May 18, 2010 02:12 AM|LINK
I am doing a SSRS report to generate some kind of print outs.
I need to have different footers inside the whole print out.
e.g. After first several pages I need to use page number as page footer( this can be easily done). but after that i need have footers as Annex A -1, Annex A-2, or Annex B -1 , Annex C - 1, when the page is Annex A, Annex B...etc.
Anyone can help me with this?
May 18, 2010 11:22 AM|LINK
the greate thing about SQL Server Reports that you can do almost everything through expression, all what you have to
is to find the expression that fit your purposes, for example through page numbers or if this page contains specific thing
to be numbered Annex-1 or whatsoever.
May 18, 2010 11:32 AM|LINK
Hi, may I know how to check or what's the function if this page contains specific things? (e.g. contains some text box, so that will be very easy for to determine the footer)
May 19, 2010 12:06 PM|LINK
=iif(Globals!PageNumber<=Globals!TotalPages,"Page "+ Globals!PageNumber.ToString() +" of"+Globals!TotalPages.ToString()",code.GetPageName(txtPageName) assign the value to Textbox in footer.
You create custom code and pass the Page Name when you reach the total page numbers...
Public iTotalPage as Integer
Public sPage as string=string.empty
Public Function GetPageName(sPageName as string) //pass the PageName to the function and keeping adding 1,2 for all Annex A,Annex B,Annex C...
If sPage<>sPageName then //here we are checking whether Annex A=Annex B. If not then continue adding 1,2,3 so on till we get Annex B
May 20, 2010 02:23 AM|LINK
Thanks for your code, I am trying it out.
But I met some issues. May I know what is txtPageName?
May 20, 2010 04:29 AM|LINK
that will be footer textbox name, just I have mentioned like that, you can mention the textbox name which you have declared in the footer.
May 20, 2010 05:27 AM|LINK
You mean assign value to text box txtPageName as
=iif(Globals!PageNumber<=Globals!TotalPages,"Page "+ Globals!PageNumber.ToString() +" of"+Globals!TotalPages.ToString()",code.GetPageName(txtPageName)
I got the error "txtPageName' is not declared.
Please help, thank you.
May 24, 2010 07:38 AM|LINK
TextPageName is just the mentioned textbox name which you have declared in the footer.
Jun 03, 2010 03:13 AM|LINK
forgive me if i understand wrongly,
Do you mean you add a text box named 'txtPageName' inside the footer.
Then you assign value
to this text box 'txtPageName'.
I notice that this txtPageName as a para. within the assigned value itself.
and I still got the error "txtPageName' is not declared.
Please help, thanks.