Display Parameter Results in Report

Discussion in 'ASP .Net Web Controls' started by john, Oct 6, 2007.

  1. john

    john Guest

    Conditions:
    Web Control: Report Viewer
    The Report.rdlc Dataset query has 2 Date Parameters @Start & @End.
    In the Report viewers ObjectDataSource: Configuration, I have them set them
    to 2 Textbox controls.

    Report works as expected.

    What I would like is to have those two Enter Dates Displayed in the Reports
    Header itself'.
    I have tried setting these parameters in the Report.rdlc Report Parameter
    Dialog but do not know how (I assume thru the Expression Builder) to
    Reference their Values to those Textboxes on the Report Viewers Form

    I have Textboxes in the Header that I Basically want to Display these Two
    Entered Dates so the printed(Exported) report Reveals the Reports Date Range

    Thanks for any info on how to do this
    John
     
    john, Oct 6, 2007
    #1
    1. Advertising

  2. Hi John,

    Regarding on the question about mapping the ReportViewrer's LocalReport
    parameter to the DataSource's parameter, here are some of my understanding
    and suggestion:

    **As the documenet mentioend, for Local Report(RDLC ..), reportviewer does
    not provide parameter area by default. You will need to use your own
    controls(on the page) to accept the parameter values and assign it to
    report programmatically. Also, it also mentioned that report parameters can
    not be mapped to query parameters since they're used separately and have no
    relation to eachother.

    #Defining Report Parameters in a ReportViewer Report
    http://msdn2.microsoft.com/en-us/library/ms251685(VS.80).aspx

    #Using report parameters in local mode
    http://www.gotreportviewer.com/localmodeparameters/index.html


    For your case that the parameters are actually of the datasource component,
    my suggestion here is that you do not need to care about report parameters.
    Just add the TextBoxes onto the page and use them as the parameter source
    for the report datasource(object datasource control). Also, since these
    TextBoxes are manually added, they're outside of the built-in
    reportviewer's toolbar area. I think you may consider set "ShowToolBar"
    property of the ReportViewr to "false" so that you can completely provide
    the toolbar interface yourself. e.g. You can add code to manually refresh
    the report .e.g

    =================
    protected void Button1_Click(object sender, EventArgs e)
    {
    ReportViewer1.LocalReport.Refresh();
    }
    =================

    How do you think? Please feel free to let me know if you have any other
    ideas or questions here.

    Sincerely,

    Steven Cheng

    Microsoft MSDN Online Support Lead



    ==================================================

    Get notification to my posts through email? Please refer to
    http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
    ications.



    Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
    where an initial response from the community or a Microsoft Support
    Engineer within 1 business day is acceptable. Please note that each follow
    up response may take approximately 2 business days as the support
    professional working with you may need further investigation to reach the
    most efficient resolution. The offering is not appropriate for situations
    that require urgent, real-time or phone-based interactions or complex
    project analysis and dump analysis issues. Issues of this nature are best
    handled working with a dedicated Microsoft Support Engineer by contacting
    Microsoft Customer Support Services (CSS) at
    http://msdn.microsoft.com/subscriptions/support/default.aspx.

    ==================================================


    This posting is provided "AS IS" with no warranties, and confers no rights.







    --------------------
    >From: "john" <>
    >Subject: Display Parameter Results in Report
    >Date: Sat, 6 Oct 2007 09:26:24 -0400


    >
    >Conditions:
    >Web Control: Report Viewer
    >The Report.rdlc Dataset query has 2 Date Parameters @Start & @End.
    >In the Report viewers ObjectDataSource: Configuration, I have them set

    them
    >to 2 Textbox controls.
    >
    >Report works as expected.
    >
    >What I would like is to have those two Enter Dates Displayed in the

    Reports
    >Header itself'.
    >I have tried setting these parameters in the Report.rdlc Report Parameter
    >Dialog but do not know how (I assume thru the Expression Builder) to
    >Reference their Values to those Textboxes on the Report Viewers Form
    >
    >I have Textboxes in the Header that I Basically want to Display these Two
    >Entered Dates so the printed(Exported) report Reveals the Reports Date

    Range
    >
    >Thanks for any info on how to do this
    >John
    >
    >
    >
     
    Steven Cheng[MSFT], Oct 8, 2007
    #2
    1. Advertising

  3. Hi John,

    Have you got any further ideas on this issue or does the suggestion in my
    last reply help some? If there is anything else we can help, please feel
    free to post here.

    Sincerely,

    Steven Cheng

    Microsoft MSDN Online Support Lead

    This posting is provided "AS IS" with no warranties, and confers no rights.
    --------------------

    >Organization: Microsoft
    >Date: Mon, 08 Oct 2007 06:40:51 GMT
    >Subject: RE: Display Parameter Results in Report


    >
    >Hi John,
    >
    >Regarding on the question about mapping the ReportViewrer's LocalReport
    >parameter to the DataSource's parameter, here are some of my understanding
    >and suggestion:
    >
    >**As the documenet mentioend, for Local Report(RDLC ..), reportviewer does
    >not provide parameter area by default. You will need to use your own
    >controls(on the page) to accept the parameter values and assign it to
    >report programmatically. Also, it also mentioned that report parameters

    can
    >not be mapped to query parameters since they're used separately and have

    no
    >relation to eachother.
    >
    >#Defining Report Parameters in a ReportViewer Report
    >http://msdn2.microsoft.com/en-us/library/ms251685(VS.80).aspx
    >
    >#Using report parameters in local mode
    >http://www.gotreportviewer.com/localmodeparameters/index.html
    >
    >
    >For your case that the parameters are actually of the datasource

    component,
    >my suggestion here is that you do not need to care about report

    parameters.
    >Just add the TextBoxes onto the page and use them as the parameter source
    >for the report datasource(object datasource control). Also, since these
    >TextBoxes are manually added, they're outside of the built-in
    >reportviewer's toolbar area. I think you may consider set "ShowToolBar"
    >property of the ReportViewr to "false" so that you can completely provide
    >the toolbar interface yourself. e.g. You can add code to manually refresh
    >the report .e.g
    >
    >=================
    > protected void Button1_Click(object sender, EventArgs e)
    > {
    > ReportViewer1.LocalReport.Refresh();
    > }
    >=================
    >
    >How do you think? Please feel free to let me know if you have any other
    >ideas or questions here.
    >
    >Sincerely,
    >
    >Steven Cheng
    >
    >Microsoft MSDN Online Support Lead
    >
    >
    >
    >==================================================
    >
    >Get notification to my posts through email? Please refer to
    >http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#noti

    f
    >ications.
    >
    >
    >
    >Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
    >where an initial response from the community or a Microsoft Support
    >Engineer within 1 business day is acceptable. Please note that each follow
    >up response may take approximately 2 business days as the support
    >professional working with you may need further investigation to reach the
    >most efficient resolution. The offering is not appropriate for situations
    >that require urgent, real-time or phone-based interactions or complex
    >project analysis and dump analysis issues. Issues of this nature are best
    >handled working with a dedicated Microsoft Support Engineer by contacting
    >Microsoft Customer Support Services (CSS) at
    >http://msdn.microsoft.com/subscriptions/support/default.aspx.
    >
    >==================================================
    >
    >
    >This posting is provided "AS IS" with no warranties, and confers no rights.
    >
    >
    >
    >
    >
    >
    >
    >--------------------
    >>From: "john" <>
    >>Subject: Display Parameter Results in Report
    >>Date: Sat, 6 Oct 2007 09:26:24 -0400

    >
    >>
    >>Conditions:
    >>Web Control: Report Viewer
    >>The Report.rdlc Dataset query has 2 Date Parameters @Start & @End.
    >>In the Report viewers ObjectDataSource: Configuration, I have them set

    >them
    >>to 2 Textbox controls.
    >>
    >>Report works as expected.
    >>
    >>What I would like is to have those two Enter Dates Displayed in the

    >Reports
    >>Header itself'.
    >>I have tried setting these parameters in the Report.rdlc Report Parameter
    >>Dialog but do not know how (I assume thru the Expression Builder) to
    >>Reference their Values to those Textboxes on the Report Viewers Form
    >>
    >>I have Textboxes in the Header that I Basically want to Display these Two
    >>Entered Dates so the printed(Exported) report Reveals the Reports Date

    >Range
    >>
    >>Thanks for any info on how to do this
    >>John
    >>
    >>
    >>

    >
    >
     
    Steven Cheng[MSFT], Oct 10, 2007
    #3
  4. john

    john Guest

    Still Reviewing articles you had links for, will try it out ASAP.
    Thanks

    "Steven Cheng[MSFT]" <> wrote in message
    news:...
    > Hi John,
    >
    > Have you got any further ideas on this issue or does the suggestion in my
    > last reply help some? If there is anything else we can help, please feel
    > free to post here.
    >
    > Sincerely,
    >
    > Steven Cheng
    >
    > Microsoft MSDN Online Support Lead
    >
    > This posting is provided "AS IS" with no warranties, and confers no
    > rights.
    > --------------------
    >
    >>Organization: Microsoft
    >>Date: Mon, 08 Oct 2007 06:40:51 GMT
    >>Subject: RE: Display Parameter Results in Report

    >
    >>
    >>Hi John,
    >>
    >>Regarding on the question about mapping the ReportViewrer's LocalReport
    >>parameter to the DataSource's parameter, here are some of my understanding
    >>and suggestion:
    >>
    >>**As the documenet mentioend, for Local Report(RDLC ..), reportviewer does
    >>not provide parameter area by default. You will need to use your own
    >>controls(on the page) to accept the parameter values and assign it to
    >>report programmatically. Also, it also mentioned that report parameters

    > can
    >>not be mapped to query parameters since they're used separately and have

    > no
    >>relation to eachother.
    >>
    >>#Defining Report Parameters in a ReportViewer Report
    >>http://msdn2.microsoft.com/en-us/library/ms251685(VS.80).aspx
    >>
    >>#Using report parameters in local mode
    >>http://www.gotreportviewer.com/localmodeparameters/index.html
    >>
    >>
    >>For your case that the parameters are actually of the datasource

    > component,
    >>my suggestion here is that you do not need to care about report

    > parameters.
    >>Just add the TextBoxes onto the page and use them as the parameter source
    >>for the report datasource(object datasource control). Also, since these
    >>TextBoxes are manually added, they're outside of the built-in
    >>reportviewer's toolbar area. I think you may consider set "ShowToolBar"
    >>property of the ReportViewr to "false" so that you can completely provide
    >>the toolbar interface yourself. e.g. You can add code to manually refresh
    >>the report .e.g
    >>
    >>=================
    >> protected void Button1_Click(object sender, EventArgs e)
    >> {
    >> ReportViewer1.LocalReport.Refresh();
    >> }
    >>=================
    >>
    >>How do you think? Please feel free to let me know if you have any other
    >>ideas or questions here.
    >>
    >>Sincerely,
    >>
    >>Steven Cheng
    >>
    >>Microsoft MSDN Online Support Lead
    >>
    >>
    >>
    >>==================================================
    >>
    >>Get notification to my posts through email? Please refer to
    >>http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#noti

    > f
    >>ications.
    >>
    >>
    >>
    >>Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
    >>where an initial response from the community or a Microsoft Support
    >>Engineer within 1 business day is acceptable. Please note that each follow
    >>up response may take approximately 2 business days as the support
    >>professional working with you may need further investigation to reach the
    >>most efficient resolution. The offering is not appropriate for situations
    >>that require urgent, real-time or phone-based interactions or complex
    >>project analysis and dump analysis issues. Issues of this nature are best
    >>handled working with a dedicated Microsoft Support Engineer by contacting
    >>Microsoft Customer Support Services (CSS) at
    >>http://msdn.microsoft.com/subscriptions/support/default.aspx.
    >>
    >>==================================================
    >>
    >>
    >>This posting is provided "AS IS" with no warranties, and confers no
    >>rights.
    >>
    >>
    >>
    >>
    >>
    >>
    >>
    >>--------------------
    >>>From: "john" <>
    >>>Subject: Display Parameter Results in Report
    >>>Date: Sat, 6 Oct 2007 09:26:24 -0400

    >>
    >>>
    >>>Conditions:
    >>>Web Control: Report Viewer
    >>>The Report.rdlc Dataset query has 2 Date Parameters @Start & @End.
    >>>In the Report viewers ObjectDataSource: Configuration, I have them set

    >>them
    >>>to 2 Textbox controls.
    >>>
    >>>Report works as expected.
    >>>
    >>>What I would like is to have those two Enter Dates Displayed in the

    >>Reports
    >>>Header itself'.
    >>>I have tried setting these parameters in the Report.rdlc Report Parameter
    >>>Dialog but do not know how (I assume thru the Expression Builder) to
    >>>Reference their Values to those Textboxes on the Report Viewers Form
    >>>
    >>>I have Textboxes in the Header that I Basically want to Display these Two
    >>>Entered Dates so the printed(Exported) report Reveals the Reports Date

    >>Range
    >>>
    >>>Thanks for any info on how to do this
    >>>John
    >>>
    >>>
    >>>

    >>
    >>

    >
     
    john, Oct 11, 2007
    #4
  5. Thanks for your followup John,

    welcome to post here if you get any progress.

    Sincerely,

    Steven Cheng

    Microsoft MSDN Online Support Lead


    This posting is provided "AS IS" with no warranties, and confers no rights.
    --------------------
    >From: "john" <>
    >References: <#>

    <>
    <>
    >Subject: Re: Display Parameter Results in Report
    >Date: Thu, 11 Oct 2007 02:50:21 -0400


    >Still Reviewing articles you had links for, will try it out ASAP.
    >Thanks
    >
    >"Steven Cheng[MSFT]" <> wrote in message
    >news:...
    >> Hi John,
    >>
    >> Have you got any further ideas on this issue or does the suggestion in my
    >> last reply help some? If there is anything else we can help, please feel
    >> free to post here.
    >>
    >> Sincerely,
    >>
    >> Steven Cheng
    >>
    >> Microsoft MSDN Online Support Lead
    >>
    >> This posting is provided "AS IS" with no warranties, and confers no
    >> rights.
    >> --------------------
    >>
    >>>Organization: Microsoft
    >>>Date: Mon, 08 Oct 2007 06:40:51 GMT
    >>>Subject: RE: Display Parameter Results in Report

    >>
    >>>
    >>>Hi John,
    >>>
    >>>Regarding on the question about mapping the ReportViewrer's LocalReport
    >>>parameter to the DataSource's parameter, here are some of my

    understanding
    >>>and suggestion:
    >>>
    >>>**As the documenet mentioend, for Local Report(RDLC ..), reportviewer

    does
    >>>not provide parameter area by default. You will need to use your own
    >>>controls(on the page) to accept the parameter values and assign it to
    >>>report programmatically. Also, it also mentioned that report parameters

    >> can
    >>>not be mapped to query parameters since they're used separately and have

    >> no
    >>>relation to eachother.
    >>>
    >>>#Defining Report Parameters in a ReportViewer Report
    >>>http://msdn2.microsoft.com/en-us/library/ms251685(VS.80).aspx
    >>>
    >>>#Using report parameters in local mode
    >>>http://www.gotreportviewer.com/localmodeparameters/index.html
    >>>
    >>>
    >>>For your case that the parameters are actually of the datasource

    >> component,
    >>>my suggestion here is that you do not need to care about report

    >> parameters.
    >>>Just add the TextBoxes onto the page and use them as the parameter source
    >>>for the report datasource(object datasource control). Also, since these
    >>>TextBoxes are manually added, they're outside of the built-in
    >>>reportviewer's toolbar area. I think you may consider set "ShowToolBar"
    >>>property of the ReportViewr to "false" so that you can completely provide
    >>>the toolbar interface yourself. e.g. You can add code to manually refresh
    >>>the report .e.g
    >>>
    >>>=================
    >>> protected void Button1_Click(object sender, EventArgs e)
    >>> {
    >>> ReportViewer1.LocalReport.Refresh();
    >>> }
    >>>=================
    >>>
    >>>How do you think? Please feel free to let me know if you have any other
    >>>ideas or questions here.
    >>>
    >>>Sincerely,
    >>>
    >>>Steven Cheng
    >>>
    >>>Microsoft MSDN Online Support Lead
    >>>
    >>>
    >>>
    >>>==================================================
    >>>
    >>>Get notification to my posts through email? Please refer to
    >>>http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#no

    ti
    >> f
    >>>ications.
    >>>
    >>>
    >>>
    >>>Note: The MSDN Managed Newsgroup support offering is for non-urgent

    issues
    >>>where an initial response from the community or a Microsoft Support
    >>>Engineer within 1 business day is acceptable. Please note that each

    follow
    >>>up response may take approximately 2 business days as the support
    >>>professional working with you may need further investigation to reach the
    >>>most efficient resolution. The offering is not appropriate for situations
    >>>that require urgent, real-time or phone-based interactions or complex
    >>>project analysis and dump analysis issues. Issues of this nature are best
    >>>handled working with a dedicated Microsoft Support Engineer by contacting
    >>>Microsoft Customer Support Services (CSS) at
    >>>http://msdn.microsoft.com/subscriptions/support/default.aspx.
    >>>
    >>>==================================================
    >>>
    >>>
    >>>This posting is provided "AS IS" with no warranties, and confers no
    >>>rights.
    >>>
    >>>
    >>>
    >>>
    >>>
    >>>
    >>>
    >>>--------------------
    >>>>From: "john" <>
    >>>>Subject: Display Parameter Results in Report
    >>>>Date: Sat, 6 Oct 2007 09:26:24 -0400
    >>>
    >>>>
    >>>>Conditions:
    >>>>Web Control: Report Viewer
    >>>>The Report.rdlc Dataset query has 2 Date Parameters @Start & @End.
    >>>>In the Report viewers ObjectDataSource: Configuration, I have them set
    >>>them
    >>>>to 2 Textbox controls.
    >>>>
    >>>>Report works as expected.
    >>>>
    >>>>What I would like is to have those two Enter Dates Displayed in the
    >>>Reports
    >>>>Header itself'.
    >>>>I have tried setting these parameters in the Report.rdlc Report

    Parameter
    >>>>Dialog but do not know how (I assume thru the Expression Builder) to
    >>>>Reference their Values to those Textboxes on the Report Viewers Form
    >>>>
    >>>>I have Textboxes in the Header that I Basically want to Display these

    Two
    >>>>Entered Dates so the printed(Exported) report Reveals the Reports Date
    >>>Range
    >>>>
    >>>>Thanks for any info on how to do this
    >>>>John
    >>>>
    >>>>
    >>>>
    >>>
    >>>

    >>

    >
    >
    >
     
    Steven Cheng[MSFT], Oct 12, 2007
    #5
  6. john

    Quinncd Guest

    I had the same issue. I am using the business object(BO) method as a
    datasource for my local report
    (http://msdn2.microsoft.com/en-us/library/ms251692(VS.80).aspx). An issue
    with this method, however, is that the directions state that your business
    object should then appear in the report designer view as a web datasource
    after compilation. For me,it didn't so I manually created a datatable. I
    added the parameters as properties of my business object as well as columns
    to the datatable (the names of the columns and of the properties should
    match). The newly added columns should now show in the website datasource
    view. You can then drag the properties onto your report, but you'll need to
    use the First() function =(First(Fields!Date.Value)) since your parameter
    values are added to the datatable for each row. HTH.

    "john" wrote:

    > Conditions:
    > Web Control: Report Viewer
    > The Report.rdlc Dataset query has 2 Date Parameters @Start & @End.
    > In the Report viewers ObjectDataSource: Configuration, I have them set them
    > to 2 Textbox controls.
    >
    > Report works as expected.
    >
    > What I would like is to have those two Enter Dates Displayed in the Reports
    > Header itself'.
    > I have tried setting these parameters in the Report.rdlc Report Parameter
    > Dialog but do not know how (I assume thru the Expression Builder) to
    > Reference their Values to those Textboxes on the Report Viewers Form
    >
    > I have Textboxes in the Header that I Basically want to Display these Two
    > Entered Dates so the printed(Exported) report Reveals the Reports Date Range
    >
    > Thanks for any info on how to do this
    > John
    >
    >
    >
     
    Quinncd, Oct 31, 2007
    #6
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. James Wallace
    Replies:
    0
    Views:
    1,078
    James Wallace
    Oct 17, 2003
  2. Monique Y. Mudama
    Replies:
    1
    Views:
    462
    Monique Y. Mudama
    Jun 28, 2005
  3. lovecreatesbeauty
    Replies:
    8
    Views:
    1,702
    Old Wolf
    Sep 12, 2005
  4. =?Utf-8?B?TWlrZQ==?=

    RDL Files - Display Dataset Parameter on the Report

    =?Utf-8?B?TWlrZQ==?=, Sep 17, 2007, in forum: ASP .Net
    Replies:
    0
    Views:
    345
    =?Utf-8?B?TWlrZQ==?=
    Sep 17, 2007
  5. Ken Fine
    Replies:
    3
    Views:
    553
    Steven Cheng [MSFT]
    Jul 23, 2008
Loading...

Share This Page