Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Paramaters and Reporting in SQL Server 2000

Status
Not open for further replies.

ScottXJ

Programmer
Aug 14, 2002
51
CA
Hello,

I am working on converting our Access 2000 database application to a SQL Server 2000 back-end with an Access .adp front-end. The conversion has gone pretty well so far, with a few stumbling blocks along the way. The most recent of these is concerning converting the reports that existed in the Access application to the SQL Server solution. Specifically, I am having problems creating reports that use fields from a selection form as parameters in the report generation. For example, in the Access application, I have a form which asks a user to make choices via combo boxes. The selections from these combo boxes are then passed into the report via parameters in the SQL that is used as the basis of the report data. How is the same result possible in the SQL Server environment? I need to find out how I can reference forms and form items (i.e. combo boxes) in my SQL code. Do I need to use a stored procedure in this case and if so, how would I go about doing so? I am going to continue to search for some additional information on this site, but if anyone can provide some insight into this process, it would be greatly appreciated.

Thanks in advance,

Scott.
 
Yes you need to use a stored procedure. BAsically you create the stored procedure with input ariables. THen you cal it from your Access form by putting the values of the fields on the form in as your parameters. I'm sure the Access forums would have lots of examples for how you call this from Access. For the format of an sp, see BOL.

Questions about posting. See faq183-874
Click here to learn Ways to help with Tsunami Relief
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top