The sum of all SQL Server matter that exist,
and the space in which all SQL Server events
occur or could occur.
Welcome to SQL Server Universe.com Sign in | Join | Help
in
Home SS SLUG Forums Articles Photos Downloads

Report filters

Last post 05-15-2008, 9:06 by Lasi. 4 replies.
Sort Posts: Previous
  • Report filters

     05-22-2007, 1:22

    • Joined on 05-15-2007
    • Posts 4
    • Points 0
    • Top 25 Contributor

    Hi friends,

    Did any one came across how to enable/disable report filters?

    As it seems once we have included a report parameter it will automatically become a filter for the same report. But i need to set some of the filters as hidden as a configuration setting.

    Can any one help me in doing this?

    Lasi

  • Re: Report filters

     05-22-2007, 3:42

    • Joined on 11-22-2006
    • Colombo, Sri Lanka
    • Posts 219
    • Points 0
    • Top 10 Contributor
      Male

    Hi Lasi,

     You could set the parameter to be of the Hidden or Internal type. This can be done by going to Report -> Report Parameters menu option when the report is in Data or Layout modes. Here you can set the parameter to be Hidden and then set a default value to it either from a query or a non-query by specifying a value or expression.

    After publishing the report, values can be set for the hidden parameter, either through the report URL like this:
    http://exampleWebServerName/reportserver?/foldercontainingreports/report1&param1=testvalue
    here, report1 is the report. param1 is the parameter and testvalue is the value for the parameter.

    or by using something called a subscription definition (this is when users subscribe for the report). More information about it here: http://msdn2.microsoft.com/en-us/library/ms157306.aspx

    Hope we could get more insight from others as well, especially regarding setting values from configuration files etc.

    Regards.


    Gogula G. Aryalingam (MVP - SQL Server)

    DB Antics

  • Re: Report filters

     05-22-2007, 6:45

    • Joined on 03-27-2007
    • Colombo
    • Posts 3
    • Points 0
    • Top 50 Contributor
      Male
    What if you use custom .NET code to apply your filtering?
    Joy's Blog
  • Re: Report filters

     05-23-2007, 0:10

    • Joined on 05-15-2007
    • Posts 4
    • Points 0
    • Top 25 Contributor

    Thanks lot.

    Hi friends,

    It looks like all the methods mentioned here is to set parameter options manually. What i really needed is to set parameter visibility at run time. Currently i am investivating to write a custom code for it. Any new ideas are mostly welcome.

  • Re: Report filters

     05-15-2008, 9:06

    • Joined on 05-15-2007
    • Posts 4
    • Points 0
    • Top 25 Contributor

    Hi All,

    I found a way of implementing this functionality! but sorry for late reply.

    I am using ReportParameter objects to set parameter values through the visual studio report viewer control. It contains a "Visible" property to do hide when necessary at the run time.

    Following is a code sample:

    ReportParameter p1 = new ReportParameter("Parameter1", param1Value);

    p1.Visible = true;

    Thanks for the support!

    Lasi

View as RSS news feed in XML

(Best viewed with a resolution of more than 1024 * 768)

Powered by Community Server, by Telligent Systems