AGB  ·  Datenschutz  ·  Impressum  







Anmelden
Nützliche Links
Registrieren
Zurück Delphi-PRAXiS Programmierung allgemein Programmieren allgemein DBChart aus Query zur Laufzeit füllen
Thema durchsuchen
Ansicht
Themen-Optionen

DBChart aus Query zur Laufzeit füllen

Ein Thema von AndreT · begonnen am 23. Feb 2005 · letzter Beitrag vom 13. Mai 2005
Antwort Antwort
AndreT

Registriert seit: 5. Nov 2004
Ort: Bocholt
82 Beiträge
 
Delphi 2006 Enterprise
 
#1

DBChart aus Query zur Laufzeit füllen

  Alt 23. Feb 2005, 10:34
Hallo,

ich hab ein AdoQuery, was erst zur Laufzeit dynamisch ausgeführt wird und auch da erst seine SQL-Statement übergeben bekommt.

Nun möchte ich das Ergebnis (2 Spalten / 10 Reihen) in einem DBChart darstellen.

Wie übergebe ich dem DBChart die Einstellungen zur Laufzeit.

DBChart1.Series[0].DataSource:=dataset_query;
und wie weiter?

Ich steh echt vor einem Rätsel

Danke für Eure Hilfe
Andre
  Mit Zitat antworten Zitat
AndreT

Registriert seit: 5. Nov 2004
Ort: Bocholt
82 Beiträge
 
Delphi 2006 Enterprise
 
#2

Re: DBChart aus Query zur Laufzeit füllen

  Alt 25. Feb 2005, 08:27
Keiner eine Idee?
Andre
  Mit Zitat antworten Zitat
Benutzerbild von SilverMoonGirl
SilverMoonGirl

Registriert seit: 21. Aug 2003
Ort: Berlin
160 Beiträge
 
Delphi 6 Professional
 
#3

Re: DBChart aus Query zur Laufzeit füllen

  Alt 12. Mai 2005, 10:46
Huhu ihrs

Ich stehe vor dem selben Problem und würde auch gerne wissen, wie das funktioniert
Simone
There is no dark side of the moon really.
Matter of fact it's all dark.
.::mein Blog::.
  Mit Zitat antworten Zitat
Benutzerbild von alcaeus
alcaeus

Registriert seit: 11. Aug 2003
Ort: München
6.537 Beiträge
 
#4

Re: DBChart aus Query zur Laufzeit füllen

  Alt 12. Mai 2005, 10:57
Hallo ihr,

ich hab mal meine Delphi-Hilfe konsultiert, und folgendes gefunden:

Zitat:
TeeChart Charts will connect with 3 different types of Dataset.
TTable
TQuery
TClientDataset
The minimum that requires to be set in each case is:
The name of the database,
For the table the TableName of a table
or
in the case of the query a valid SQL string.
or
in the case of a ClientDataset Define source (right button on TClientDataset object in form).
Remember to activate the Dataset by setting the Active property to True.

...


You may populate your Chart at runtime by coding which Series to add to the Chart and defining the fields of those Series.
It assumes you have a table on your form, Table1 with fields Name and Amount.

Delphi-Quellcode:
Var
MySeries,Ave:TLineSeries;

MySeries:=TLineSeries.Create( Self );
With MySeries do
begin
 ParentChart:=DBChart1;
 DataSource:=Table1;
 XLabelsSource:='Name';
 YValues.ValueSource:= 'Amount';
 CheckDatasource;
end;
Verwendet hab ich das Ding nie, also kann ich nicht mehr als das sagen. Vielleicht hilft es euch aber trotzdem weiter

Greetz
alcaeus
Andreas B.
Die Mutter der Dummen ist immer schwanger.
Ein Portal für Informatik-Studenten: www.infler.de
  Mit Zitat antworten Zitat
Benutzerbild von MagicAndre1981
MagicAndre1981

Registriert seit: 4. Jun 2004
Ort: Nordhausen
2.214 Beiträge
 
Delphi 7 Enterprise
 
#5

Re: DBChart aus Query zur Laufzeit füllen

  Alt 13. Mai 2005, 10:33
Zitat von SilverMoonGirl:
Huhu ihrs

Ich stehe vor dem selben Problem und würde auch gerne wissen, wie das funktioniert
Hi Simone, schau dir mal die Demos dazu an. Es gibt eine Demo mit Namen TeeChart da wird dir geholfen.

André
André
  Mit Zitat antworten Zitat
Antwort Antwort


Forumregeln

Es ist dir nicht erlaubt, neue Themen zu verfassen.
Es ist dir nicht erlaubt, auf Beiträge zu antworten.
Es ist dir nicht erlaubt, Anhänge hochzuladen.
Es ist dir nicht erlaubt, deine Beiträge zu bearbeiten.

BB-Code ist an.
Smileys sind an.
[IMG] Code ist an.
HTML-Code ist aus.
Trackbacks are an
Pingbacks are an
Refbacks are aus

Gehe zu:

Impressum · AGB · Datenschutz · Nach oben
Alle Zeitangaben in WEZ +1. Es ist jetzt 01:51 Uhr.
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024 by Thomas Breitkreuz