FR Designer: Assign Field-content to variable
Hi, (FR2.5, D7)
I would like to create a group-condition from the values of 2 different database-fields. (GROUPA + GROUPB)
I made this:
- In Data Dictionary I create a Variable "GroupMerge"
- I set the variable "GroupMerge" as the condition for the groupheader.
- I make something like this in the "OnBeforePrint" of the detailband:
(GroupA and GroupB are String-Fields)
begin
if [DialogForm.qryAblauf."GROUPA"] <> '' then begin
GroupMerge:= [DialogForm.qryAblauf."GROUPA"];
end else if [DialogForm.qryAblauf."GROUPB"] <> '' then begin
GroupMerge := [DialogForm.qryAblauf."GROUPB"];
end;
end
.... but something here seems not to be correct.
Can somebody help me?
Thanks
Willi
I would like to create a group-condition from the values of 2 different database-fields. (GROUPA + GROUPB)
I made this:
- In Data Dictionary I create a Variable "GroupMerge"
- I set the variable "GroupMerge" as the condition for the groupheader.
- I make something like this in the "OnBeforePrint" of the detailband:
(GroupA and GroupB are String-Fields)
begin
if [DialogForm.qryAblauf."GROUPA"] <> '' then begin
GroupMerge:= [DialogForm.qryAblauf."GROUPA"];
end else if [DialogForm.qryAblauf."GROUPB"] <> '' then begin
GroupMerge := [DialogForm.qryAblauf."GROUPB"];
end;
end
.... but something here seems not to be correct.
Can somebody help me?
Thanks
Willi
Comments
[DialogForm.qryAblauf."GROUPA"] + [DialogForm.qryAblauf."GROUPB"]
But do you also know the solution for my Problem: How to assign the Database-Value to a Variable ?
Thanks for any Ideas!
Willi
a := [table."Field"]
or, create a variable in the data dictionary and assign field reference to it ([table."Field"]). Each time when you access that variable it will return a field value.