A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Using Forms
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

How can I achieve this?



 
 
Thread Tools Display Modes
  #1  
Old February 22nd, 2005, 07:15 PM
Jim Franklin
external usenet poster
 
Posts: n/a
Default How can I achieve this?

Hi,

I am using A2K and I have a table with four fields, say ProdCode, Size,
Colour, StockLevel. There is an index so that 2 records cannot have the same
ProdCode, Size and Colour, as follows:

Size Colour PCode StockLevel
S Blue 123 10
M Blue 123 20
L Blue 123 30
M Red 123 22
S Red 123 12
L Red 123 32
M Green 123 21
S Green 123 11
L Green 123 31


I would like to be able to display this data in a matrix as follows. When
each cell of the matrix is edited/updated, the original record is changed to
reflect the new value in the Stock field.

Blue Green Red
S 10 11 12
M 20 21 22
L 30 31 32

Can anyone give me some clues as to the best way to go about this? Or even
if it is possible to do?

Many thanks for reading / any help you can give,

Jim F.




  #2  
Old February 22nd, 2005, 08:25 PM
Ron Weiner
external usenet poster
 
Posts: n/a
Default

Jim

Looks like you need a CrossTab Query. From the description you gave of the
data the Sql might look like this:

TRANSFORM Sum(StockLevel) AS SumStockLevel
SELECT Size
FROM YourTable
WHERE Pcode=123
GROUP BY Size
ORDER BY Size DESC
PIVOT Colour

I am just guessing that you have already gotten this far. Now the big
"Problem" with this is that Crosstab queries are NEVER updateable. So...
you will need devise your own way to allow users to edit the values. In the
past what I have done was to insert the results of the Crosstab into a temp
table. I then let the user mess with the temp table via a bound form.
Lastly write some VBA/ADO code to morph the values in the temp table back
into the normalized tables when the form is closed or a Save button is
pushed.

Ron W


"Jim Franklin" wrote in message
news
Hi,

I am using A2K and I have a table with four fields, say ProdCode, Size,
Colour, StockLevel. There is an index so that 2 records cannot have the

same
ProdCode, Size and Colour, as follows:

Size Colour PCode StockLevel
S Blue 123 10
M Blue 123 20
L Blue 123 30
M Red 123 22
S Red 123 12
L Red 123 32
M Green 123 21
S Green 123 11
L Green 123 31


I would like to be able to display this data in a matrix as follows. When
each cell of the matrix is edited/updated, the original record is changed

to
reflect the new value in the Stock field.

Blue Green Red
S 10 11 12
M 20 21 22
L 30 31 32

Can anyone give me some clues as to the best way to go about this? Or even
if it is possible to do?

Many thanks for reading / any help you can give,

Jim F.






  #3  
Old February 23rd, 2005, 12:43 AM
Jim Franklin
external usenet poster
 
Posts: n/a
Default

Thanks Ron,

I had got this far, hoping there is an easier solution. I want to try and
avoid writing a temptable each time as it seems messy and also its going to
be happening alot, so 1) its slow and 2) makes a big file.

Is there an easier way? I have been looking at some 3rd party Grid controls
which seem to do this, but I have no idea which ones are any good. Is this
the right way to go, anyone?

Thanks again,
Jim F.


"Ron Weiner" wrote in message
...
Jim

Looks like you need a CrossTab Query. From the description you gave of

the
data the Sql might look like this:

TRANSFORM Sum(StockLevel) AS SumStockLevel
SELECT Size
FROM YourTable
WHERE Pcode=123
GROUP BY Size
ORDER BY Size DESC
PIVOT Colour

I am just guessing that you have already gotten this far. Now the big
"Problem" with this is that Crosstab queries are NEVER updateable. So...
you will need devise your own way to allow users to edit the values. In

the
past what I have done was to insert the results of the Crosstab into a

temp
table. I then let the user mess with the temp table via a bound form.
Lastly write some VBA/ADO code to morph the values in the temp table back
into the normalized tables when the form is closed or a Save button is
pushed.

Ron W


"Jim Franklin" wrote in message
news
Hi,

I am using A2K and I have a table with four fields, say ProdCode, Size,
Colour, StockLevel. There is an index so that 2 records cannot have the

same
ProdCode, Size and Colour, as follows:

Size Colour PCode StockLevel
S Blue 123 10
M Blue 123 20
L Blue 123 30
M Red 123 22
S Red 123 12
L Red 123 32
M Green 123 21
S Green 123 11
L Green 123 31


I would like to be able to display this data in a matrix as follows.

When
each cell of the matrix is edited/updated, the original record is

changed
to
reflect the new value in the Stock field.

Blue Green Red
S 10 11 12
M 20 21 22
L 30 31 32

Can anyone give me some clues as to the best way to go about this? Or

even
if it is possible to do?

Many thanks for reading / any help you can give,

Jim F.








  #4  
Old February 25th, 2005, 02:20 PM
Ron Weiner
external usenet poster
 
Posts: n/a
Default

Jim

Don't know if you are still working on this as I haven't had the chance to
get back here since the 22nd, but consider the following before you rush out
and start buying a grid tool.

The tool is just one more thing that has to be installed with your
application.
The Grid tool is one extra failure point that you may need to deal with when
the user can't get it to register, or the reference to it breaks in your
Access app, or operates erratically.

I have had to do this kind of thing before and have successfully deployed a
non trivial enterprise level hybrid application using Access2K, Sql2K, and
ASP by using a couple of permanent temp tables in my Sql database.

I used one table to actually hold the data and the other table to describe
it. The table that holds that data looks like...

CREATE TABLE [tblTemp] (
[TempID] [int] IDENTITY (1, 1) NOT NULL ,
[Dirty] [bit] NOT NULL CONSTRAINT [DF_tblTemp_Dirty] DEFAULT (0),
[CurUserID] [int] NOT NULL ,
[StudentID] [int] NULL ,
[StudentName] [nvarchar] (255) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
[Temp1] [nvarchar] (255) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
[Temp2] [nvarchar] (255) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
[Temp3] [nvarchar] (255) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
[Temp4] [nvarchar] (255) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
[Temp5] [nvarchar] (255) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
[Temp6] [nvarchar] (255) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
[Temp7] [nvarchar] (255) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
[Temp8] [nvarchar] (255) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
[Temp9] [nvarchar] (255) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
[Temp10] [nvarchar] (255) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
-- ad-nauseaum till done Be sure to add as many columns as is necessary to
hold
-- the maximum number of columns that the worst case crosstab might return.
-- my app stopen with 99 temp columns
CONSTRAINT [PK_tblTemp] PRIMARY KEY CLUSTERED
(
[TempID]
) WITH FILLFACTOR = 90 ON [PRIMARY]
) ON [PRIMARY]
END

and the table that describes how the data should look / behave looks like...

