2+ TDBCrossTabSource problem

TeeChart VCL for Borland/CodeGear/Embarcadero RAD Studio, Delphi and C++ Builder.
Post Reply
nathean
Newbie
Newbie
Posts: 3
Joined: Thu Feb 23, 2006 12:00 am

2+ TDBCrossTabSource problem

Post by nathean » Wed Apr 11, 2007 11:14 am

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

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Post by Narcís » Thu Apr 12, 2007 9:42 am

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.
Best Regards,
Narcís Calvet / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

Post Reply