on 02-20-2007 3:08 PM
Hello,
I need to dynamically set the title of a BusinessGraphic to include the current date. I will need to change it through code and the only example I have seen involves using the Chart Designer. I believe I need to use the "customizing" property to use an xml file. Can anyone point me to an example on how this is done?
Thank You.
Look there.
And use
graphic.setDirectCustomizing(cuString.toString());
to set dynamically the XML Customizing.
I explain again how retrieve the XML Customizing that Chart Designer create.
Create your chart with Chart Designer and save all metadata.
Pass to "Navigator" panel, find the view file.
Something like:
$YOUR_NAME_VIEW$.wdview
into your package tree
Open it like a normal TEXT file, inside you must find the XML Customizing that Chart Designer created.
Bye
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I have tried using the following code in the wdDoModifyView:
final IWDBusinessGraphics gfx = (IWDBusinessGraphics) view.getElement("BusinessGraphic");
final StringBuffer cuString = new StringBuffer(1024);
cuString.append("<?xml version="1.0" encoding="ascii"?>");
cuString.append("<SAPChartCustomizing>");
cuString.append("<Title>");
cuString.append("<Caption="");
cuString.append("Average Dispatch Type FEBRUARY 20, 2007");
cuString.append("">");
cuString.append("</Caption>");
cuString.append("</Title>");
cuString.append("</SAPChartCustomizing>");
gfx.setDirectCustomizing( cuString.toString() );
I am hardcoding the date for now. I have found that file you are talking about. Are you opening that file and overwriting the values you need to change? Or do you overwrite it through code? I will need to change the values in that file every time I generate the graph and cannot do it manually.
Thanks for the help.
Nooooo
You cannot overwrite that file!
From there you must take only the complete XML.
And after by code
cuString.append("<?xml version=\"1.0\" encoding=\"ascii\"?>");
cuString.append("<SAPChartCustomizing>");
cuString.append("<Title>");
...........
cuString.append("<Caption=\"");
cuString.append("Average Dispatch Type FEBRUARY 20, 2007");
cuString.append("\">");
cuString.append("</Caption>");
..........
cuString.append("</Title>");
cuString.append("</SAPChartCustomizing>");
all XML TAG!
Changing only wished part.
i use only one CODE line
cuString.append("<?xml version=\"1.0\" encoding=\"ascii\"?> ...... </SAPChartCustomizing>");
Using TextPAD editor for example, change the wished part and transform the XML in only one line.
Really i have something like:
cuString.append("<?xml version=\"1.0\" encoding=\"ascii\"?> ...... ");
cuString.append("..."JAVA_VARIABLE"....");
cuString.append(" </SAPChartCustomizing>");
Try this way
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
87 | |
23 | |
11 | |
9 | |
8 | |
5 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.