Wrox Programmer Forums
Go Back   Wrox Programmer Forums > .NET > Other .NET > Crystal Reports
|
Crystal Reports General discussion about Crystal Reports. For discussions specific to the book Professional Crystal Reports for VS.NET, please see the book discussion forum for that book.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Crystal Reports section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old August 27th, 2013, 09:39 AM
Registered User
 
Join Date: Aug 2013
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default Charts -- formatting from formulas

Has anyone found any chart formatting commands exposed to the formula editor? I'm trying to graph multiple series and stop / start a series based on a change in the data.
 
Old August 30th, 2013, 02:11 AM
Authorized User
 
Join Date: Mar 2012
Posts: 49
Thanks: 0
Thanked 0 Times in 0 Posts
Default Chart formation in java for net use?

Quote:
Originally Posted by labrat_6310 View Post
Has anyone found any chart formatting commands exposed to the formula editor? I'm trying to graph multiple series and stop / start a series based on a change in the data.
Hello
Hope you would try out with the following code & if ok reply
Thanks
As
muthukumatta
Finding is in java for furthe modification as follows:
Code:

import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
import javax.swing.table.*;

public class ChartTester extends JFrame {

  public ChartTester() {
    super("Simple JTable Test");
    setSize(300, 200);
    setDefaultCloseOperation(EXIT_ON_CLOSE);


    TableModel tm = new AbstractTableModel() {
      String data[][] = {
        {"Biler.com", "0.00", "68.68", "77.34", "78.02"},
        {"Hill.Com", "0.00", "70.89", "64.17", "75.00"},
        {"Horn.com", "00.52", ".12", "5.68", "74.14"},
        {"Reality.com", "70.00", "15.72", "26.40", "38.32"},
       // {"Ellen", "80.32", "78.16", "83.80", "85.72"}
      };
      String headers[] = { "", "Q1", "Q2", "Q3", "Q4" };
      public int getColumnCount() { return headers.length; }
      public int getRowCount() { return data.length; }
      public String getColumnName(int col) { return headers[col]; }
      public Class getColumnClass(int col) {
        return (col == 0) ? String.class : Number.class;
      }

      public boolean isCellEditable(int row, int col) { return true; }
      public Object getValueAt(int row, int col) { return data[row][col]; }
      public void setValueAt(Object value, int row, int col) {
        data[row][col] = (String)value;
        fireTableRowsUpdated(row,row);
      }
    };

    JTable jt = new JTable(tm);
    JScrollPane jsp = new JScrollPane(jt);
    getContentPane().add(jsp, BorderLayout.CENTER);

    final TableChartPopup tcp = new TableChartPopup(tm);
    JButton button = new JButton("Show me a chart of this table");
    button.addActionListener(new ActionListener() {
      public void actionPerformed(ActionEvent ae) {
        tcp.setVisible(true);
      }
    } );
    getContentPane().add(button, BorderLayout.SOUTH);
  }

  public static void main(String args[]) {
    ChartTester ct = new ChartTester();
    ct.setVisible(true);
  }
}
 
Old August 30th, 2013, 02:12 AM
Authorized User
 
Join Date: Mar 2012
Posts: 49
Thanks: 0
Thanked 0 Times in 0 Posts
Default Chart formation in java for net use?

Quote:
Originally Posted by labrat_6310 View Post
Has anyone found any chart formatting commands exposed to the formula editor? I'm trying to graph multiple series and stop / start a series based on a change in the data.
Hello
Hope you would try out with the following code & if ok reply
Thanks
As
muthukutta1
Finding is in java for furthe modification as follows:
Code:

import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
import javax.swing.table.*;

public class ChartTester extends JFrame {

  public ChartTester() {
    super("Simple JTable Test");
    setSize(300, 200);
    setDefaultCloseOperation(EXIT_ON_CLOSE);


    TableModel tm = new AbstractTableModel() {
      String data[][] = {
        {"Biler.com", "0.00", "68.68", "77.34", "78.02"},
        {"Hill.Com", "0.00", "70.89", "64.17", "75.00"},
        {"Horn.com", "00.52", ".12", "5.68", "74.14"},
        {"Reality.com", "70.00", "15.72", "26.40", "38.32"},
       // {"Ellen", "80.32", "78.16", "83.80", "85.72"}
      };
      String headers[] = { "", "Q1", "Q2", "Q3", "Q4" };
      public int getColumnCount() { return headers.length; }
      public int getRowCount() { return data.length; }
      public String getColumnName(int col) { return headers[col]; }
      public Class getColumnClass(int col) {
        return (col == 0) ? String.class : Number.class;
      }

      public boolean isCellEditable(int row, int col) { return true; }
      public Object getValueAt(int row, int col) { return data[row][col]; }
      public void setValueAt(Object value, int row, int col) {
        data[row][col] = (String)value;
        fireTableRowsUpdated(row,row);
      }
    };

    JTable jt = new JTable(tm);
    JScrollPane jsp = new JScrollPane(jt);
    getContentPane().add(jsp, BorderLayout.CENTER);

    final TableChartPopup tcp = new TableChartPopup(tm);
    JButton button = new JButton("Show me a chart of this table");
    button.addActionListener(new ActionListener() {
      public void actionPerformed(ActionEvent ae) {
        tcp.setVisible(true);
      }
    } );
    getContentPane().add(button, BorderLayout.SOUTH);
  }

  public static void main(String args[]) {
    ChartTester ct = new ChartTester();
    ct.setVisible(true);
  }
}





Similar Threads
Thread Thread Starter Forum Replies Last Post
Help with formulas billy1r Excel VBA 2 July 27th, 2011 09:14 AM
code for formulas tofimoon4 Excel VBA 16 October 28th, 2010 04:33 AM
Formatting Excel charts with VBA edwardluce Excel VBA 2 March 24th, 2010 06:40 PM
Formulas Juan0214 Access 4 July 2nd, 2008 02:04 PM
Inputbox and Formulas bahachin Excel VBA 3 February 17th, 2005 01:39 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.