asp.net 2 report problem with 3-tier design

Discussion in 'ASP .Net Web Controls' started by Bernie Beattie, Sep 25, 2006.

  1. How do you create a report when you have a 3-tier web application? I have a
    class that does all the data accessing for me, so I don't have direct access
    to datasets in the user interface tier. I was hoping I could just cheat the
    report with a dummy dataset structure nut I'm not sure how to go about
    creating the dummy dataset.

    The alternative would be to create the report in code at runtime but I'm not
    sure if that's possible either. I can't find any examples of this.

    Can anyone help?

    Thanks,

    Bernie Beattie
    Bernie Beattie, Sep 25, 2006
    #1
    1. Advertising

  2. Thanks for your reply David. First time anyone has replied to any of my posts!

    I'm trying to use the asp.net 2.0 in-built reporting (rdlc) with a chart
    control dropped on, but it requires to have a dataset/table bound immediately
    when you create the report. This is the bit I'm finding tricky as the data is
    accessed via a separate tier. I was hoping I could trick the report into
    working by having a dummy business object with the fields that will be in my
    dataset and somehow rebind the data at runtime. But it doesn't seem to work.

    Maybe I need a different approach or use a different chart tool?

    Thanks for your help,

    Bernie Beattie

    "David R. Longnecker" wrote:

    > You can reference your business (or directly to your data) layer in your
    > reporting layer.
    >
    > So, for example, on your reporting project, reference the business layer
    > project in your solution (add reference > projects > business layer project,
    > in this case, called myBizLayer). Now, you have access to the datagrids
    > and functions of that project.
    >
    > From here, if you have a call to get information based off a user input number,
    > say a part lookup. Your business layer contains a select for this that outputs
    > a DataRow.
    >
    > --
    > int partNumber = Convert.ToInt32(lblPartNumber.Text);
    > DataRow partInfo = myBizLayer.getPartInfo(partNumber);
    > --
    >
    > From here, you can use that DataRow (or DataSet, DataTable, etc) however
    > you please in your reporting project. Most of my projects are separated by
    > business, data, presentation (web, usually), and reporting. I use DataDynamics
    > ActiveReports and have found this to work like a champ and still keep the
    > layers of logic separated.
    >
    > If this isn't what you're meaning, reply back with an example or pseudocode
    > of how you're calling the data in your presentation tier and we can go from
    > there. :)
    >
    > -dl
    >
    > --
    > David Longnecker
    > Web Developer
    > Wichita Public Schools, USD 259
    >
    > > How do you create a report when you have a 3-tier web application? I
    > > have a class that does all the data accessing for me, so I don't have
    > > direct access to datasets in the user interface tier. I was hoping I
    > > could just cheat the report with a dummy dataset structure nut I'm not
    > > sure how to go about creating the dummy dataset.
    > >
    > > The alternative would be to create the report in code at runtime but
    > > I'm not sure if that's possible either. I can't find any examples of
    > > this.
    > >
    > > Can anyone help?
    > >
    > > Thanks,
    > >
    > > Bernie Beattie
    > >

    >
    >
    >
    Bernie Beattie, Sep 27, 2006
    #2
    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. rob

    ASP v2 & 3-tier or 2-tier

    rob, Aug 13, 2004, in forum: ASP .Net
    Replies:
    1
    Views:
    394
    Steve C. Orr [MVP, MCSD]
    Aug 13, 2004
  2. NOSPAM

    2 tier to 3 tier?

    NOSPAM, Oct 14, 2004, in forum: ASP .Net
    Replies:
    1
    Views:
    421
    =?Utf-8?B?Q293Ym95IChHcmVnb3J5IEEuIEJlYW1lcikgLSBN
    Oct 14, 2004
  3. Steve Kershaw

    Setting up a new tier in a 3-tier system?

    Steve Kershaw, Mar 28, 2006, in forum: ASP .Net
    Replies:
    3
    Views:
    434
    Steve Kershaw
    Mar 29, 2006
  4. Shantanu Bhattacharya
    Replies:
    2
    Views:
    536
    Christopher Benson-Manica
    Dec 26, 2003
  5. Shantanu Bhattacharya

    Converting a 2-tier application to 3-tier application

    Shantanu Bhattacharya, Dec 25, 2003, in forum: C Programming
    Replies:
    2
    Views:
    447
    Christopher Benson-Manica
    Dec 26, 2003
Loading...

Share This Page