Hi all..iused VB6,Access and CR8.5.
I have create one parameter field for Location..May i know how to list out all location that contains in Access DB, in Parameter Prompt so that user can choose it from parameter list..
Thanks
Printable View
Hi all..iused VB6,Access and CR8.5.
I have create one parameter field for Location..May i know how to list out all location that contains in Access DB, in Parameter Prompt so that user can choose it from parameter list..
Thanks
Use the parameters collection of your report object in VB.
Thanks a lot..but can u give me an example.What i have done so far:Quote:
Originally Posted by RobDog888
I just create a parameter on CR only.Please let me know how to do it in VB.So it will be listed out all of the location in Paramter Prompt.ThanksVB Code:
Private Sub cmdPrint_Click() Dim criteria Screen.MousePointer = 11 With CrystalReport1 .ReportFileName = App.Path & "\RPT\RPTLocation.rpt" .DiscardSavedData .WindowShowCloseBtn = True .WindowShowRefreshBtn = True .WindowState = crptMaximized .WindowShowSearchBtn = True .WindowTitle = "Location " .Action = 1 End With Screen.MousePointer = 0 End Sub
Create the parameter in CR first.
View > Field Object. Then on that windows toolbar you click the "Add New" while the appropriate node is sleected. As long as you bring up the Field Object dialog.
Then your VB code
VB Code:
CrystalReport1.ParameterFields.Item(1).ClearCurrentValueAndRange CrystalReport1.ParameterFields.Item(1).AddCurrentValue sTitle
Thanks a lot..What do u mean by .Item(1).....when i typed crystalreport1.ParameterFields.(After this dot, there is no property list coming).There was something important declaration that i have missed??ThanksQuote:
Originally Posted by RobDog888