Autor Beitrag
Karstadt
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 174

Windows 2000 / XP
Delphi 7 Pro
BeitragVerfasst: Mo 10.10.05 16:23 
Hallo. Ich möchte eine Tabelle erstellen und eine Spalte für EURO Beträge. Wenn ich z.B. 2,50 abspeichere soll ich auch 2,50 rauslesen und nicht 2,5.

Wie mache ich das ? Wie heißt der Feldtype?

MFG
Bernhard Geyer
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 721
Erhaltene Danke: 3



BeitragVerfasst: Di 11.10.05 10:09 
Es gibt noch keinen speziellen Datentyp, aber es wird DECIMAL(19,4) (dev.mysql.com/tech-r...-from-microsoft.html) vorgeschlagen.
Karstadt Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 174

Windows 2000 / XP
Delphi 7 Pro
BeitragVerfasst: Di 11.10.05 11:32 
Problem ist aber, wenn ich 15,20 in die Tabelle speichere. Bekomme ich nur 15,2 angezeigt. Das soll nicht sein :(
Bernhard Geyer
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 721
Erhaltene Danke: 3



BeitragVerfasst: Di 11.10.05 11:46 
Wo bekommst Du des angezeigt?
Du wirst vermutlich noch ein Anzeigeformat definieren müssen (Displayformat in den Felddefinitionen)
Karstadt Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 174

Windows 2000 / XP
Delphi 7 Pro
BeitragVerfasst: Di 11.10.05 12:32 
DBGRIB zeigt mir immer nur 2,8 bei 2,80. Muss ich felder immer einlesen, um die Formatierung vorzuhnemen?

Wie mache ich das bei RAVE REPORT ?
tomtom62
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 278

WIN 2000, XP prof
D5 prof.
BeitragVerfasst: Mi 12.10.05 10:06 
Bei den Report-Tools kannst Du immer die Anzeige eines solchen Wertes einstellen. Das Format wird dann einmal ausgewählt bei der Reporterstellung. Es gibt da oft den Typ "Währung".

Wenn dich die Anzeige im Grid stört,dann kannst Du das auch ändern. Du musst dann den Wert selbst ausgeben. Dazu gibt es Events im DBGrid.Ein Beispiel wäre onDrawDefaultCell.

Thomas
Karstadt Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 174

Windows 2000 / XP
Delphi 7 Pro
BeitragVerfasst: Mi 12.10.05 10:38 
Ich habe das jetzt in der TQuery.Field.Displayformat geändert und das funktioniert einwandfrei auch in RAVE REPORT. Danke für die schnelle Hilfe.