Skip to Content
avatar image
Former Member

Can you change column formats in child datawindows?

I have a child datawindow in a trailer band of a nested datawindow.  I use modify to attempt to change the display formats at run time, but, while this doesn't produce errors, neither does it change the format of the displayed data.   Should this work?

This is a sample modify string

paid.format="######0.00;(######0.00);######0.00" unpaid.format="######0.00;(######0.00);######0.00"

We are running PB12.5.2 Classic on Windows 8.1

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

4 Answers

  • Best Answer
    avatar image
    Former Member
    Dec 30, 2014 at 05:27 PM

    Did you put a check mark on the Use Format property? You should put a check on it to use the format.

    As suggested above by Chris, you could also use EditMask.Mask instead of Format.


    use_format.jpg (17.2 kB)
    Add comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      I've found the reason for my syntax errors - if you try to modify an editmask property and there is no editmask set up, then you get an error.

  • avatar image
    Former Member
    Dec 30, 2014 at 12:56 PM

    Hi David;

      Are you sure that the MODIFY () method was working in the first place .. does your PowerScript check the return code from this command?

    Regards ... Chris

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      Oh yes.  I have a nagging doubt that pasting the values in the debugger may have a bearing, so I'll try modifying the powerscript proper.

  • avatar image
    Former Member
    Dec 31, 2014 at 01:55 PM

    So the current arrangement is that I modify the format string.  I check whether there is an editmask.mask value other than '?' or '!' and if so then I set the useformat flag to Yes.  There is similar code for datawindows and child datawindows.  Changing the font on the child works fine.  Changing the fonts works in all of these. Changing formats returns no errors, but has no visible effects in the child DWs.

    There is some office folklore to the effect there are problems with modifying child DWs, but I can't find anything about this on the net.

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Jan 02, 2015 at 10:52 AM

    Happy New Year everybody!

    I've tried this using the dot notation and looking at the format once assigned to confirm that it's changed.  Still no effect on the output report.  Just to confirm that I'm manipulating the correct datawindow, I hacked the original and the changes were reflected in the report, so that's not it.

    I think that I've run out of options

    Add comment
    10|10000 characters needed characters exceeded