private ChartEntry readEntry(ScanfReader scanReader, TablePane pane)
            throws IOException {
        String entryName = scanReader.scanString("%S");
        ChartEntry entry = new ChartEntry(entryName);
        String attributeName;
        while (!(attributeName = scanReader.scanString()).equals("end")) {

            //***
            //Here we have added a special case for the entry, called "report=", this is the PDF file location of the report associated with this entry 
            //PROBLEM: the acme scanReader reads the line in the file, but if the line has any spaces is becomes the next attribute.
            //         so, in the valuecharts file, the user needs to specify the entire line, including the path as one single line
            //         We suggest using "$" to replace spaces
            //         This method also adds a double slash when the user enters a single (necessary for java opening the file)
            if (attributeName.startsWith("report=")) {
                File reportFileLocation = new File(attributeName.substring(7).replace("$", " ").replace("\\", "\\\\"));
                entry.setReport(reportFileLocation);

                //***Now create the windows necessary to hold the pdf in view
                //build a controller
                SwingController controller = new SwingController(); //Used for each window that controls a pdf document
                SwingViewBuilder factory = new SwingViewBuilder(controller);

                // Build a SwingViewFactory configured with the controller
                JPanel viewerComponentPanel = new JPanel(); //the panel for which the frame sits on;
                viewerComponentPanel = factory.buildViewerPanel();
                // add copy keyboard command
                ComponentKeyBinding.install(controller, viewerComponentPanel);
                // add interactive mouse link annotation support via callback
                controller.getDocumentViewController().setAnnotationCallback(new org.icepdf.ri.common.MyAnnotationCallback(controller.getDocumentViewController()));
                //Use the factory to build a JPanel that is pre-configured
                //with a complete, active Viewer UI.
                // Open a PDF document (frame is no yet visible, but the document is opened and ready for interaction)
                controller.openDocument(reportFileLocation.toString());
                //Make it continuous view
                controller.setPageFitMode(org.icepdf.core.views.DocumentViewController.PAGE_FIT_WINDOW_WIDTH, false);
                controller.setPageViewMode(DocumentViewControllerImpl.ONE_COLUMN_VIEW, true);

                // Create a JFrame to display the panel in
                JFrame window = new JFrame("Report for " + entryName); //the windows created for the attribute, these are used to show the report. They are class variables because we need to toggle visibility from different methods
                window.getContentPane().add(viewerComponentPanel);
                window.pack();
                window.setDefaultCloseOperation(JFrame.HIDE_ON_CLOSE); //we only want to hide the window, not close it.
                window.setSize(new Dimension(800,600));
                
                //The Frame and controller are the only aspects of the report frame that need to be modified from elsewhere in the program (particularly AttributeCell, so they become part of the hashmap
                entry.setReportFrame(window);
                entry.setReportController(controller);

                //Now add the outline and bookmark items to the hash map
                OutlineItem entryItem = null;
                Outlines entryOutlines = controller.getDocument().getCatalog().getOutlines();
                if (entryOutlines != null) {
                    entryItem = entryOutlines.getRootOutlineItem();
                }
                if (entryItem != null) {
                    OutlineItemTreeNode outlineItemTreeNode = new OutlineItemTreeNode(entryItem);
                    outlineItemTreeNode.getChildCount();  // Added this line
                    Enumeration depthFirst = outlineItemTreeNode.depthFirstEnumeration();
                    // find the node you need
                }
                
                entry.setOutlineItem(entryItem);
                //entry.map.put("Outlines", entryOutlines); //this doesn't need to be added, it is only the items that are needed for locating
                
                
            } else {
                AttributeCell attributeCell = pane.getAttributeCell(attributeName);
                if (attributeCell == null) {
                    throw new IOException("attribute " + attributeName + " not found");
                }
                AttributeDomain domain = attributeCell.getDomain();
                AttributeValue value;
                if (domain.getType() == AttributeDomain.DISCRETE) {
                    String name = scanReader.scanString("%S");
                    value = new AttributeValue(name, domain);
                } else { // type == AttributeDomain.CONTINUOUS
                    double x = scanReader.scanDouble();
                    value = new AttributeValue(x, domain);
                }
                entry.map.put(attributeName, value);
            }
        }
        return entry;
    }