Page 1 of 1

2+ TDBCrossTabSource problem

Posted: Wed Apr 11, 2007 11:14 am
by 9345419
I have a TDBChart with a single TDBCrossTabSource component - it works great. However when I add an additional one to the TDBChart component only the first will activate. I can activate the second when I deactivate the first but just not both at the same time. Any hints?

Cheers

JP

Posted: Thu Apr 12, 2007 9:42 am
by narcis
Hi JP,

We have run some tests here and found something that can make a difference in the project working fine or not.

Could you please try the following?

1. Create a copy of your project.
2. Open this copy in Delphi/BCB, open the form where the TDBCrossTabSources are.
3. Right-click on the form and select 'View as Text'.
4. Look at the series objects definition and check if a property called 'DataSources' appears, something like this:

Code: Select all

    object Series1: TBarSeries
      Marks.Callout.Brush.Color = clBlack
      Marks.Visible = True
      DataSource = DBCrossTabSource2
      Title = 'South America'
      Gradient.Direction = gdTopBottom
      XValues.Name = 'X'
      XValues.Order = loAscending
      YValues.Name = 'Bar'
      YValues.Order = loNone
      DataSources = (
        'DBCrossTabSource2'
        'DBCrossTabSource1')
    end
5. Now try removing 'DataSources' property so the code above ends like this:

Code: Select all

    object Series1: TBarSeries
      Marks.Callout.Brush.Color = clBlack
      Marks.Visible = True
      DataSource = DBCrossTabSource2
      Title = 'South America'
      Gradient.Direction = gdTopBottom
      XValues.Name = 'X'
      XValues.Order = loAscending
      YValues.Name = 'Bar'
      YValues.Order = loNone
    end
6. Without switching to form view yet try building and running your application. Does it work fine? This works fine here.

7. Right-click on the text view and select 'View as Form', build and run the project again. Does it work now? This makes the project not running again for us.

Thanks in advance.