Quantcast
Channel: VBForums - Visual Basic 6 and Earlier
Viewing all articles
Browse latest Browse all 21854

Vb6,sp and crystal report

$
0
0
My company have develops a software that uses vb6,mssql2000 and crystal reports 10.
I want to call a stored procedure(in ms sql 2000) with parameters through vb6. the result will be displayed in crystal reports, and the parameters value should be supplied in the form.
Note: the crystal report is desined and located inside the vb.

see the process below
Database name = jolamic
1.
CREATE PROCEDURE spInvoice
@startdate datetime,
@enddate datetime,
@itemid nvarchar(60)
AS
select itemid, itemname, tdate, invoiceid, rate, amount
from tblinvoice
where tdate between @startdate and @enddate
and itemid = @itemid

2. the vb forms => (a)frmSearch has this controls
TextBoxes: txtItemID
CommandButton: cmdPreview
DatePicker: dtpStartDate, dtpEndDate,

(b) frmPreview

The question is how the i write the vb code that will call the procedure(spInvoice) from the datebase,
supply the parameters(from frmSearch),
display the report,
and convert the date format to US format if it is in UK.


THANKS IN ADVANCE

Viewing all articles
Browse latest Browse all 21854

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>