Labels pointing to pie slices with lines (or how 2 set chart properties in code behind)

I want to be able to create lines outside of my pie chart with labels and have those lines drawn to connect to the pie chart.  I saw that this can be done in code behind in the following thread:
MSDN thread on lines to pie slices
But my problem is I never declared an instance of my chart when I am using my code behind.  My code that makes the reports visible is basically (but not completely) the following:
ReportDataSet.Tables.Add(ReportDataTable)
ReportViewer.Visible = True
Dim ReportDataSource As ReportDataSource = New ReportDataSource("ReportDataSource", ReportDataSet.Tables(0))
ReportViewer.LocalReport.ReportPath = ReportToDisplay.RDLCFileName
ReportViewer.LocalReport.DataSources.Clear()
ReportViewer.LocalReport.DataSources.Add(ReportDataSource)
ReportDataSource.Name = ReportToDisplay.DataSetName
ReportViewer.DataBind()
ReportViewer.LocalReport.Refresh()
ReportViewer.ShowReportBody = True
ReportViewer.Width = RVWidth
ReportViewer.Height = RVHeight
So how do I set chart properties for my report given the above code?  As long as I can set my chart properties with the above code, I should be able to get this to work given the above thread and the link to the Label-Outside-of-Pie and Line-Color properties
(or whatever) info on Microsoft's info page

Hello,
Based on your description, you want to design a
pie chart with outside lables and pie line inside a .rdlc report. If so, you can add the Chart report item into the report after open a client report definition (.rdlc) file in graphical design mode. And then Set the
PieLabelStyle property and PieLineColor property. Please refer to the following screen shot:
The link your post above it about the
Chart Web server control. As pre my undersntand, you cannot reference a Web server control inside .rdlc file.
If you have any question about using Chart Web server control, you can post a question on
Chart Controls for .NET Framework forum.
Regards,
Fanny Liu
If you have any feedback on our support, please click here. 
Fanny Liu
TechNet Community Support

