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

Comments

  • edited 12:26PM
    if you want to group on GROUPA + GROUPB, just assign the following value to the GroupMerge variable (or directly to Groupheader.Condition):
    [DialogForm.qryAblauf."GROUPA"] + [DialogForm.qryAblauf."GROUPB"]
  • edited 12:26PM
    It works, thanks for your help!

    But do you also know the solution for my Problem: How to assign the Database-Value to a Variable ?

    Thanks for any Ideas!

    Willi
  • edited 12:26PM
    In the script:
    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.

Leave a Comment

Rich Text Editor. To edit a paragraph's style, hit tab to get to the paragraph menu. From there you will be able to pick one style. Nothing defaults to paragraph. An inline formatting menu will show up when you select text. Hit tab to get into that menu. Some elements, such as rich link embeds, images, loading indicators, and error messages may get inserted into the editor. You may navigate to these using the arrow keys inside of the editor and delete them with the delete or backspace key.