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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Report Viewer at Runtime

Status
Not open for further replies.

dvannoy

MIS
May 4, 2001
2,765
0
0
US
I'm trying to create reports within my vb.net application. I want to be able to bind the report at runtime and pass parameters from textboxes etc on a form. I have searched all over the place and can't seem to get a clear example of how to do this. I can get the report viewer to work by binding the report within the app but I would like to do this at runtime. does anyone have some sample code I can go off ?

Thanks in advance

 
Are you trying to use Server Side reports or is the report local to the app?

--------------------------------------------------
“Crash programs fail because they are based on the theory that, with nine women pregnant, you can get a baby a month.” --Wernher von Braun
--------------------------------------------------
 
Will this not work?
Bear with the sample. It's snip-its from our Reporting Class that is also a wrapper for displaying reports.

Code:
        Private ParamLisings As Generic.List(Of Microsoft.Reporting.WinForms.ReportParameter) = Nothing
    
    If ParamLisings Is Nothing Then ParamLisings = New Generic.List(Of Microsoft.Reporting.WinForms.ReportParameter)()
    ParamLisings.Add(New Microsoft.Reporting.WinForms.ReportParameter(ParamName, ParamValue, ParamVisible))

    FrmRpt.ListParams = ParamLisings
    FrmRpt.Show()

--------------------------------------------------
“Crash programs fail because they are based on the theory that, with nine women pregnant, you can get a baby a month.” --Wernher von Braun
--------------------------------------------------
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top