||Re: report canrender
Mervyn Bick <firstname.lastname@example.org>
||Thu, 6 Dec 2018 07:15:14 +0200
On 2018-12-06 5:53 AM, charlie wrote:
> Hi... I am having trouble with this:
> function TEXT9_canRender()
> this.text = this.parent.text6.text()+this.parent.textadditamt1.text()
> return true
> text6 is basically the total of a row in streamframe I am trying to take it from the text box it is situated in on the footerband. textadditamt is the amount of a field.
> I am trying to take a total amount of a field from the streamframe and add it to textadditamt which appears in text on the footerband of the report.
> text9 is supposed to represent textadditamt + text6.
> This works sometimes, but other times text9 is completely blank. Not sure at all why it is blank sometimes.
> I am not that familiar with this part of reports. Think I need some help. Thanks much!!!
Your code will only work if text6, text9 and textadditamt1 are all on
the same band. Your code also implies that codeblocks provide the
values to the text properties of text6 and textadditammt1.
If this is correct then the blank values are probably caused by a null
value in a field. Try the following. (It's untested so your mileage may
this.text = 0
if not empty(this.parent.text6.text())
this.text += this.parent.text6.text()
if not empty(this.parent.textadditamt1.text())
this.text += this.parent.textadditamt1.text()
If text6, text9 and textadditamt1 are not all on the same band please
give details of where each one is placed and exactly how the text value
for each text object is derived.