|
-
March 15th, 1999, 12:50 AM
#1
VB 6.0 and data report writer
I have created everything I need to print a report. I have based my report on a data source called datainvoice and a datamember called currentinvoice.
Currentinvoice is defined on a SQL statement (select invoice.* from invoice where invoiceno = ?)
I have defined a parameter in the parameter tab and now need a way to pass an invoiceno to the report before it prints (to print just one invoice that the user selects to print)
How do I pass this parameter to the data report writer so that the sql statement will read (select invoice.* from invoice where invoiceno = 3001) (the invoice that I currently want to print) If I fill in the Value prompt in the Parameter tab all works fine but the report will only print that invoice.
All help docs seem to relate to creating a new query but I want to use my nice report that I created.
Can anyone please help?
-
March 16th, 1999, 06:08 PM
#2
Re: VB 6.0 and data report writer
The way that I do it is to send the invoiceid to a temp table and have the data source equal a query that matches the invoice.invoiceid to report.invoiceid
Hope that helps
Jason
-
April 15th, 1999, 10:41 AM
#3
Re: VB 6.0 and data report writer
I had a similar issue with a command object within a data environment. I set up two parameters using SQL and the ?. I then called it through code with something like: dataenvironment1.command1 text1.text, text2.text
I hope this helps...
-
April 27th, 1999, 07:52 PM
#4
Re: VB 6.0 and data report writer
<vbcode>
'Asset_view is the dataenvironment
'rs command is the command object created for the 'data environment
If ASSET_VIEW.rsCommand4.State = adStateOpen Then
ASSET_VIEW.rsCommand4.Close
End If
'The command accepts a parameter which i am 'passing from the input box.
Test = InputBox("Please enter the Clock Speed")
ASSET_VIEW.Command4 (test)'query with parameter
CPU_Report1.Show
<vbcode1>
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
|