Hi All
This is my first post here and am new to crystal reports. The following is what I would like to achieve.
I have a .rpt file “saved with data”. I need to get a new set of records based on the saved data in the file, without the .rpt file having to access the database, when I change the selection criteria. This is possible within Crystal report environment. The reason for this is, selecting data out of a saved report is considerably quicker than accessing the database to retrieve data.
How can I programmatically achieve the same with VB 6?
This is my code;
If I insert the flowing line of code
The program works, however after accessing the database, which takes a long time when all I want is some records out of the saved report
Without the above a line a blank report is displayed, with the message that the server has not yet been opened.
I am using Crystal Report 8 with VB 6.
Any help with this will be appreciated.
Thanking all of you in advance
Ishaan
This is my first post here and am new to crystal reports. The following is what I would like to achieve.
I have a .rpt file “saved with data”. I need to get a new set of records based on the saved data in the file, without the .rpt file having to access the database, when I change the selection criteria. This is possible within Crystal report environment. The reason for this is, selecting data out of a saved report is considerably quicker than accessing the database to retrieve data.
How can I programmatically achieve the same with VB 6?
This is my code;
Code:
Dim Crystalapp As New CRAXDRT.Application
Dim Crystalrep As CRAXDRT.Report
Dim callNo As String
Set Crystalrep = Crystalapp.OpenReport("C:\HEATSelectionTest.rpt")
callNo = InputBox("Please enter your selection")
Crystalrep.RecordSelectionFormula = "{CallLog.CallID} = '" & callNo & "'"
CRViewer1.ReportSource = Crystalrep
CRViewer1.ViewReport
CRViewer1.Zoom (100)
Code:
Crystalrep.Database.Tables(1).SetLogOnInfo "ODBC", "Database", "UserID", "Pwd"
The program works, however after accessing the database, which takes a long time when all I want is some records out of the saved report
Without the above a line a blank report is displayed, with the message that the server has not yet been opened.
I am using Crystal Report 8 with VB 6.
Any help with this will be appreciated.
Thanking all of you in advance
Ishaan