Note: Forums will be making significant UX changes to address key usability improvements surrounding search, discoverability and navigation. To learn more about these changes please visit the announcement which can be found HERE.

Answered Is this possible?

  • Monday, January 14, 2013 6:07 AM
     
     

    Hi all,

    I have a database and I would like to generate reports on a given set of filter criteria. E.x., if there are columns like FirstName, City, Country, Designation, I may select different combination of these filters , click on search and a report should come. The search button will trigger this filtering query  and I should be able to save the genearted query with a friendly name for future use. Is all of this possible with SSRS, i.e. click on search button(may be in .net form), save query and generate the report? The filter criteria need not be on the sql report, it could be also in the asp.net webform.

    Can you provide some links ? (I'm also searching)

All Replies

  • Monday, January 14, 2013 8:38 AM
     
     

    Hi,

    for own asp.net webform with search button, look for custom report viever

    http://www.mssqltips.com/sqlservertip/1751/custom-control-and-setup-of-ssrs-report-parameters-from-a-web-page/

    saving generated report is possible with web archive rendering extension.

    for rendering extensions see:

    http://msdn.microsoft.com/en-us/library/cc627537(v=sql.100).aspx

    Zdenek


    Please mark as helpful and propose as answer if you find this as correct. nosekz.eu

  • Monday, January 14, 2013 10:27 AM
     
     

    Hi Zdenek,

    The links were helpful, but I don't want to save the report, I want to save the filter criteria. i.e. in the example that you showed if the user selected the StartDate as xyz and Endate as abc, etc, I would like to save that criteria. I think this I can do in the click event, i.e. Save all fields comma seperated in db.

    But I would like to get the content of the report also in the click event (perhaps a datatable/dataset). Is this possible? i.e Accessing the report data in the event. 

  • Monday, January 14, 2013 11:13 AM
     
     Answered

    Hi,

    You can create onclick event and store criteria and web archive output (as varbinary) to spacial database.

    If you want to create reports based on dataset, look for local report processing or RDLC. And maybe helpful will be how are reports generated, especially intermediate format of reports.

    zdenek


    Please mark as helpful and propose as answer if you find this as correct. nosekz.eu

    • Marked As Answer by sanjuv Wednesday, January 16, 2013 3:31 AM
    •  
  • Monday, January 14, 2013 12:29 PM
     
     Answered

    Hi,

    You can create a table that will store your parameter values when the report is ran and retrieve them later based on a specific user id, report name. 

    Check out this link:

    Saving Parameters


    Please mark as answered or vote helpful if this post help resolved your issue. Thanks!

    k r o o t z

  • Tuesday, January 15, 2013 2:23 AM
    Moderator
     
     

    Hi Sanjuv,

    I have tested it on my environment, first to create table in the database that used to store the filter. And then create a stored procedure use the query like below.
    Create PROC SP_test
    (
     @Class nvarchar(50),
     @SQL int,
     @Java int,
     @C# int
    )
    AS
    BEGIN
    INSERT INTO filter values(@Class,@SQL,@Jave,@C#)
    SELECT * from case115 where Class=@Class and SQL>@SQL and Java>@Java and C#>@C#
    END

    And then create a dataset using this procedure. The report looks like below.

    If you have any questions, please feel free to ask.

    Regards,
    Charlie Liao


    Charlie Liao
    TechNet Community Support

  • Wednesday, January 16, 2013 3:32 AM
     
     
    Thanks for the same
  • Wednesday, January 16, 2013 3:32 AM
     
     
    Thanks for the same