Using ASP.NET to mimick MS Access forms/navigation/and reports

Posted on 2006-05-08
Last Modified: 2007-12-19
Hi all,
As a learning project I would like to recreate a project that I made in
MS Access within ASP.NET. Could someone help by commenting on the
correctness of my statements below and also by making suggestions?

1) In Access, you can create a form that gets it's values from a
multi-table query. In ASP you can create a web page that gets it's
values from a multi-table DataSet. This is the first step to complete
this project.

2a) In Access, at the bottom of the form you can show Navigation
buttons which allow you to select which record you are viewing...and
you can view one record at a time. The form's information is stored in
a RecordSet. Also,  using the center mouse wheel you can quickly scroll
 through records one-by-one within the recordset.
2b) In ASP, the Dataset (as apposed to the RecordSet in Access) can be
stored several different places from the Session to the ViewState among
others. (I'm still fully grasping all of the places to store this
information.) So, my question is this--the Dataset could be a large
table so I've been reading that this information shouldn't be stored in
the ViewState for performance reasons...however, if I want to make a
web page that acts just like the Access form with Nav buttons and mouse
scroll record selecting:
**how should I store DataSet information?
**what's the best way to program the Nav buttons? Is there a
pre-built web object that does this?

3) MS Access makes it easy to create Reports for printing by just linking them to queries and designing them in design view. What options (free??) are there to print good looking reports easily in the ASP.NET platform?

I'd love coding samples if you have them!

thanks much,

