Andy99
March 12th, 2004, 04:23 PM
Hello,
I'm having trouble passing a VB string to a Crystal Report parameter field. Following is an excerpt of the code:
--------------------------------------------------
strDocID = InputBox("Please enter the DocID")
If strDocID <> "" Then
With CrystalReport1
.ReportFileName = "C:\Program Files\CSC Imaging\CSCReports\Reports\DocumentHistory.rpt" .Connect = cn.ConnectionString
.WindowState = crptMaximized
strSelection = "{CSC_TRANS.Document_ID} = " & "'" + strDocID + "'"
.ReplaceSelectionFormula strSelection
.Destination = crptToWindow
.Action = 1
---------------------------------------------------
The user enters the DocID, but when the Crystal Report launches, the user has to enter it again.
Following is the entry in the Record Selection Formula:
{CSC_TRANS.Document_ID} = {?DocumentID_PROMPT}
Also, if they select Cancel in the Crystal parameter window, it still tries to run the report. How can I stop the report from running?
Thank you for your assistance!
Andy
I'm having trouble passing a VB string to a Crystal Report parameter field. Following is an excerpt of the code:
--------------------------------------------------
strDocID = InputBox("Please enter the DocID")
If strDocID <> "" Then
With CrystalReport1
.ReportFileName = "C:\Program Files\CSC Imaging\CSCReports\Reports\DocumentHistory.rpt" .Connect = cn.ConnectionString
.WindowState = crptMaximized
strSelection = "{CSC_TRANS.Document_ID} = " & "'" + strDocID + "'"
.ReplaceSelectionFormula strSelection
.Destination = crptToWindow
.Action = 1
---------------------------------------------------
The user enters the DocID, but when the Crystal Report launches, the user has to enter it again.
Following is the entry in the Record Selection Formula:
{CSC_TRANS.Document_ID} = {?DocumentID_PROMPT}
Also, if they select Cancel in the Crystal parameter window, it still tries to run the report. How can I stop the report from running?
Thank you for your assistance!
Andy