Autor Beitrag
dirkil2
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 130



BeitragVerfasst: Mo 31.01.05 00:59 
Mein Rave Report zeigt eine Tabelle an. In dieser Tabelle möchte ich genau eine Zeile mit einem fetten Font erstellen lassen. Dies soll in Abhängigkeit eines Datenbankfeld-Wertes sein. Dieser Wert ist aber nicht immer gleich, sondern wird erst zur Laufzeit bekannt.

Ich habe mir eine DataMirrorSection erstellt, die einmal eine Bold-Version anzeigt und einmal eine Normal-Version. Das funktioniert auch alles super - allerdings nur mit hart-codiertem Feldwert.

Kann mir jemand sagen (kleines Stück Code), wie man den Feldwert zur Laufzeit ändern kann?
tpau17
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 45

W2K, XP
D7 E, D2006Arch
BeitragVerfasst: Fr 04.02.05 21:35 
Dirk,
aus meinen Rave-Schulungsunterlagen:

OnMirrorValue event von DataMirrorSection.

ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
if RaveProject.GetParam('Druck') = 'TRUE' then
  EmpMirror := 'GPTexte.Druck';
else
  EmpMirror := 'GPText.Leer';
end if;


(ob es in Rave BE 5.0.8 sauber läuft weiß ich allerdings nicht :oops: )

:-) thomas, TeamNevrona

Moderiert von user profile iconraziel: Delphi-Tags hinzugefügt

_________________
(TeamNevrona cannot respond to questions received via email)
dirkil2 Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 130



BeitragVerfasst: Mi 09.02.05 18:09 
Hi Thomas,

danke für die Antowrt, allerdings kapiere ich sie noch nicht so ganz und bekomme es auch nicht kompiliert. Ich bräuchte noch ein paar Infos, was die Variablen in Deinem Beispiel sind.

Was ist in Deinem Beispiel EmpMirror und RaveProject?

Ich hätte jetzt so was erwartet wie:
if <dataview>.<feld> = <???>.GetParam(valforfeld) then
<wähle section fett>
else
<wähle section normal>

Wenn also besagtes feld den Wert meines Parameters hat, dann nehme die fette Section ansonsten die normale. Do wo stehen diese Infos in Rave?
tpau17
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 45

W2K, XP
D7 E, D2006Arch
BeitragVerfasst: Do 10.02.05 01:23 
hallo,
will die tage mal eine kleine demo-app für den fall basteln...

:-) thomas, TeamNevrona

_________________
(TeamNevrona cannot respond to questions received via email)
dirkil2 Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 130



BeitragVerfasst: Do 10.02.05 09:37 
Hi Thomas,

das finde ich klasse! Ich bin sicher, es werden noch mehr Leute davon profitieren können!

Bis dann,

Dirk.
dirkil2 Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 130



BeitragVerfasst: Do 03.03.05 00:08 
@Thomas

Ich bin nach wie vor sehr an einem Beispiel interessiert und ich denke genügend andere auch, zumal es nichts Brauchbares zu diesem Thema anderswo zu finden ist.

Thomas, Du würdest also ein gutes Werk tun, wenn Du ein kleines Beispielchen dazu anfertigen könntest.

Vielen Dank im Voraus!
tpau17
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 45

W2K, XP
D7 E, D2006Arch
BeitragVerfasst: Sa 05.03.05 19:13 
Hallo,
ich habe es nicht vergessen, bin aber schlicht zeitlich nicht dazugekommen!
bin gerade am basteln /erstellen von Rave 6.0 BEX mit WinForm und ASP.NET Anwendung
mit Nevrona zusammen.


:-) thomas

_________________
(TeamNevrona cannot respond to questions received via email)
tpau17
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 45

W2K, XP
D7 E, D2006Arch
BeitragVerfasst: Di 19.04.05 14:57 
Dirk,
bin immer noch nicht dazugekommen, ein vollständiges Beispiel zu fertigen :oops:
aber hier ein kleiner Test mit Rave6 (sollte in 5.08 oder höher auch gehen):

ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
function MirrorOrderComment_OnMirrorValue(Self: TRaveDataMirrorSection; var Value: string);
if DVOrdersAmountPaid.AsCurrency <= 500 then
  Value := '1';
end;
if DVOrdersAmountPaid.AsCurrency > 501 then
  Value := '2';
end;
if DVOrdersAmountPaid.AsCurrency > 1000 then
  Value := '3';
end;
if DVOrdersAmountPaid.AsCurrency > 4000 then
  Value := '4';
end;
end OnMirrorValue;


:-) thomas, TeamNevrona

Moderiert von user profile iconraziel: Code- durch Delphi-Tags ersetzt.
Einloggen, um Attachments anzusehen!
_________________
(TeamNevrona cannot respond to questions received via email)
dirkil2 Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 130



BeitragVerfasst: Fr 22.04.05 11:39 
@tpau17

Hi Thomas! Danke, dass Du noch dran gedacht hast. Ich habe versucht, das umzusetzen. Allerdings stürzt Rave beim compilieren ab.

Mein Code:
ausblenden Delphi-Quelltext
1:
2:
3:
4:
if DVMitbewerberVglNAME.AsString = 'xxx' then
   Value := '1';
if DVMitbewerberVglNAME.AsString <> 'xxx' then
   Value := '2';


Wenn ich auf Compilieren drücke, hängt die ganze Rave Applikation und ich muss sie abschießen. Mache ich was falsch?

Moderiert von user profile iconraziel: Code- durch Delphi-Tags ersetzt.