frankienstien
Programmer
I am trying to get crystal XI to print a selected report when the user clicks on the report.
but everytime i do that i receive the error missing parameter.
i have two parameters that are used in the data selection expert
i have just turned off the save data "feature" in the hope that when i told this to print it would ask the user for the date ranges to enter and then print the report. the report did work until then but would always print with the saved info from the last view.
i could also use the default value field in the paramter but i don't know what the command is for the current date.
everytime i enter something in that box it is removed after i leave.
but everytime i do that i receive the error missing parameter.
i have two parameters that are used in the data selection expert
Code:
{@TransactionDate} in {?StartDate} to {?EndDate}
i could also use the default value field in the paramter but i don't know what the command is for the current date.
everytime i enter something in that box it is removed after i leave.
Code:
Private Sub PrintButton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles PrintButton.Click
Me.Cursor = Cursors.WaitCursor
Dim rdReport As New ReportDocument
rdReport.Load("C:\Cash\Reports\New\" & ReportListBox.GetItemText(ReportListBox.SelectedItem) & ".rpt")
rdReport.PrintToPrinter(1, True, 0, 0)
Me.Cursor = Cursors.Default
End Sub