ASP or HTML - how to freeze columns in pivot table

Discussion in 'HTML' started by Kamyk, Dec 16, 2004.

  1. Kamyk

    Kamyk Guest

    Hello all!

    I have created a pivot table using ASP and HTML language. I have based on a
    crosstab query created in MS Access 97. My pivot table looks excellent. Is
    there any possibility to freeze first three columns which are static,
    because the whole report takes a lot of space and I have to scroll right to
    see the rest of values, but then I cannot see the static descriptions. My
    reports looks like this:

    Status | Wage | Target | 200441 | 200442 | 200443 | 200444 | 200445 etc
    C01 1 85% 10% 20% 70% 67%
    C02 4 85% 12% 32% 17% 71%

    I want to freeze three columns: "Status", "Wage" and "Target". How can I
    make this? The procedure of generating a pivot table, which I made in ASP is
    so I don`t know if it is easy to freeze these columns.

    Thank you in advance for your posts
    Marcin from Poland
    Kamyk, Dec 16, 2004
    1. Advertisements

  2. Andy Dingley

    Andy Dingley Guest

    On Thu, 16 Dec 2004 19:47:03 +0100, "Kamyk"
    <> wrote:

    >Is there any possibility to freeze first three columns which are static,

    There are two ways to do this.

    One, which is fairly easy, is to use frames. This is an appropriate
    time to use frames. Put the fixed part in one frame, the scroling
    part in another, then just let the normal scrolling mechanism take
    care of it.

    Frames have a problem for you. Your database query is long and
    complex, so you don't want to run it twice, once for each frame. So
    instead generate it from within the frameset page and store the
    results in the session object. Then your frame pages can use this
    stored content to generate their output very simply. (the rest
    requires some ASP knowledge, which you might already have, or you can
    ask again).

    The second way, perhaps better, is to use your own scrolling, by using
    client-side Javascript and switching individual columns on and off
    through CSS and the display:none; property.

    This is perhaps easier, but it relies on the users having Javascript
    enabled. This isn't too bad though, because you can easily make this
    default to all columns being visible.

    You should also use CSS @media print {} to make all the table columns
    displayed for printing.
    Smert' spamionam
    Andy Dingley, Dec 16, 2004
    1. Advertisements

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. Grey

    Pivot table function in

    Grey, Sep 24, 2004, in forum: ASP .Net
  2. Grey
    Prodip Saha
    Sep 24, 2004
  3. =?Utf-8?B?QWJoaWplZXQgS3VtYXI=?=

    Freeze columns in GridView ASP.NET2.0(Urgent)

    =?Utf-8?B?QWJoaWplZXQgS3VtYXI=?=, Jun 28, 2006, in forum: ASP .Net
  4. Replies:
    Olivier Renaud
    Mar 15, 2007
  5. srinivas
    Nov 18, 2005

Share This Page