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

Field Aliases & Teechart

edited January 2005 in General
Howzit,
I have a system where report fields are dynamically created according to
user information and data. So I will have something like:
"Field1" - Caption (Alias) = "Bob's Balance"
"Field2" - Caption (Alias) = "Humprey's Balance"
etc.

Next time the report is run data may have changed - something like:
"Field1" - Caption (Alias) = "Bob's Balance"
"Field2" - Caption (Alias) = "Jezebel's Balance"

i.e. there will always be, say, 5 fields with the same name, but captions
(aliases) may differ.
Normal report controls are fine because they will link to "Field1" etc. But
TeeChart links (YValues.ValueSource) to the alias and not the field name. Is
there a way to get TeeChart to link to the field name and not the alias?

Regards,
Gilbert

Comments

  • edited January 2005
    Hi Gilbert,

    In my testing with ReportBuilder 9.01, the field aliases were being used in
    the TppDBTeeChart component when I tried to set the Labels and Values
    properties. Which version of ReportBuilder are you currently using?

    --
    Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com

    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
  • edited January 2005
    Nico,
    Using RB 7.02 i think - definately a sub-version of 7. That is not my
    problem though, problem is that aliases are stored in the streamed report
    template in teechart (but not in other RB controls).
    Example (this is the actual field name):

    object ppDBText1: TppDBText
    UserName = 'DBText1'
    DataField = 'ControlEffectiveness_Count_PIVOT_1'

    Now, teechart is using the Alias (see YValues.ValueSource):

    object ppDPTeeChartControl1: TppDPTeeChartControl
    Left = 0
    Top = 0
    Width = 400
    Height = 250
    Title.Text.Strings = (
    'Chart')
    BackColor = clWhite
    BottomAxis.LabelsAngle = 90
    BevelOuter = bvNone
    BorderStyle = bsNone
    Color = clWhite
    object Series1: TBarSeries
    Depth = 0
    Marks.ArrowLength = 20
    Marks.Callout.Brush.Color = clBlack
    Marks.Callout.Length = 20
    Marks.Visible = False
    DataSource = plMaster
    SeriesColor = clGreen
    Title = 'High'
    XLabelsSource = 'Assessment Name'
    Gradient.Direction = gdTopBottom
    XValues.Name = 'X'
    XValues.Order = loAscending
    YValues.Name = 'Bar'
    YValues.ValueSource = 'Control Effectiveness (Count) for High'

    problem is i am creating pivot tables on the fly and cannot count on
    ControlEffectiveness_Count_PIVOT_1 = Control Effectiveness (Count) for
    High
    being true all the time, so i would like teechart to use
    ControlEffectiveness_Count_PIVOT_1. Is there a way to do this?
    Regards,
    Gilbert

This discussion has been closed.