RTC report customization - header issue

kamil_czkamil_cz Member Posts: 7
edited 2011-02-08 in NAV Three Tier
Hi all,

I need to add a couple of new fields into the standard report 10572 Sales Invoice GB. I have added the fields into the classic report layout so I can see the fields in the RDLC designer and dataset. The RDLC report layout has got a PageHeader, Body and PageFooter sections. There is one hidden field within PageHeader with value of =code.SetData(ReportItems!PageHeaderData.Value). I can see the report code stores this in global variable and then the fields within the PageHeader are populated using =code.GetData(31).

My Question is: Where does my new fields will appear in the ReportItems!PageHeaderData.Value? How to find correct index id for my new fields.

I have also tried to create my own functions to store and retrieve single detail into/from global variable and used this as recommended with hidden field but this also doesn't work for me.

Code
Shared PlaceOfIssue as Object

Public Function SetPOI(ByVal Value As Object)
If Not (Value = "") Then
PlaceOfIssue = Value
end If
End Function

Public Function GetPOI() as Object
Return PlaceOfIssue
End Function

new hidden field has got value =Code.SetPOI(ReportItems!CompanyInfo__Place_Of_Issue_.Value)
new standard fields has got value =code.GetPOI()

Thanks
Kamil

Comments

  • mohana_cse06mohana_cse06 Member Posts: 5,504
    Or you can simply add the new field in body section and hide..

    in header you can add it as reportitems.new field..
  • kamil_czkamil_cz Member Posts: 7
    Or you can simply add the new field in body section and hide..

    in header you can add it as reportitems.new field..

    Hi, I have tried what you suggested but I'm getting following errors: 'Report item expressions can only refer to other report items within the same grouping scope or a containing grouping scope ' or 'Fields cannot be used in page headers or footers' when try to reference Fields.new field. :-(
  • mohana_cse06mohana_cse06 Member Posts: 5,504
    Can you check report 111 for how it has been used to show the COMPANYNAME in header..
  • BeliasBelias Member Posts: 2,998
    use
    =code.setpoi(yourfield.Value) //Not the reportitems!textboxname.value, but the dataset field value!!!
    
    in the body part of the report.
    and then use the getpoi function in the header. (you already did this).
    BTW, these procedures are perfectly explained in msdn, and on manuals, too. You should read them before asking here: it's far more better explained than what we can do. :wink:
    -Mirko-
    "Never memorize what you can easily find in a book".....Or Mibuso
    My Blog
  • kamil_czkamil_cz Member Posts: 7
    Issue resolved. I couldn't find what the 'PageHeaderData' reference is. It is obviously again a hidden field in body section that holds all the fields from the header. This textbox control just didn't have the color set to RED so I overlooked it. I though wrong it is some standard report property that I couldn't simply find anywhere.

    Thanks for help
Sign In or Register to comment.