Skip to main content

Notifications

Announcements

No record found.

Small and medium business | Business Central, N...
Suggested answer

Expressions in RDLC Report of BC

(1) ShareShare
ReportReport
Posted on by 97
I am a beginner and learning on my own, While playing around with existing reports. I came across this expression
=Cstr(Choose(12,Split(Cstr(ReportItems!HeaderValue.Value),Chr(177))))
 
I am able to understand the most of the functions but what is 12 in here similarly in following expression 
=Cstr(Choose(26,Split(Cstr(ReportItems!HeaderValue.Value),Chr(177))))
 
is it related to columns of the table, if that is the case how will i know which number is mapping to which column name?
I tried to map the columns value of report to the main table ID, it is not same? What am i missing
Categories:
  • Suggested answer
    Steven Renders Profile Picture
    Steven Renders 5,051 Super User 2024 Season 1 on at
  • Suggested answer
    Judy Profile Picture
    Judy Microsoft Employee on at
    Expressions in RDLC Report of BC
    Hi,
     
    The Choose function uses the first parameter as the index of one of the remaining function parameters. The first argument must be an integer. 
    You can refer to the blog about RDLC report functions:
     
    Best Regards,
    Judy
  • Suggested answer
    YUN ZHU Profile Picture
    YUN ZHU 73,718 Super User 2024 Season 2 on at
    Expressions in RDLC Report of BC
    Hi, here is a simple explanation that I hope will give you some tips.
     
    For a brief description, the n-th field in the group of defined fields, such as the following example, (8,1) is WhseShptHeader_PostingDate. 
    =Code.SetData(Cstr(Fields!CompanyInfo_Name.Value) + Chr(177) + 
    Cstr(Fields!WhseShptHeader_ShptDate.Value) + Chr(177) + 
    Cstr(Fields!WhseShptHeader_No.Value) + Chr(177) + 
    Cstr(Fields!WhseShptHeader_ShipmentNo.Value) + Chr(177) + 
    Cstr(Fields!WhseShptHeader_LocName.Value) + Chr(177) + 
    Cstr(Fields!SalesHeader_SellToCustName.Value) + Chr(177) + 
    Cstr(Fields!SalesHeader_ShipToAddr.Value) + Chr(177) + 
    Cstr(Fields!WhseShptHeader_PostingDate.Value) + Chr(177) + 
    Cstr(Fields!OutboundType.Value)
    , 1)
     
     
    Thanks.
    ZHU
  • Suggested answer
    gdrenteria Profile Picture
    gdrenteria 12,250 Most Valuable Professional on at
    Expressions in RDLC Report of BC
    Hi
    Maybe this can help you and give you some hints
    Best regards
    Gerardo

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,280 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,253 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans