|
-
Sep 23rd, 2006, 11:41 AM
#1
Thread Starter
Member
How Do I List Data From Access in Parameter Prompt
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
-
Sep 23rd, 2006, 01:48 PM
#2
Re: How Do I List Data From Access in Parameter Prompt
Use the parameters collection of your report object in VB.
VB/Office Guru™ (AKA: Gangsta Yoda™ ®)
I dont answer coding questions via PM. Please post a thread in the appropriate forum. 
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it! 
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6 
-
Sep 23rd, 2006, 10:00 PM
#3
Thread Starter
Member
Re: How Do I List Data From Access in Parameter Prompt
 Originally Posted by RobDog888
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:
VB 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
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.Thanks
-
Sep 24th, 2006, 01:18 AM
#4
Re: How Do I List Data From Access in Parameter Prompt
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
VB/Office Guru™ (AKA: Gangsta Yoda™ ®)
I dont answer coding questions via PM. Please post a thread in the appropriate forum. 
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it! 
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6 
-
Sep 24th, 2006, 03:22 AM
#5
Thread Starter
Member
Re: How Do I List Data From Access in Parameter Prompt
 Originally Posted by RobDog888
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??Thanks
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|