Question by:goldylamont
    LVL 37

    Accepted Solution

    saw your msg on Expert Notify...

    although I can't find a tutorial at the moment...I know I've seen...somewhere...a sample where the .Net 2.0 FormView control was used to create a very Access-like form...main thing is that it pulls up one record at a time and has built in navigation...

    as for how to maintain your dataset...although i'm not a big fan of this situation, I think you'd be ok storing your ds in session...

    ...alternately, I think the built-in behavior of the FormView is to just get each record as you navigate...(that is, a lot of db calls on roundtrips for the page...)

    google around for " 2.0 formview" and/or " state management"
    as far as can use the built in Crystal Reports...or for the absolute quickest way to print a to provide a javascript print button (which is just like using the browser's File\Print from the menu)...

    but i think you'd be comfortable using Crystal...designing the report is almost just like Access' report designer...Google "Visual Studio Crystal Reports" for some direction...

    Author Comment

    dude thanks samtran. i will definitely search on formview later today when I have time.

    regarding Crystal Reports--I've seen posted here several times that people, well kinda hate CR. And isn't it expensive? I will look into it,  but check out these links for reporting (i'll post them maybe it could help someone else):
    (my client is running a full version of SQL 2005. maybe reporting is built in!?!)
    (anyone with experience using this?)

    okay, so i don't want to stray too far away from my initial question. samtran if you find that tutorial then points go to you. i want to leave this question open for a bit longer for other suggestions though. thanks much!

    LVL 26

    Assisted Solution

    first of all my advice would be stop having direct comparisons between applications build in ASP.Net and Access becuase one is a web application and the other is a windows application i.e. web applications are stateless and windows application can maintain state .. so ur comparison of the access form where u have a navigation at the bottom to a web page is not very valid here. you can create a similar web page which seems to behave the same way but remmber its not that simple as it is in the case of access as in a web application each change in the record the page has to return to the server from the client (browser) .. and for each return back to the server (postback), the state is not completely maintained .. so u will have to use sessions (as u have already mentioned). But the complexity here is that how will u maintain the bookmark of the records currently been viewed to move up and down .. all this can be managed in different ways but again not as easily as it is access .. also I would not advice this kind of a design in a internet development .. yes, maybe for a intranet where the response time is fast, the number of postbacks might not be too much of an issues ....

    So try not to make a direct comparison ... and think of designing a web page as web page is supposed to behave and not try to make it into a windows form as in a windows application

    By the way, I would not even advice storing datasets in sessions i.e. to maintain state ..  try using datagrids/gridview and its paging feature .. gridview also has inbuild functionality for inline editing/deleting etc .. have a look at for loads of examples on this control ..

    For creating simple reports, use plain old datagrid/gridview which will generate HTML tables ... format the control to give the require color and fonts .. u might also want to look at SQL reporting services for creating reports ... its specifically made for creating web reports and it has lots of feature for creating some complex reports and also easy for deployment ..


    Author Comment

    samtran you're the man! FormView is exactly what I was looking for. It shows one record at a time and allows you to update the record if you want. All I have to do is figure out how to customize it to show the record number and then add images for the forward and backwards buttons. It's right there next to Gridview and the rest of the Data Controls so I don't know how I overlooked it.

    Rejo, sho you right man. but, i just want/need to do this as a learning experience. but yeah man i completely understand that i have to consider how slow a web app would run with humoungous datasets in a stateless environment. i will experiment with reports just using gridview/datagrid...but i'm really excited to try out the reporting services in sql 2005. i'll take a look at the site you suggested.

    i'm new to ASP.NET although I've been doing web dev/Access for a while...and i'm really impressed with the free VS Express tools so I just feel like I can do whatever the heck i want in ASP because it looks so easy :-) ...but i know it's not so simple :-) i'll try to be as fair as possible splitting the points as samtran answered more directly but rejo's advice is noteworthy.
    LVL 37

    Expert Comment

    >>All I have to do is figure out how to customize it to show the record number and then add images for the forward and backwards buttons.

    Even if you can't find specific articles on custom paging for FormView control...any tutorial for paging a datagrid, gridview, datalist you find...will most likely work on the FormView just google " gridview custom paging"...find one where they do what you want...and the code and subs for custom paging a gridview should work for the FormView also...

    as far as maintaining a really depends on the app...if you're writing an intranet app used by 50 people and the server is in the don't really have to worry about roundtrips of the pages...i'd just let the FormView "do its thing"...don't worry about setting up any custom data storage ...and see if your clients have or anticipate speed problems...and it is a good rule of thumb to keep db calls and roundtrips to a minimum...but considering how powerful most servers are today and that most ppl are on broadband...even if you have a couple thousand users...half of them would have to click the "next" button simultaneously for you to notice performance problems...

    if you do go the session route...i'd suggest usine the State Server or SQL server to maintain sessions...not the default "in process"....
    LVL 37

    Expert Comment

    by:samtran0331 you look at the rankings on the'll see Rejo and I are neck and neck...he's the main reason I stay active on EE daily...every time I stay off EE for a few days and come back...he jumps ahead of me! we're so close in points we flip back and forth a lot on who is ahead.

    And although I don't participate on EE for points...the points do add a little excitement...and it's been fun trying to keep up with ya Rejo!! =0D

    LVL 26

    Expert Comment

    :-) all the best samtran0331 .. glad that I cld be of some encouragement to you to actively participate here ..
    have been too busy this year on various projects that i haven't been able to frequently participate in EE this year .. yes, the pnts do add to the excitement and I did notice you jumping ahead :-) ... hope to win back my position as soon as I get relatively free to atleast spend an hour or two in EE everyweek  .. I really cannot understand how experts like scolja and raterus are able to earn so many points in such a short time .. it really commendable ...

    thx goldylamont for the points ... glad to be of some help .. this thread has been the first one after a break of more than a month .. saw ur comment in "Expert Notify" ..


    Featured Post

    Find Ransomware Secrets With All-Source Analysis

    Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

    Join & Write a Comment

    Suggested Solutions

    I recently went through the process of creating a Calendar Control of events with the basis of using a database to keep track of the dates that are selectable, one requirement was to have the selected date pop-up in a simple lightbox.  At first this…
    ASP.Net to Oracle Connectivity Recently I had to develop an ASP.NET application connecting to an Oracle database.As I am doing it first time ,I had to solve several problems. This article will help to such developers  to develop an ASP.NET client…
    Migrating to Microsoft Office 365 is becoming increasingly popular for organizations both large and small. If you have made the leap to Microsoft’s cloud platform, you know that you will need to create a corporate email signature for your Office 365…
    Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

    730 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    15 Experts available now in Live!

    Get 1:1 Help Now