资源描述:
《在vb中打印复杂报表(printing complex reports in vb)》由会员上传分享,免费在线阅读,更多相关内容在教育资源-天天文库。
1、在vb中打印复杂报表(PrintingcomplexreportsinVB)44modernelectronictechnology2001PrintingcomplexreportsinVBYongZhenYaoJunyi(Instituteofnetworksystems,HeFeiUniversityofTechnology,Hefei230009)Intheprocessofdatabasedevelopment,weoftenencountertheproblemofreportprinti
2、ng.ThispaperintroducesseveralreportsprintingofVBMethod,themethodofgeneratingreportbyVBcontrolledbyExcelisanalyzedindetail.KeywordsmanagementinformationsystemreportActiveXtemplateLoverviewInthedatabasemanagementinformationsystem,thereportisveryimportantS
3、tatus.Anysystem,nomatterhowfriendlytheinterfaceis,howgooditistooperateButthefinaloutputisstillreflectedbythereport,sothereportThestrengthoffunctionisoftenanimportantindicatorofasystem'squality.VB,asaspecializeddatabasedevelopmenttool,isalsoprovidedSuppo
4、rtforreportfunctions,likeCrystal5.OinVBReports(CrystalReport)andnewDatareportinVB6.OcanbeaddedTohandlesomesimpledatabasereportoutput,butuserrequirementsReportformatsareoftenverycomplex,irregular,nested,printed,slash,Crosslineisthebiggestproblemthatbothe
5、rsdevelopers.Intermsoftabulation,ExcelisanexcellentformdesigntooltosupportavarietyofcomplexTableformat,sowecancombinetheadvantagesofVBandExcelPointdesignamethodofprintingreports,thatis,usingVBtooperateExcelTogeneratecomplexreports.2solutionsMostlargeAct
6、iveX-enabledapplicationsandtheirIt'sActiveXparts,whichareprovidedintheirobjecthierarchyAnobjectcanbecreatedoutsideofthetoplayer.TheobjectprovidesforthislayerOtherobjectsareaccessed,andtheentireapplicationisalsoprovidedMethodsandattributesused.Forexample
7、,eachMicrosoftOfficeapplicationTheprogramprovidesatop-levelAppIicationobject.2.1referencingExcelobjectsinVBThefollowingstatementshowstheVB6.OonMicrosoftExcelReferencetotheApplicationobject:(beforerunningthecode,selectfirstSelect"reference"inthe"project"
8、menuandselect"Microsoft"fromitExcel80bjectI.Ibrary"DimxlAppAsExcel.ApplicationSetxlApp-NewExcel.ApplicationYoucanthenusethisvariabletoaccesstheExcelapplicationThesubordinateobjects,aswellasthepropertiesandmethodsoftheseobjects.Fo