Jobs
Author: ariesme@indiatimes.com Date Submitted: 2/3/2005 Category: Database Compatibility: VB 6 This code has been accessed 22050 times.
Email Yourself this snippet:
No declarations
Code
cr1.ReportFileName = App.Path & "\reports\ot1.rpt" 'DataFiles method stores actual database location 'you must declare DataFiles equal to Tables used in Crystal Report 'By doing this you don't need to set database path from Crystal report setting cr1.DataFiles(0) = App.Path & "\otmanag.mdb" cr1.DataFiles(1) = App.Path & "\otmanag.mdb" 'SelectionFormula is used to pass query to report cr1.SelectionFormula = "" 'cr1.SelectionFormula = {otmast.otid}='" & trim(text1.text) & "'" cr1.WindowState = crptMaximized cr1.Action = 1 cr1.PageZoom 89