Use dbr.record to capture and insert dbr.editable statements?

(3 posts) (2 voices)

Tags:

  1. duane, Member

    Hi.

    I'm trying to create a dynamic editable report (form) with a dynamic set of fields. To do this, I need to have a dynamic set of dbr.editable statements that match those fields. I have the procedure that builds the field listing and it displays fine. I also have the procedure that generates the set of dbr.editable lines which work find if static. But I'm tring to make a call to that procedure to include them in the 'main' report.

    Just using CALL myEditableInstructions(myvariables); doesn't work and I also tried wrapping it in dbr.record begin-end statements like:
    SELECT 'dbr.record', 'begin'; CALL myEditableInstructions(myvariables); SELECT 'dbr.record', 'end';

    What I can't figure out is how to 'play back' this resultset. I've tried having nothing after and having a dummy select like:
    SELECT "" AS EditableInstructionsResult;

    But so far it hasn't worked to get the actual editable statements recognised and working.

    Do you have any suggestions?

    FYI: so far with is without tempates but it will soon be used in a template.

  2. myDBR Team, Key Master

    Duane,
    should be enough if you just call the myEditableInstructions-routine.

    Can you check what the output of the report is if you export it to SQL? You should be able to see if the commands are genrated corrctly.
    --
    myDBR Team

  3. duane, Member

    Thanks- that was the hint I needed to solve it.

    I was concatenating a string which contained all the dbr.editable query lines in one and executed after the loop ended. By instead executing them during each cycle of the loop, it worked (all the specified fields were editable).

    So thanks for the hint!


Reply

You must log in to post.