c# - Trouble referencing labels with Active Reports -
ok, start off, first time working c#, , top off attempting work in report editor myobs aepm software, doesn't give me lot of info or flexibility. have been able work out uses version of data dynamics active reports, not sure one. cannot seem figure out naming have used of report. anyway, main issue.
i needing add calculations report visual editor wont allow me do(it restricted count, sum, min, max, avg, var, not helpful). calculations pretty simple(one total x .7, , other being result of first x 74 value might changed in future). figured best way have 2 text boxes value in each of them of "0", , once main report pretty done run calculations , replace values of 2 text boxes. made text boxes in appropriate section , labelled them calctotal1 , calctotal2.
now in editor allows me select object , event trigger it, selected reportfooter object , afterprint event. put in line chance calctotal1 value , tried generate report resulting in following error:
error message: report script compile error on line 8 error = name 'calctotal1' not exist in current context
public void reportfooter_afterprint() { calctotal1.text = "hello"; }
i have tried looking @ documentation active reports not having luck, ideas incredibly welcome.
the myob ae pm feature referred called smart reports. able replicate error , consequently resolved problem using following syntax:
((textbox)rpt.sections["detail"].controls["textbox2"]).text= "$2000.00";
eg:
public void detail_afterprint() { ((textbox)rpt.sections["detail"].controls["textbox2"]).text= "$2000.00"; }
Comments
Post a Comment