Need help pulling unrelated counts into a report
Post Author: tminner
CA Forum: Crystal Reports
Right now I'm using Crystal 9 to create Performance Reviews for all our employees (about 400/month) and everything is fine except I need 4 counts for tardies, warnings, absences, and suspensions. Of course these are kept in unrelated tables for example I'm counting tardies from VP_TIMESHEETCOMMENTS.comments = "Tardy-Late for Work" and absences from VP_TIMESHEETCOMMENTS.comments = "Absent".
When I create running totals for these it works fine, however when I try to count warnings from EVENTS.event = "Warning" then all my running totals give me wrong information.
What would be a better way of doing this? I'm also grouping by person ID and have the entire Performance Review in the group footer. I just need accurate counts for the last year. Please help....
Tim
Post Author: crimson
CA Forum: Crystal Reports
Try this:
If you are grouping on 'person ID' in your main report, group on 'person ID' in your subreport. Then from your main report, Right Click on the subreport. Click on Change Subreport Links. Set up a subreport parameter field 'person ID' and it will create a parameter field in the subreport (ex: ?Pm-person_ID) that ties it to the group value in the main report. Be sure and click on the checkbox that says "Select data in subreport based on field:" with the person ID field name right underneath it.
Similar Messages
-
Complete novice needs help getting SQL Query into Crystal Reports XI
Post Author: MissMarnie
CA Forum: Data Connectivity and SQL
So I was given an intro level web course and a monster reference guide in prep to format a report. One of our developers wrote me everything I need for the report into a SQL Query and now I'm supposed to format it in CR XII literally do not know what to do from here. I'm able to set up the correct server as a datasource, if that's useful, but I don't know how to make the querey into a bunch of formattable fields in CR. If anyone can walk me through this, I'd be so grateful. I've attempted to look up SQL query in both the help and the book but I keep hitting a wall. The help dialog says things like "press this button" with no reference to what "this button" is. I'm sure it's obvious to the knowledgeable but I'm in a complete fog. Thanks in advancePost Author: synapsevampire
CA Forum: Data Connectivity and SQL
IF you're trying to get assistance with setting up a query as the source for a report, try posting your Crystal version and the database type.
Different software works differently.
In CR 9 and above, under the connection to the database you'll see Add Command. Select that and you can paste the query in.
As for not knowing how to generate a report, that requires experience, there's no generic solution of course..
-k -
Need help pulling data from an outside file into my array. Please help =)
Hi,
I need help adapting my array to read the interest rates from an outside file. Here is my code and the outside file I wrote. Please help. Oh, the array in question is on line 259, inside of my calculation() method.
Thanks...
import javax.swing.*;
import javax.swing.event.*;
import java.awt.*;
import java.awt.event.*;
import java.text.NumberFormat;
import java.text.DecimalFormat;
import java.io.*;
import javax.swing.JOptionPane;
public class Workshop5 extends JFrame implements ActionListener
//declare gui components
//declare labels
JPanel contentPane = new JPanel();
JPanel graphPane = new JPanel();
JLabel instructionLabel = new JLabel();
JLabel amountLabel = new JLabel();
JLabel orLabel = new JLabel();
JLabel comboBoxLabel = new JLabel();
JLabel termLabel = new JLabel();
JLabel rateLabel = new JLabel();
JLabel calcLabel = new JLabel();
JLabel paymentLabel = new JLabel();
JLabel tableLabel = new JLabel();
//declare font object
Font labelFont = new Font("Tahoma", Font.PLAIN, 16);
//declare text fields
JTextField amountField = new JTextField(20);
JTextField termField = new JTextField(20);
JTextField rateField = new JTextField(20);
JTextField paymentField= new JTextField(20);
//declare combo box for loan selection
JComboBox comboBox = new JComboBox();
//declare button group and radio buttons
ButtonGroup buttonGroup = new ButtonGroup();
JRadioButton enterRadioButton = new JRadioButton("Enter amount, term, & rate", true);
JRadioButton selectRadioButton = new JRadioButton("Select a preset term/rate loan", false);
//declare button objects
JButton clearButton = new JButton();
JButton calcButton = new JButton();
JButton quitButton = new JButton();
//declare text area for amortization
JTextArea amortTextArea = new JTextArea();
JTextArea testTextArea = new JTextArea();
//declare scroll bar for amortization table
JScrollPane scrollPane = new JScrollPane(amortTextArea,ScrollPaneConstants.VERTICAL_SCROLLBAR_ALWAYS,ScrollPaneConstants.HORIZONTAL_SCROLLBAR_AS_NEEDED);
public Workshop5()
instructionLabel.setText("Choose one of the following payment calculation options:");
instructionLabel.setFont(new Font("Tahoma",Font.PLAIN,16));
//adds both buttons to button group
buttonGroup.add(enterRadioButton);
buttonGroup.add(selectRadioButton);
enterRadioButton.setFont(labelFont);
enterRadioButton.setBackground(Color.WHITE);
enterRadioButton.setContentAreaFilled(false);
enterRadioButton.addActionListener(this); //adds action listener to enter radio button
orLabel.setText("OR");
orLabel.setFont(new Font("Tahoma",Font.BOLD,18));
selectRadioButton.setFont(labelFont);
selectRadioButton.setBackground(Color.WHITE);
selectRadioButton.setContentAreaFilled(false);
selectRadioButton.addActionListener(this); //adds action listener to select radio button
amountLabel.setText("Enter mortgage amount");
amountLabel.setFont(new Font("Tahoma", Font.PLAIN,16));
amountField.requestFocusInWindow();
termLabel.setText("Enter term length in years:");
termLabel.setFont(new Font("Tahoma", Font.PLAIN,14));
rateLabel.setText("Enter interest rate:");
rateLabel.setFont(new Font("Tahoma", Font.PLAIN,14));
comboBoxLabel.setText("Select a loan:");
comboBoxLabel.setFont(new Font("Tahoma", Font.PLAIN,14));
comboBox.setBackground(new Color(255,255,255));
comboBox.setFont(new Font("Tahoma", Font.PLAIN, 14));
comboBox.setEnabled(false);
ComboBox();
calcLabel.setText("Press Calculate button to determine monthly payment.");
calcLabel.setFont(new Font("Tahoma", Font.PLAIN, 16));
calcButton.setText("Calculate");
calcButton.setFont(new Font("Tahoma", Font.BOLD, 14));
calcButton.addActionListener(this);
//define monthly payment label
paymentLabel.setText("Monthly payment:");
paymentLabel.setFont(new Font("Tahoma", Font.PLAIN, 16));
//define monthly payment text field
paymentField.setFont(new Font("Tahoma", Font.BOLD,16));
paymentField.setBackground(new Color(255,255,255));
paymentField.setEditable(false);
//define clear button
clearButton.setText("Clear");
clearButton.setFont(new Font("Tahoma", Font.BOLD,14));
clearButton.addActionListener(this);
//define quit button
quitButton.setText("Quit");
quitButton.setFont(new Font("Tahoma", Font.BOLD,14));
quitButton.addActionListener(this);
tableLabel.setText("Amoritization Table");
tableLabel.setFont(new Font("Tahoma", Font.BOLD, 16));
graphPane.setBackground(Color.WHITE);
//add components to content
getContentPane().add(contentPane);
contentPane.setLayout(null);
addComponent(contentPane, instructionLabel, 80,10,450,26);
addComponent(contentPane, enterRadioButton, 30,40,220,30);
addComponent(contentPane, orLabel, 280,40,100,30);
addComponent(contentPane, selectRadioButton, 335,40,350,30);
addComponent(contentPane, amountLabel, 100,80,220,26);
addComponent(contentPane, amountField, 300,80,150,26);
addComponent(contentPane, termLabel, 15,125,200,30);
addComponent(contentPane, termField, 195,125,125,30);
addComponent(contentPane, rateLabel, 62,160,200,30);
addComponent(contentPane, rateField, 195,165,125,30);
addComponent(contentPane, comboBoxLabel, 400,125,200,26);
addComponent(contentPane, comboBox, 400,155,150,30);
addComponent(contentPane, calcLabel, 100,200,400,30);
addComponent(contentPane, calcButton, 250,240,100,30);
addComponent(contentPane, paymentLabel, 150,285,200,30);
addComponent(contentPane, paymentField, 300,285,100,30);
addComponent(contentPane, clearButton, 100,330,100,30);
addComponent(contentPane, quitButton, 400,330,100,30);
addComponent(contentPane, tableLabel, 200,370,300,26);
addComponent(contentPane, scrollPane, 10,400,450,360);
addComponent(contentPane, graphPane, 475,400,305,360);
//add window listener to close window when user presses X
addWindowListener(new WindowAdapter()
public void windowClosing(WindowEvent e)
System.exit(0);
pack();
//method to add components
private void addComponent(Container container, Component c, int x, int y, int width, int height)
c.setBounds(x, y, width, height);
container.add(c);
//action performed method
public void actionPerformed(ActionEvent event)
Object source = event.getSource();
if (source == calcButton)
Calculate();
if (source == clearButton)
Clear();
if (source == quitButton)
Exit();
//defines active area based on user selection of mortgage calculation method
//if user chooses to enter the mortgage manually, combo box fields are inactive
if (source == enterRadioButton)
comboBox.setEnabled(false);
termField.setEnabled(true);
termField.setEditable(true);
rateField.setEnabled(true);
rateField.setEditable(true);
amountField.setText("");
amountField.requestFocusInWindow();
termField.setText("");
rateField.setText("");
paymentField.setText("");
amortTextArea.setText("");
//if user chooses to select from a preset mortgage, rate and term fields are inactive
if (source == selectRadioButton)
comboBox.setEnabled(true);
termField.setEnabled(false);
termField.setEditable(false);
rateField.setEnabled(false);
rateField.setEditable(false);
amountField.setText("");
amountField.requestFocusInWindow();
termField.setText("");
rateField.setText("");
paymentField.setText("");
amortTextArea.setText("");
}//end of action performed method
//combo box method
public void ComboBox()
String[] LoanArray = {" 7 years at 5.35 %", " 15 years at 5.50 %", " 30 years at 5.75 %"};
for (int i = 0; i < LoanArray.length; i++)
comboBox.addItem(LoanArray);
}//end combo box method
//calculation method
void Calculate()
//resets fields
paymentField.setText("");
amortTextArea.setText("");
//calculation variables
NumberFormat currency = NumberFormat.getCurrencyInstance();
int [] termArray = {7, 15, 30}; //array of years
double [] yearlyInterestArray = {5.35, 5.5, 5.75}; //array of interest
int totalMonths = 0; //total months
double Loan = 0.0; //amount of loan
double MonthlyInterest = 0.0; //monthly interest rate
double Payment = 0.0; //calculate payment
double monthlyPayment = 0.0; //calculate monthly payment
double Interest = 0.0; //variable for Interest Array input
int Term = 0; //variable for Term Array input
double NewMonthlyInterest = 0.0; //new interest amount
double NewLoan = 0.0; //new loan amount
double Reduction = 0.0; //principle reduction
//validate input
try
Loan = Double.parseDouble(amountField.getText());
catch (NumberFormatException e)
JOptionPane.showMessageDialog(null,"Invalid Entry. Please enter valid loan amount.", "Error", JOptionPane.WARNING_MESSAGE);
//resets input fields after error message
amountField.setText("");
amountField.requestFocusInWindow();
//if select button is chosen
if (selectRadioButton.isSelected())
int index = comboBox.getSelectedIndex();
Term = termArray[index];
Interest = yearlyInterestArray[index];
//if user chooses to enter mortgage information
else
if (enterRadioButton.isSelected())
//validates input
try
Term = Integer.parseInt(termField.getText());
catch (NumberFormatException e)
JOptionPane.showMessageDialog(null,"Invalid entry. Please enter valid term length in years.", "Error",JOptionPane.WARNING_MESSAGE);
//clears fields after error message
termField.setText("");
termField.requestFocusInWindow();
try
Interest = Double.parseDouble(rateField.getText());
catch (NumberFormatException e)
JOptionPane.showMessageDialog(null,"Invalid entry. Please enter valid rate (without percent symbol).","Error",JOptionPane.WARNING_MESSAGE);
//clears fields after error message
rateField.setText("");
rateField.requestFocusInWindow();
//perform calculations
if (Loan > 0)
Loan = Double.parseDouble(amountField.getText());
MonthlyInterest = (Interest / 12)/100;
totalMonths = Term * 12;
monthlyPayment = Loan * MonthlyInterest *(Math.pow((1 + MonthlyInterest), totalMonths)/(Math.pow((1 + MonthlyInterest), totalMonths)-1));
paymentField.setText("" + currency.format(monthlyPayment));
//send information to amortization text area
amortTextArea.append("Number\t");
amortTextArea.append(" Amount\t");
amortTextArea.append("Interest\t");
amortTextArea.append("Principle\t");
amortTextArea.append("Balance\n");
NewLoan = Loan;
for (int i = 1; i <= totalMonths; i++)
NewMonthlyInterest = MonthlyInterest * NewLoan;
Reduction = monthlyPayment - NewMonthlyInterest;
NewLoan = NewLoan - Reduction;
amortTextArea.append(" " + i +"\t");
amortTextArea.append(" " + currency.format(monthlyPayment) + "\t");
amortTextArea.append(" " + currency.format(NewMonthlyInterest)+ "\t");
amortTextArea.append(" " + currency.format(Reduction) + "\t");
amortTextArea.append(" " + currency.format(NewLoan) + "\n");
//resets fields if loan amount is less than zero
if((Loan <= 0 || Term <= 0 || Interest <= 0))
paymentField.setText("");
amortTextArea.setText("");
}//end calcualtion method
//clear method
void Clear()
amountField.setText("");
amountField.requestFocusInWindow();
termField.setText("");
rateField.setText("");
paymentField.setText("");
amortTextArea.setText("");
}//end of clear method
//main method
public static void main(String args[])
Workshop5 f = new Workshop5();
f.setTitle("Carol's Mortgage Calculator");
f.setBounds(200,100,800,800);
f.setResizable(false);
f.setVisible(true);
}//end of main method
//exit method
void Exit()
System.exit(0);
}//end of exit method
}//program end
My data file is called: "InterestData.dat" and only contains the following text:
5.35, 5.5, 5.75Ok, now I am getting this error message:
cannot resolve symbol method lenght()
Please help me out here, this is due tomorrow and I've been killing myself on it...
attaching program with revised code included, see beginning of calculation method line 250:
import javax.swing.*;
import javax.swing.event.*;
import java.awt.*;
import java.awt.event.* ;
import java.text.NumberFormat;
import java.text.DecimalFormat;
import java.io.*;
import javax.swing.JOptionPane;
public class Workshop5 extends JFrame implements ActionListener
//declare gui components
//declare labels
JPanel contentPane = new JPanel();
JPanel graphPane = new JPanel();
JLabel instructionLabel = new JLabel();
JLabel amountLabel = new JLabel();
JLabel orLabel = new JLabel();
JLabel comboBoxLabel = new JLabel();
JLabel termLabel = new JLabel();
JLabel rateLabel = new JLabel();
JLabel calcLabel = new JLabel();
JLabel paymentLabel = new JLabel();
JLabel tableLabel = new JLabel();
//declare font object
Font labelFont = new Font("Tahoma", Font.PLAIN, 16);
//declare text fields
JTextField amountField = new JTextField(20);
JTextField termField = new JTextField(20);
JTextField rateField = new JTextField(20);
JTextField paymentField= new JTextField(20);
//declare combo box for loan selection
JComboBox comboBox = new JComboBox();
//declare button group and radio buttons
ButtonGroup buttonGroup = new ButtonGroup();
JRadioButton enterRadioButton = new JRadioButton("Enter amount, term, & rate", true);
JRadioButton selectRadioButton = new JRadioButton("Select a preset term/rate loan", false);
//declare button objects
JButton clearButton = new JButton();
JButton calcButton = new JButton();
JButton quitButton = new JButton();
//declare text area for amortization
JTextArea amortTextArea = new JTextArea();
JTextArea testTextArea = new JTextArea();
//declare scroll bar for amortization table
JScrollPane scrollPane = new JScrollPane(amortTextArea, ScrollPaneConstants.VERTICAL_SCROLLBAR_ALWAYS,ScrollPaneConstants.HORIZONTAL_SCROLLBAR_AS_NEEDED);
public Workshop5()
instructionLabel.setText("Choose one of the following payment calculation options:");
instructionLabel.setFont(new Font("Tahoma",Font.PLAIN,16));
//adds both buttons to button group
buttonGroup.add(enterRadioButton);
buttonGroup.add (selectRadioButton);
enterRadioButton.setFont(labelFont);
enterRadioButton.setBackground(Color.WHITE);
enterRadioButton.setContentAreaFilled(false);
enterRadioButton.addActionListener(this); //adds action listener to enter radio button
orLabel.setText("OR");
orLabel.setFont(new Font("Tahoma",Font.BOLD,18));
selectRadioButton.setFont(labelFont);
selectRadioButton.setBackground(Color.WHITE);
selectRadioButton.setContentAreaFilled(false);
selectRadioButton.addActionListener (this); //adds action listener to select radio button
amountLabel.setText("Enter mortgage amount");
amountLabel.setFont(new Font("Tahoma", Font.PLAIN,16));
amountField.requestFocusInWindow();
termLabel.setText("Enter term length in years:");
termLabel.setFont(new Font("Tahoma", Font.PLAIN,14));
rateLabel.setText("Enter interest rate:");
rateLabel.setFont(new Font("Tahoma", Font.PLAIN,14));
comboBoxLabel.setText("Select a loan:");
comboBoxLabel.setFont(new Font("Tahoma", Font.PLAIN,14));
comboBox.setBackground(new Color(255,255,255));
comboBox.setFont(new Font("Tahoma", Font.PLAIN, 14));
comboBox.setEnabled(false);
ComboBox();
calcLabel.setText("Press Calculate button to determine monthly payment.");
calcLabel.setFont(new Font("Tahoma", Font.PLAIN, 16));
calcButton.setText("Calculate");
calcButton.setFont(new Font("Tahoma", Font.BOLD, 14));
calcButton.setBackground(new Color(202,255,112));
calcButton.addActionListener(this);
//define monthly payment label
paymentLabel.setText("Monthly payment:");
paymentLabel.setFont(new Font("Tahoma", Font.PLAIN, 16));
//define monthly payment text field
paymentField.setFont (new Font("Tahoma", Font.BOLD,16));
paymentField.setBackground(new Color(255,255,255));
paymentField.setEditable(false);
//define clear button
clearButton.setText("Clear");
clearButton.setFont(new Font("Tahoma", Font.BOLD,14));
clearButton.setBackground(new Color(202,255,112));
clearButton.addActionListener(this);
//define quit button
quitButton.setText("Quit");
quitButton.setFont(new Font("Tahoma", Font.BOLD,14));
quitButton.setBackground(new Color(202,255,112));
quitButton.addActionListener(this);
//define label for amortization table
tableLabel.setText ("Amoritization Table");
tableLabel.setFont(new Font("Tahoma", Font.BOLD, 16));
graphPane.setBackground(Color.WHITE);
//add components to content
getContentPane().add(contentPane);
contentPane.setLayout(null);
addComponent(contentPane, instructionLabel, 80,10,450,26);
addComponent(contentPane, enterRadioButton, 30,40,220,30);
addComponent(contentPane, orLabel, 280,40,100,30);
addComponent(contentPane, selectRadioButton, 335,40,350,30);
addComponent(contentPane, amountLabel, 100,80,220,26);
addComponent(contentPane, amountField, 300,80,150,26);
addComponent(contentPane, termLabel, 15,125,200,30);
addComponent(contentPane, termField, 195,125,125,30);
addComponent(contentPane, rateLabel, 62,160,200,30);
addComponent(contentPane, rateField, 195,165,125,30);
addComponent(contentPane, comboBoxLabel, 400,125,200,26);
addComponent(contentPane, comboBox, 400,155,150,30);
addComponent(contentPane, calcLabel, 100,200,400,30);
addComponent(contentPane, calcButton, 250,240,100,30);
addComponent(contentPane, paymentLabel, 150,285,200,30);
addComponent(contentPane, paymentField, 300,285,100,30);
addComponent(contentPane, clearButton, 100,330,100,30);
addComponent(contentPane, quitButton, 400,330,100,30);
addComponent(contentPane, tableLabel, 200,370,300,26);
addComponent(contentPane, scrollPane, 10,400,450,360);
addComponent(contentPane, graphPane, 475,400,305,360);
//add window listener to close window when user presses X
addWindowListener(new WindowAdapter()
public void windowClosing(WindowEvent e)
System.exit(0);
pack();
//method to add components
private void addComponent(Container container, Component c, int x, int y, int width, int height)
c.setBounds(x, y, width, height);
container.add(c);
//action performed method
public void actionPerformed(ActionEvent event)
Object source = event.getSource();
if (source == calcButton)
Calculate();
if (source == clearButton)
Clear();
if (source == quitButton)
Exit();
//defines active area based on user selection of mortgage calculation method
//if user chooses to enter the mortgage manually, combo box fields are inactive
if (source == enterRadioButton)
comboBox.setEnabled(false);
termField.setEnabled(true);
termField.setEditable(true);
rateField.setEnabled(true);
rateField.setEditable(true);
amountField.setText ("");
amountField.requestFocusInWindow();
termField.setText("");
rateField.setText("");
paymentField.setText ("");
amortTextArea.setText("");
//if user chooses to select from a preset mortgage, rate and term fields are inactive
if (source == selectRadioButton)
comboBox.setEnabled(true);
termField.setEnabled(false);
termField.setEditable(false);
rateField.setEnabled (false);
rateField.setEditable(false);
amountField.setText("");
amountField.requestFocusInWindow();
termField.setText ("");
rateField.setText("");
paymentField.setText("");
amortTextArea.setText("");
}//end of action performed method
//combo box method
public void ComboBox()
String[] LoanArray = {" 7 years at 5.35 %", " 15 years at 5.50 %", " 30 years at 5.75 %"};
for (int i = 0; i < LoanArray.length; i++)
comboBox.addItem(LoanArray);
}//end combo box method
//calculation method
void Calculate()
//resets fields
paymentField.setText("");
amortTextArea.setText("");
//calculation variables
NumberFormat currency = NumberFormat.getCurrencyInstance();
//declare input stream object
InputStream istream;
//create a file object to refer to the outside file
File interestData = new File("InterestFile.dat");
//assign instream to the new file object
istream = new FileInputStream(interestData);
try
StringBuffer sb = new StringBuffer();
BufferedReader in = new BufferedReader(new FileReader(interestData));
String line = "";
while((line = in.readLine()) != null)
sb.append(line);
in.close();
String fileData = sb.toString();
String[] splitData = fileData.split(", ");
double [] yearlyInterestArray = new double[splitData.length()];
for(int j = 0; j < splitData.length(); j++)
yearlyInterestArray[j] = new Double(splitData[j]).doubleValue();
catch (IOException e)
JOptionPane.showMessageDialog(null, "File does not exist." + e.getMessage());
int [] termArray = {7, 15, 30}; //array of years
double [] yearlyInterestArray = { 5.35, 5.5, 5.75}; //array of interest
int totalMonths = 0; //total months
double Loan = 0.0; //amount of loan
double MonthlyInterest = 0.0; //monthly interest rate
double Payment = 0.0; //calculate payment
double monthlyPayment = 0.0; //calculate monthly payment
double Interest = 0.0; //variable for Interest Array input
int Term = 0; //variable for Term Array input
double NewMonthlyInterest = 0.0; //new interest amount
double NewLoan = 0.0; //new loan amount
double Reduction = 0.0; //principle reduction
//validate input
try
Loan = Double.parseDouble(amountField.getText());
catch (NumberFormatException e)
JOptionPane.showMessageDialog(null,"Invalid Entry. Please enter valid loan amount.", "Error", JOptionPane.WARNING_MESSAGE);
//resets input fields after error message
amountField.setText("");
amountField.requestFocusInWindow ();
//if select button is chosen
if (selectRadioButton.isSelected())
int index = comboBox.getSelectedIndex ();
Term = termArray[index];
Interest = yearlyInterestArray[index];
//if user chooses to enter mortgage information
else
if (enterRadioButton.isSelected())
//validates input
try
Term = Integer.parseInt(termField.getText());
catch (NumberFormatException e)
JOptionPane.showMessageDialog(null,"Invalid entry. Please enter valid term length in years.", "Error",JOptionPane.WARNING_MESSAGE);
//clears fields after error message
termField.setText("");
termField.requestFocusInWindow();
try
Interest = Double.parseDouble(rateField.getText());
catch (NumberFormatException e)
JOptionPane.showMessageDialog(null,"Invalid entry. Please enter valid rate (without percent symbol).","Error",JOptionPane.WARNING_MESSAGE);
//clears fields after error message
rateField.setText("");
rateField.requestFocusInWindow();
//perform calculations
if (Loan > 0)
Loan = Double.parseDouble(amountField.getText ());
MonthlyInterest = (Interest / 12)/100;
totalMonths = Term * 12;
monthlyPayment = Loan * MonthlyInterest *(Math.pow ((1 + MonthlyInterest), totalMonths)/(Math.pow((1 + MonthlyInterest), totalMonths)-1));
paymentField.setText("" + currency.format(monthlyPayment));
//send information to amortization text area
amortTextArea.append("Number\t");
amortTextArea.append(" Amount\t");
amortTextArea.append("Interest\t");
amortTextArea.append("Principle\t");
amortTextArea.append("Balance\n");
NewLoan = Loan;
for (int i = 1; i <= totalMonths; i++)
NewMonthlyInterest = MonthlyInterest * NewLoan;
Reduction = monthlyPayment - NewMonthlyInterest;
NewLoan = NewLoan - Reduction;
amortTextArea.append(" " + i +"\t");
amortTextArea.append (" " + currency.format(monthlyPayment) + "\t");
amortTextArea.append(" " + currency.format(NewMonthlyInterest)+ "\t");
amortTextArea.append(" " + currency.format(Reduction) + "\t");
amortTextArea.append(" " + currency.format(NewLoan) + "\n");
//resets fields if loan amount is less than zero
if((Loan <= 0 || Term <= 0 || Interest <= 0))
paymentField.setText("");
amortTextArea.setText("");
}//end calcualtion method
//clear method
void Clear()
amountField.setText("");
amountField.requestFocusInWindow();
termField.setText("");
rateField.setText("");
paymentField.setText("");
amortTextArea.setText("");
}//end of clear method
//main method
public static void main(String args[])
Workshop5 f = new Workshop5();
f.setTitle("Carol's Mortgage Calculator");
f.setBounds(200,100,800,800);
f.setResizable(false);
f.setVisible(true);
}//end of main method
//exit method
void Exit()
System.exit(0);
}//end of exit method
}//program end -
Need help showing multiple parameters in a report header
Post Author: Annette
CA Forum: Formula
hi-- i am new to this and i have created a report where the person picks one or more items (they are different hospital suites) and i need for them to print on the report header all of the selections that they chose. right now it only prints the name of the first one they choose..
any help would be good..
i do know it's a string value....
thank-you for anything you can help me with....
basically if 1 is picked then it needs to state that name, if 2 or more are picked id like it to say Name, name, name, etx...Post Author: Annette
CA Forum: Formula
the actual parameter is a number, but what im trying to populate on the heading is the name of the number..
for example... when you choose the resource unit of 31 when you refresh i want it to show the name of it which is ORA Surgery.... but if they choose 31 & 53 then id like it to show ORA Surgery, ORD Surgery.... right now it just pulls the first name choosen.. does that make sense..
so the parameter is a number, but the name(the one i want populated) is a string
and oh gosh,, thanks for your quick responses.. -
I need help dividing an image into two equal parts in Adobe Illustrator CC--ASAP!!!
I need help dividing a single, already created image into 2 equal parts...Am getting nowhere so far
Hi Willi, thanks so much for responding! Below is the image I need to divide in half. The left half where it says "Click here for the definition" links to a landing page where people can read the definition of the Hebrew Word. The right half links to an audio recording of the Hebrew word being spoken aloud. I am trying to figure out how to use the scissors or knife tool in Adobe Illustrator and am having no luck. Plus I believe there's a way to include URLs on each separated part, but I can't get past figuring out how to cut it. My background is not graphic design
-
Need help uploading mp4 file into Muse
Help please!
I have a very nice quality, short animation I want to add to my Muse website's home page, but am stuck on putting the video file into the site. I have found that I need to change the mp4 into a swf (flash) file, but I couldn't get that to work either. (Flash gives me the error: "One or more files were not imported because there were problems reading them." when trying to import the mp4 and mov file to convert to swf. I have tried HTML5 also, but can't seem to get the code right.
Can anyone help me get this video file into a Muse site? If that means I just copy a piece of code and put it into Muse that would be great. If it means I just have to drag and drop, that would be even better! (dreaming a little bit!)
Thank you!HI,
try some suggestion given in following threads
Re: Adding HTML5 Video in Adobe Muse
Re: embedding video in Muse
A useful video
Do let me know if you have any question. -
Need help in identifying fields of sd report creation
Hi Experts,
I need to create report in sd from manual report .The fileds in report are taken from Quickbooks.so inorder to create report in sap I need to identify fields in sap first.we dont had functional guy so i need help in identifying fields in sap for below mentioned report.
Report: invoice distribution report-service billing for all states.
Fields:customer number,customer name,city state,SAP Document number,Invoice date,period(month,year)invoice number,invoice type,currency,invoice amount in usd.
Please help me in suggesting tcodes or table names from where i can fetch these fields.
Thanking you in advance.
Regards,
narasimha.Hi Experts,
Finally with all above suggestions i have chosen tables vbrk(billing document header data),kna1(customer header),vbrp.
1.I created view to find the output of report with conditions as follows:
tables:vbrk,kna1,vbrp
vbrk-vbeln(invoice number)
vbrk-fkart(invoice type)
vbrk-fkdat(invoice date)
vbrk-waerk(currency)
vbrk-netwr(netvalue)
vbrk-kunag(customer number)
kna1-name1(customer name)
kna1-ort01(customer city)
kna1-regio(customer state)
join condition:
kna1-mandt=vbrk-mandt
kna1-kunnr=vbrk-kunag.
when i execute the report i am getting same value for lot of times.
i am confused how to include sales document number.I hope sales document number and invoice are different.
2.i have also added vbrp-aubel and join condition as
vbrk-mandt = vbrp-mandt
vbrk-vbeln = vbrp-vbeln.
but when i execute the report i am getting lot of duplicated with same value and unknown invoice numbers.
please let me know where i went wrong.
is there any standard adhoc report so that i can manipulate it with above requirement.
vf05n is somewhat useful .is it possible to add customer details in this??
Thanks&Regards,
narasimha. -
Need help adding a second page on reports builder, paper layout.
Hi,
I have a requirement where I need to create a paper layout using Reports Builder (10.1.2.0.2). This report will print out the following:
1) Invoice
2) VAT Slip (on a separate page)
So far I have created the invoice part and it is printing properly. Now I want to add the Vat slip. When I use the "Trailer Section" on the rdf report, I create a frame and inserted some text. The report ran just fine. Then in the same frame, I added a repeating frame. And now the report is completing with the following error:
APPLLCSP Environment Variable set to :
Current NLS_LANG and NLS_NUMERIC_CHARACTERS Environment Variables are :
American_America.UTF8
stat_low = 86
stat_high = 0
emsg:was terminated by signal 6
Enter Password:
MSG-00100: DEBUG: AfterPForm_Trigger +
MSG-00100: DEBUG: Multi Org established.
MSG-00100: DEBUG: AfterParam_Procs.Get_Country_Details
MSG-00100: DEBUG: Get_Country_Description.
MSG-00100: DEBUG: AfterParam_Procs.Switch_On_Debug
MSG-00100: Running in debug mode
MSG-00100: DEBUG: AfterParam_Procs.Get_Trx_Number_Low
MSG-00100: DEBUG: AfterParam_Procs.Get_Trx_Number_High
MSG-00100: DEBUG: AfterParam_Procs.Get_Tax_Option
MSG-00100: DEBUG: AfterPForm_Trigger -
*** glibc detected *** ora_rw20_run: munmap_chunk(): invalid pointer: 0x09067b10 ***
Anyone have any idea why this is happening? Any help is much appreciated.
Or is there any way I can add a page that has to be printed after the invoice?
Thanks
-NellyIf you have created your own template (but it sounds like you haven't) you will need to 'capture' that page so it repeats on following pages.
The whole process is described here:
"Letterhead and follower sets"
http://www.freeforum101.com/iworktipsntrick/viewtopic.php?t=182&mforum=iworktips ntrick
Peter -
Need help regarding Cycle counting
Hi All,
I need your help regarding cycle counting process in SAP PI. The scenario is as follows,
At present in the legacy system business practice is to count certain number of materials say 100 materials every day. Out of these 100 materials; we keep fixed percentage for the materials to be counted i.e. out of 100 certain percentage will of A material, certain percentage will of B materials like wise.
Also every day we want to generate a list of these 100 materials to be counted (this list can be handed over to inventory person to physically count the material) and generation of PI documents to subsequently post the count results.
Please note that we will be manually assigning cycle count indicator (A or B or C etc) in the material master.
Thanks,
Attardefrom OSS Note 518418 - FAQ: Cycle Counting
3. Question:
I do not understand the determination of the date of physical inventory in the cycle counting physical inventory. How is the planned date or the date of physical inventory determined in the SAP system?
Answer:
In principle, the program calculates the planned date of physical inventory according to the following formula:
planned date = base date + Interval (Trans.OMCO/Tab.XT159C-ININV)
Usually, the base date is the 'date of the last physical inventory'. Depending on the type of the stock or the batch management requirement, this date is read from one of the following table fields:
MARD-DLINL (Normal materials)
MCHB-CHDLL (Batch materials, separately valuated materials)
If no physical inventory has been carried out yet and if this date field is therefore empty, the system uses the creation date of the material as basis date. The basis date then comes from one of the following table fields:
MSTA-ERSDA (Normal materials)
MCHB-ERSDA (Batch materials, separately valuated materials)
Since the cycle counting physical inventory always runs for the current fiscal year, the earliest possible physical inventory date is the 01.01. and the latest possible physical inventory date is the 31.12 of the current year.
If the date of the physical inventory is a non-working day, the program automatically proposes the next possible workday. -
Please Need help for change chart automaticly in report builder
Hello,
I have a problem under transfer Builder oracle 6i and I wish that you help me.
I developed a report which contains a Camembert cheese, The parameters to enter are the date of edition and the code of the customer. For every customer that works very well. But when I wish to generate all the customers I have to get back the code of the customer from the request and to spend it in parameter automatically without the seizure of the code, the information of the customer is exact but the Camembert cheese generates without change and I think that I have to cross(spend) the code of the customer in parameter in the Camembert cheese but I do not know how.
My questions:
how to give a parameter in a Camembert cheese under graphic builder either adjournment(transfer)?
do you have another solution so that the Camembert cheese generates for every customer?
Thank you very muchcan someone please give a work around for this issue.
Regards,
Amrit -
Need help with integrating chat into Gui
Hello Guys,
I'm fairly new to Java and I have a quick question regarding a simple chat program in java. My problem is that I have a simple chat program that runs from its own JFrame etc. Most of you are probably familiar with the code below, i got it from one of my java books. In any case, what I'm attempting to do is integrate this chat pane into a gui that i have created. I attempted to call an instace of the Client class from my gui program so that I can use the textfield and textarea contained in my app, but it will not allow me to do it. Would I need to integrate this code into the code for my Gui class. I have a simple program that contains chat and a game. The code for the Client is listed below.
import java.awt.*;
import java.awt.event.*;
import java.io.*;
import java.net.*;
import javax.swing.*;
public class Client
extends JPanel {
public static void main(String[] args) throws IOException {
String name = args[0];
String host = args[1];
int port = Integer.parseInt(args[2]);
final Socket s = new Socket(host, port);
final Client c = new Client(name, s);
JFrame f = new JFrame("Client : " + name);
f.addWindowListener(new WindowAdapter() {
public void windowClosing(WindowEvent we) {
c.shutDown();
System.exit(0);
f.setSize(300, 300);
f.setLocation(100, 100);
f.setContentPane(c);
f.setVisible(true);
private String mName;
private JTextArea mOutputArea;
private JTextField mInputField;
private PrintWriter mOut;
public Client(final String name, Socket s)
throws IOException {
mName = name;
createUI();
wireNetwork(s);
wireEvents();
public void shutDown() {
mOut.println("");
mOut.close();
protected void createUI() {
setLayout(new BorderLayout());
mOutputArea = new JTextArea();
mOutputArea.setLineWrap(true);
mOutputArea.setEditable(false);
add(new JScrollPane(mOutputArea), BorderLayout.CENTER);
mInputField = new JTextField(20);
JPanel controls = new JPanel();
controls.add(mInputField);
add(controls, BorderLayout.SOUTH);
mInputField.requestFocus();
protected void wireNetwork(Socket s) throws IOException {
mOut = new PrintWriter(s.getOutputStream(), true);
final String eol = System.getProperty("line.separator");
new Listener(s.getInputStream()) {
public void processLine(String line) {
mOutputArea.append(line + eol);
mOutputArea.setCaretPosition(
mOutputArea.getDocument().getLength());
protected void wireEvents() {
mInputField.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent ae) {
String line = mInputField.getText();
if (line.length() == 0) return;
mOut.println(mName + " : " + line);
mInputField.setText("");I think the easiest way to do it would be to cut an paste most of that code into your program. Then all you have to do is change some names so that it uses your textfield and textarea.
-
Hi All,
I am new to B2B. I am getting following error in B2B Console please suggest what could be the reason and possible steps to resolve:
Machine Info: (fcgemapptest05)
Description: General Error
StackTrace:
Error -: AIP-50014: General Error
at oracle.tip.adapter.b2b.engine.Engine.processOutgoingMessage(Engine.java:1194)
at oracle.tip.adapter.b2b.data.MsgListener.onMessage(MsgListener.java:836)
at oracle.tip.adapter.b2b.data.MsgListener.run(MsgListener.java:402)
at java.lang.Thread.run(Thread.java:534)
Regards,
SujanCan you tell me what's the status of components (value of "In sync" column) when you run "dcmctl getState" command?
Thanks
Shail -
I need help making a query into a recordset
I have a detail page with a query that uses the "IN" statement to select from multiple states from the state_label field in my table
and display the zips, cities, and counties related to those states.
The query works great if I use regular menus with a single selection, but I need a comma separated menu
to be used to allow for multiple zips, cities and counties to be selected.
In order to make a texbox into a comma separated menu, I need to define my recordset to retrieve the values, I just can't figure out how to make amy query into a recordset.
This is the query.
<?php require_once('../Connections/duitop.php'); ?>
<?php $state_list = $_REQUEST['States_served']; ?>
<?php
mysql_select_db($database_duitop, $duitop);
$query_TONY = ("SELECT * FROM zip_code WHERE state_label IN (";
for ($i=0; $i<=count($state_list)-1; $i++) {
//echo $state_list[$i];
$query_TONY = $query_TONY . "'" . $state_list[$i] . "'";
if ($i < count($state_list)-1) {
$query_TONY = $query_TONY . ", ";
$query_TONY = $query_TONY . ") GROUP BY county ORDER BY state_label, city ASC");
?>
CAn any one please help with this problem , I've been trying for a week with no luck.
This is the way my detail page looks like.
Cities, Counties, and Zipcodes in your statesAs far as I know this will be included in the next ISO release. I solved it by manually bringing the dmraid package to the install and wrote a guide on installing your root system on dmraid. However when the system crashes I have the slight inconvenience of having to install dmraid and manually mount the sets to do a recovery. I guess this is the part you want to get rid of aswell. I decided to wait until the next holy ISO.
-
Need help in Multi language XML Publisher report
Hi Experts,
I am working in EBS R12, database 10g.
I am have a requirement to develop the multilanuge XML Publisher report.
Details i have till now:
query in report builder: select * from emp;
RTF: created RTF(test_rtf)
Datadefinition: test_dd
Template:test_t (Language:English, terittory:US, uploaded the RTF)
Requirement: I need the output in English and German Language.
For French language, how to proceed further.... Could somebody help me with procedure to get it.
Do i need to create any RTF and Template for FRENCH language.
Kindly help me with procedure to be followed.
Thanks in advance.Hi Experts,
I have below procedure to achieve this but still not able to print output in desired language.
1. created rtf
2. created data definition (dd)
3. created template (tt) [language-english, terittory-US, translatable].
4. Exported the translated file(.xlf file) to local system
5. In .xlf file, changed the target language to 'fr-FR' (I want to print in french)
6. It was successfull done and status is complete
Through SRS window, i submitted the program...but it's still showing output in english only not in french.
Note:At SRS window, it's showing only ENGLISH LANGUAGE.
Am i missing anything....How to show desired languages at SRS WINDOW.
Could somebody help me how to print data in FRENCH language.
I hope that i can get the solution from this forum.
Thanks in advance. -
Need help on self referencing a ssrs report
Hi All,
I have a graph on one of my report which shows data on level 1 by default and go on showing level 2 and level 3 data on successive clicks. This has been achieved by self referencing a ssrs report and passing respective parameters. Now to identify which level
data needs to be shown on graph, I have used one more parameter which default value is 1 and go on increasing to 2 then 3 on successive click and this parameter value is used in group expression of graph. This works just fine.
But the real problem has occurred when you go and select report parameters which are corresponding to level 1, level 2 and level 2 values and click on apply in between. For e.g. Assume level 1=Region, level 2=SubRegion and level 3=Country. When you run this
report it shows region wise data on graph and value of fourth parameter is 1, now when you click on graph it takes you to level 2 i.e. it shows sub region wise data on graph and value of fourth parameter is 2 but when you go and select all region, sub region
and countries from report parameters and click on apply button then it should show data on graph region wise but since the time you were selecting parameter data was sub region wise and value of fourth parameter was 2 it shows data for all sub regions which
is weird and not acceptable at all.
I am hoping SSRS should provide a way to pass parameters just like we pass in action on any control within ssrs report to solve this issue. Please help me out to solve this issue or let me know if need more infor.Hi,
There was an error reading from the pipe: Unrecognized error 109 (0x6d).
One reason was inconsistent binding between client and server <netNamedPipeBinding> <security mode="None"></security>... (no
communication)
The other intermittent issue was time-out related.
For more information, you could refer to:
http://stackoverflow.com/questions/15836199/wcf-namedpipe-communicationexception-the-pipe-has-been-ended-109-0x6d
http://stackoverflow.com/questions/22334514/wcf-named-pipe-error-the-pipe-has-been-ended-109-0x6d
Regards
Maybe you are looking for
-
Best way to transfer csv or excel file ??
Hi Can anyone recommend the best way for a customer emailing a csv or excel file to me - how can i guarantee it came from them and hasn't been tampered with. This file is generated from the application i develped if this helps. Have looked at public
-
ABAP Runtime Error Error Code.......
Hi , I sheduled the<b> ABAP & BASIS patch in background</b>, but after some time I tried to login in system through gui..its showing..<b>ABAP Runtime Error Error Code</b>..its not allowing me to login in sap system in gui mode... pls any one h
-
No internet @ grandma's. Is there a card I can use?
I have a macbook pro and will be somewhere that has no internet. Is there a card or something I can purchase to use for about a week to connect to the internet?
-
All, Hope you are doing great. I have a storage account which is RA-GRS enabled. Which has couple of (IaaS based vms) .vhd. I have taken few snapshots on the VMs too. Queries: 1. How do I copy the .vhds from secondary storage account to different acc
-
hi all expert please i want to know how to trap error in session method?? enduser do not want to go to sm35 .. please note: bdcmsgcoll is for call transaction method only, so pl do not answer releted to call transaction. is there any way i can trap