473,396 Members | 1,827 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Creating Crosstab with drilldown

I have to create a report with drill down and I can only think of
crosstab
report to achieve this task. However 2 things I am lacking, first is I
dont know how to enable drill-down on cross tab and secondly how to get
the report look like below...

This is how I would like to see the output...

Date China Brazil USA
Jan 58,999.00 61,258.00 71,244.00
Jan 76,078.67

--------------------------------------------------------------

And then upon drilling into USA...

Date NY CA
Jan 71,244.00
Feb 76,078.67

-------------------------------------------------
This is how the table structure looks

Date Country Region City Amount
Jan China Hong Kong Christchurch $58,999.00
Jan Brazil Rio Rio Grande $61,258.00
Jan USA NY Buffalo $71,244.00
Jan USA CA Los Angeles $76,078.67

How can I create a report like this one with drill-down so I can
drilldown all the way till City. I would really appreciate if anyone
could help me out in this. I was thinking of crosstab but if anyone
have a better solution I am open to suggestions.
Thank you for your help.

- Nabil

Nov 12 '05 #1
4 5203
In article <11**********************@l41g2000cwc.googlegroups .com>,
Nabil (ns******@gmail.com) says...

How can I create a report like this one with drill-down so I can
drilldown all the way till City. I would really appreciate if anyone
could help me out in this. I was thinking of crosstab but if anyone
have a better solution I am open to suggestions.
Thank you for your help.

- Nabil


In the DB2 Cookbook from Graeme Birchall you can find some examples.
You can find it at:
http://ourworld.compuserve.com/homep...l/HTM_COOK.HTM

Check the grouping set examples at page 191.

Kind regards, Gert
Nov 12 '05 #2
Thank you.

Gert van der Kooij wrote:
In article <11**********************@l41g2000cwc.googlegroups .com>,
Nabil (ns******@gmail.com) says...

How can I create a report like this one with drill-down so I can
drilldown all the way till City. I would really appreciate if anyone could help me out in this. I was thinking of crosstab but if anyone
have a better solution I am open to suggestions.
Thank you for your help.

- Nabil


In the DB2 Cookbook from Graeme Birchall you can find some examples.
You can find it at:
http://ourworld.compuserve.com/homep...l/HTM_COOK.HTM

Check the grouping set examples at page 191.

Kind regards, Gert


Nov 12 '05 #3
Try this:

select date, sum(ch_amt), sum(br_amt), sum(us_amt)
from (
select
date,
case when country = 'China' then amount else 0 end ch_amt,
case when country = 'Brazil' then amount else 0 end br_amt,
case when country = 'USA' then amount else 0 end us_amt
from <your_tbl_nm>
) tmp
Nov 12 '05 #4
Thank you very much. This really helps. I did however figure out a way
to get around with drilldown in crosstab with the use of hyperlinks.

Nov 12 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Darleen | last post by:
I am seeking conceptual here on how to get started with a "3D Matrix" in Access. We run a training center which holds multiple classes in multiple cities at multiple times. So I need to create a...
1
by: Nathan Bloomfield | last post by:
Does anyone know if there is any documentation which relates to Access2k + ? or can anyone help adjust the code? I am having trouble converting the DAO references. TITLE :INF: How to...
4
by: Judy | last post by:
I'm using Access 2003 and was wondering if it is possible to have a paramater selection within a crosstab query so that I wouldn't need to build a new table. I have a select query that I'm using...
1
by: kelvinweb | last post by:
Hi All, I try to read different sample codes for drilldown function. But I don't understand what does it say. I don't know how to using (Nested, Hierarchical) data control to display data. Do...
0
by: Rahul Patel | last post by:
i had create one report with subreport and section with drilldown. the subreport is display on user click event i.e on demand subreport. now while i can the subreport in crystal viewer but while...
0
by: Li Pang | last post by:
Hi, I made a main report, and I want to drilldown a field in the report to get a subreport in the runtime. Anybody has sample codes or links on such topic? Thanks in advance
4
by: tshad | last post by:
I am trying to set up an Image authorization where you type in the value that is in a picture to log on to our site. I found a program that is supposed to do it, but it doesn't seem to work. ...
2
by: Sol | last post by:
If I have data in the following format in a database LE Amount BS Class 1 10 Asset 1 15 Liability 1 20 Asset 1 12 Liability 2 ...
22
kcdoell
by: kcdoell | last post by:
I have been trying for the last several days to create a query that will give me all of the values I need to create a report. Background: The report is different than anything I have done but...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.