Subject Re: invoice report myfieldtex5
From Mervyn Bick <invalid@invalid.invald>
Date Thu, 15 Aug 2019 19:44:34 +0200
Newsgroups dbase.getting-started

On 2019-08-15 6:36 PM, error in case f ["pay type].value== CH wrote:
>     local f
>                 f = form.streamSource1.rowset.fields
>                 do case
>                    case f["pay type"].value == "CH"  <-------
>                         this.text := "Check: "
>                         this.text += f["check number"].value
>                    case f["pay type"].value == "VI"
>                         this.text := "Visa: "
>                         this.text += right( trim( f["card number"].value ), 4 )
>                    case f["pay type"].value == "MC"
>                         this.text := "MasterCard: "
>                         this.text += right( trim( f["card number"].value ), 4 )
>                    case f["pay type"].value == "DN"
>                         this.text := "Discover/Nova: "
>                         this.text += right( trim( f["card number"].value ), 4 )
>                    otherwise
>                         this.text := "Unknown payment type"
>                 endcase
>
> in my sourcecode editor line 237
> 2. the order date code block shows error
>

Assuming that the field "card number" is character and the code is in
the myfieldtext5 text object's canRender event handler there doesn't
appear to be anything that could cause an error.

If the codeblock in the orderdate text object's text property is showing
an error then that is where you should be looking.

While spaces (and reserved words) are allowed in field names they can
need special handling in some cases.  It is better to avoid spaces or
reserved words in fieldname.  Rather use _ instead of a space.

Please enter your name in the Name field when you post messages.  I
can't begin to imagine what someone with the name 'error in case f ["pay
type].value== CH' looks like. :-)

Mervyn.