Drill Down In classical report
Hi
i had done a classical report ,but now user wants in in drill down ,
My output now is
Planned Downtime
IDLE MACHINE TIME (DUE TO) 25.50 47.60 %
PREVENTATIVE MAINTENANCE 88.50 0.32 %
HOLIDAYS 288 1.05 %
Unplanned Downtime 0.00 0.00 %
SHIFT START-UP 0.00 0.00 %
PRODUCT TO PRODUCT CLEANING 0.00 0.00 %
BATCH TO BATCH CLEANING 0.00 0.00 %
Now he want a plus sign at planned and unplanned down time
when click on that pplus sign i should get details of that
similarly same for unplanned and rest and also Minus ..
Most importantly iam using sy-vline uline all in normal list to display.
Is it possible in classical report ..if yes then pls help me
out in this if possible with code.
Regards
Answers will be rewarded points.
Hi,
see this example.
REPORT ZRJNTRIAL_TREE LINE-COUNT 65
LINE-SIZE 80
NO STANDARD PAGE
HEADING.
DATA: BEGIN OF ITEMS OCCURS 100,
ID(10),
PARENT_ID(10),
TEXT(20),
SYMBOL,
END OF ITEMS,
TABIX_STACK LIKE SY-TABIX OCCURS 10 WITH HEADER LINE,
ITEMS_SHOW LIKE ITEMS OCCURS 100 WITH HEADER LINE.
INCLUDE <SYMBOL>.
append sample items (mixed order)
PERFORM APPEND_ITEM USING:
'1' '' 'Food',
'2' '' 'Drinks',
'12' '9' 'Jack Daniels',
'17' '11' 'Bosch',
'3' '' 'Tools',
'4' '1' 'Meat',
'16' '11' 'Metabo',
'5' '1' 'Chocolate',
'6' '2' 'Alcoholic',
'8' '4' 'Pork',
'10' '5' 'Milka',
'11' '3' 'Drills',
'13' '9' 'Jim Beam',
'7' '4' 'Beef',
'14' '2' 'Non-alcoholic',
'35' '31' 'Teran',
'9' '6' 'Whiskey',
'15' '14' 'Coca-cola',
'18' '6' 'Wine',
'28' '18' 'Croatia',
'33' '28' 'Slavonia',
'34' '28' 'Istria',
'29' '18' 'Hungary',
'30' '29' 'Tokaj',
'19' '33' 'Enjingi',
'20' '33' 'Zdjelarevic',
'22' '19' 'Riesling',
'23' '19' 'Chardonnay',
'24' '20' 'Riesling',
'32' '31' 'Malvazija',
'25' '20' 'Merlot',
'31' '34' 'Tomasevic'.
show initial list (items with level 0 - parentless items)
LOOP AT ITEMS WHERE PARENT_ID = ''.
MOVE-CORRESPONDING ITEMS TO ITEMS_SHOW.
ITEMS_SHOW-SYMBOL = '+'.
APPEND ITEMS_SHOW.
ENDLOOP.
PERFORM PRINT_TREE TABLES ITEMS_SHOW.
at line-selection - when the node is opened/closed or item double-clk
AT LINE-SELECTION.
READ TABLE ITEMS WITH KEY PARENT_ID = ITEMS_SHOW-ID. "see 'hide'
IF SY-SUBRC = 0. "item has children - expand or collapse
SY-LSIND = 0.
PERFORM EXPAND_COLLAPSE USING ITEMS_SHOW-ID.
PERFORM PRINT_TREE TABLES ITEMS_SHOW.
ELSE. "item has NO children - perform some action
READ TABLE ITEMS WITH KEY ID = ITEMS_SHOW-ID.
WRITE: 'Action performed on item "' NO-GAP, ITEMS-TEXT NO-GAP,
'", id.', ITEMS-ID.
ENDIF.
form print_tree
FORM PRINT_TREE TABLES ITEMS STRUCTURE ITEMS.
DATA: V_TABIX LIKE SY-TABIX,
START_TABIX LIKE SY-TABIX,
V_LEVEL LIKE SY-TFILL,
V_OFFSET TYPE I,
V_ID LIKE ITEMS-ID,
V_PARENT_ID LIKE ITEMS-PARENT_ID,
V_PARENT_ID_FOR_VLINE LIKE ITEMS-PARENT_ID,
V_PREV_LEVEL TYPE I,
V_ITEMS_COUNT LIKE SY-TFILL,
V_VLINES_STRING(200).
CHECK NOT ITEMS[] IS INITIAL.
SORT ITEMS BY PARENT_ID ID.
READ TABLE ITEMS INDEX 1.
V_PARENT_ID = ITEMS-PARENT_ID.
START_TABIX = 1.
REFRESH TABIX_STACK.
DO.
LOOP AT ITEMS FROM START_TABIX.
V_TABIX = START_TABIX = SY-TABIX."remember current index
V_ID = ITEMS-ID.
V_PARENT_ID_FOR_VLINE = ITEMS-PARENT_ID.
decrease level and exit loop if parent not the same as previous
IF ITEMS-PARENT_ID NE V_PARENT_ID.
PERFORM READ_FROM_STACK CHANGING START_TABIX. "level = NoOfRecs
READ TABLE ITEMS INDEX START_TABIX.
V_PARENT_ID = ITEMS-PARENT_ID.
ADD 1 TO START_TABIX. "next loop starts from parent index + 1
clear vline
IF V_LEVEL > 1.
V_OFFSET = 2 + ( V_LEVEL - 2 ) * 3.
IF V_LEVEL = 1. V_OFFSET = 1. ENDIF.
V_VLINES_STRING+V_OFFSET = ' '.
ENDIF.
EXIT.
ENDIF.
V_PARENT_ID = ITEMS-PARENT_ID.
write item
FORMAT COLOR OFF.
DESCRIBE TABLE TABIX_STACK LINES V_LEVEL."level is no of StackRecs
WRITE: / V_VLINES_STRING.
V_OFFSET = V_LEVEL * 3.
IF V_LEVEL NE 0.
IF V_PREV_LEVEL < V_LEVEL.
WRITE: AT V_OFFSET '|', / ''.
WRITE: / V_VLINES_STRING.
ENDIF.
V_OFFSET = V_LEVEL * 3.
WRITE AT V_OFFSET '|--'.
ENDIF.
V_OFFSET = V_OFFSET + 3.
CASE ITEMS-SYMBOL.
WHEN '+'.
WRITE AT V_OFFSET SYM_PLUS_FOLDER AS SYMBOL
COLOR 4 INTENSIFIED HOTSPOT.
WHEN '-'.
WRITE AT V_OFFSET SYM_MINUS_FOLDER AS SYMBOL
COLOR 4 INTENSIFIED HOTSPOT.
WHEN OTHERS. FORMAT COLOR 5.
ENDCASE.
WRITE: ITEMS-TEXT.
V_PREV_LEVEL = V_LEVEL.
HIDE: ITEMS-ID.
ADD 1 TO V_ITEMS_COUNT.
READ TABLE ITEMS WITH KEY PARENT_ID = ITEMS-ID.
increase level and exit loop if item has children
IF SY-SUBRC = 0.
START_TABIX = SY-TABIX.
APPEND V_TABIX TO TABIX_STACK. "level is no of recs in stack
V_PARENT_ID = ITEMS-PARENT_ID.
set vline
V_TABIX = V_TABIX + 1.
READ TABLE ITEMS INDEX V_TABIX.
V_OFFSET = 2 + ( V_LEVEL - 1 ) * 3.
IF V_LEVEL > 0.
IF ITEMS-PARENT_ID = V_PARENT_ID_FOR_VLINE AND SY-SUBRC = 0.
V_VLINES_STRING+V_OFFSET = '|'.
ELSE.
V_VLINES_STRING+V_OFFSET = ' '.
ENDIF.
ENDIF.
EXIT.
ENDIF.
at last - decrease level
AT LAST.
clear vline
IF V_LEVEL > 1.
V_OFFSET = 2 + ( V_LEVEL - 2 ) * 3.
IF V_LEVEL = 1. V_OFFSET = 1. ENDIF.
V_VLINES_STRING+V_OFFSET = ' '.
ENDIF.
" next loop starts from parent index, not parent index + 1
" because of different parents level will decrease anyway
PERFORM READ_FROM_STACK CHANGING START_TABIX.
APPEND START_TABIX TO TABIX_STACK. "must return index to stack
ENDAT.
ENDLOOP.
DESCRIBE TABLE ITEMS.
IF START_TABIX > SY-TFILL OR V_ITEMS_COUNT >= SY-TFILL.
EXIT.
ENDIF.
ENDDO.
ENDFORM.
form expand_collapse
FORM EXPAND_COLLAPSE USING VALUE(V_ID).
DATA: V_NO_MORE_ORPHANS,
ITEMS_TEMP LIKE ITEMS OCCURS 100 WITH HEADER LINE.
DELETE ITEMS_SHOW WHERE PARENT_ID = V_ID. "try to collapse
IF SY-SUBRC = 0. "succesfull first collapse
DO. "cascade collapse - delete 'orphans' that are left
REFRESH ITEMS_TEMP.
MOVE ITEMS_SHOW[] TO ITEMS_TEMP[].
SORT ITEMS_TEMP BY ID.
V_NO_MORE_ORPHANS = 'X'.
LOOP AT ITEMS_SHOW WHERE PARENT_ID NE ''.
READ TABLE ITEMS_TEMP WITH KEY ID = ITEMS_SHOW-PARENT_ID
BINARY SEARCH TRANSPORTING NO FIELDS.
IF SY-SUBRC NE 0. "no parent - it's an orphan
CLEAR V_NO_MORE_ORPHANS.
DELETE ITEMS_SHOW.
ENDIF.
ENDLOOP.
IF V_NO_MORE_ORPHANS = 'X'. EXIT. ENDIF.
ENDDO.
ITEMS_SHOW-SYMBOL = '+'.
MODIFY ITEMS_SHOW TRANSPORTING SYMBOL WHERE ID = V_ID.
ELSE. "unsuccessfull collapse - expand
ITEMS_SHOW-SYMBOL = '-'.
MODIFY ITEMS_SHOW TRANSPORTING SYMBOL WHERE ID = V_ID.
LOOP AT ITEMS WHERE PARENT_ID = V_ID. "show children
APPEND ITEMS TO ITEMS_SHOW.
ENDLOOP.
LOOP AT ITEMS_SHOW WHERE PARENT_ID = V_ID. "check grandchildren
READ TABLE ITEMS WITH KEY PARENT_ID = ITEMS_SHOW-ID.
IF SY-SUBRC = 0.
ITEMS_SHOW-SYMBOL = '+'.
ELSE.
ITEMS_SHOW-SYMBOL = ''.
ENDIF.
MODIFY ITEMS_SHOW.
ENDLOOP.
ENDIF.
ENDFORM.
form append_item
FORM APPEND_ITEM USING VALUE(ID) VALUE(PARENT_ID) VALUE(TEXT).
ITEMS-ID = ID.
ITEMS-PARENT_ID = PARENT_ID.
ITEMS-TEXT = TEXT.
APPEND ITEMS.
ENDFORM.
form read_from_stack
FORM READ_FROM_STACK CHANGING TABIX LIKE SY-TABIX.
DESCRIBE TABLE TABIX_STACK.
CHECK SY-TFILL NE 0.
READ TABLE TABIX_STACK INDEX SY-TFILL.
TABIX = TABIX_STACK.
DELETE TABIX_STACK INDEX SY-TFILL.
ENDFORM.
rgds,
bharat.
Similar Messages
-
Not able to drill down S_ALR_87013558 in reports
Hello Experts,
I am in strange situation where in I am not able to drill down my budget report S_ALR_87013558 in my development client. But it is working fine in production client.
What could be the reason.?
Please suggest.
Thanks,
Kumar SrinivasanHi Kumar,
Follow below steps in sequence.
1. Please execute CJE2.
2. Double Click on report 12KST1A. Message will come "You are changing an SAP delivery object". Press the tick mark.
3. On Output Type tab, you must have clicked on radio button "Graphical Report Output". Please change the radio button classical drilldown and check "Available on Selection Screen" at the buttom.
4. Save it.
Check your report again and you will have an option there.
Regards,
Amit -
How to setup the drill down on union report
Hi,
I'm setting the union report.
I want to set the drill down to another report.
But I can't setup it.
Would you please tell me how to setup.
Thank you.Hi Hemlatha
In Crystal Reports, to prevent the ability to drill down into a subreport when published on the Web, add a text object that is filled with blank spaces, created by pressing the 'Space Bar' and 'Enter' for line returns, to eclipse the subreport.
This workaround is applicable only to subreports that does not grow in size. For example, subreports that display only a chart or graph.
Steps to Add a Text Object over a Subreport
1. In the Crystal Reports Designer of the main report, insert a text object over the subreport.
2. Resize the text object to be the same size or a little larger than the subreport object on the main report.
3. Fill the text object with blank spaces created by pressing the 'Space Bar' and 'Enter'. This is necessary because resizing a text object without
the blank spaces will not maintain its size when it has been published on the Web.
====================
NOTE:
You can format the text object with a hyperlink to another report, another file or a URL.
====================
Now, when the Crystal report is previewed on the Web, the text object that fully eclipses the subreport will prevent the ability to drill down into it.
Regards
Girish -
Drill-down lost in Report Builder
Ever since the CFMX7.02 upgrade, we have lost the ability to
drill-down on the Report Builder reports which previously had
drill-down capability. I am referring to summary lines which
contained a link to the detail. Has anyone experienced this and is
there a fix for it?Do you choose PDF instead of flash paper as the output
format? By some reason, the drill-down function does not work in
flash paper format.
Good luck,
Daniel -
HOW TO ADD DRILL DOWN IN A REPORT
hi
well i want to add drill down in my report....
im unable to find it ....
can you please help me to make a drill down in my report.
thnx and regards
UMAR NAYAB.hey thnx toronto..
im able to make drill in my report....
now my chart is not changing its data according to drill.....
like my bar chart should also change with the data drilled down....
please help regarding this....
regards. -
Hi
Can we have drill down in XL Reporter -Report Organizer
Regards
FarheenHi Rekha,
We can user drill down in XL reporter composer and excel . IN rerport composer when you drag a field to the selection criteria then you can drill down by transaction level.
But Report organiser is where all the reports are saved and give a look and feel like windows explorer.
What is your requirement. Post reporting related queries in the reporting forum
[Reporting and Printing;
Regards,
Rakesh N -
PIE Chart Drill down in bex report
Hi Friends,
In my bex report i have pie chart for year 2008.
Shall I drill down on this report means if i click on one part of the pie chart will i go to another report or another pie chart.
Can any one pls tell me is it possible .
Thanks & Regards,
Ramnaresh.
Edited by: ramnaresh porana on Dec 1, 2008 6:35 AMHi ,
Thanks for reply.
how it is possible from context menu of the pie chart , i have seen the context menu of the pie chart but i did not get any related option for this one.
Can you pls guide me.
Thanks & Regards,
Ramnaresh. -
Hi,
Is there any way to display the drill down in webi report. For example:
YearQuarterMonth--Week.......
if the drill the Year option I can able to see all Quarter level measures and if I drill down further I can get into Month level measures and Week level and so on .
But my question is When I drill the Year to Quarter...I want it to display both Year and Quarter and If I drill down further
I want all the measures related to Year ,Quarter, Month and so on
Basically want I need is a tree level hierarchy......Could any one plz help me what all changes I need to make in order to get a detailed report.
Thanks
Sushma
Edited by: Sushma Reddy on Feb 9, 2010 9:44 PMHi,
Try to create a Class e.g Time in universe and objects to that class as year, quarter,month as
Year Object -> data type -> D/N
select To_date('sysdate','YYYY) as year from dual
Month object-> data type -> D/N
select to_date)'sysdate','MM') as month from dual;
Quarter -> data type -> D/N
case when @select(Time/Month) in (1,2,3) then q1
when @select(Time/Month) in (4,5,6) then q2
when @select(Time/Month) in (7,8,9) then q4
when @select(Time/Month) in (10,11,12) then q4
endcase
Then create a hierarch in tools -> hiearchy ->custom hierarchy and add the above class there then in any report (Deski/WebI)
you will get the above hierarchy and use it according to your requirement.
Cheers,
Suresh Aluri. -
Error Message appears when drilling down from a report.
Hi,
I am using CR XI R2.
I have an rpt file that displays a chart from a sub report.
I tested it on the CR designer and report viewer - works ok.
When I display this report in my .Net application, I get an error message when drilling down from this chart : "The Report Application Server failed"
When looking at the log files I see this error message:
4 19 13:11:14.770 5336 5564 (\servers\ras\dtsagent\reporthandler.cpp:11622): CReportHandler::buildReportViewerError: CSResultException thrown. ErrorSrc:"CRPE" FileName:"\servers\ras\dtsagent\reporthandler.cpp" LineNum:11618 ErrorCode:997 ErrorMsg:"" DetailedErrorMsg:""
This is a Viewer error - but when drilling down from the Report Viewer I don't get this exception.
Does anyone know what this mean?Too strange and my require a phone support case;
http://store.businessobjects.com/store/bobjamer/DisplayProductByTypePage&parentCategoryID=&categoryID=11522300
Three ideas:
1) Install CR designer on one of the boxes where this does not work and try to run the report there
2) Add a line to your code and save out the report just after your database logon once ( .saveAs). try to run this report in the CR designer.
3) Use the [modules|https://smpdl.sap-ag.de/~sapidp/012002523100006252802008E/modules.zip] utility to compare the runtime - both CR and db client between computers that work and those that do not.
Ludek -
Hi experts,
any can help me in this topic Drill-down into AWR reports.A typical AWR report - produced in html format- includes its main categories(for example Top 5 timed events) hyperlinked. By clicking on each one , you can navigate to a thorough analysis of all db parameters regarding it......
Anyway....Can you more specific of what exactly do you want...?????
Greetings...
Sim -
Drill down ( Collapsible Row ) Report in BEx query designer ?
Dear Friends!
I am supoosed to create a report drill down report for Purchasing History to be precise, I know that we can have drill down feature using heirarchy but is it possible for Us to have PO & PO item heirarachy ? or any other way to do drill down reporting in SAP BEx Query designer ?
like my current report is : -
| Vendor | Purchasing Organisation | Purchasing Group | Plant | PO Number | Item | Material / Service | Description | .... ( keyfigures) |
Now I am supposed to create a report in which
normal view
| Vendor | Purchasing Organisation | Purchasing Group | Plant | |> PO Number| .... ( keyfigures) | Payment |
drill down or collapsible view ( please consider the heading as data I am not talking about dynamically change of headings ).
| Vendor | Purchasing Organisation | Purchasing Group | Plant | V PO Number | Item | Material / Service | Description | .... ( keyfigures) |
is there anyway to design the report in above mention manner ? you any input will be appreciated greatly.
Thank you so much!
Regards
NaimHi Naim,
usually we don't do the transactional data as hierarchy. not sure the reason behind your requirement.
we can do one of the below :-
1. To have the default view as
| Vendor | Purchasing Organisation | Purchasing Group | Plant | | PO Number| .( keyfigures) | Payment |
and then user can drill down on rest of the characteristics for detailed view later on.
2. or if they don't want to drill down on characteristics;-
we can build 2 reports , one for header level information and then jump to second query for detailed information(item level) using RRI.
first query:
| Vendor | Purchasing Organisation | Purchasing Group | Plant | | PO Number| .( keyfigures) | Payment |
second query:
| Vendor | Purchasing Organisation | Purchasing Group | Plant | PO Number | Item | Material / Service | Description | .... ( keyfigures) |
Let us know if this works out?
Regards,
Sakthi. -
Issue to drill down from a report
Hi,
Our requirement is we need to show three different graphs in a single report representing different data, from that we need to drill down to a new different report ;
Two approaches we tried with crystal report are;
1. We put three graphs and the table in the single report and tried to implement drill down for each graph. We could group data on the basis of first pie chart data and could drill down. But while we tried to group data for second bar chart grouping is happening only as a sub group of first group. Ie, we cannot group data independently for different charts.
2. In the second approach we created different 3 sub reports and added in to a main report. But Crystal report is not supporting sub report to a sub report. Ie, we cannot go to drill down report.
It would be a great help, if you could suggest some solution.
Thanks,
JomyHi,
As per my understanding, you have one report say Parent1 (SA1) and one Report say Child1 (SA2), now you want to pass some values from parent1 to child1.
1> Create 1 interim report from parent1.
2> In your Child report in filter part use result based on another analysis.
Please let me know if it resolves yourissues.
Thanks
Anirban -
Issue with drill down in Financial Reporting 11.1.2.2
Hi All,
I have a requirement like this :
I have different dimensions for Year and Period(Period has half years and also quarters ).
The requirement is like that when the report opens up the rport should look like this:
YearTotal
FY12 FY13
Accounts
Now the user wants to drill down on YearTotal and it should show in the following way:
H1 H2
FY12 FY13 FY12 FY13
Accounts
and so on.
Still now whatever I have tried I am unable to acheive this . Any ideas whther this is acheivable or not ????
Regards,
SauravEven without drill(allow expansion) you can only achieve that only by using merge option.
With merge the drill will not work.
It'll not be a pretty report.
Regards
Celvin
http://www.orahyplabs.com -
How to go to a particular object in drill down detail pdf report?
In drill down html reports I could directly go to a particular object in the detail report from the summary report by using hyperlink destination property in the detail report and hyperlink property in the summary report.
How can I do the same thing in drill down pdf reports? The summary pdf report is opened first and then clicking on any of the object in summary pdf report should direct me to the same object in detail report.
Thanks for your help.
-JayshreeUnfortunately PDF doesn't support this concept. You could ensure that the detail report has bookmarks, then the user can easily see the different sections of the report.
Hope this helps,
Danny -
Drill down hide/show report on same page
Hi,
Is it possible to create a drill down report where instead of linking to new pages, the details can be displayed using hide/show buttons on the relevant columns? For example, if you have the following fields:
Region
Country
Division
Account
Order
Product ID
Product Price
Would it be possible to ,by default, have the report only show distinct regions. By clicking an expand button on a particular region, it's countries are displayed. By clicking an expand button on a country, its divisions are displayed,etc., eventually being able to drill down to order details.
This seems similar to a tree to me, although I have not used trees before. However, from the way I understand the structure of hierarchy in trees, the way this data is structured it would not be possible through a tree.
Any ideas? If not I can just settle on a standard drill down report with links to new pages, but if the above is possible it would work much better for my users.
ThanksFJW,
Yes, it's possible. We typically refer people to this demo from Carl to get an idea of how it can be accomplished:
http://htmldb.oracle.com/pls/otn/f?p=11933:13
Regards,
Dan
http://danielmcghan.us
http://sourceforge.net/projects/tapigen
Maybe you are looking for
-
Extended Withholding Tax - Localization Brazil - Withholding Customer
We have the Withholding Tax on receipt of customers. The register settings in the client is correct. We are having problems in receiving compensation therefore is not accounting the Withholding Tax , but was attributed to the accounting codes and cat
-
Recently I installed iTunes on my computer so that I could put music on my new iPad and it was fine, the next day when I went to put some more on it it asked me to download the newest version of iTunes and I did but since then I have been having trou
-
Restoring ios 6.0.1 backup to ios 6.1
So i have a backup saved of my iphone 4 which was running 6.0.1 before selling the phone. I am now going to get a 4S very soon and if it is running ios 6.1 will I be able to restore the backup? If not, is there a workaround? Thanks!
-
Have to update a site with aspx extensions
I have been put in a position to have to update a site that, from what I see on the Internet, has all aspx extensions. I have no experience in aspx and hope I can get by enough to update a few pages until the site is re-done. I have CS4 running on XP
-
Trying to import NEF files from a Nikon D3s but only get error messages in LR 2.5. JPEG works fine. Any way around the problem or do I have to wait for a upgrade? Michael Fränneby