Skip to Content
author's profile photo Former Member
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 a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

4 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on 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 a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on 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 a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on 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 a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on 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 a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.