CREATE TABLE [tblColumnDataStruct] (
[ColumnDataID] [int] IDENTITY (1, 1) NOT NULL ,
[CurUserID] [int] NULL ,
[FieldName] [nvarchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
[DisplayName] [nvarchar] (255) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
[FieldType] [nvarchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
[DataType] [nvarchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
[CboRowSource] [varchar] (4000) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
[DataMin] [float] NULL ,
[DataMax] [float] NULL ,
[Decimals] [int] NULL ,
[AsmtDefColID] [int] NULL ,
[AsmtID] [int] NULL ,
[SectionID] [int] NULL ,[IndentLevel] [int] NULL ,
[MarkPd] [int] NULL ,
[EditOK] [bit] NOT NULL CONSTRAINT [DF_tblColumnDataStruct_EditOK] DEFAULT
(0),
CONSTRAINT [PK_tblColumnDataStruct] PRIMARY KEY CLUSTERED
(
[ColumnDataID]
) WITH FILLFACTOR = 90 ON [PRIMARY]
) ON [PRIMARY]

Using this structure, a few Stored Procs (that delete and add rows to the
temp tables), and a fair amount of VBA code (to morph the Access Datasheets
and ASP web Pages into the proper shape and save the changed data back to my
normalized structure), allowed me to build Access Subforms and ASP web pages
on the fly that the user could edit and save.

Depending on exactly what you need to do, a similar set up may work well for
you too. If your application is 100% Access you can expect the backend
database (the one with the temp tables) to do some bloating, but a once a
week maintenance compact and repair ought to take care of that problem.
This is NOT a problem with Sql Server 2000.

The biggest speed issue we have found for the app is actually not in the
data collection side, but in the reporting side where we are having to deal
with may more rows and columns being returned in the Crosstab query. Right
now our worst case scenario is printing a class full of report cards that
could take as long as 40 to 60 seconds to create a 60 to 90 page PDF file.

Typically creating the webpage to score a class of 25 to 30 Kids (Rows) for
5 to 10 Scores (Columns) takes just a couple of seconds depending on how
thick the pipe is between the client and the webserver. All in all we are
pretty happy with the performance.

Ron W

"Jim Franklin" wrote in message
...
Thanks Ron,

I had got this far, hoping there is an easier solution. I want to try and
avoid writing a temptable each time as it seems messy and also its going

to
be happening alot, so 1) its slow and 2) makes a big file.

Is there an easier way? I have been looking at some 3rd party Grid

controls
which seem to do this, but I have no idea which ones are any good. Is this
the right way to go, anyone?

Thanks again,
Jim F.


"Ron Weiner" wrote in message
...
Jim

Looks like you need a CrossTab Query. From the description you gave of

the
data the Sql might look like this:

TRANSFORM Sum(StockLevel) AS SumStockLevel
SELECT Size
FROM YourTable
WHERE Pcode=123
GROUP BY Size
ORDER BY Size DESC
PIVOT Colour

I am just guessing that you have already gotten this far. Now the big
"Problem" with this is that Crosstab queries are NEVER updateable.

So...
you will need devise your own way to allow users to edit the values. In

the
past what I have done was to insert the results of the Crosstab into a

temp
table. I then let the user mess with the temp table via a bound form.
Lastly write some VBA/ADO code to morph the values in the temp table

back
into the normalized tables when the form is closed or a Save button is
pushed.

Ron W


"Jim Franklin" wrote in message
news
Hi,

I am using A2K and I have a table with four fields, say ProdCode,

Size,
Colour, StockLevel. There is an index so that 2 records cannot have

the
same
ProdCode, Size and Colour, as follows:

Size Colour PCode StockLevel
S Blue 123 10
M Blue 123 20
L Blue 123 30
M Red 123 22
S Red 123 12
L Red 123 32
M Green 123 21
S Green 123 11
L Green 123 31


I would like to be able to display this data in a matrix as follows.

When
each cell of the matrix is edited/updated, the original record is

changed
to
reflect the new value in the Stock field.

Blue Green Red
S 10 11 12
M 20 21 22
L 30 31 32

Can anyone give me some clues as to the best way to go about this? Or

even
if it is possible to do?

Many thanks for reading / any help you can give,

Jim F.










  #5  
Old March 2nd, 2005, 05:31 PM
Jim Franklin
external usenet poster
 
Posts: n/a
Default

Ron,

Not sure if this is good ettiquette in Newsgroups, but I just wanted to say
"Many Thanks."

I am still working on this (I managed to escape the office for a few days)
and I am exploring the path that you suggest.

Thanks again,
Jim


"Ron Weiner" wrote in message
...
Jim

Don't know if you are still working on this as I haven't had the chance to
get back here since the 22nd, but consider the following before you rush

out
and start buying a grid tool.

The tool is just one more thing that has to be installed with your
application.
The Grid tool is one extra failure point that you may need to deal with

when
the user can't get it to register, or the reference to it breaks in your
Access app, or operates erratically.

I have had to do this kind of thing before and have successfully deployed

a
non trivial enterprise level hybrid application using Access2K, Sql2K, and
ASP by using a couple of permanent temp tables in my Sql database.

I used one table to actually hold the data and the other table to describe
it. The table that holds that data looks like...

CREATE TABLE [tblTemp] (
[TempID] [int] IDENTITY (1, 1) NOT NULL ,
[Dirty] [bit] NOT NULL CONSTRAINT [DF_tblTemp_Dirty] DEFAULT (0),
[CurUserID] [int] NOT NULL ,
[StudentID] [int] NULL ,
[StudentName] [nvarchar] (255) COLLATE SQL_Latin1_General_CP1_CI_AS NULL

,
[Temp1] [nvarchar] (255) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
[Temp2] [nvarchar] (255) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
[Temp3] [nvarchar] (255) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
[Temp4] [nvarchar] (255) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
[Temp5] [nvarchar] (255) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
[Temp6] [nvarchar] (255) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
[Temp7] [nvarchar] (255) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
[Temp8] [nvarchar] (255) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
[Temp9] [nvarchar] (255) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
[Temp10] [nvarchar] (255) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
-- ad-nauseaum till done Be sure to add as many columns as is necessary

to
hold
-- the maximum number of columns that the worst case crosstab might

return.
-- my app stopen with 99 temp columns
CONSTRAINT [PK_tblTemp] PRIMARY KEY CLUSTERED
(
[TempID]
) WITH FILLFACTOR = 90 ON [PRIMARY]
) ON [PRIMARY]
END

and the table that describes how the data should look / behave looks

like...

CREATE TABLE [tblColumnDataStruct] (
[ColumnDataID] [int] IDENTITY (1, 1) NOT NULL ,
[CurUserID] [int] NULL ,
[FieldName] [nvarchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
[DisplayName] [nvarchar] (255) COLLATE SQL_Latin1_General_CP1_CI_AS NULL

,
[FieldType] [nvarchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
[DataType] [nvarchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
[CboRowSource] [varchar] (4000) COLLATE SQL_Latin1_General_CP1_CI_AS NULL

,
[DataMin] [float] NULL ,
[DataMax] [float] NULL ,
[Decimals] [int] NULL ,
[AsmtDefColID] [int] NULL ,
[AsmtID] [int] NULL ,
[SectionID] [int] NULL ,
[IndentLevel] [int] NULL ,
[MarkPd] [int] NULL ,
[EditOK] [bit] NOT NULL CONSTRAINT [DF_tblColumnDataStruct_EditOK]

DEFAULT
(0),
CONSTRAINT [PK_tblColumnDataStruct] PRIMARY KEY CLUSTERED
(
[ColumnDataID]
) WITH FILLFACTOR = 90 ON [PRIMARY]
) ON [PRIMARY]

Using this structure, a few Stored Procs (that delete and add rows to the
temp tables), and a fair amount of VBA code (to morph the Access

Datasheets
and ASP web Pages into the proper shape and save the changed data back to

my
normalized structure), allowed me to build Access Subforms and ASP web

pages
on the fly that the user could edit and save.

Depending on exactly what you need to do, a similar set up may work well

for
you too. If your application is 100% Access you can expect the backend
database (the one with the temp tables) to do some bloating, but a once a
week maintenance compact and repair ought to take care of that problem.
This is NOT a problem with Sql Server 2000.

The biggest speed issue we have found for the app is actually not in the
data collection side, but in the reporting side where we are having to

deal
with may more rows and columns being returned in the Crosstab query.

Right
now our worst case scenario is printing a class full of report cards that
could take as long as 40 to 60 seconds to create a 60 to 90 page PDF file.

Typically creating the webpage to score a class of 25 to 30 Kids (Rows)

for
5 to 10 Scores (Columns) takes just a couple of seconds depending on how
thick the pipe is between the client and the webserver. All in all we are
pretty happy with the performance.

Ron W

"Jim Franklin" wrote in message
...
Thanks Ron,

I had got this far, hoping there is an easier solution. I want to try

and
avoid writing a temptable each time as it seems messy and also its going

to
be happening alot, so 1) its slow and 2) makes a big file.

Is there an easier way? I have been looking at some 3rd party Grid

controls
which seem to do this, but I have no idea which ones are any good. Is

this
the right way to go, anyone?

Thanks again,
Jim F.


"Ron Weiner" wrote in message
...
Jim

Looks like you need a CrossTab Query. From the description you gave

of
the
data the Sql might look like this:

TRANSFORM Sum(StockLevel) AS SumStockLevel
SELECT Size
FROM YourTable
WHERE Pcode=123
GROUP BY Size
ORDER BY Size DESC
PIVOT Colour

I am just guessing that you have already gotten this far. Now the big
"Problem" with this is that Crosstab queries are NEVER updateable.

So...
you will need devise your own way to allow users to edit the values.

In
the
past what I have done was to insert the results of the Crosstab into a

temp
table. I then let the user mess with the temp table via a bound form.
Lastly write some VBA/ADO code to morph the values in the temp table

back
into the normalized tables when the form is closed or a Save button is
pushed.

Ron W


"Jim Franklin" wrote in message
news Hi,

I am using A2K and I have a table with four fields, say ProdCode,

Size,
Colour, StockLevel. There is an index so that 2 records cannot have

the
same
ProdCode, Size and Colour, as follows:

Size Colour PCode StockLevel
S Blue 123 10
M Blue 123 20
L Blue 123 30
M Red 123 22
S Red 123 12
L Red 123 32
M Green 123 21
S Green 123 11
L Green 123 31


I would like to be able to display this data in a matrix as follows.

When
each cell of the matrix is edited/updated, the original record is

changed
to
reflect the new value in the Stock field.

Blue Green Red
S 10 11 12
M 20 21 22
L 30 31 32

Can anyone give me some clues as to the best way to go about this?

Or
even
if it is possible to do?

Many thanks for reading / any help you can give,

Jim F.












  #6  
Old April 16th, 2005, 11:57 AM
Jess Martyn
external usenet poster
 
Posts: n/a
Default

Hello,

Recently, http://extremedesigners.5u.com - A website about web designing -
has been launched. I would like you to take a look at it and pass your
suggestions - complements - about it.

- Regards,
Extreme Designing Team.
"Jim Franklin" wrote in message
...
Ron,

Not sure if this is good ettiquette in Newsgroups, but I just wanted to

say
"Many Thanks."

I am still working on this (I managed to escape the office for a few days)
and I am exploring the path that you suggest.

Thanks again,
Jim


"Ron Weiner" wrote in message
...
Jim

Don't know if you are still working on this as I haven't had the chance

to
get back here since the 22nd, but consider the following before you rush

out
and start buying a grid tool.

The tool is just one more thing that has to be installed with your
application.
The Grid tool is one extra failure point that you may need to deal with

when
the user can't get it to register, or the reference to it breaks in your
Access app, or operates erratically.

I have had to do this kind of thing before and have successfully

deployed
a
non trivial enterprise level hybrid application using Access2K, Sql2K,

and
ASP by using a couple of permanent temp tables in my Sql database.

I used one table to actually hold the data and the other table to

describe
it. The table that holds that data looks like...

CREATE TABLE [tblTemp] (
[TempID] [int] IDENTITY (1, 1) NOT NULL ,
[Dirty] [bit] NOT NULL CONSTRAINT [DF_tblTemp_Dirty] DEFAULT (0),
[CurUserID] [int] NOT NULL ,
[StudentID] [int] NULL ,
[StudentName] [nvarchar] (255) COLLATE SQL_Latin1_General_CP1_CI_AS

NULL
,
[Temp1] [nvarchar] (255) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
[Temp2] [nvarchar] (255) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
[Temp3] [nvarchar] (255) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
[Temp4] [nvarchar] (255) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
[Temp5] [nvarchar] (255) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
[Temp6] [nvarchar] (255) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
[Temp7] [nvarchar] (255) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
[Temp8] [nvarchar] (255) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
[Temp9] [nvarchar] (255) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
[Temp10] [nvarchar] (255) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
-- ad-nauseaum till done Be sure to add as many columns as is necessary

to
hold
-- the maximum number of columns that the worst case crosstab might

return.
-- my app stopen with 99 temp columns
CONSTRAINT [PK_tblTemp] PRIMARY KEY CLUSTERED
(
[TempID]
) WITH FILLFACTOR = 90 ON [PRIMARY]
) ON [PRIMARY]
END

and the table that describes how the data should look / behave looks

like...

CREATE TABLE [tblColumnDataStruct] (
[ColumnDataID] [int] IDENTITY (1, 1) NOT NULL ,
[CurUserID] [int] NULL ,
[FieldName] [nvarchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
[DisplayName] [nvarchar] (255) COLLATE SQL_Latin1_General_CP1_CI_AS

NULL
,
[FieldType] [nvarchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
[DataType] [nvarchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
[CboRowSource] [varchar] (4000) COLLATE SQL_Latin1_General_CP1_CI_AS

NULL
,
[DataMin] [float] NULL ,
[DataMax] [float] NULL ,
[Decimals] [int] NULL ,
[AsmtDefColID] [int] NULL ,
[AsmtID] [int] NULL ,
[SectionID] [int] NULL ,
[IndentLevel] [int] NULL ,
[MarkPd] [int] NULL ,
[EditOK] [bit] NOT NULL CONSTRAINT [DF_tblColumnDataStruct_EditOK]

DEFAULT
(0),
CONSTRAINT [PK_tblColumnDataStruct] PRIMARY KEY CLUSTERED
(
[ColumnDataID]
) WITH FILLFACTOR = 90 ON [PRIMARY]
) ON [PRIMARY]

Using this structure, a few Stored Procs (that delete and add rows to

the
temp tables), and a fair amount of VBA code (to morph the Access

Datasheets
and ASP web Pages into the proper shape and save the changed data back

to
my
normalized structure), allowed me to build Access Subforms and ASP web

pages
on the fly that the user could edit and save.

Depending on exactly what you need to do, a similar set up may work well

for
you too. If your application is 100% Access you can expect the backend
database (the one with the temp tables) to do some bloating, but a once

a
week maintenance compact and repair ought to take care of that problem.
This is NOT a problem with Sql Server 2000.

The biggest speed issue we have found for the app is actually not in the
data collection side, but in the reporting side where we are having to

deal
with may more rows and columns being returned in the Crosstab query.

Right
now our worst case scenario is printing a class full of report cards

that
could take as long as 40 to 60 seconds to create a 60 to 90 page PDF

file.

Typically creating the webpage to score a class of 25 to 30 Kids (Rows)

for
5 to 10 Scores (Columns) takes just a couple of seconds depending on how
thick the pipe is between the client and the webserver. All in all we

are
pretty happy with the performance.

Ron W

"Jim Franklin" wrote in message
...
Thanks Ron,

I had got this far, hoping there is an easier solution. I want to try

and
avoid writing a temptable each time as it seems messy and also its

going
to
be happening alot, so 1) its slow and 2) makes a big file.

Is there an easier way? I have been looking at some 3rd party Grid

controls
which seem to do this, but I have no idea which ones are any good. Is

this
the right way to go, anyone?

Thanks again,
Jim F.


"Ron Weiner" wrote in message
...
Jim

Looks like you need a CrossTab Query. From the description you gave

of
the
data the Sql might look like this:

TRANSFORM Sum(StockLevel) AS SumStockLevel
SELECT Size
FROM YourTable
WHERE Pcode=123
GROUP BY Size
ORDER BY Size DESC
PIVOT Colour

I am just guessing that you have already gotten this far. Now the

big
"Problem" with this is that Crosstab queries are NEVER updateable.

So...
you will need devise your own way to allow users to edit the values.

In
the
past what I have done was to insert the results of the Crosstab into

a
temp
table. I then let the user mess with the temp table via a bound

form.
Lastly write some VBA/ADO code to morph the values in the temp table

back
into the normalized tables when the form is closed or a Save button

is
pushed.

Ron W


"Jim Franklin" wrote in message
news Hi,

I am using A2K and I have a table with four fields, say ProdCode,

Size,
Colour, StockLevel. There is an index so that 2 records cannot

have
the
same
ProdCode, Size and Colour, as follows:

Size Colour PCode StockLevel
S Blue 123 10
M Blue 123 20
L Blue 123 30
M Red 123 22
S Red 123 12
L Red 123 32
M Green 123 21
S Green 123 11
L Green 123 31


I would like to be able to display this data in a matrix as

follows.
When
each cell of the matrix is edited/updated, the original record is
changed
to
reflect the new value in the Stock field.

Blue Green Red
S 10 11 12
M 20 21 22
L 30 31 32

Can anyone give me some clues as to the best way to go about this?

Or
even
if it is possible to do?

Many thanks for reading / any help you can give,

Jim F.














 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Calendar Report hughess7 Setting Up & Running Reports 21 April 12th, 2005 01:41 PM
Is it possible to achieve this goal? Karen Calendar 2 November 24th, 2004 07:54 PM
How do I achieve four flyers to one page Modernism Publisher 2 November 19th, 2004 10:19 PM


All times are GMT +1. The time now is 03:05 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.