Results 1 to 3 of 3

Thread: [RESOLVED] Pass params to MS Report from VB.NET, how to add condition to Query based on a Param?

  1. #1

    Thread Starter
    PowerPoster jcis's Avatar
    Join Date
    Jan 2003
    Location
    Argentina
    Posts
    4,430

    Resolved [RESOLVED] Pass params to MS Report from VB.NET, how to add condition to Query based on a Param?

    I did this to pass a param to a Report, the report is inside a ReportViewer and it's created using a Dataset, this Dataset connects to a MSACCESS 2007 db using a view (query) in Access.

    The link shows how to send params to a Report, but i need to do something else inside the report to make it only select rows where <SomeFieldName> = <@myParamName>. The idea is simply giving the user the ability to set some conditions before running the report, how can i do this using MS Report 2010?
    Last edited by jcis; Jul 5th, 2012 at 10:05 AM.

  2. #2
    I'm about to be a PowerPoster! kleinma's Avatar
    Join Date
    Nov 2001
    Location
    NJ - USA (Near NYC)
    Posts
    23,373

    Re: Pass params to MS Report from VB.NET, how to add condition to Query based on a Pa

    jcis,

    Since you are hooking up the report to a dataset, I will assume you are using a Table or Matrix object to display the dataset data?

    If so then all you would need to do is go into the properties of the table or matrix that your dataset is bound to on the report, and go to the filters tab. You can add a filter expression there which will allow you to select the column in your dataset to filter on, and allow an expression to be set using the expression builder. You can just sedt the operator to = and the Value just needs to be [@YourParam]

    Like this:
    Attached Images Attached Images  

  3. #3

    Thread Starter
    PowerPoster jcis's Avatar
    Join Date
    Jan 2003
    Location
    Argentina
    Posts
    4,430

    Re: Pass params to MS Report from VB.NET, how to add condition to Query based on a Pa

    Thank you very much Keinma, solved

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width