ASP or HTML - how to freeze columns in pivot table

K

Kamyk

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%
99%
C02 4 85% 12% 32% 17% 71%
49%

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
complicataed,
so I don`t know if it is easy to freeze these columns.

Thank you in advance for your posts
Marcin from Poland
 
A

Andy Dingley

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,997
Messages
2,570,240
Members
46,828
Latest member
LauraCastr

Latest Threads

Top