Results 1 to 2 of 2
  1. #1
    Join Date
    Nov 2005
    Posts
    2

    Unanswered: Dynamic Column Heading

    Hi,

    We are developing a report where one column heading should change dynamically based on the data in a meta table. Let me explain the problem with a simple example.

    Let us assume asp.net page has simple filter compnay. values comp1, comp2, comp. When the user click the "get report" button it will displays all the employees in that company.

    Meta table will have data as below.
    Compnay Desc
    --------------------------------
    comp Application Developer
    comp1 Programmer Analyst
    comp2 System Engineer.

    Now if user selects comp from the asp.net page output should be as below.

    Application Developer
    ---------------------
    employee1
    empolyee2
    employee3

    If user selects comp1, output is

    Programmer Analyst
    ---------------------
    employee1
    empolyee2
    employee3

    If user selects comp2, output is

    System Engineer
    ---------------------
    employee1
    empolyee2
    employee3

    You could clearly see that in all the cases we give only list of employees. ONly difference is column heading should be different based on user selection and should be maintained in a database table.
    any help is highly appreciated.

    Thanks
    Ravi

  2. #2
    Join Date
    Oct 2005
    Posts
    178
    Quote Originally Posted by rvidela
    Hi,

    We are developing a report where one column heading should change dynamically based on the data in a meta table. Let me explain the problem with a simple example.

    Let us assume asp.net page has simple filter compnay. values comp1, comp2, comp. When the user click the "get report" button it will displays all the employees in that company.

    Meta table will have data as below.
    Compnay Desc
    --------------------------------
    comp Application Developer
    comp1 Programmer Analyst
    comp2 System Engineer.

    Now if user selects comp from the asp.net page output should be as below.

    Application Developer
    ---------------------
    employee1
    empolyee2
    employee3

    If user selects comp1, output is

    Programmer Analyst
    ---------------------
    employee1
    empolyee2
    employee3

    If user selects comp2, output is

    System Engineer
    ---------------------
    employee1
    empolyee2
    employee3

    You could clearly see that in all the cases we give only list of employees. ONly difference is column heading should be different based on user selection and should be maintained in a database table.
    any help is highly appreciated.

    Thanks
    Ravi
    Create a formula with condition and insert that formula in your column heading.

    How to do that..

    Create your group based on your field that contain records Comp, Comp1, Comp2

    Create a formula and maybe call it "DHeading" and use the condition

    if {tblfieldname.value} = "Comp" then "Application Developer" else
    if {tblfieldname.value} = "Comp1" then "Programmer Analyst" else
    if {tblfieldname.value} = "Comp2" then "System Engineer" else
    "Undefined"

    then insert that formula (DHeading)in your column header
    Last edited by fredservillon; 11-29-05 at 15:14.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •