dynamic reporting in an asp.net app -- how to?

Discussion in 'ASP .Net' started by Ray Porter, Sep 17, 2009.

  1. Ray Porter

    Ray Porter Guest

    Hi all,
    I'm in the process of re-implementing and ISAPI -based web app as an asp.net
    app. The application allows the user to enter a number of parameters, some
    of which are optional, then queries the database and returns the data in an
    Excel sheet. The database is Oracle 10G. So I need to be able to collect
    user entered data at runtime, build my SQL statement on the fly, then
    generate a report based on that SQL statement. All of the examples I've
    found with Crystal and MS Reports show a dataset created at design time.

    Is there a step-by-step instruction set somewhere for doing this all at
    runtime, based on dynamically created datasets? I don't mind designing the
    report at design time but I need to be able to actually populate the dataset
    based on a dynamically created SQL statement.

    Thanks,
    =================================
    Ray Porter
    Information Systems
    Applications Development Manager
    Division of University Advancement
    University of North Carolina at Chapel Hill
    Phone: (919) 259-9389
    Fax: (919) 843-3314
    Pager: (919) 216-4218


    http://www.unc.edu/~dragon

    Meddle not in the affairs of dragons for thou
    art crunchy and taste good with ketchup
     
    Ray Porter, Sep 17, 2009
    #1
    1. Advertising

  2. Ray Porter

    Patrice Guest

    My understanding is that you need to return aribtrary data using the Excel
    format ? Crystal and RS are rather devoted to making reports on known data.

    If you have simple needs you could create the file directly (as an XML or
    HTML file that Excel would read).
    With RS you could create a report and then run this report (report
    description uses an XML based format).

    Or elaborate a bit. For now I'm not sure why you could build the report at
    design time (so the report would used always the same columns) but not the
    SQL part (this is just because of the criteria ?)

    --
    Patrice

    "Ray Porter" <> a écrit dans le message de groupe de
    discussion : ...
    > Hi all,
    > I'm in the process of re-implementing and ISAPI -based web app as an
    > asp.net app. The application allows the user to enter a number of
    > parameters, some of which are optional, then queries the database and
    > returns the data in an Excel sheet. The database is Oracle 10G. So I need
    > to be able to collect user entered data at runtime, build my SQL statement
    > on the fly, then generate a report based on that SQL statement. All of
    > the examples I've found with Crystal and MS Reports show a dataset created
    > at design time.
    >
    > Is there a step-by-step instruction set somewhere for doing this all at
    > runtime, based on dynamically created datasets? I don't mind designing
    > the report at design time but I need to be able to actually populate the
    > dataset based on a dynamically created SQL statement.
    >
    > Thanks,
    > =================================
    > Ray Porter
    > Information Systems
    > Applications Development Manager
    > Division of University Advancement
    > University of North Carolina at Chapel Hill
    > Phone: (919) 259-9389
    > Fax: (919) 843-3314
    > Pager: (919) 216-4218
    >
    >
    > http://www.unc.edu/~dragon
    >
    > Meddle not in the affairs of dragons for thou
    > art crunchy and taste good with ketchup
    >
    >
     
    Patrice, Sep 17, 2009
    #2
    1. Advertising

  3. Ray Porter

    Ray Porter Guest

    "Patrice" <http://scribe-en.blogspot.com/> wrote in message
    news:...
    >
    > Or elaborate a bit. For now I'm not sure why you could build the report at
    > design time (so the report would used always the same columns) but not the
    > SQL part (this is just because of the criteria ?)
    >
    > --
    > Patrice
    >


    Yes, Patrice. The columns in the SELECT statement are static. The problem
    is that the WHERE clause will vary depending on what the user enters on the
    web page.

    This is a fairly common scenario that I've dealt with in other programming
    environments so I'm sure there's some way to do it in .Net world -- I'm just
    too new to .Net to know the best approach yet.

    Thanks,
    Ray
     
    Ray Porter, Sep 17, 2009
    #3
  4. Ray Porter

    Patrice Guest

    Ok so from a general point of view and in the worst case it could be done at
    the SQL side :

    http://www.sqlteam.com/article/implementing-a-dynamic-where-clause

    Now if using Reporting Services and the selection is quite simple it could
    be not necessary. A parameter can be multivalued and taken from another
    SELECT. The "select all" option collects all values so in all cases using an
    IN clause is enough :

    http://msdn.microsoft.com/en-us/library/aa337292.aspx

    Don't know about Crystal (we stopped at 9.5) but likely similar...

    --
    Patrice


    "Ray Porter" <> a écrit dans le message de groupe de
    discussion : #...
    >
    > "Patrice" <http://scribe-en.blogspot.com/> wrote in message
    > news:...
    >>
    >> Or elaborate a bit. For now I'm not sure why you could build the report
    >> at design time (so the report would used always the same columns) but not
    >> the SQL part (this is just because of the criteria ?)
    >>
    >> --
    >> Patrice
    >>

    >
    > Yes, Patrice. The columns in the SELECT statement are static. The
    > problem is that the WHERE clause will vary depending on what the user
    > enters on the web page.
    >
    > This is a fairly common scenario that I've dealt with in other programming
    > environments so I'm sure there's some way to do it in .Net world -- I'm
    > just too new to .Net to know the best approach yet.
    >
    > Thanks,
    > Ray
    >
    >
    >
     
    Patrice, Sep 17, 2009
    #4
    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. Brendan Reynolds
    Replies:
    8
    Views:
    5,124
    Brendan Reynolds
    Aug 18, 2005
  2. kbutterly
    Replies:
    2
    Views:
    816
    kbutterly
    Oct 19, 2006
  3. Phils
    Replies:
    1
    Views:
    530
    Cowboy \(Gregory A. Beamer\)
    Nov 24, 2006
  4. Blasting Cap
    Replies:
    3
    Views:
    818
    Blasting Cap
    Jul 30, 2007
  5. Headless Rider

    Control asp.net app from other asp.net app

    Headless Rider, Aug 18, 2003, in forum: ASP .Net Security
    Replies:
    0
    Views:
    125
    Headless Rider
    Aug 18, 2003
Loading...

Share This Page