Solved

VB6 DataReport - passing Params

Posted on 2000-02-20
5
328 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 50 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

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

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

When designing a form there are several BorderStyles to choose from, all of which can be classified as either 'Fixed' or 'Sizable' and I'd guess that 'Fixed Single' or one of the other fixed types is the most popular choice. I assume it's the most p…
I was working on a PowerPoint add-in the other day and a client asked me "can you implement a feature which processes a chart when it's pasted into a slide from another deck?". It got me wondering how to hook into built-in ribbon events in Office.
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…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

696 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