Jump to content
Software FX Community

I think I'm slow...


User (Legacy)

Recommended Posts

Posted

I have an ADO recordset set has three colums - Year, Quarter, and Sales

amount. I am looking to get a bar that groups the data by year, and then

puts the 4 quarters in 4 different bars. Something like this :

| |

| || | | ||

|||| | || ||||

2003 2002 2001

But after hours of experimenting, I cannot figure it out. I think I should

be looking at the CfxDataType, but I don't know. Can someone please give me

a hand with this? I am betting its really easy and I missed some sort of

easy readme.

Thanks,

Rob

Posted

You need to use the Cross-Tab Data Provider. See the docs. for details.

You want your Column Header to be the Quarter, your Row Header will be the

Year and your Value will be the Sales.

You need to order the Recorset by Year + Quarter before passing it to the

cross-tab provider.

--

FP

Software FX, Inc.

Posted

Thank you for your help.  I have discovered one more problem.  If my

recordset has 8 records inidicating 2 full years, everything works perfect.

But if I change my date range to only run from Q2 2002 to now, the first

quarter in 2003 is moved to the end of the year instead of showing first .

Here is an example.

If I run 1/1/02 to 12/31/03 I get:

Q12002 Q22002 Q32002 Q42002 Q12003 Q22003 Q32003 Q42003

But if I run 4/1/02 to 12/31/03 I get:

Q22002 Q32002 Q42002 Q22003 Q32003 Q42003 Q12003

I would hope to get:

Q22002 Q32002 Q42002 Q12003 Q22003 Q32003 Q42003

Any ideas? Here is my code (fx is the control):

Dim cfx As New CfxDataAdo

Dim x As New CrosstabProvider

Dim rs As ADODB.Recordset

Set rs = GetAvgRespTimeChart(sDate, eDate) 'Returns proper recordset

cfx.Resultset = rs

x.DataSource = cfx

x.DataType(0) = CTDT_ROWHEADING

x.DataType(1) = CTDT_COLUMNHEADING

x.DataType(2) = CTDT_VALUE

fx.ClearData (CD_ALLDATA)

fx.GetExternalData x

Thanks,

Rob

"SoftwareFX Support" <support@softwarefx.com> wrote in message

news:cuO9$oDtDHA.1816@WEBSERVER1...

> You need to use the Cross-Tab Data Provider. See the docs. for details.

>

> You want your Column Header to be the Quarter, your Row Header will be the

> Year and your Value will be the Sales.

>

> You need to order the Recorset by Year + Quarter before passing it to the

> cross-tab provider.

>

> --

> FP

> Software FX, Inc.

>

>

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...