关闭

关闭

封号提示

内容

首页 微软AX培训——Reports.doc

微软AX培训——Reports.doc

微软AX培训——Reports.doc

上传者: 我de温柔_喂过狗 2017-12-08 评分 5 0 204 28 928 暂无简介 简介 举报

简介:本文档为《微软AX培训——Reportsdoc》,可适用于IT/计算机领域,主题内容包含微软AX培训ReportsLessonReportsAttheendofthislesson,youareexpectedtobeableto:Kn符等。

微软AX培训ReportsLessonReportsAttheendofthislesson,youareexpectedtobeableto:KnowabouttheArgsobjectKnowabouttheElementoperatorDevelopmoreadvancedreportsUseadisplaymethodinareportUsetheArgsobjectandtheElementoperatortosynchronizeareportwithaformDocID:AXILTvENUSReportsREPORTS,ARGS,ANDELEMENTInapreviouscourseyoulookedathowtodevelopareportHowever,youhaveyettoexperimentwithcodinginreportsThat'swhatyou'llbedoinginthislessonCodinginreportsisalsoagoodopportunitytointroducetheuseofArgsandElementReportsDISPLAYMETHODSDisplaymethodscanbeusedsuccessfullyinreportsinconnectionwithdirectlookupsinthedatabaseandorcalculationsItisimportanttolookatwheretolocatetheseYouhavethefollowingoptions:Underthereport'sdesignmethods,alogo,forexample,mayappearUnderthetablemethodsusedbythedatasourceofthereportIfyouareusingthetablemethods,thetablelabelmustbespecifiedunderpropertiesinthefieldusingthedisplaymethod(inthesamewayasforforms)ExampleChecktheDevelopersguideforanExampleshowinghowtouseadisplaymethodReportsSYNCHRONIZATIONInconnectionwithforms,youhaveseenthattwoformsmaybesynchronizedwithoneanotherwithoutrequiringanycodeFromMicrosoftNavisionAxapta,youmayalsosynchronizeareportwithaformExampleLet'slookatanarbitraryreportsearchingthroughCustTableItmustbesynchronizablewithaformdisplayingcustomers,sothatifthereportisactivatedfromaformcontainingdatafromCustTable,onlythecustomeroftherelevantrecordwillbeincludedinthereportThiscanbedoneinseveralways:IfyoualterthereportpropertiessothatAutojoinissettoYesasshownbelow,thereportwillbesynchronizedExampleofSynchronizationUsingCodingInthesectiononqueriesyoulookedatthekernelclasscalledQueryBuildRangeItisusedforthegenerationofobjectsthatareemployedinqueriesMoreover,itcontainsthevalue()method,whichyoucanusetoenterrangevaluesButinordertogetthistowork,youmustlookatthetwotoolscalledArgsandElementArgsArgsisakernelclassThenamestandsforArgumentsYoumayrememberseeingtheclassinconnectionwithjobparametersEachjobReportsreceivesaparameterofthistypeInfact,thekernelusestheArgsclasstogenerateobjectsusedfordatatransfer,forexamplefromaformtoareportElementElementresemblesthethisoperatorAreportconsistsofseveralobjectsThethisoperatorcanbeusedtoopenanobject'smethodsinsidethatsameobjectLikewise,theElementoperatorisusedtoopenmethodswithinanentirereport,evenifthereportconsistsofacollectionofobjectsYoucanusetheElementoperatorinreportsandformsExampleSoyoucanuseElementsandArgsacrossseveralobjectsAgoodexampleofthisisusingcodetosynchronizeInorderforthesynchronizationtobesuccessful,youmustentercodeontothereport'srunmethodYoumaywriteitasfollows:CustTablectQueryBuildRangeqbrif(elementargs()dataset()==TableNum(CustTable)){codeisexecutedifargscontainsatablebufferfromCustTablect=elementargs()record()Setct=therelevantrecordsavedinargsqbr=elementquery()dataSourceNo()findRange(FieldNum(CustTable,AccountNum))Setqbr=thequery'srangesonAccountNum(ifany)if(!qbr)Ifitdoesnotexist,createitbelow{qbr=elementquery()dataSourceNo()addRange(FieldNum(CustTable,AccountNum))}qbrValue(ctAccountNum)ReportsThectvalueisusedasrangeelementQuery()interactive(false)Therangeboxisclosed}super()UsingtheElementdesignation,yougainaccesstothereportmethodsInthiscase,youcouldhaveachievedthesameresultusingthisReportsEXERCISESExerciseDisplayMethodsCreateadisplaymethodontheEmpTablewhichreturnsthelocalphonenumberwhennophonenumberexistsCreateareportwhichprintsusernamesandtheirrelatedphonenumberIfnophonenumberexists,theirrelatedlocalphonenumberisprintedExerciseSynchronizationCreateaprintbuttonontheEmployeeFormThisreportonlyprintsthereportofexercisefromtheselectedemployeeWhennoemployeeisselectedamessageshouldappearwhentheprintbuttonispressedReports

精彩专题

职业精品

上传我的资料

热门资料

资料评价:

/ 6
所需积分:0 立即下载

意见
反馈

返回
顶部

Q