TeeChart 7.01 Summary Charts
D6 RB7.04 EUR
How in EUR can I do a simple chart of say Orders by day of week from a
detailed dataview that has amount and Order date? I see that TeeChart
has a crosstab and a summary (although I don't know exactly what they
do) but they are not appearing in my runtime chart editor?
Alternatively how in DADE can I create a grouped dataview on day of
week ( calculated field of say DateName( weekday, orders.orderdate)
)?
Thanks,
Rick Matthews
Dartek Systems Inc.
How in EUR can I do a simple chart of say Orders by day of week from a
detailed dataview that has amount and Order date? I see that TeeChart
has a crosstab and a summary (although I don't know exactly what they
do) but they are not appearing in my runtime chart editor?
Alternatively how in DADE can I create a grouped dataview on day of
week ( calculated field of say DateName( weekday, orders.orderdate)
)?
Thanks,
Rick Matthews
Dartek Systems Inc.
This discussion has been closed.
Comments
1. To build a summary query that has Day of Week data, consult your database
docs and determine whether there is a SQL function that can do that.
2. ReportBuilder's support for data-aware TppDPTeeChart is datapipeline
based. Some of the series types are not supported. In general you can create
a data-aware series and each time it prints it will traverse the
datapipeline to which it is attached and create series data.
3. You can summary queries and you can use master/detail pipelines (i.e.
connect the series to the detail pipeline that is linked to the master.).
4. Other alternatives are to use the TppTeeChart and then write your own
code to fill in the series. Use a JITPipeline or Create a custom dataview.
--
Nard Moseley
Digital Metaphors Corporation
www.digital-metaphors.com
Best regards,
Nard Moseley
Digital Metaphors
www.digital-metaphors.com
too clear so just to make sure.... This is EUR using Dade.
1. I know the SQL function (I listed it) but I am unable to create a
grouped (summary) dataview on a calculated column. Is there in fact a
way to do this that I am missing?
2/4. If I can't group by a calculated column then I need to have
TeeChart summarize for me I think? I understand by your response that
this is not supported by the current TeeChart wrapper? Would you know
which of the Series DataSource types would be the one for me to look
into supporting?
Many thanks,
1. You can try typing in the SQL text to see whether the database you are
using will support it. The RB Query tools do not support it because
performing a Goup By on a calculated column is not permitted according to
the ANSI Standard SQL specification. And I think most database products do
not support it.
2. The ReportBuilder data-aware TeeChart simply traverses the datapipeline
and adds series points. Check out ppChrtDP.pas, the method
TppCustomDBChart.TraverseDataPipeline.
--
Nard Moseley
Digital Metaphors Corporation
www.digital-metaphors.com
Best regards,
Nard Moseley
Digital Metaphors
www.digital-metaphors.com
Sybase ASA allow grouping on calculated fields.
Cheers,
Thanks for that info - perhaps we need to investigate allowing this
capability. What is the syntax? Can you provide a simple example...
--
Nard Moseley
Digital Metaphors Corporation
www.digital-metaphors.com
Best regards,
Nard Moseley
Digital Metaphors
www.digital-metaphors.com
For SQL Server the syntax is what you would expect
select Left(name,2) , count(*)
from customer
group by Left(name,2)
order by Left(name,2)
There are restrictions, here is a small excerpt from the MS Online
Book:
Syntax
[ GROUP BY [ ALL ] group_by_expression [ ,...n ]
[ WITH { CUBE | ROLLUP } ]
]
Arguments
ALL
Includes all groups and result sets, even those that do not have any
rows that meet the search condition specified in the WHERE clause.
When ALL is specified, null values are returned for the summary
columns of groups that do not meet the search condition. You cannot
specify ALL with the CUBE or ROLLUP operators.
GROUP BY ALL is not supported in queries that access remote tables if
there is also a WHERE clause in the query.
group_by_expression
Is an expression on which grouping is performed. group_by_expression
is also known as a grouping column. group_by expression can be a
column or a nonaggregate expression that references a column. A column
alias that is defined in the select list cannot be used to specify a
grouping column.
Note Columns of type text, ntext, and image cannot be used in
group_by_expression.
Cheers,