Hello Parker,
I'd like to thank you for your response.
Unfortunatelly, I couldnt get it to work using this approach.I'm not sure if
I understood where Function StoreHeaderInfo supposed to go to, into the code
of the main report, or subreport?
I have tried both, but it didnt work..
I could not use the header of the main report, as I didnt want to use the
same header accross all subreports. The main header works fine if it is to be
applied throughout all report (will be applied to all subreports)...from what
I could find is that it can only be hidden on the first and/or the last page
if required...I couldnt find a way to control it accross subreports....
If I try to make use of the header in the subreport , it doesnt work
again...this header is completelly ignored once I run the whole report.
This is what I did at the end:
I have modified table 2 and made table 1 part of the table 2 (created new
group in table one and placed table 1 into it)...
I have then added Title which I wanted to repeat into the table 2 header.
Thank you again!
[quoted text, click to view] "Parker" wrote:
> A little clumsy, but you could add an additional dataset in the main
> report to provide the subreport heading that you want to repeat - if
> you want values from it to appear in the actual header, you need to
> use the following trick to show dataset values in the header (or
> footer):
>
> Go to Report|Report Properties menu.
>
> Put code similar to the following into the Code tab (for each field
> you plan on using in the header, add a global variable and a function
> to return it and/or a parameter).
>
> Sample:
> Public Shared reportTitle As String
> Public Shared reportName As String
>
> Public Shared Function StoreHeaderInfo( title As String, name As
> String) As String
> reportTitle = title
> reportName = name
> ' we need the assignment statement below, because method must return
> something
> ' otherwise, we can't use it in a table cell or textbox
> StoreHeaderInfo = ""
> End Function
>
> Then, in the body of the report, add a hidden textbox that has an
> expression similar to this:
>
> =Code.StoreHeaderInfo( Fields!ReportTitle.Value, Fields!
> ReportName.Value )
>
> Finally, in the header, put in a text box that has the expression:
>
> =Code.reportName or =Code.reportTitle
>