if file("temp_golfers_scores.dbf") drop table temp_golfers_scores endif copy table golfers_scores to temp_golfers_scores alter table temp_golfers_scores add late_entry boolean update temp_golfers_scores set late_entry = false insert into temp_golfers_scores (grp,late_entry) values (99,true) ** END HEADER -- do not remove this line // // Generated on 2016-12-01 // local r r = new MBGOLFERS_SCORESREPORT() r.render() class MBGOLFERS_SCORESREPORT of REPORT with (this) metric = 0 // Chars autoSort = false endwith this.TEMP_GOLFERS_SCORES1 = new QUERY(this) with (this.TEMP_GOLFERS_SCORES1) left = 22.0 sql = 'select t.*,fname||" "||lname as name1,lname||", "||fname as name2 from "temp_golfers_scores.DBF" t where (dbname = :dbname or late_entry = true ) order by grp,lname ' requestLive = false params["dbname"] = "SATURDAY20161203" active = true endwith this.STREAMSOURCE1 = new STREAMSOURCE(this) this.STREAMSOURCE1.GROUP1 = new GROUP(this.STREAMSOURCE1) with (this.STREAMSOURCE1.GROUP1) groupBy = "late_entry" endwith with (this.STREAMSOURCE1.GROUP1.headerBand) preRender = class::HEADERBAND_PRERENDER onRender = class::HEADERBAND_ONRENDER expandable = false height = 1.0 endwith this.STREAMSOURCE1.GROUP2 = new GROUP(this.STREAMSOURCE1) with (this.STREAMSOURCE1.GROUP2) groupBy = "grp" headerEveryFrame = true endwith with (this.STREAMSOURCE1.GROUP2.footerBand) onRender = class::FOOTERBAND_ONRENDER height = 1.0 endwith this.STREAMSOURCE1.GROUP2.footerBand.TEXT1 = new TEXT(this.STREAMSOURCE1.GROUP2.footerBand) with (this.STREAMSOURCE1.GROUP2.footerBand.TEXT1) canRender = {||false} height = 1.0 left = 6.5 top = 0.0 width = 12.0 prefixEnable = false text = "Text1" endwith with (this.STREAMSOURCE1.GROUP2.headerBand) preRender = class::HEADERBAND_PRERENDER1 height = 6.0 endwith this.STREAMSOURCE1.GROUP2.headerBand.TEXT1 = new TEXT(this.STREAMSOURCE1.GROUP2.headerBand) with (this.STREAMSOURCE1.GROUP2.headerBand.TEXT1) canRender = class::TEXT1_CANRENDER height = 1.0 left = 2.5 top = 4.25 width = 12.0 prefixEnable = false alignHorizontal = 2 // Right text = "Match No" endwith this.STREAMSOURCE1.GROUP2.headerBand.TEXTGRP1 = new TEXT(this.STREAMSOURCE1.GROUP2.headerBand) with (this.STREAMSOURCE1.GROUP2.headerBand.TEXTGRP1) canRender = class::TEXTGRP1_CANRENDER height = 1.0 left = 16.1667 top = 4.25 width = 4.0 variableHeight = true prefixEnable = false alignHorizontal = 2 // Right picture = "999" text = {||this.form.temp_golfers_scores1.rowset.fields["grp"].value} endwith this.STREAMSOURCE1.GROUP2.headerBand.TEXT2 = new TEXT(this.STREAMSOURCE1.GROUP2.headerBand) with (this.STREAMSOURCE1.GROUP2.headerBand.TEXT2) height = 1.0 left = 2.5 top = 1.6 width = 25.3333 prefixEnable = false fontSize = 11.0 fontBold = true text = "Additional matches" endwith with (this.STREAMSOURCE1.detailBand) onRender = class::DETAILBAND_ONRENDER height = 0.8333 endwith this.STREAMSOURCE1.detailBand.TEXTNAME11 = new TEXT(this.STREAMSOURCE1.detailBand) with (this.STREAMSOURCE1.detailBand.TEXTNAME11) height = 0.9767 left = 0.0 top = 0.0267 width = 21.1667 variableHeight = true prefixEnable = false text = {||this.form.temp_golfers_scores1.rowset.fields["name1"].value} endwith this.STREAMSOURCE1.detailBand.TEXTNAME21 = new TEXT(this.STREAMSOURCE1.detailBand) with (this.STREAMSOURCE1.detailBand.TEXTNAME21) height = 0.9767 left = 25.3333 top = 0.0267 width = 20.8334 variableHeight = true prefixEnable = false text = {||this.form.temp_golfers_scores1.rowset.fields["name2"].value} endwith with (this.printer) duplex = 1 // None orientation = 1 // Portrait paperSource = 7 paperSize = 9 resolution = 3 // Medium color = 2 // Color trueTypeFonts = 1 // Bitmap endwith this.PAGETEMPLATE1 = new PAGETEMPLATE(this) with (this.PAGETEMPLATE1) height = 56.1233 width = 132.2778 marginTop = 3.6 marginLeft = 12.0 marginBottom = 3.6 marginRight = 12.0 gridLineWidth = 0 endwith this.PAGETEMPLATE1.STREAMFRAME1 = new STREAMFRAME(this.PAGETEMPLATE1) with (this.PAGETEMPLATE1.STREAMFRAME1) height = 43.0 left = 3.8334 top = 4.0 width = 50.0 form.STREAMFRAME1 = form.pagetemplate1.streamframe1 endwith this.PAGETEMPLATE1.STREAMFRAME2 = new STREAMFRAME(this.PAGETEMPLATE1) with (this.PAGETEMPLATE1.STREAMFRAME2) height = 43.0 left = 56.3333 top = 4.0 width = 50.0 form.STREAMFRAME2 = form.pagetemplate1.streamframe2 endwith this.PAGETEMPLATE1.TEXT1 = new TEXT(this.PAGETEMPLATE1) with (this.PAGETEMPLATE1.TEXT1) height = 1.0 left = 6.3334 top = 1.8 width = 14.0 prefixEnable = false text = "Day" form.TEXT1 = form.pagetemplate1.text1 endwith this.PAGETEMPLATE1.TEXT2 = new TEXT(this.PAGETEMPLATE1) with (this.PAGETEMPLATE1.TEXT2) height = 1.0 left = 21.5001 top = 1.75 width = 12.0 prefixEnable = false text = "Date" form.TEXT2 = form.pagetemplate1.text2 endwith with (this.reportGroup.footerBand) height = 0.8333 endwith this.firstPageTemplate = this.form.pagetemplate1 this.form.pagetemplate1.nextPageTemplate = this.form.pagetemplate1 this.form.pagetemplate1.streamframe1.streamSource = this.form.streamsource1 this.form.pagetemplate1.streamframe2.streamSource = this.form.streamsource1 this.form.streamsource1.rowset = this.form.temp_golfers_scores1.rowset function DETAILBAND_onRender() this.parent.group2.footerband.text1.text := this.renderOffset return function FOOTERBAND_onRender() //group2 footerband. //check if there is enough space for another match. If not go to a new fame if this.parent.parent.parent.streamframe1.height - this.parent.footerband.text1.text < 8 this.parent.headerband.beginNewframe := true else this.parent.headerband.beginNewframe := false endif return function HEADERBAND_onRender() //group1 headerband //Check if there is enough space for additional matches. If not force group2 headerband to a new frame //Adjust the value if necessary if this.parent.parent.parent.streamframe1.height - this.parent.parent.group2.footerband.text1.text < 12 this.parent.parent.group2.headerband.beginNewframe := true else this.parent.parent.group2.headerband.beginNewframe := false endif return function HEADERBAND_preRender() //group1 headerband //Set height to 0 here so that the headerband shows in the designer this.height := 0 return function HEADERBAND_preRender1() //group2 headerband if this.parent.parent.parent.temp_golfers_scores1.rowset.fields["late_entry"].value = true //Resize the group2 headerband and show "Late entries" text and hide the match no this.beginNewframe := true this.text2.height := 1 this.text2.top := 1 this.text1.top := 0 this.textgrp1.top := 0 this.height := 3 else //Resize the group2 headerband and hide the "Late entries" text. this.text2.height := 0 this.text2.top := 0 this.text1.top := 2 this.textgrp1.top := 2 this.height := 3 endif return function TEXT1_canRender() //Don't print for dummy match 99 local lRet lRet = true if this.parent.textgrp1.text() =' 99' lRet = false endif return lRet function TEXTGRP1_canRender() //Don't print for dummy match 99 local lRet lRet = true if this.text() = 99 lRet = false endif return lRet endclass