passing session variable to reportviewer

Bear in mind, I am really, really new at all this.  I have a database created using 2008 SQL Server Management Studio and am using Microsoft Visual Web Developer 2008 Express Edition to create a website.  Using gridview & detailview throughout this project. Datasources are configured using "where MasterId=session(RFQMasterId)". Individual pages are passed the MasterId    
        Me.SqlDataSource1.InsertParameters("MasterId").DefaultValue = Session("RFQMasterId")
        Dim iReturn As Int32 = Me.SqlDataSource1.Insert()
then passed page specific ID
        Dim sValue As String = Me.GridView1.Rows(Me.GridView1.Rows.Count - 1).Cells(1).Text
        Session("corrId") = sValue
to create new record.  May be edited using:
        Dim Row As GridViewRow = Me.GridView1.SelectedRow
        Session("CorrId") = Row.Cells(1).Text

I now have to create a report that ties all individual records to MasterId.  How do I set up my data set to return only the pages "where master id = session(rfqmasterid)" [the selected record]?  I then want to have report list selected main information & individual page ids that are tied to that masterid.  I want sub report to print all information on individual pages.

Can anyone point me in the right direction?  Any code or sql queries would be greatly appreciated!!
acs6699Asked:
Who is Participating?
 
CodeCruiserConnect With a Mentor Commented:
If I understand correctly, you need to use parameters.

http://www.codeproject.com/KB/books/InputParmReport.aspx
0
 
acs6699Author Commented:
thank you
0
 
acs6699Author Commented:
Thank you.  I will try it & let you know how it turns out.  Problem is, I've been asked to put out some other fires
0
 
CodeCruiserCommented:
>I've been asked to put out some other fires
Happens most of the time in IT :-)
0
All Courses

From novice to tech pro — start learning today.