Hi All,
I created the code as shown below for setdata and getdata for page no. and for a Heading field for the no. of copies for my report
Shared Offset As Integer
Shared NewPage As Object
Public Function GetGroupPageNumber(NewPage As Boolean, PageNumber As Integer) As Object
If NewPage
Offset = PageNumber - 1
NewPage = False
End If
Return PageNumber - Offset
End Function
Public Function IsNewPage As Boolean
NewPage = True
Return NewPage
End Function
Shared Data1 as Object
Public Function GetData(Num as integer , Group as integer) as Object
if Group = 1 then
Return Cstr(Choose(Num, Split(Cstr(Data1),Chr(177))))
End If
End Function
Public Function SetData(NewData as Object,Group as integer)
If Group =1 and NewData >"" Then
Data1 = NewData
End If
Return True
End Function
Later inserted Textbox in the body with hidden property as shown below
= Code.SetData(Cstr(Fields!ReportTitleCopyText.Value) + Chr(177) +Cstr(Fields!PageCaption.Value),1)
Inserted textboxes in header for dispalying the Header data with each textboxes expression as '=Code.GetData(1,1) and code.GetData(2,1)
If the Report is for one page I am getting the values of header and pageNo. correctly, but if it is for multiple pages i am getting the header and page numbers wrongly, why this is coming this like for multiple pages and for single page it is coming corretctly, i want to know and i am beginner in the setdata and getdata type of a report, can anyone help me.
Thanks And Ragards,
Satish