LineChart - Style line in the chart
Hello,
I am trying to style the line in a LineChart. I would like to turn off the shadow behind the line, change line color, and change thickness of the line. Is it possible to change it somehow?
Thanks, Gabor
Look in caspian.css (you can extract it from jfxrt.jar) and you will find this style. It would be easiest to copy this into your own .css file and then add that as a stylesheet to the Scene.
.chart-series-line {
-fx-stroke: #f9d900;
-fx-stroke-width: 4px;
-fx-effect: dropshadow( two-pass-box , rgba(0,0,0,0.3) , 8, 0.0 , 0 , 3 );
}
Similar Messages
-
Benchmarking line in the chart
Hi
I have created one VC model for comparitive analysis of feedack of the training program. Based on this i want some benchmark so that i can compare this with others. To do this i want to show some benchmarking line in my chart. How do i do this?
Thanks in advance
Deepdas
Edited by: Deepdas on Nov 6, 2009 4:16 PMHi
There is another way also of doing same thing -
1. First select 'Grid Lines' as Horizontal in the chart.
2. Then set value range manual & give min & max values.
3. Adjust interval size so as your 'Benchmark value' will come as one of the intervals.
Earlier what i explained is visible only if there are more than 1 values on category axis for a given field.
Regards
Sandeep -
WAD - display only the last value in the chart
hi...
I designed a chart in WAD wich displayed a range of values in a line. Now im searching for a possibility to display the value for the points in my chart, but not for all values, only for the last value in the line! And every month the line will extended with new value-points, so it is necassary that the function is dynamic, always for the last point in the chart the value should displayed!?
thx for some ideas!
davidhi @ all... once more information:
the chart displayed only one keyfigure of a query. for example it display the revenue per month. in jan. = 10, feb. = 15, mar. = 25, apr. = 13, jun. = 23. these values should be displayed in a line in the chart aaaand additional for the last one in the line the valuecaption direct in the chart (f.e.: jun. = 23). not for all "periods-points"only for the last one.
in jul. = 25 the chart changed and only for july the value-caption should be displayed. Is it possible?
Regards,
David -
Need help in Line bar combo chart - line is not prominent in dashboard
Hi All,
I face an issue where the line in a line bar combo chart is not prominent in Dashbords.
lets say i have 5 reports (all of them are line bar combo charts) in a dashboard. The lines in graph are not prominent or not displayed in usual thickness. But this scenario does not happen always. if i scroll down or up the browser(here i am using IE8) some of the reports displays line in the charts and some does not display the line. when i click on the report then the line will be displayed.
please suggest whether this is a browser issue ror something to deal with OBIEE itself.
Thanks in advance.Hi,
It's a bug in obiee11g. kindly download the patch file from My Oracle Support and delpoye it
OBIEE 11g: Line Bar Combo , With Stacked Chart , The Bar Width Gets Affected [ID 1369493.1]
Patch 12947990: BAR CHANGES WIDTH WHEN CHART CHANGED FROM DEFAULT LINE-BAR TO STACKED LINE-BAR
Symptoms
When the chart type is changed from Standard or Default line-bar to Stacked line-bar chart, the bars are reducing their width.
Line-bar should keep the width of the previous bars.
However, when vertical Bar is changed to stacked vertical, the bar width remains the
same. But when a regular Line-Bar is changed to stacked vertical, the width
changes (reduces, in this case it becomes half the original width)
Cause
For dual Y stacked bar graph, the bar width was half of the regular bar width
because the series assigned to Y2 was given the half of the space also. This is not needed if the marker type for Y2 is not bar.
The following bugs have been opened to handle this issue
Reference Bug:
Bug 12931660 - line bar combo with stacked chart changes its width
BUG:12931660 - LINE BAR COMBO WITH STACKED CHART CHANGES ITS WIDTH
BUG:12947990 - BAR CHANGES WIDTH WHEN CHART CHANGED FROM DEFAULT LINE-BAR TO STACKED LINE-BAR
Patch 12947990: BAR CHANGES WIDTH WHEN CHART CHANGED FROM DEFAULT LINE-BAR TO STACKED LINE-BAR
Bug Ref:
e.x: applying patch file refer the below file
http://obieeelegant.blogspot.com/2011/11/how-to-apply-patches-using-opatch.html
Thanks
Deva -
Is it possible to display fixed lines in the candlestick chart ?
Hi,
I have a nice candlestick flash chart using AnyChart integration kit.
I would like to display 3 lines in this chart, they are as follow and they return one value each :
SELECT SEUIL_HAUT FROM SITE_ECHELLE WHERE SITE = :p184_ename
SELECT SEUIL_BAS FROM SITE_ECHELLE WHERE SITE = :p184_ename
SELECT SEUIL_ALERTE FROM SITE_ECHELLE WHERE SITE = :p184_ename
You know these line represents limits.
I tried to add these values in the request below but nothing would appear. Do you have an idea how I could display these fixed lines ?
DECLARE
X VARCHAR2 (4000);
BEGIN
x := 'With S1 as (
SELECT DATE1, round(avg(VALEUR),2) OPEN, NVL(ROUND(MAX(Valeur),2), 0) HIGH,
NVL(ROUND(MIN(Valeur),2), 0) LOW,
NVL(ROUND(AVG(Valeur),2), 0) CLOSE
FROM EVV_'||:P184_ENAME||'
WHERE DATE1 BETWEEN
TO_DATE('''||:P8_DATE_DEBUT||'000000'', ''DD/MM/YYYYHH24MISS'') AND
TO_DATE('''||:P8_DATE_FIN||'235959'', ''DD/MM/YYYYHH24MISS'') AND
CLEF_VAR = (SELECT CLEF_VAR FROM SITE_ECHELLE WHERE
SITE = '''||:P184_ENAME||''')
group by date1)
Select NULL LINK,
to_char(n, ''DD/MM/YY HH24:MI''),
NVL(ROUND(AVG(OPEN),2), 0) OPEN,
nvl(round(max(HIGH),2), 0) HIGH,
nvl(round(min(LOW),2), 0) LOW,
NVL(ROUND(AVG(CLOSE),2), 0) CLOSE
FROM (select to_date('''||:P8_DATE_DEBUT||''',''DD/MM/YYYY'') + (level-1)/
TO_NUMBER('''||:P8_ECHELLE||''') n
from dual connect by level <=
(select (to_date('''||:P8_DATE_FIN||''',''DD/MM/YYYY'')+ 1 - to_date('''||:P8_DATE_DEBUT||''',''DD/MM/YYYY'')) * TO_NUMBER('''||:P8_ECHELLE||''')
from dual
)) days
LEFT JOIN s1 ON days.n = trunc(date1,'''||:P8_TRUNC||''')
GROUP BY n
order by n';
RETURN (X);
END;Thank you for your kind help.
ChristianHello, Jacky, thanks a lot for your answer.
This is not exactly what I was thinking about:
I want that the planners can be informed in the BPS planning layout about about e.g. the date when material is available again.
There should be a text saying: "Material xyz is not available until Oct 1st, 2008"
Additionally, the user should have the opportunity to give comments on their planning data.
Any idea?
Thanks and best regards
Gerd -
CR 9 - Need HELP Setting Line Graph colors in the Chart Expert
Post Author: desselle
CA Forum: Charts and Graphs
Hello,
I created a Crystal Report (CR) based off an existing Trend Analysis report. I have created a VB6 application that calls the .RPT file I created for the report in CR. The VB6 app sets the report recordset via code that corresponds to the .TTX file, and the parameters . The report contains a Line graph that plots five pieces of data. The report & graph work good. The Problem: CR determines the color of each line on the graph. However, I need to set the color for each line to correspond to the colors used on our existing reports. The users are accustom to a certain color representing a certain set of data on the existing reports. I have tried everything I can think of and from all documentation I can find, and nothing changes the line colors. I have tried all of the following:
1.) From the Chart Expert, Option tab, I click the Format button next to Color and setup conditional color settings per each piece of data. However, when I run the report these conditional color settings are not reflected on the CR graph. I am using formula fields (based off database fields in the recordset) to produce the report. However, I only see the database fields to use in the conditional color formatting screen and not the formula fields. I thought this would possibly be the cause why the colors wonu2019t change on the CR, but I canu2019t find a way to make the formula fields show up in the list.
2.)Also, I tried right clicking the individual lines of the graph and change the selected item color, but this didnu2019t change the color either. I do this in Design mode and Preview mode and neither one changes the color of the lines on the graph.
3.)I have also looked into the CR object model to see if I can change the line colors of the graph via code and it doesn't look like I am given this flexibility.
Do you know what I am doing wrong here? I just want to be able to set the color of each line on the CR graph to the color I want instead of using the default colors. Are there some Hot Fixes that I need to apply to my copy of CR?
ThanksPost Author: desselle
CA Forum: Charts and Graphs
Hello,
I got the problem fixed w/ the line graph not making the data lines the same color on the report as on the frmPlot graph. Compare the two screen shots below. The problem was as follows: When I created the graph (in the Chart Expert) the field u201CReadingDateu201D was not one of the Report Fields, and all the other fields were Report Fields (Reading, LowAlarm, UpperAlarm, LowerLimit, & UpperLimit). See the 3rd screen shot below. ReadingDate does show up as a Report Field now but it wasnu2019t at first. Originally, this field was only available in the Chart Expert as a recordset field. When I changed this field to be a Report Field, the graph then allowed me to change the data series line colors. This was not obvious at all. From the beginning when I setup the graph and passed in the recordset from VB it graphed all of the data series fine. The colors that the Chart Expert chose for each line just didnu2019t match what was on the frmPlot graph. Anyway, it is working now. I can at least say I learned (somethingu2019s to-do and somethingu2019s not to-do) a good bit about Crystal Reports in the process.
Thanks -
CR XI - Problem Setting Line Graph colors in the Chart Expert
Post Author: desselle
CA Forum: Charts and Graphs
Hello,
I created a Crystal Report (CR) of an existing Trend Analysis report. I have created a VB6 application that calls the .RPT file I created for the report in CR. The VB6 app sets the report recordset via code that corrsponds to the .TTX file, and the parameters . The report contains a Line graph that plots five pieces of data. The report & graph work good. CR determines the color of each line on the graph. However, I need to set the color for each line to correspond to the colors used on our existing reports. The users are accustom to a certain color representing a certain set of data on the existing reports. I have tried everything I can think of and from all documentation I can find, and nothing changes the line colors. I have tried all of the following:
1.) From the Chart Expert, Option tab, I click the Format button next to Color and setup conditional color settings per each piece of data. However, when I run the report these conditional color settings are not reflected on the CR graph. I am using formula fields (based off database fields in the recordset) to produce the report. However, I only see the database fields to use in the conditional color formatting screen and not the formula fields. I thought this would possibly be the cause why the colors wonu2019t change on the CR, but I canu2019t find a way to make the formula fields show up in the list.
2.)Also, I tried right clicking the individual lines of the graph and change the selected item color, but this didnu2019t change the color either. I do this in Design mode and Preview mode and neither one changes the color of the lines on the graph.
3.)I have also looked into the CR object model to see if I can change the line colors of the graph via code and it doesn't look like I am given this flexibility.
Do you know what I am doing wrong here? I just want to be able to set the color of each line on the CR graph to the color I want instead of using the default colors.
Thanks,StevePost Author: desselle
CA Forum: Charts and Graphs
Hello,
I got the problem fixed w/ the line graph not making the data lines the same color on the report as on the frmPlot graph. Compare the two screen shots below. The problem was as follows: When I created the graph (in the Chart Expert) the field u201CReadingDateu201D was not one of the Report Fields, and all the other fields were Report Fields (Reading, LowAlarm, UpperAlarm, LowerLimit, & UpperLimit). See the 3rd screen shot below. ReadingDate does show up as a Report Field now but it wasnu2019t at first. Originally, this field was only available in the Chart Expert as a recordset field. When I changed this field to be a Report Field, the graph then allowed me to change the data series line colors. This was not obvious at all. From the beginning when I setup the graph and passed in the recordset from VB it graphed all of the data series fine. The colors that the Chart Expert chose for each line just didnu2019t match what was on the frmPlot graph. Anyway, it is working now. I can at least say I learned (somethingu2019s to-do and somethingu2019s not to-do) a good bit about Crystal Reports in the process.
Thanks -
I need in more lines of the Index some words in Bold text and some others in Kursiv text. How can i get it? It seems to me that either I can edit a Style only in Bold Text or in Kursiv Text
I make you an example to clear what I really need:
Index
Introduction
I. Leonardo's Monnalisa
II. Leonardo's Battaglia
Bibliography
Please HELP HELP HELPWhat version of Pages are you referring to?
Basically if you are talking about the Table of Contents in Pages and want to have different character styles within paragraphs in the T.O.C. you will have to export the T.O.C. and bring it back in as text and change that.
Peter -
Don't want to displya the connecor line in the Stacked charts in CR2008
Hi,
I have a requirement to display one of the measure as a connected line with data makers(Rectangle) for each month on the top of the graph for the future 12 months in the Stacked bar charts graph in Crystal Reports 2008.
Now the user is asking if there is no data in any one of the months then the connected line should not be displayed in the graph.
1) i have tried formatting the conneced line alone by right clicking on the connected line in design mode.but i couldn't arrive at the appropriate solution for this.
Is there any work around or solution not to dispaly the connected line at all.. i mean only to display the Data markers on the top of the graph and not the connected line between the data makers.
urgent solution would help me.
Regards,
Nanda Kishore.Hi,
yup.. the base is the stacked bar chart and i can show as many as lines on top of it..currently i have only one.
So is that mandatory to create a line chart if i want a line on the stacked bars in CR2008.
Can u explain me if i have to go with line chart on top of the stacked bars to get the solution for this?
Regards,
Nanda Kishore. -
iO7 in good, but the fine lines of the characters are a nuisance. Is there a way to convince Apple to offer a thicker letter type for aging persons with limited vision?
I turned on Bold Text - the phone will restart itself, that's normal - and it is now MUCH easier on my eyes.
Give it a try. -
Charts: Gap between Vertical Axis and the chart area
Friends,
I have a really wierd issue and I am sure I am doing
something wrong.
I am trying to align 2 charts that are placed vertically. I
want to align the left vertical axis and the gridlines within them.
Aligning the left vertical axis is easy and done but aligning the
grids is becoming challenging and I have already spent a few hours
on this problem.
Here is a wrong chart image ...
Wrong
chart image
The line of the LineChart (in the top chart) is touching the
left and right edges where as the bottom chart bars do not touch
the left/right edges. Due to this the gridlines are not aligned.
I had managed to solve this problem but I am not sure what
part of the code solved the problem. Here is the right chart image:
Right
chart image
In this chart, the line of the linechart (in the top chart)
is not touching the left and right boundary hence the gridlines are
alignd with each other.
I wonder what property of the chart controls the series
touching the left/right vertical axis or boundary. Your help is
appreciated.
Thankshere is some more information ...
I started changing some of the properties of the chart which
I mentioned is a RIGHT CHART and this is what I learnt ...
It was a CartesianChart hence it was creating the gap
between the left/right vertical axis and the actual chart area
(refer to the right chart image).
I changed it to a LineChart and it started behaving like the
chart in the WRONG CHART image.
Is there a solution to this problem? -
Modify the Chart Display colors
Hi,
Is there a way to change the coloring of charts in VC?
I tried to edit the GML file and change the "series" attribute of the chart element. I need to display the line in red color. I am using a combo chart of column+lines.
When I edited the code, i realised that its not letting me skip the inbetween dataseries colors. And a closer shade of red in the dataseries by default comes as series 7.
Is there a workaround for this?
Ashwini.Hi Ashvini,
The colors that are automatically assigned to your application by Visual Composer should suffice; however, if your application requires that specific colors be assigned to elements, you can implement this by modifying the CSS files that are used by the Flash runtime.
1.Go to the following directory on the J2EE server:
...\usr\sap\...\...\j2ee\cluster\server0\apps\sap.com\vc_client\servlet_jsp\VCRes\root\webContent\VisualComposer\6.00\bin.
2.Within the directory, you'll see the following two files: 15595730 and 1808630. You should always make a backup of the files before continuing. Within the files, there are DefaultFlexFrameStyle tag properties. By changing their values, you can assign colors according to our needs.
3.The following example regarding this issue is from the official SAP Note 959996. It changes the text input control background color:
DefaultFlexFrameStyle.TextInput =
{'corner-radius': 2,
'margin-left': 5,
'drop-shadow': false,
'border-style': 'solid',
'font-weight': 'normal',
'background-color': '#FFFFFF',
'border-color': '#84898D',
'disabled-color': '#999999'}
4.You have to back up the new files, because any subsequent Visual Composer patches or upgrades will overwrite the modified files.
5.Before redeploying the backups after an update, you must ensure that there is no change to the set of tag properties in the updated files. In general, we recommend that you copy the changes into the new files instead of overwriting them.
Regards,
Vinoth.M -
How to get the multiple lines on the header part in ALV
HI all,
In my program i am using the ALV- Grid functionality through methods. I have 2 different layouts in the same screen , for this i have 2 containers and i am displaying the title through the gird title now i need to add the few more lines under the title .
Please suggest me, how can i proceede now.
Thanks
GiridharHi,
check this sample code, i did it using splitter container. check it, it is weel documented to know what are required ....
REPORT ZTEST_ALV_TOP MESSAGE-ID ZZ .
DATA: G_GRID TYPE REF TO CL_GUI_ALV_GRID.
DATA: L_VALID TYPE C,
V_FLAG,
V_DATA_CHANGE,
V_ROW TYPE LVC_S_ROW,
V_COLUMN TYPE LVC_S_COL,
V_ROW_NUM TYPE LVC_S_ROID.
DATA: IT_ROW_NO TYPE LVC_T_ROID,
X_ROW_NO TYPE LVC_S_ROID.
DATA:BEGIN OF ITAB OCCURS 0,
VBELN LIKE LIKP-VBELN,
POSNR LIKE LIPS-POSNR,
CELLCOLOR TYPE LVC_T_SCOL, "required for color
DROP(10),
END OF ITAB.
"The Below Definitions Must.....
DATA:
* Reference to document
DG_DYNDOC_ID TYPE REF TO CL_DD_DOCUMENT,
* Reference to split container
DG_SPLITTER TYPE REF TO CL_GUI_SPLITTER_CONTAINER,
* Reference to grid container
DG_PARENT_GRID TYPE REF TO CL_GUI_CONTAINER,
* Reference to html container
DG_HTML_CNTRL TYPE REF TO CL_GUI_HTML_VIEWER,
* Reference to html container
DG_PARENT_HTML TYPE REF TO CL_GUI_CONTAINER.
"up to here
* CLASS lcl_event_handler DEFINITION
CLASS LCL_EVENT_HANDLER DEFINITION .
PUBLIC SECTION .
METHODS:
**Hot spot Handler
HANDLE_HOTSPOT_CLICK FOR EVENT HOTSPOT_CLICK OF CL_GUI_ALV_GRID
IMPORTING E_ROW_ID E_COLUMN_ID ES_ROW_NO,
**Double Click Handler
HANDLE_DOUBLE_CLICK FOR EVENT DOUBLE_CLICK OF CL_GUI_ALV_GRID
IMPORTING E_ROW E_COLUMN ES_ROW_NO,
TOP_OF_PAGE FOR EVENT TOP_OF_PAGE "event handler
OF CL_GUI_ALV_GRID
IMPORTING E_DYNDOC_ID.
* END_OF_LIST FOR EVENT end_of_list "event handler
* OF CL_GUI_ALV_GRID
* IMPORTING E_DYNDOC_ID.
ENDCLASS. "lcl_event_handler DEFINITION
* CLASS lcl_event_handler IMPLEMENTATION
CLASS LCL_EVENT_HANDLER IMPLEMENTATION.
*Handle Hotspot Click
METHOD HANDLE_HOTSPOT_CLICK .
CLEAR: V_ROW,V_COLUMN,V_ROW_NUM.
V_ROW = E_ROW_ID.
V_COLUMN = E_COLUMN_ID.
V_ROW_NUM = ES_ROW_NO.
* MESSAGE I000 WITH V_ROW 'clicked'.
CLEAR IT_ROW_NO[].
X_ROW_NO-ROW_ID = V_ROW.
APPEND X_ROW_NO TO IT_ROW_NO .
CALL METHOD G_GRID->SET_SELECTED_ROWS
EXPORTING
IT_ROW_NO = IT_ROW_NO.
ENDMETHOD. "lcl_event_handler
*Handle Double Click
METHOD HANDLE_DOUBLE_CLICK.
CLEAR: V_ROW,V_COLUMN,V_ROW_NUM.
V_ROW = E_ROW.
V_COLUMN = E_COLUMN.
V_ROW_NUM = ES_ROW_NO.
IF E_COLUMN = 'VBELN'.
SET PARAMETER ID 'VL' FIELD ITAB-VBELN.
CALL TRANSACTION 'VL03N' AND SKIP FIRST SCREEN.
ENDIF.
IF E_COLUMN = 'POSNR'.
SET PARAMETER ID 'VL' FIELD ITAB-VBELN.
CALL TRANSACTION 'VL03N' AND SKIP FIRST SCREEN."
ENDIF.
ENDMETHOD. "handle_double_click
* METHOD END_OF_LIST. "implementation
** Top-of-page event
* PERFORM EVENT_TOP_OF_PAGE USING DG_DYNDOC_ID.
* ENDMETHOD. "top_of_page
METHOD TOP_OF_PAGE. "implementation
* Top-of-page event
PERFORM EVENT_TOP_OF_PAGE USING DG_DYNDOC_ID.
ENDMETHOD. "top_of_page
ENDCLASS. "LCL_EVENT_HANDLER IMPLEMENTATION
*& Global Definitions
DATA: G_CUSTOM_CONTAINER TYPE REF TO CL_GUI_CUSTOM_CONTAINER,"Container1
G_HANDLER TYPE REF TO LCL_EVENT_HANDLER. "handler
DATA: OK_CODE LIKE SY-UCOMM,
SAVE_OK LIKE SY-UCOMM,
G_CONTAINER1 TYPE SCRFNAME VALUE 'TEST',
GS_LAYOUT TYPE LVC_S_LAYO.
data: v_lines type i.
data: v_line(3) type c.
*- Fieldcatalog for First and second Report
DATA: IT_FIELDCAT TYPE LVC_T_FCAT,
X_FIELDCAT TYPE LVC_S_FCAT,
LS_VARI TYPE DISVARIANT.
* START-OF_SELECTION
START-OF-SELECTION.
SELECT VBELN
POSNR
FROM LIPS
UP TO 20 ROWS
INTO CORRESPONDING FIELDS OF TABLE ITAB.
describe table itab lines v_lines.
END-OF-SELECTION.
IF NOT ITAB[] IS INITIAL.
CALL SCREEN 100.
ELSE.
MESSAGE I002 WITH 'NO DATA FOR THE SELECTION'(004).
ENDIF.
*& Form CREATE_AND_INIT_ALV
* text
FORM CREATE_AND_INIT_ALV .
DATA: LT_EXCLUDE TYPE UI_FUNCTIONS.
"attention.....from here
"split your container here...into two parts
"create the container
CREATE OBJECT G_CUSTOM_CONTAINER
EXPORTING CONTAINER_NAME = G_CONTAINER1.
"this is for top of page
* Create TOP-Document
CREATE OBJECT DG_DYNDOC_ID
EXPORTING STYLE = 'ALV_GRID'.
* Create Splitter for custom_container
CREATE OBJECT DG_SPLITTER
EXPORTING PARENT = G_CUSTOM_CONTAINER
ROWS = 2
COLUMNS = 1.
* Split the custom_container to two containers and move the reference
* to receiving containers g_parent_html and g_parent_grid
"i am allocating the space for grid and top of page
CALL METHOD DG_SPLITTER->GET_CONTAINER
EXPORTING
ROW = 1
COLUMN = 1
RECEIVING
CONTAINER = DG_PARENT_HTML.
CALL METHOD DG_SPLITTER->GET_CONTAINER
EXPORTING
ROW = 2
COLUMN = 1
RECEIVING
CONTAINER = DG_PARENT_GRID.
* CALL METHOD DG_SPLITTER->GET_CONTAINER
* EXPORTING
* ROW = 2
* COLUMN = 1
* RECEIVING
* CONTAINER = DG_PARENT_HTML.
* CALL METHOD DG_SPLITTER->GET_CONTAINER
* EXPORTING
* ROW = 1
* COLUMN = 1
* RECEIVING
* CONTAINER = DG_PARENT_GRID.
"you can set the height of it
* Set height for g_parent_html
CALL METHOD DG_SPLITTER->SET_ROW_HEIGHT
EXPORTING
ID = 1
HEIGHT = 5.
"from here as usual..you need to specify parent as splitter part
"which we alloted for grid
CREATE OBJECT G_GRID
EXPORTING I_PARENT = DG_PARENT_GRID.
* Set a titlebar for the grid control
CLEAR GS_LAYOUT.
GS_LAYOUT-GRID_TITLE = TEXT-003.
GS_LAYOUT-ZEBRA = SPACE.
GS_LAYOUT-CWIDTH_OPT = 'X'.
GS_LAYOUT-NO_ROWMARK = 'X'.
GS_LAYOUT-CTAB_FNAME = 'CELLCOLOR'.
CALL METHOD G_GRID->REGISTER_EDIT_EVENT
EXPORTING
I_EVENT_ID = CL_GUI_ALV_GRID=>MC_EVT_ENTER.
CREATE OBJECT G_HANDLER.
SET HANDLER G_HANDLER->HANDLE_DOUBLE_CLICK FOR G_GRID.
SET HANDLER G_HANDLER->HANDLE_HOTSPOT_CLICK FOR G_GRID.
* SET HANDLER G_HANDLER->END_OF_LIST FOR G_GRID.
SET HANDLER G_HANDLER->TOP_OF_PAGE FOR G_GRID.
DATA: LS_CELLCOLOR TYPE LVC_S_SCOL. "required for color
DATA: L_INDEX TYPE SY-TABIX.
"Here i am changing the color of line 1,5,10...
"so you can change the color of font conditionally
LOOP AT ITAB.
L_INDEX = SY-TABIX.
IF L_INDEX = 1 OR L_INDEX = 5 OR L_INDEX = 10.
LS_CELLCOLOR-FNAME = 'VBELN'.
LS_CELLCOLOR-COLOR-COL = '6'.
LS_CELLCOLOR-COLOR-INT = '0'.
LS_CELLCOLOR-COLOR-INV = '1'.
APPEND LS_CELLCOLOR TO ITAB-CELLCOLOR.
MODIFY ITAB INDEX L_INDEX TRANSPORTING CELLCOLOR.
LS_CELLCOLOR-FNAME = 'POSNR'.
LS_CELLCOLOR-COLOR-COL = '6'.
LS_CELLCOLOR-COLOR-INT = '0'.
LS_CELLCOLOR-COLOR-INV = '1'.
APPEND LS_CELLCOLOR TO ITAB-CELLCOLOR.
MODIFY ITAB INDEX L_INDEX TRANSPORTING CELLCOLOR.
ENDIF.
ENDLOOP.
* setting focus for created grid control
CALL METHOD CL_GUI_CONTROL=>SET_FOCUS
EXPORTING
CONTROL = G_GRID.
* Build fieldcat and set editable for date and reason code
* edit enabled. Assign a handle for the dropdown listbox.
PERFORM BUILD_FIELDCAT.
PERFORM SET_DRDN_TABLE.
* Optionally restrict generic functions to 'change only'.
* (The user shall not be able to add new lines).
PERFORM EXCLUDE_TB_FUNCTIONS CHANGING LT_EXCLUDE.
**Vaiant to save the layout
LS_VARI-REPORT = SY-REPID.
LS_VARI-HANDLE = SPACE.
LS_VARI-LOG_GROUP = SPACE.
LS_VARI-USERNAME = SPACE.
LS_VARI-VARIANT = SPACE.
LS_VARI-TEXT = SPACE.
LS_VARI-DEPENDVARS = SPACE.
**Calling the Method for ALV output
CALL METHOD G_GRID->SET_TABLE_FOR_FIRST_DISPLAY
EXPORTING
IT_TOOLBAR_EXCLUDING = LT_EXCLUDE
IS_VARIANT = LS_VARI
IS_LAYOUT = GS_LAYOUT
I_SAVE = 'A'
CHANGING
IT_FIELDCATALOG = IT_FIELDCAT
IT_OUTTAB = ITAB[].
"do these..{
* Initializing document
CALL METHOD DG_DYNDOC_ID->INITIALIZE_DOCUMENT.
* Processing events
CALL METHOD G_GRID->LIST_PROCESSING_EVENTS
EXPORTING
I_EVENT_NAME = 'TOP_OF_PAGE'
I_DYNDOC_ID = DG_DYNDOC_ID.
"end }
* Set editable cells to ready for input initially
CALL METHOD G_GRID->SET_READY_FOR_INPUT
EXPORTING
I_READY_FOR_INPUT = 1.
ENDFORM. "CREATE_AND_INIT_ALV
*& Form EXCLUDE_TB_FUNCTIONS
* text
* -->PT_EXCLUDE text
FORM EXCLUDE_TB_FUNCTIONS CHANGING PT_EXCLUDE TYPE UI_FUNCTIONS.
* Only allow to change data not to create new entries (exclude
* generic functions).
DATA LS_EXCLUDE TYPE UI_FUNC.
LS_EXCLUDE = CL_GUI_ALV_GRID=>MC_FC_LOC_COPY_ROW.
APPEND LS_EXCLUDE TO PT_EXCLUDE.
LS_EXCLUDE = CL_GUI_ALV_GRID=>MC_FC_LOC_DELETE_ROW.
APPEND LS_EXCLUDE TO PT_EXCLUDE.
LS_EXCLUDE = CL_GUI_ALV_GRID=>MC_FC_LOC_APPEND_ROW.
APPEND LS_EXCLUDE TO PT_EXCLUDE.
LS_EXCLUDE = CL_GUI_ALV_GRID=>MC_FC_LOC_INSERT_ROW.
APPEND LS_EXCLUDE TO PT_EXCLUDE.
LS_EXCLUDE = CL_GUI_ALV_GRID=>MC_FC_LOC_MOVE_ROW.
APPEND LS_EXCLUDE TO PT_EXCLUDE.
LS_EXCLUDE = CL_GUI_ALV_GRID=>MC_FC_LOC_COPY.
APPEND LS_EXCLUDE TO PT_EXCLUDE.
LS_EXCLUDE = CL_GUI_ALV_GRID=>MC_FC_LOC_CUT.
APPEND LS_EXCLUDE TO PT_EXCLUDE.
LS_EXCLUDE = CL_GUI_ALV_GRID=>MC_FC_LOC_PASTE.
APPEND LS_EXCLUDE TO PT_EXCLUDE.
LS_EXCLUDE = CL_GUI_ALV_GRID=>MC_FC_LOC_PASTE_NEW_ROW.
APPEND LS_EXCLUDE TO PT_EXCLUDE.
LS_EXCLUDE = CL_GUI_ALV_GRID=>MC_FC_LOC_UNDO.
APPEND LS_EXCLUDE TO PT_EXCLUDE.
ENDFORM. " EXCLUDE_TB_FUNCTIONS
*& Form build_fieldcat
* Fieldcatalog
FORM BUILD_FIELDCAT .
DATA: L_POS TYPE I.
L_POS = L_POS + 1.
X_FIELDCAT-SCRTEXT_M = 'Delivery'(024).
X_FIELDCAT-FIELDNAME = 'VBELN'.
X_FIELDCAT-TABNAME = 'IT_FINAL'.
X_FIELDCAT-COL_POS = L_POS.
X_FIELDCAT-NO_ZERO = 'X'.
X_FIELDCAT-OUTPUTLEN = '10'.
X_FIELDCAT-HOTSPOT = 'X'.
APPEND X_FIELDCAT TO IT_FIELDCAT.
CLEAR X_FIELDCAT.
L_POS = L_POS + 1.
X_FIELDCAT-SCRTEXT_M = 'Item'(025).
X_FIELDCAT-FIELDNAME = 'POSNR'.
X_FIELDCAT-TABNAME = 'IT_FINAL'.
X_FIELDCAT-COL_POS = L_POS.
X_FIELDCAT-OUTPUTLEN = '5'.
APPEND X_FIELDCAT TO IT_FIELDCAT.
CLEAR X_FIELDCAT.
L_POS = L_POS + 1.
X_FIELDCAT-SCRTEXT_M = 'Drop'(025).
X_FIELDCAT-FIELDNAME = 'DROP'.
X_FIELDCAT-TABNAME = 'IT_FINAL'.
X_FIELDCAT-COL_POS = L_POS.
X_FIELDCAT-OUTPUTLEN = '5'.
X_FIELDCAT-EDIT = 'X'.
X_FIELDCAT-DRDN_HNDL = '1'.
X_FIELDCAT-DRDN_ALIAS = 'X'.
APPEND X_FIELDCAT TO IT_FIELDCAT.
CLEAR X_FIELDCAT.
ENDFORM. " build_fieldcat
*& Module STATUS_0100 OUTPUT
* text
MODULE STATUS_0100 OUTPUT.
SET PF-STATUS 'MAIN100'.
SET TITLEBAR 'MAIN100'.
IF G_CUSTOM_CONTAINER IS INITIAL.
**Initializing the grid and calling the fm to Display the O/P
PERFORM CREATE_AND_INIT_ALV.
ENDIF.
ENDMODULE. " STATUS_0100 OUTPUT
*& Module USER_COMMAND_0100 INPUT
* text
MODULE USER_COMMAND_0100 INPUT.
CASE SY-UCOMM.
WHEN 'BACK'.
LEAVE TO SCREEN 0.
ENDCASE.
ENDMODULE. " USER_COMMAND_0100 INPUT
*& Form SET_DRDN_TABLE
* text
FORM SET_DRDN_TABLE.
DATA:LT_DRAL TYPE LVC_T_DRAL,
LS_DRAL TYPE LVC_S_DRAL.
LOOP AT ITAB .
* First listbox (handle '1').
IF SY-INDEX = 1.
LS_DRAL-HANDLE = '1'.
LS_DRAL-VALUE = ' '.
LS_DRAL-INT_VALUE = ' '.
ELSE.
LS_DRAL-HANDLE = '1'.
LS_DRAL-VALUE = ITAB-POSNR.
LS_DRAL-INT_VALUE = ITAB-POSNR.
ENDIF.
APPEND LS_DRAL TO LT_DRAL.
ENDLOOP.
**Setting the Drop down table for Reason Code
CALL METHOD G_GRID->SET_DROP_DOWN_TABLE
EXPORTING
IT_DROP_DOWN_ALIAS = LT_DRAL.
ENDFORM. " set_drdn_table
*& Form EVENT_TOP_OF_PAGE
* text
* -->DG_DYNDOC_ID text
FORM EVENT_TOP_OF_PAGE USING DG_DYNDOC_ID TYPE REF TO CL_DD_DOCUMENT.
"this is more clear.....check it
"first add text, then pass it to comentry write fm
DATA : DL_TEXT(255) TYPE C. "Text
* Populating header to top-of-page
CALL METHOD DG_DYNDOC_ID->ADD_TEXT
EXPORTING
TEXT = 'Test Report'
SAP_STYLE = CL_DD_AREA=>HEADING.
* Add new-line
CALL METHOD DG_DYNDOC_ID->NEW_LINE.
CLEAR : DL_TEXT.
* Move program ID
CONCATENATE 'Program Name :' SY-REPID
INTO DL_TEXT SEPARATED BY SPACE.
* Add Program Name to Document
PERFORM ADD_TEXT USING DL_TEXT.
* Add new-line
CALL METHOD DG_DYNDOC_ID->NEW_LINE.
CLEAR : DL_TEXT.
* Move User ID
CONCATENATE 'User ID :' SY-UNAME INTO DL_TEXT SEPARATED BY SPACE
* Add User ID to Document
PERFORM ADD_TEXT USING DL_TEXT.
* Add new-line
CALL METHOD DG_DYNDOC_ID->NEW_LINE.
CLEAR : DL_TEXT.
* Move count (no of records).
move v_lines to v_line.
CONCATENATE 'No of records :' v_line INTO DL_TEXT SEPARATED BY SPACE.
* Add Client to Document
PERFORM ADD_TEXT USING DL_TEXT.
* Add new-line
CALL METHOD DG_DYNDOC_ID->NEW_LINE.
CLEAR : DL_TEXT.
* Move date
WRITE SY-DATUM TO DL_TEXT.
CONCATENATE 'Date :' DL_TEXT INTO DL_TEXT SEPARATED BY SPACE.
* Add Date to Document
PERFORM ADD_TEXT USING DL_TEXT.
* Add new-line
CALL METHOD DG_DYNDOC_ID->NEW_LINE.
CLEAR : DL_TEXT.
* Move time
WRITE SY-UZEIT TO DL_TEXT.
CONCATENATE 'Time :' DL_TEXT INTO DL_TEXT SEPARATED BY SPACE.
* Add Time to Document
PERFORM ADD_TEXT USING DL_TEXT.
* Add new-line
CALL METHOD DG_DYNDOC_ID->NEW_LINE.
* Populating data to html control
PERFORM HTML.
ENDFORM. " EVENT_TOP_OF_PAGE
*& Form ADD_TEXT
* To add Text
FORM ADD_TEXT USING P_TEXT TYPE SDYDO_TEXT_ELEMENT.
* Adding text
CALL METHOD DG_DYNDOC_ID->ADD_TEXT
EXPORTING
TEXT = P_TEXT
SAP_EMPHASIS = CL_DD_AREA=>HEADING.
ENDFORM. " ADD_TEXT
*& Form HTML
* text
FORM HTML.
DATA : DL_LENGTH TYPE I, " Length
DL_BACKGROUND_ID TYPE SDYDO_KEY VALUE SPACE. " Background_id
* Creating html control
IF DG_HTML_CNTRL IS INITIAL.
CREATE OBJECT DG_HTML_CNTRL
EXPORTING
PARENT = DG_PARENT_HTML.
ENDIF.
* Reuse_alv_grid_commentary_set
CALL FUNCTION 'REUSE_ALV_GRID_COMMENTARY_SET'
EXPORTING
DOCUMENT = DG_DYNDOC_ID
BOTTOM = SPACE
IMPORTING
LENGTH = DL_LENGTH.
* Get TOP->HTML_TABLE ready
CALL METHOD DG_DYNDOC_ID->MERGE_DOCUMENT.
* Set wallpaper
CALL METHOD DG_DYNDOC_ID->SET_DOCUMENT_BACKGROUND
EXPORTING
PICTURE_ID = DL_BACKGROUND_ID.
* Connect TOP document to HTML-Control
DG_DYNDOC_ID->HTML_CONTROL = DG_HTML_CNTRL.
* Display TOP document
CALL METHOD DG_DYNDOC_ID->DISPLAY_DOCUMENT
EXPORTING
REUSE_CONTROL = 'X'
PARENT = DG_PARENT_HTML
EXCEPTIONS
HTML_DISPLAY_ERROR = 1.
IF SY-SUBRC NE 0.
MESSAGE I999 WITH 'Error in displaying top-of-page'(036).
ENDIF.
ENDFORM. " HTML
Regards
vijay -
How do I get iCal to print my calendar just as it appears on the screen? I like the whole block-out method rather than just a line down the side indicating the time devoted to an event. Is there any way to change the style of how it' sprinted?
View > Sidebar > Bookmarks (Ctrl+B)
Press F10 or tap the Alt key to bring up the "Menu Bar" temporarily. -
Is there a way to display the legend for a chart, but not the chart?
Hi,
I have a stacked column chart and a line chart on top of each other. I can't use the legend for the stacked column chart because the data will change from month to month, and the 2 charts will not be aligned. I copied the stacked column chart to another part of the canvas and want to display only the legend, but the chart is still displaying. Is there a way to prevent the chart from displaying? Thanks.hi Jim Wojewnik,
we can show only the legend in a pie chart by dragging the edges to closer.do the following,
select the pie chart,select the edge of the chart and make it small and u ll find the pie chart shrinking.make it lean such that the pie chart disappear.
try this work around and let me know.
regards,
ravi.
Maybe you are looking for
-
How to split a single scan of multiple docs into multiple files.
I'm currently using Acrobat X Pro. I need to scan a pile of documents (bills, receipts, etc) and convert them to PDF for archiving (this I can do). Problem is I want to scan 50-100 at a time, and I want to save each as it's own individual PDF, not
-
DNS configuration for webhosting
Our intention is to use an Xserve as a webhosting platform, but have huge problems in configuring DNS for each domain hosted. Can someone provide me with a template what I have to provide for a typical domain name at the server admin tools ? How woul
-
Mail is slow to load messages from Gmail, Exchange and inbox.
I have three email accounts in Mail, iCloud (12k), Gmail (57k) and Exchange (31k). I have just around 100,000 total inbox and sent messages. Often, like 99% of the time, I'll get an email alert in notification center and when I click on it mail is
-
Running Win98. I somehow removed the Java application from my computer, and am unable to open any java appelets or javascript. Where can I download the JVM for Win98. Currently all I have is JVM 1.5.0_05 (which is for Win98SE), and doesn't work. I we
-
When i start bootcamp, i can make a partition +/- 60 mb, put de Win cd in and restart, no bootable bootcamp partition on the grey startup screen, only OS X There is however an bootcamp icon of de HD. Tried several times, deleting the partition again