Home General
New Blog Posts: Merging Reports - Part 1 and Part 2

Loop and Create Dynamic Header Labels

edited February 2004 in General
I have looked at every bit of sample code to create a dynamic report and
cannot find a way to loop through data on the fly and create dynamic header
labels to correspond to the data on the fly. Cany you provide a simple
example for this?

Thanks!

--


Jane Scarano

Comments

  • edited February 2004
    Hi Jane,

    How are you getting your data "on the fly"? ReportBuilder by default will
    traverse your data automatically so there should be no need to loop through
    the data again. Please provide a little more information on how your report
    and data access is setup and exactly how you would like your report to
    behave.

    --
    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
  • edited February 2004
    I am generating data from a several queries and creating a memory table from
    the results. Every time I run the queries I will be getting entirely
    different column headers. I am not able to create a static report because I
    do not have the column headers at design time. Therefore, I need to create
    this report dynamically. I've checked out everything I could from cross tabs
    to creating a report in code ot third party solutions and still have not
    been able to accomplish this. Please help!

    Thanks.

    Jane Scarano

  • edited February 2004
    Hi Jane,

    You are going to want to loop through the field names in your datapipeline,
    then based on those names, you will want to create and position TppLabels in
    the header band and TppDBTexts in the detail with the corresponding field
    names. I went ahead and created a small example that shows how this can be
    done. You can download this example from the following link...

    http://www.digital-metaphors.com/tips/DynamicFields.zip



    --
    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
This discussion has been closed.