Fields use outside fetchdata

Posted by: joseantonio on 11 September 2019, 12:51 am EST

    • Post Options:
    • Link

    Posted 11 September 2019, 12:51 am EST

    Hi,

    How can I safely access the latest collection of fields read in fetchdata, for use in the detail_format, groupheader_format and pageheader_format events?

    Regards.

  • Posted 12 September 2019, 6:07 pm EST

    Hello,

    As per my understanding, you wish to use fields whose values are set in FetchData, in format event of other sections. For this, you can refer the attached application showing how it is done.

    Note that in Detail.Format event, a TextBox is assigned value based on the value from the field collection:

    textBox2.Value = Fields["Country"].Value;  
    

    Let me know if you need further assistance.

    Regards,

    Esha

    prj_SectionReport_FetchDataEvent.zip

  • Posted 13 September 2019, 1:03 am EST

    Hi, thanks for the example.

    I also need to access these fields in the format event of a groupheader.

    How could I do it, an example?

    Regards

    Jose

  • Posted 15 September 2019, 5:58 pm EST

    Hello,

    It is not the apt procedure to use the collection in Group Header’s Format event. Note that as the Group Header prints once for every data group, it is not the perfect section to define fields from the field collection as the value of these fields will not be displayed as they are rendered in the Detail section.

    Group Header is generally fit to contain aggregate functions.

    Suppose you have a TextBox named TextBox3 in the GroupHeader, you can use the code as mentioned in the previous response for this TextBox in GroupHeader’s format event but it will only display the first value for the field. Thus, it won’t show accurate results.

    Regards,

    Esha

Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels