Subject Re: CODEBLOCK IN DETAIL BAND
From MUSTANSIR GHOR <mustan31@hotmail.com>
Date Thu, 20 Jul 2017 10:44:05 -0400
Newsgroups dbase.getting-started

Dear Mervyn

Thank you. It was an opening as this will be required very much in all reports. Here 'this' refers to which object

Best regards
Mustansir


Mervyn Bick Wrote:

> On 2017-07-20 9:38 AM, Mustansir Ghor wrote:
> > Dear All
> >
> > I have a scenario where any one field  out of these three fields RESULTL (this is using lookupSQL for data display), RESULTN, RESULTM  need to be printed in a tabular report. The criteria for field selection is stored in the fourth field RESULTY ("N", "C", "L")
> >
> >             NAME                        RESULT
> >             -------------------------------------
> >             Malaria                      Positive     (RESULTL)
> >             HB                            8.0           (RESULTN)
> >             SENSITIVITY             No growth (RESULTC)
> >  
> >
> > Is there any means of using codeblock with text object to achieve this.
> >
>
>
> Try the following.
>
>
> Instead of dragging resulty from the fields palette to the detailband
> place a plain text object where you want the actual result to be placed.
>
> Use the text object's canRender event handler to control the output
>
>
>    function TEXT1_canRender()
>        if this.form.YourQueryName.rowset.fields["resulty"].value = 'L'
>           this.text = this.form.YourQueryName.rowset.fields["resultl"].value
>        elseif if this.form.YourQueryName.rowset.fields["resulty"].value
> = 'N'
>           this.text = this.form.YourQueryName.rowset.fields["resultn"].value
>        elseif if this.form.YourQueryName.rowset.fields["resulty"].value
> = 'C'
>           this.text =
> this.form.YourQueryName.rowset.fields["resultc"].value
>        endif
>        return true
>
>
> Mervyn.



Warning: Unknown: write failed: No space left on device (28) in Unknown on line 0

Warning: Unknown: Failed to write session data (files). Please verify that the current setting of session.save_path is correct () in Unknown on line 0