[Crystal Report] Creating a report that is not subject to database restrictions (2)

xiaoxiao2021-03-06  57

Newly built a VB project, add a reference to the crystal report design and running components, add a Viewer control on the interface. The result of run is to display the core code after loading the data in (1). Core code:

'------------------------------------- - 'Creating a report' ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- ----- 'Load Report Template Set Objcrreport = Objc Abjcrreport = Objc Abjcrreport = Objcrapp.OpenReport (App.Path & "/Report1.rpt", 1)' Load Report field definition file set props = objcrreport.Database.tables (1) .connectionproperties for Each PROP IN PROPS if INSTR (Prop.Name, "Field Definition File"> 0 Then Prop.Value = App.Path & "/Users.ttx" EXIT for end if next set props = nothing 'Clear data held in the report Objcrreport .Discardsaveddata 'assigns the report data Objcrreport.Database.SetDataSource RST

Please download the full code (VB Crystal Report 9.2), unzipped password: www.facesun.cn program has a complete note, you can use it as a development template:) Update on December 15, 2004, increase report parameters Demo Prohibited parameter interface pop-up

转载请注明原文地址:https://www.9cbs.com/read-117941.html

New Post(0)