Similar Messages

  • Screen is fussy with lines.  How do I resolve this?

    Screen is fussy with lines.  How do I resolve this?

    Sounds like you may have a screen hardware problem with your iPad.  Take it to an Apple store so they can help you and let you know what it will cost to repair it

  • Labeling points on XY graph with numbers. Trying to use cursor names.

    I have found some example vis in the NI Developers Zone that label the points using Cursor Name attribute. I have some success, but results are not consistent. I need up to 100 labels...is there a limit to the number of cursors? Is there a way to initialize 100 cursors without using Cursor Legend? Sometimes the cursors do not appear or do not move...they don't seem to be consistent. Any other ideas to solve this problem? Would it be possible to show the number of the point when the cursor is moved to that point. I am using LabView 6.0. windows 2000.
    Thanks.
    Liz

    > Problem: When trying to change cursor position programatically using
    > attribute notes, the cursor position will not change.
    >
    > I found this in the knowledgeBase. Solution: Unlock the cursor.
    > Cursor position attributes are read-only when the cursor is locked.
    > Liz
    > Still looking for answer of a way to initialize 100 cursors with
    > Cursor legend.
    >
    If you want to do things programmatically, like set the cursor text to
    match the X or Y value of the point, read the value, format the string
    and write it to the name of the cursor.
    If you want to init 100 cursors interactively, you can popup on the edge
    of the cursor legend and show the index. The cursor legend is simply an
    array of clusters of cursor info. Set the index to 99 and type in a
    name, value or something else. This will allocate 100 cursors. I'm not
    sure if that is what you meant.
    Greg McKaskle

  • It appears that Firefox affects my email by labelling most of my contact with "forget." How can we resolve this?

    Many of my contacts have not been able to reach me via email with the notice on returned mail that they have been blocked as "spam." This all started after updating Firefox about 30 days ago. I use RCN as my email program and having discussed this problem with them at length, their records do not show the word "forget" on my contact's address. Does anyone an answer to this problem.

    Firefox is only a browser. It has no controls like that. This may be an issue
    with your e-mail provider.

  • Acrobat pro: how set default properties for arrow and line tool seperately?

    I have a problem with the 'comment and markup' tools in Adobe Acrobat Pro.
    I would like to change the defaults of some of the tools, eg the arrow and the line tool.
    This can be achieved by right-clicking on something drawn using the tool in question and then selecting 'properties' - or by selecting the tool and then press ctrl+E, wich opens a 'Callout Tool Properties', and then change what you want there. The latter option keeps the changes as defaults - the former offers a box to tick in the 'properties' dialogue that opens - or, you can right-click on the object again after having changed the properties, and then select 'Make Current Properties Default'.
    My Problem is now, that, apparently, you cannot choose and save default properties freely and for each tool. I woul like to have the default properties for the line tool set as the following:
    -line color: yellow
    -line thickness: 8pt
    -opacity: 60%
    and fot the arrow tool as this:
    -line color: red
    -line thickness: 1pt
    -opacity: 100%
    This all works fine as long as the program is open. As soon as I exit and start it again opening another document /the same one again, the arrow tool changes to
    -line color: yellow
    -opacity: 60%
    only the line thickness remains at 1pt.
    If I change the properties of the line to the ones I want for the arrow, the arrow properties remain unaltered if I close Acrobat Pro.
    Why do these properties interfere? Why is it "line color/thickness" in both? Why, then, do only the opacity and the color interfere, but not the thickness - even if it's the latter two properties that are bot called "line xxx"? Why does Acrobat not save all properties for these two shapes seperately - even IF the two shapes are both of a line-like kind?
    Is there a way to get around this?

    Trobbel - This indeed is puzzling behavior. Clicking 'Make Current Properties Default' should preserve the default  appearance for each. I don't have a solution, but merely a couple of suggestions:
    1) Make sure you have installed any available upgrade for your version of Acrobat Professional.
    2) Consider using the line tool exclusively - you can add an arrowhead and make one tool perform both tasks.
    Hope this helps. /rmbrown

  • Remove labels on pie slices when show legend

    How do I remove the labels on the pie slices when I have displayed the legend? They are hard to read because they overlap each other.

    I figured it out ...

  • Pie chart doesn't show the label of the last slice

    Post Author: saschaherrle
    CA Forum: Charts and Graphs
    Hi there...
    I have this problem with displaying the label of the last pie slice of my report. It is working perfectly fine in my testing environment, but it just doesn't want to show in the client environmet... I don't know what to try anymore. I've tried all the other label location options, but they also dont help. There are five slices on the pie chart with the following values:
    1.9%
    43.6%
    51.1%
    2.3%
    1.1%
    All the labels and feeler lines are showing except for value number 5.
    Any help or advice would be greatly appreciated. Thanks
    P.S. I'm using Crystal Reports XI Version 11.0.0.1994 and the client is just running the Crystal Runtime (Maybe this helps... I hope)

    ewilly wrote:Sorry to say that but i'm not unhappy to see i'm not alone to encounter this issue
    I aggree with you : it's only a partial issue as those partitions are mounted under /media with their label name.
    As krusader is able to retrieve the label name i don't think it's an udisks issue so it's more related to a kde functionnality. I looked for missing (optionnal or not) dependencies but without success.
    Any idea is welcome... perhaps opening a bug could help ??
    I have run out of ideas.
    If you tried krusader, yes, it is quite safe to assume it is not a udisks problem, since I tried nautilus which uses udisks2. I also would rule out udev/systemd. Leaves solid, kdelibs, and the kdebase sources.
    As said, on gentoo, kdelibs are compiled with udev dependency which I have not seen in the pkgbuild for kdelibs.
    I think a bug report is a good idea.
    Last edited by artoo (2012-09-06 18:01:49)

  • Scatter chart with lines between points

    In one of our Deski reports, we have a "funnel" chart.  This is essentially achieved with a scatter plot graph with lines drawn between the scatter points to resemble a line chart.  This allows us to draw odd lines, such as a funnels that don't really look like funnels.    (Picture drawing a concentric circle for another visualization of what we are trying to accomplish).  So our problem is that we need to convert this Deski Report to Webi in order to move to BusinessObjects 4.1.  But we cannot seem to achieve this in Webi because the scatter plot in Webi does not draw lines between the points.  Any ideas out there?  Can this be done in a current BusinessObjects tool?

    Hi,
    We have the same problem, did you solve your problem and how?
    thanks in advanced

  • How connect dragable labels with line

    When I load the program labels will appear within the window. You can ckick
    and drag these labels. The code for this
    is very simple. The code works perfectly. However I want to extend my code to do
    the following :
    (1) I want to add an extra label .. it does not matter where on the screen
    [ JLabel label = new JLabel() ]
    (2) When I press this button I want a line to appear between the two
    moveable labels ( ie the two labels are joined together by the line)
    (3)Now here is the hard part.. Whenever I move either of the two labels
    the line stretches so that the two labels are still connected.
    start--->
    import java.awt.*;
    import java.awt.event.*;
    import java.awt.geom.*;
    import javax.swing.*;
    import javax.swing.border.*;
    public class Connection
    public static void main(String[] args)
    JFrame f = new JFrame("Connection");
    f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    f.getContentPane().add(new ConnectionPanel());
    f.setSize(400,300);
    f.setLocation(200,200);
    f.setVisible(true);
    class ConnectionPanel extends JPanel
    JLabel label1, label2, label3, label4;
    JLabel[] labels;
    JLabel selectedLabel;
    int offsetX, offsetY;
    boolean dragging;
    public ConnectionPanel()
    setOpaque(false);
    setLayout(null);
    addLabels();
    addMouseListener(new LabelSelector());
    addMouseMotionListener(new LabelMover());
    public void paintComponent(Graphics g)
    Graphics2D g2 = (Graphics2D)g;
    g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING,
    RenderingHints.VALUE_ANTIALIAS_ON);
    g2.setPaint(Color.white);
    g2.fillRect(0, 0, getWidth(), getHeight());
    g2.setPaint(Color.blue);
    Point
    p1 = getCenter(label1),
    p2 = getCenter(label2),
    p3 = getCenter(label3),
    p4 = getCenter(label4);
    g2.draw(new Line2D.Double(p1.x, p1.y, p2.x, p2.y));
    g2.draw(new Line2D.Double(p1.x, p1.y, p3.x, p3.y));
    g2.draw(new Line2D.Double(p1.x, p1.y, p4.x, p4.y));
    g2.draw(new Line2D.Double(p2.x, p2.y, p3.x, p3.y));
    g2.draw(new Line2D.Double(p2.x, p2.y, p4.x, p4.y));
    g2.draw(new Line2D.Double(p3.x, p3.y, p4.x, p4.y));
    super.paintComponent(g);
    private Point getCenter(JComponent c)
    Rectangle r = c.getBounds();
    return new Point((int)r.getCenterX(), (int)r.getCenterY());
    private class LabelSelector extends MouseAdapter
    public void mousePressed(MouseEvent e)
    Point p = e.getPoint();
    for(int i = 0; i < labels.length; i++)
    Rectangle r = labels.getBounds();
    if(r.contains(p))
    selectedLabel = labels[i];
    offsetX = p.x - r.x;
    offsetY = p.y - r.y;
    dragging = true;
    break;
    public void mouseReleased(MouseEvent e)
    dragging = false;
    private class LabelMover extends MouseMotionAdapter
    public void mouseDragged(MouseEvent e)
    if(dragging)
    int x = e.getX() - offsetX;
    int y = e.getY() - offsetY;
    Rectangle r = selectedLabel.getBounds();
    selectedLabel.setBounds(x, y, r.width, r.height);
    repaint();
    private void addLabels()
    int w = 125;
    int h = 25;
    Border border = BorderFactory.createEtchedBorder();
    label1 = new JLabel("Label 1", JLabel.CENTER);
    label2 = new JLabel("Label 2", JLabel.CENTER);
    label3 = new JLabel("Label 3", JLabel.CENTER);
    label4 = new JLabel("Label 4", JLabel.CENTER);
    labels = new JLabel[4];
    labels[0] = label1; labels[1] = label2; labels[2] = label3; labels
    [3] = label4;
    for(int i = 0; i < labels.length; i++)
    labels[i].setBorder(border);
    labels[i].setOpaque(true);
    labels[i].setBackground(Color.white);
    add(labels[i]);
    label1.setBounds(40, 40, w, h);
    label2.setBounds(215, 40, w, h);
    label3.setBounds(40, 200, w, h);
    label4.setBounds(215, 200, w, h);
    end-->
    In this code: How to add labels when to me it is necessary
    (From menu: add new label)?

    import java.awt.*;
    import java.awt.event.*;
    import java.awt.geom.Line2D;
    import javax.swing.*;
    import javax.swing.event.MouseInputAdapter;
    public class Connection
        ConnectionPanel connectionPanel;
        LabelWrangler wrangler;
        public Connection()
            connectionPanel = new ConnectionPanel();
            wrangler = new LabelWrangler(connectionPanel);
            connectionPanel.addMouseListener(wrangler);
            connectionPanel.addMouseMotionListener(wrangler);
            JFrame f = new JFrame();
            f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
            f.getContentPane().add(getUIPanel(), "North");
            f.getContentPane().add(connectionPanel);
            f.setSize(400,400);
            f.setLocation(200,200);
            f.setVisible(true);
        private JPanel getUIPanel()
            JButton add = new JButton("add label");
            add.addActionListener(new ActionListener()
                public void actionPerformed(ActionEvent e)
                    wrangler.willAcceptLabel = true;
            JCheckBox lineBox = new JCheckBox("show lines");
            lineBox.addActionListener(new ActionListener()
                public void actionPerformed(ActionEvent e)
                    connectionPanel.showConnectionLines();
            JPanel panel = new JPanel();
            panel.add(add);
            panel.add(lineBox);
            return panel;
        public static void main(String[] args)
            new Connection();
    class ConnectionPanel extends JPanel
        boolean showConnections;
        int labelCount;
        final int
            N  = 2,
            NW = 3,
            W  = 1,
            SW = 9,
            S  = 8,
            SE = 12,
            E  = 4,
            NE = 6;
        public ConnectionPanel()
            showConnections = false;
            labelCount = 0;
            setLayout(null);
        protected void paintComponent(Graphics g)
            super.paintComponent(g);
            Graphics2D g2 = (Graphics2D)g;
            g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING,
                                RenderingHints.VALUE_ANTIALIAS_ON);
            if(showConnections)
                Component[] c = getComponents();
                Rectangle r1 = new Rectangle();
                Rectangle r2 = new Rectangle();
                for(int j = 0; j < c.length - 1; j++)
                    c[j].getBounds(r1);
                    for(int k = j + 1; k < c.length; k++)
                        c[k].getBounds(r2);
                        Point p1 = getClosestPoint(r1, r2);
                        Point p2 = getClosestPoint(r2, r1);
                        g2.draw(new Line2D.Double(p1.x, p1.y, p2.x, p2.y));
        private Point getClosestPoint(Rectangle r1, Rectangle r2)
            double cx = r2.getCenterX();
            double cy = r2.getCenterY();
            Point p = new Point();
            int outcode = r1.outcode(cx, cy);
            switch(outcode)
                case N:
                    p.x = r1.x + r1.width/2 - 1;
                    p.y = r1.y;
                    break;
                case NW:
                    p.x = r1.x;
                    p.y = r1.y;
                    break;
                case W:
                    p.x = r1.x;
                    p.y = r1.y + r1.height/2 - 1;
                    break;
                case SW:
                    p.x = r1.x;
                    p.y = r1.y + r1.height - 1;
                    break;
                case S:
                    p.x = r1.x + r1.width/2 - 1;
                    p.y = r1.y + r1.height - 1;
                    break;
                case SE:
                    p.x = r1.x + r1.width - 1;
                    p.y = r1.y + r1.height - 1;
                    break;
                case E:
                    p.x = r1.x + r1.width - 1;
                    p.y = r1.y + r1.height/2 - 1;
                    break;
                case NE:
                    p.x = r1.x + r1.width - 1;
                    p.y = r1.y;
                    break;
                default /* INSIDE == 0 */:
                    System.out.println("INSIDE");
            return p;
        public void addLabel(Point p)
            JLabel label = new JLabel("label " + ++labelCount);
            label.setBorder(BorderFactory.createEtchedBorder());
            add(label);
            Dimension d = label.getPreferredSize();
            label.setBounds(p.x - d.width/2, p.y - d.height/2, d.width, d.height);
            repaint();
        public void showConnectionLines()
            showConnections = !showConnections;
            repaint();
    class LabelWrangler extends MouseInputAdapter
        ConnectionPanel connectionPanel;
        Component selectedLabel;
        Point offset;
        boolean dragging, willAcceptLabel;
        public LabelWrangler(ConnectionPanel cp)
            connectionPanel = cp;
            offset = new Point();
            willAcceptLabel = false;
            dragging = false;
        public void mousePressed(MouseEvent e)
            Point p = e.getPoint();
            // has a label been selected for dragging?
            Component[] c = connectionPanel.getComponents();
            Rectangle r = new Rectangle();
            for(int j = 0; j < c.length; j++)
                c[j].getBounds(r);
                if(r.contains(p))
                    selectedLabel = c[j];
                    offset.x = p.x - r.x;
                    offset.y = p.y - r.y;
                    dragging = true;
                    break;
            // if no selection, are we adding a new label?
            if(!dragging && willAcceptLabel)
                connectionPanel.addLabel(p);
                willAcceptLabel = false;
        public void mouseReleased(MouseEvent e)
            dragging = false;
        public void mouseDragged(MouseEvent e)
            if(dragging)
                int x = e.getX() - offset.x;
                int y = e.getY() - offset.y;
                selectedLabel.setLocation(x, y);
                connectionPanel.repaint();
    }

  • Trying to charge ipod and only thing that will show up is a plug with an arrow pointing to a zig zag line

    when i went to charge my ipod it wont charge, so i pluged it into my computer and still the same thing pops up its a plug then an arrow pointing to a zig zag line..

    Not Charge
    - See:       
    iPod touch: Hardware troubleshooting
    - Try another cable
    - Try another charging source
    - Inspect the dock connector for bent or missing contacts, foreign material, corroded contacts, broken, missing or cracked plastic.
    - Make an appointment at the Genus Bar of an Apple store.
    Apple Retail Store - Genius Bar

  • Set pie slice color

    Hey guys,
             I am creating pie chart based on xml data, which can have at most 6 categories, but not every time.  For consistency sake I would like pie slice to be colored by category, i.e every time I see category 1 it should be colored with c1, category 2 should be colored c2 etc.  By just setting fill property I don't always get the same color for category 2 if category 1 is missing. 
         Hope my objective is clear, does anyone have any idea, I have been nosing around adobe forms and google but no luck so far.
    Thank you
    Jay

    Instead of a switch statement you could do this, the colors use the fieldname as id's so you then have a single line in your fillfunction.
    <?xml version="1.0" encoding="utf-8"?>
    <s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
    xmlns:s="library://ns.adobe.com/flex/spark"
    xmlns:mx="library://ns.adobe.com/flex/halo" minWidth="1024" minHeight="768" xmlns:local="*">
    <fx:Declarations>
    <s:SolidColor id="Taxes" color="blue" alpha="1"/>
    <s:SolidColor id="Rent" color="red" alpha="1"/>
    <s:SolidColor id="Bills" color="green" alpha="1"/>
    <s:SolidColor id="Car" color="gray" alpha="1"/>
    <s:SolidColor id="Gas" color="black" alpha="1"/>
    <s:SolidColor id="Food" color="yellow" alpha="1"/>
    </fx:Declarations>
    <fx:Script>
    <![CDATA[
    import mx.charts.series.items.PieSeriesItem;
    import mx.graphics.IFill;
    import mx.charts.ChartItem;
    import mx.collections.ArrayCollection;
    [Bindable]
    public var expenses:ArrayCollection = new ArrayCollection([
    {Expense:"Taxes", Amount:2000},
    {Expense:"Rent", Amount:1000},
    {Expense:"Bills", Amount:100},
    {Expense:"Car", Amount:450},
    {Expense:"Gas", Amount:100},
    {Expense:"Food", Amount:200}
    private function myFiller(item:ChartItem, index:Number):IFill
    return(this[expenses[index].Expense]);
    ]]>
    </fx:Script>
    <mx:Panel title="Pie Chart">
    <mx:PieChart id="myChart"
    dataProvider="{expenses}"
    showDataTips="true"
    innerRadius=".3"
    >
    <mx:series>
    <mx:PieSeries
    field="Amount"
    nameField="Expense"
        fillFunction="myFiller"
    />
    </mx:series>
    </mx:PieChart>
    </mx:Panel>
    </s:Application>

  • Glitchy Slices with WordPress Design

    I was wondering if one or more of you experts can help me out.
    I'm working with this template from Template Monsters
    Template Link
    I made some rollover images in Fireworks, that looks pretty good on a standard export. (quick sample) However when I enter the code into WordPress HTML editor, while the design may show, the buttons won't rollover.
    I tried creating a sample HTML page without the wordpress management and the rollovers work again but doesn't solve the bigger issue.
    I have two questions regarding the matter:
    1. Can I get the Fireworks slices and code to work well in WordPress?
    I'm having some troubles when taking the theme code and placing the Firework HTML in between the template coding. I had some success but I was foolish to not document what steps I took to get there. If you can take a look at these 2 samples and tell me what you think the problem is that would be great. Both times I fixed the error it was like a line or two that needed to be addressed but I can't seem to solve it now.
    Link to Image 1: Broken Version
    Link to Image 2: Fixed Version
    2: Can you possibly point out what line of code I'm missing on editing?
    I appreciate all help, and thanks!

    That's exactly the problem I'm trying to solve. From what I've read, Fireworks will export the slices with absolute pixel positioning if there are overlapping slices but I haven't been able to make this work.
    I started working on a little Javascript function to export the slices with absolute pixel positioning and it's working pretty well so far. I'll post it here once I've finished it.

  • Connect specified words in textframe with lines

    Dear all,
    I want to use the script below and change it to a script that connects specified words with lines. Now it connects all the words with lines. I'm not sure what to do, so I hope someone can help me.
    Thanks in advance
    #include ./lib/bene.jsx
    //InDesign CS2 JavaScript
    //Set to 4.0 scripting object model
    app.scriptPreferences.version = 4.0;
    var myScriptName = app.activeScript.name;
    var myObjectList = new Array;
    if (app.documents.length != 0){
         if (app.selection.length != 0){
             for(var myCounter = 0;myCounter < app.selection.length; myCounter++){
                 switch (app.selection[myCounter].constructor.name){
                     //allow only textframes
                     case "TextFrame":
                         myObjectList.push(app.selection[myCounter]);
                         break;
             if (myObjectList.length != 0){
                 //run the thing! call a function           
                 myConnectWords(myObjectList);
             else{
                 alert ("Please select TextFrame and try again.");
         else{
             alert ("Please select an object and try again.");
    else{
         alert ("Please open a document, select an object, and try again.");
    //functions
    function myConnectWords(myObjectList){
         var myDocument = app.activeDocument;
         var myLayer, myCounter, myColor;
         //Measurement
         var myOldRulerOrigin = myDocument.viewPreferences.rulerOrigin;
         myDocument.viewPreferences.rulerOrigin = RulerOrigin.spreadOrigin;
         //Save the current measurement units.
         var myOldXUnits = myDocument.viewPreferences.horizontalMeasurementUnits;
         var myOldYUnits = myDocument.viewPreferences.verticalMeasurementUnits;
         //Set the measurement units to points.
         myDocument.viewPreferences.horizontalMeasurementUnits = MeasurementUnits.points;
         myDocument.viewPreferences.verticalMeasurementUnits = MeasurementUnits.points;
         //Get references  the None swatch.       
         var myNoneSwatch = myDocument.swatches.item("None");   
         //Create a color (if it does not already exist).   
         myColor = myDocument.colors.item(myScriptName);
         try{
             myColorName = myColor.name;
         catch (myError){
             var myColorArray = new Array(100, 0, 0, 0);
             myColor = myDocument.colors.add({model:ColorModel.process,  space: ColorSpace.CMYK, colorValue:myColorArray,name: myScriptName});        
         //Create a layer to hold the generated lines (if it does not already exist).
         myLayer = myDocument.layers.item(myScriptName);
         try{
             myLayerName = myLayer.name;
         catch (myError){
             myLayer = myDocument.layers.add({name:myScriptName});
         //Process the objects (here text frames) in the selection.   
         for(myCounter = 0; myCounter < myObjectList.length; myCounter ++){
             //get textframe
             var myNewFrame = myObjectList[myCounter];       
             //get all lines in the frame
             var myLines = myNewFrame.lines;
             //connect each word with all words in the next line
             for(myLineCounter = 0; myLineCounter < myLines.length-1; myLineCounter ++){
                 //get all words in the line + next line
                 var myLine = myLines[myLineCounter].words;           
                 var myNextLine = myLines[myLineCounter+1].words;           
                 //myPathPoints.push([myLine.insertionPoints[-2].horizontalOffset,myTmpY]);
                //combine this + next line words
                 for(i = 0; i < myLine.length; i++){   
                     //get word       
                     var myWord_i = myLine[i];
                     //array for points
                     var myPathPoints = new Array;
                     //add fist point X/Y               
                     myPathPoints[0]=[myWord_i.horizontalOffset,myWord_i.baseline]; 
                    for(j = 0; j < myNextLine.length; j++){
                        //get word
                        var myWord_j = myNextLine[j];                                     
                        if (myWord_j.baseline != myWord_i.baseline  && myWord_j.horizontalOffset != myWord_i.horizontalOffset) {
                            //add secound point X/Y
                            myPathPoints[1]=[myWord_j.horizontalOffset,myWord_j.baseline];
                            //draw the line
                            myDrawPolygon(myPathPoints, 1, 100, myColor, myNoneSwatch, myLayer);          
        myDocument.viewPreferences.rulerOrigin = myOldRulerOrigin; 
        //Set the measurement units back to their original state. 
        myDocument.viewPreferences.horizontalMeasurementUnits = myOldXUnits; 
        myDocument.viewPreferences.verticalMeasurementUnits = myOldYUnits; 

    Yup -- Fun little exercise, this was.
    Select either an entire text frame, or some text directly, and this script connects all of the words with the character style "label". The lines are at the baseline center of each word.
    if (app.documents.length == 0 || app.selection.length != 1 ||
    !(app.selection[0] instanceof TextFrame || app.selection[0].hasOwnProperty("baseline")))
    alert ("Please select a single text frame or some text first");
    } else
    charStyleName = "label";
    app.findTextPreferences = null;
    app.findTextPreferences.appliedCharacterStyle = app.activeDocument.characterStyles.item(charStyleName);
    list = app.selection[0].findText();
    if (list.length == 0)
      alert ('No text found with char style "'+charStyleName+'"');
    else if (list.length == 1)
      alert ('Only one text found with char style "'+charStyleName+'", no use in going on');
    else
      lpath = [];
      while (list.length)
       lpath.push ( centerOfWord (list.shift()) );
      if (app.selection[0] instanceof TextFrame)
       pg = app.selection[0].parent;
      else
       pg = app.selection[0].parentTextFrames[0];
      while (!(pg instanceof Spread || pg instanceof MasterSpread || pg instanceof Page))
       if (pg instanceof Document || pg instanceof Application)
        break;
       pg = pg.parent;
      l = pg.graphicLines.add({strokeWeight:0.5, strokeColor:app.activeDocument.swatches.item("Black")});
      l.paths[0].entirePath = lpath;
    function centerOfWord (word)
    var l = word.insertionPoints[0].horizontalOffset;
    var r = word.insertionPoints[-1].horizontalOffset;
    return [ (l+r)/2, word.baseline ];

  • Why is my Macbook Pro suddenly and constantly shutting down/crashing on me and giving me a blacked out or blued out screen with lines?  Seems like a total system failure is happening?

    Macbook Pro- shortly after upgrading to free software upgrade to Mavericks- 10.9.5-
    has suddenly been freezing up, but went more directly to 'shutting down,'  CRASHING on its own.  Most of the time, if I'm even able to successfully get the laptop turned back on, it only stays up/on for a few moments before repeating the failure.   The failure is often accompanied with the monitor going 'blank,' or most typically either 'blacking out,' or going blue/green or grey screen with lines or grids all over the monitor.  All Desktop visibility, functions or applications in process disappears.  This has caused repetetive 'forced shut downs,' which I never usually do, unless prompted to because I have no choice like this.... Or as I said, the computer itself will just shut down and turn off by itself.... Can anyone tell me what this issue is, and I'm pretty sure other Mac users have seen this exact thing I'm describing happening on their laptops, with their systems or on their monitors.  Someone please explain or point me in the right direction... as naturally my laptop just went out of warranty as well.... And I don't know if this means the entire system is basically corrupted, dying/dead... and or if it is a monitor issue, a hardware issue, software issue or if there is anything that can be done to restore, repair it, etc.?   Also another thing I have noticed ever since getting this laptop- (few years old now...) is that it runs VERY HOT... has in fact burned my lap /skin many times... and seems like the fan or internal operating systems/functions are also perhaps not functioning properly.  Can this also be causing the problem?  Or is it a corruption or virus of some kind? etc.   Thank you.

    What you describe sounds like a hardware issue. Unfortunately, you'll need to get that checked out by Apple. If you have an Apple Store near you, make an appointment with the Genius Bar and take the machine in for evaluation.

  • One pr for multiple materials with line items while running mrp

    Hi SAP gurus,
                  I am config the system for MRP as per my client requerement.
                     We use CBP for different RAW materialsfor example they having a 10 materials for planning,were,
             MRP type is VB,
              LOT size is FX,with Different Reorder points and fix order quantity for all materials,
             My client whant run MRP for all these materials in single time that means they whant multiple item at single levels,
            i soles these requirement with the help of Product Group(sop) and its working but when we running md02 for product group all materials have planed and they give different purchase requistion numbers for all these materials but my client Wants single purchase requistion with line items for all these materials.
         Pls give me the solution for that requirement.
    thanks and Regards,
    abhi

    this is not the way SAPs MRP run works.
    Where is the benefit for this?
    the requisitions are not even split into header and item table, it is just one table EBAN, and either way you would get exact the same number of records in EBAN.

Maybe you are looking for