Here is the situation, on a clean windows installation (tried so far in 98 and 2000) the following code is used to retrieve a report to the screen. But sadly it does nothing, the result in the .status property after the .action = 1 line is -1 where actually a successful report shows 3.
VB Code:
'use ADO to connect to a Access 97 DB. CrystalReport1.Connect = "Provider = Microsoft.Jet.OLEDB.4.0;" & App.Path & "\config.mdb;UID=sa;PWD=12345;" Me.CrystalReport1.DataFiles(0) = App.Path + "\db.mdb" 'call the report which is stored in the app's path. CrystalReport1.ReportFileName = App.Path + "\boent_rep.rpt" CrystalReport1.Destination = crptToWindow CrystalReport1.DiscardSavedData = True 'before this lines, I go thru several steps to get the formula. CrystalReport1.SelectionFormula = formula 'whatever formula is 'call the report. CrystalReport1.Action = 1
THe viewer doesnt show at all, but Im postive the program executes all the lines. As I have said, the status property might tell me the answer but I cant find any description of what a -1 result means. Any help will be appreciated.
![]()




Reply With Quote