?
Solved

VB6 DataReport - passing Params

Posted on 2000-02-20
5
Medium Priority
?
329 Views
Last Modified: 2006-11-17
VB6 sp3, Win98

I have created a report that is based on a command within a data environment. This is easy if the command has no parameters, but if params are required, how do you pass the param values to the command ?

TIA

John
0
Comment
Question by:JohnHind
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
5 Comments
 
LVL 3

Expert Comment

by:MTroutwine
ID: 2539620
Here is an article by Microsoft that describes passing a parameter to a Command object.  It comes with explanation and sample code!

http://msdn.microsoft.com/library/devprods/vs6/vbasic/vbcon98/vbcondataenvironmentprogrammingguidelines.htm
0
 

Author Comment

by:JohnHind
ID: 2540050
I agree that this explains passing params to a data environment, but it does not explain how to do it from a data report.

In the report you select which command to base the report on, but when the report is generated, I cannot see where you would pass the params to the command function....

John
0
 
LVL 12

Accepted Solution

by:
roverm earned 200 total points
ID: 2541441
Just invoke the command first:

DataEnvironment1.Command1 parm1, parm2

then invoke the DataReport:

DataReport1.PrintReport

This works!

D'Mzzl!
RoverM
0
 

Author Comment

by:JohnHind
ID: 2541757
MTroutwine

Yes you were correct but not as clear as roverm. I will send you 25 points if that's possible !

John Hind
0
 
LVL 3

Expert Comment

by:MTroutwine
ID: 2542184
John,

Don't worry about the points, glad to see you got a your problem solved. That's what counts!

:>)
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction In a recent article (http://www.experts-exchange.com/A_7811-A-Better-Concatenate-Function.html) for the Excel community, I showed an improved version of the Excel Concatenate() function.  While writing that article I realized that no o…
This article describes some techniques which will make your VBA or Visual Basic Classic code easier to understand and maintain, whether by you, your replacement, or another Experts-Exchange expert.
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
Suggested Courses

764 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question