I am really sorry but I am still stuck. Please help.
Please can someone help me with the following code. I have a number of questions. So far all buttons that I have coded actions for work fine. When The program saves it does it correctly as I have seen the text file. However I have some problems.
1) How can I declare the arrays in another way without setting them to "" when the program starts. I need the program to start and show the previous saved arrays instead. I dont know if my method used for retrieving data from the file is correct either?.
2) When retrieving the values from a file that has example (all are string values). ADAM SANDLER 111 222 333 MICKY MOUSE 222 444 666
Where I want them to be in the follwing arrays as an example.
String name[1] = ADAM
String surname[1] = SANDLER
String home[1] = 111
String work[1] = 222
String cell[1] = 333
String name[2] = MICKY
String surname[2] = MOUSE
String home[2] = 222
String work[2] = 444
String cell[2] = 666
Here is my code.
Filename: ContactsListInterface.java
Date: 16 March 2008
Programmer: Yucca Nel
Purpose: Provides a GUI for entering names and contact numbers into a telephone directory.
Also allows options for searching for a specific name and deleting of data from the record
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
import javax.swing.text.*;
import java.io.*;
import java.util.*;
import java.text.*;
public class ContactsListInterface extends JFrame implements ActionListener
{ //start of class
// Declare outputstream and inputStream
DataOutputStream output;
DataInputStream input;
String filename = "phonebook";
// construct fields, buttons, labels and text boxes
JTextPane displayPane = new JTextPane();
JLabel listOfContacts = new JLabel("List Of Contacts"); // creates a label for the scrollpane
JButton createButton = new JButton("Create");
JButton searchButton = new JButton("Search");
JButton modifyButton = new JButton("Modify");
JButton deleteButton = new JButton("Delete");
// declare data arrays for name, surname, work number, home number and cell number
private String name[] = {""};
private String surname[] = {""};
private String home[] = {""};
private String work[] = {""};
private String cell[] = {""};
// create an instance of the ContactsListInterface
public ContactsListInterface()
{ // start of cli()
super("Phonebook Interface");
} // end of cli()
public JMenuBar createMenuBar()
{ // start of the createMenuBar()
// construct and populate a menu bar
JMenuBar mnuBar = new JMenuBar(); // creates a menu bar
setJMenuBar(mnuBar);
JMenu mnuFile = new JMenu("File",true); // creates a file menu in the menu bar which is visible
mnuFile.setMnemonic(KeyEvent.VK_F);
mnuFile.setDisplayedMnemonicIndex(0);
mnuFile.setToolTipText("File Options");
mnuBar.add(mnuFile);
JMenuItem mnuFileExit = new JMenuItem("Exit"); // creates an exit option in the file menu
mnuFileExit.setMnemonic(KeyEvent.VK_X);
mnuFileExit.setDisplayedMnemonicIndex(1);
mnuFileExit.setToolTipText("Close Application");
mnuFile.add(mnuFileExit);
mnuFileExit.setActionCommand("Exit");
mnuFileExit.addActionListener(this);
JMenu mnuEdit = new JMenu("Edit",true); // creates a menu for editing options
mnuEdit.setMnemonic(KeyEvent.VK_E);
mnuEdit.setDisplayedMnemonicIndex(0);
mnuEdit.setToolTipText("Edit Options");
mnuBar.add(mnuEdit);
JMenu mnuEditSort = new JMenu("Sort",true); // creates an option for sorting entries
mnuEditSort.setMnemonic(KeyEvent.VK_S);
mnuEditSort.setDisplayedMnemonicIndex(0);
mnuEdit.add(mnuEditSort);
JMenuItem mnuEditSortByName = new JMenuItem("Sort By Name"); // to sort entries by name
mnuEditSortByName.setMnemonic(KeyEvent.VK_N);
mnuEditSortByName.setDisplayedMnemonicIndex(8);
mnuEditSortByName.setToolTipText("Sort entries by first name");
mnuEditSortByName.setActionCommand("Name");
mnuEditSortByName.addActionListener(this);
mnuEditSort.add(mnuEditSortByName);
JMenuItem mnuEditSortBySurname = new JMenuItem("Sort By Surname"); // to sort entries by surname
mnuEditSortBySurname.setMnemonic(KeyEvent.VK_R);
mnuEditSortBySurname.setDisplayedMnemonicIndex(10);
mnuEditSortBySurname.setToolTipText("Sort entries by surname");
mnuEditSortBySurname.setActionCommand("Surname");
mnuEditSortBySurname.addActionListener(this);
mnuEditSort.add(mnuEditSortBySurname);
JMenu mnuHelp = new JMenu("Help",true); // creates a menu for help options
mnuHelp.setMnemonic(KeyEvent.VK_H);
mnuHelp.setDisplayedMnemonicIndex(0);
mnuHelp.setToolTipText("Help options");
mnuBar.add(mnuHelp);
JMenuItem mnuHelpHelp = new JMenuItem("Help"); // creates a help option for help topic
mnuHelpHelp.setMnemonic(KeyEvent.VK_P);
mnuHelpHelp.setDisplayedMnemonicIndex(3);
mnuHelpHelp.setToolTipText("Help Topic");
mnuHelpHelp.setActionCommand("Help");
mnuHelpHelp.addActionListener(this);
mnuHelp.add(mnuHelpHelp);
JMenuItem mnuHelpAbout = new JMenuItem("About"); // creates a about option for info about api
mnuHelpAbout.setMnemonic(KeyEvent.VK_T);
mnuHelpAbout.setDisplayedMnemonicIndex(4);
mnuHelpAbout.setToolTipText("About this program");
mnuHelpAbout.setActionCommand("About");
mnuHelpAbout.addActionListener(this);
mnuHelp.add(mnuHelpAbout);
return mnuBar;
} // end of the createMenuBar()
// create the content pane
public Container createContentPane()
{ // start of createContentPane()
// try blocks for the input and output
try
output = new DataOutputStream(new FileOutputStream(filename));
catch(IOException io)
JOptionPane.showMessageDialog(null,"This program could not create a storage location. Please check the disk drive and the tun the program again.","Error",JOptionPane.ERROR_MESSAGE);
System.exit(1);
//construct and populate panels and content pane
JPanel labelPanel = new JPanel(); // panel is only used to put the label for the textpane in
labelPanel.setLayout(new FlowLayout());
labelPanel.add(listOfContacts);
JPanel displayPanel = new JPanel();// panel is used to display all the contacts and thier numbers
setTabsAndStyles(displayPane);
displayPane = addTextToTextPane();
displayPane.setEditable(false);
JScrollPane scrollPane = new JScrollPane(displayPane);
scrollPane.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_ALWAYS); // pane is scrollable vertically
scrollPane.setWheelScrollingEnabled(true);// pane is scrollable by use of the mouse wheel
scrollPane.setPreferredSize(new Dimension(400,320));
displayPanel.add(scrollPane);
JPanel workPanel = new JPanel();// panel is used to enter, edit and delete data
workPanel.setLayout(new FlowLayout());
workPanel.add(createButton);
createButton.setToolTipText("Create a new entry");
createButton.addActionListener(this);
workPanel.add(searchButton);
searchButton.setToolTipText("Search for an entry by name number or surname");
searchButton.addActionListener(this);
workPanel.add(modifyButton);
modifyButton.setToolTipText("Modify an existing entry");
modifyButton.addActionListener(this);
workPanel.add(deleteButton);
deleteButton.setToolTipText("Delete an existing entry");
deleteButton.addActionListener(this);
labelPanel.setBackground(Color.red);
displayPanel.setBackground(Color.red);
workPanel.setBackground(Color.red);
// create container and set attributes
Container c = getContentPane();
c.setLayout(new BorderLayout(30,30));
c.add(labelPanel,BorderLayout.NORTH);
c.add(displayPanel,BorderLayout.CENTER);
c.add(workPanel,BorderLayout.SOUTH);
c.setBackground(Color.red);
// add a listener for the window closing and save
addWindowListener(
new WindowAdapter()
public void windowClosing(WindowEvent e)
int answer = JOptionPane.showConfirmDialog(null,"Are you sure you would like to save all changes and exit?","File submission",JOptionPane.YES_NO_OPTION);
if(answer == JOptionPane.YES_OPTION)
save();
System.exit(0);
return c;
} // end of createContentPane()
protected void setTabsAndStyles(JTextPane displayPane)
{ // Start of setTabsAndStyles()
// set Font style
Style fontStyle = StyleContext.getDefaultStyleContext().getStyle(StyleContext.DEFAULT_STYLE);
Style regular = displayPane.addStyle("regular", fontStyle);
StyleConstants.setFontFamily(fontStyle, "SansSerif");
Style s = displayPane.addStyle("bold", regular);
StyleConstants.setBold(s,true);
} // End of setTabsAndStyles()
public JTextPane addTextToTextPane()
{ // start of addTextToTextPane()
try
input = new DataInputStream(new FileInputStream(filename));
for(int i=0; i<name.length;i++)
name[i] = input.readUTF();
surname[i] = input.readUTF();
home[i] = input.readUTF();
work[i] = input.readUTF();
cell[i] = input.readUTF();
catch(IOException io)
Document doc = displayPane.getDocument();
try
{ // start of tryblock
// clear previous text
doc.remove(0,doc.getLength());
// insert titles of columns
doc.insertString(0,"NAME\tSURNAME\tHOME NO\tWORK NO\tCELL NO\n",displayPane.getStyle("bold"));
// insert data
for(int i=0; i<name.length; i++)
doc.insertString(doc.getLength(), name[i] +"\t",displayPane.getStyle("regular"));
doc.insertString(doc.getLength(), surname[i] +"\t",displayPane.getStyle("regular"));
doc.insertString(doc.getLength(), home[i]+"\t",displayPane.getStyle("regular"));
doc.insertString(doc.getLength(), work[i]+"\t",displayPane.getStyle("regular"));
doc.insertString(doc.getLength(), cell[i]+"\t",displayPane.getStyle("regular"));
} // end of try block
catch(BadLocationException ble)
{ // start of ble exception handler
System.err.println("Could not insert text.");
} // end of ble exception handler
return displayPane;
} // end of addTextToTextPane()
// code to process user clicks
public void actionPerformed(ActionEvent e)
{ // start of actionPerformed()
String arg = e.getActionCommand();
// user clicks exit option
if(arg.equals("Exit"))
int answer = JOptionPane.showConfirmDialog(null,"Exiting will save all changes to file. \nAre you sure you would like to save and exit now?","File submission",JOptionPane.YES_NO_OPTION);
if(answer == JOptionPane.YES_OPTION)
save();
System.exit(1);
// user clicks help option
if(arg.equals("Help"))
JOptionPane.showMessageDialog(null, "Welcome to the phone book application. To add a new entry press the \"Create\" button.\n To search for an entry press the \"Search\" button.\n To modify an existing entry press the \"Modify\" button. \n To delete an entry press the \"Delete\" button.","Help Topic",JOptionPane.INFORMATION_MESSAGE);
// user clicks about option
if(arg.equals("About"))
JOptionPane.showMessageDialog(null,"Phonebook v 1.01 created by Yucca Nel.\nNo copyright exists.\nThis program is freeware and should not be sold.\nEnjoy :-)","About phonebook",JOptionPane.INFORMATION_MESSAGE);
// user clicks create button
if(arg.equals("Create"))
createNew();
// user clicks search button
if(arg.equals("Search"))
searchForName(arg, name); // Only possible to search by name as all contacts Must have a name
if(arg.equals("Modify"))
modifyContact(arg,name);
save();
// user clicks the sort by name option
if(arg.equals("Name"))
sort(name);
if(arg.equals("Surname"))
sort(surname);
} // end of actionPerformed()
// Method to ceate a new entry
public void createNew()
{ // start of createNew()
int newHome, newWork, newCell = 0;
String newContactName = JOptionPane.showInputDialog(null,"Please enter the new contacts first name or press cancel to exit.");
if(newContactName == null) finish(); // if user clicks cancel
if(newContactName.length() <=0)
JOptionPane.showMessageDialog(null,"You did not enter a valid name.\nPlease make sure you enter data correctly.","Error",JOptionPane.ERROR_MESSAGE);
createNew(); // To return to the create method
String newContactSurname = JOptionPane.showInputDialog(null,"Please enter the new contacts surname or press cancel to exit.");
if(newContactSurname == null) finish(); // if user clicks cancel
if(newContactSurname.equals(""))
int answer = JOptionPane.showConfirmDialog(null,"You did not enter a surname.\nAre you sure you wish to leave the surname empty?","No data entered",JOptionPane.YES_NO_OPTION); // Asks if data was valid
if(answer == JOptionPane.NO_OPTION)
newContactSurname = JOptionPane.showInputDialog(null,"Please enter the new contacts surname.");
String newContactWorkNum = JOptionPane.showInputDialog(null,"Please enter the new contacts work number or press cancel to exit.");
if(newContactWorkNum == null) finish(); // if user clicks cancel
String newContactHomeNum = JOptionPane.showInputDialog(null,"Please enter the new contacts home number or press cancel to exit.");
if(newContactHomeNum == null) finish(); // if user clicks cancel
String newContactCellNum = JOptionPane.showInputDialog(null,"Please enter the new contacts cell number or press cancel to exit.");
if(newContactCellNum == null) finish(); // if user clicks cancel
// enlarge the arrays so they can accept data
name = enlargeArray(name);
surname = enlargeArray(surname);
work = enlargeArray(work);
home = enlargeArray(home);
cell = enlargeArray(cell);
// add the new data into the arrays
name[name.length-1] = newContactName;
surname[surname.length-1] = newContactSurname;
home[home.length-1] = newContactHomeNum;
work[work.length-1] = newContactWorkNum;
cell[cell.length-1] = newContactCellNum;
// sort the names so they appear in alphebetical order
sort(name);
} // end of createNew()
// The enlarge array method
//method to enlarge an array by 1
public String[] enlargeArray(String[] currentArray)
String[] newArray = new String[currentArray.length + 1];
for (int i = 0; i < currentArray.length; i++)
newArray[i] = currentArray;
return newArray;
}// End of enlargeArray()
// The Sort Method
public void sort(String tempArray[])
{ // start of sort()
// for loop
for(int pass = 1; pass < tempArray.length; pass++)
for(int element = 0; element < tempArray.length -1; element++)
if(tempArray[element].compareTo(tempArray[element+1])>0)
swap(name, element, element+1);
swap(surname, element, element+1);
swap(home, element, element+1);
swap(work, element, element+1);
swap(cell, element, element+1);
addTextToTextPane();
} // end of sort()
// The swap method
public void swap(String swapArray[], int first, int second)
{ // start of swap()
String hold;
hold = swapArray[first];
swapArray[first] = swapArray[second];
swapArray[second] = hold;
} // end of swap()
// method to search for a name
public void searchForName(String searchField, String searchArray[])
{ // start of searchForName()
try
Document doc = displayPane.getDocument(); // assign text to an object
doc.remove(0,doc.getLength()); // clear the screen
doc.insertString(0,"NAME\tSURNAME\tHOME NO\tWORK NO\tCELL NO\n",displayPane.getStyle("bold"));
String searchValue = JOptionPane.showInputDialog(null,"Please enter the 1st name of the person you would like to see phone numbers for or press cancel to exit.");
boolean found = false;
if(searchValue == null) finish(); // if user clicks cancel
//search the array
for(int i=0; i < name.length; i++)
if(searchValue.compareTo(searchArray[i])==0)
doc.insertString(doc.getLength(), name[i] +"\t",displayPane.getStyle("regular"));
doc.insertString(doc.getLength(), surname[i] +"\t",displayPane.getStyle("regular"));
doc.insertString(doc.getLength(), home[i]+"\t",displayPane.getStyle("regular"));
doc.insertString(doc.getLength(), work[i]+"\t",displayPane.getStyle("regular"));
doc.insertString(doc.getLength(), cell[i]+"\t",displayPane.getStyle("regular"));
found = true;
if(found == false)
JOptionPane.showMessageDialog(null,"No contact with that name found.","No result found",JOptionPane.INFORMATION_MESSAGE);
sort(name);
catch(BadLocationException ble)
System.err.println("Could not insert text.");
} // end of searchForName()
// Method to modify contact
public void modifyContact(String searchField, String searchArray[])
{ // start of modifyContact()
try
Document doc = displayPane.getDocument(); // assign text to an object
doc.remove(0,doc.getLength()); // clear the screen
doc.insertString(0,"NAME\tSURNAME\tHOME NO\tWORK NO\tCELL NO\n",displayPane.getStyle("bold"));
String modifyValue = JOptionPane.showInputDialog(null,"Please enter the 1st name of the person you would like to change details for. Or press cancel to exit");
boolean found = false;
if(modifyValue == null) finish(); // if user clicks cancel
//search the array
for(int i=0; i < name.length; i++)
if(modifyValue.compareTo(searchArray[i])==0)
// To change the name
String oldName = name[i];
String newName = JOptionPane.showInputDialog(null,"Please enter a new name if you would like to change the name for "+name[i]+". Or press cancel to exit");
if(newName == null)
name[i] = oldName; // if user clicks cancel keep old entry
finish();
if(newName.equals("")) // if no data entered then name will stay same
JOptionPane.showMessageDialog(null,"You did not enter a name in the name field.\nOld name will be kept.","Information Message",JOptionPane.INFORMATION_MESSAGE);
name[i] = oldName;
addTextToTextPane();
else
name[i] = newName; // new name is saved into array
addTextToTextPane();
//To change the surname
String oldSurname = surname[i];
String newSurname = JOptionPane.showInputDialog(null,"Please enter a new surname if you would like to change the surname for "+name[i]+". Or press cancel to exit");
if(newSurname == null)
surname[i] = oldSurname; // if user clicks cancel keep old entry
finish();
if((oldSurname.length()>0) && newSurname.length()<=0) // if surname existed but no new surname was entered
int answer = JOptionPane.showConfirmDialog(null,"You are about to remove the surname for "+name[i]+".\nAre you sure you would like to remove the surname for this contact?","Please confirm the following",JOptionPane.YES_NO_OPTION);
if(answer == JOptionPane.YES_OPTION) // user wishes to remove old surname and leave no surname in place
surname[i] = newSurname; // new surname is saved into the array
else // user does not wish to remove surname
surname[i] = oldSurname; // keep the old surname
else // just replace the surname with new one as everything seems fine
surname[i] = newSurname;
//To change the work number of contact
String oldWork = work[i];
String newWork = JOptionPane.showInputDialog(null,"Please enter a new work number if you would like to change the work number for "+name[i]+". Or press cancel to exit");
if(newWork == null)
work[i] = oldWork; // user clicks cancel keep old entry
finish();
if((oldWork.length()>0) && newWork.length()<=0) // if number existed but no new number was entered
int answer = JOptionPane.showConfirmDialog(null,"You are about to remove the work number for "+name[i]+".\nAre you sure you would like to remove the work number for this contact?","Please confirm the following",JOptionPane.YES_NO_OPTION);
if(answer == JOptionPane.YES_OPTION) // user wishes to remove old number and leave no number in place
work[i] = newWork; // new number is saved into the array
else // user does not wish to remove number
work[i] = oldWork; // keep the old number
else // just replace the number with new one as everything seems fine
work[i] = newWork;
//To change the work number of contact
String oldHome = home[i];
String newHome = JOptionPane.showInputDialog(null,"Please enter a new home number if you would like to change the home number for "+name[i]+". Or press cancel to exit");
if(newHome == null)
home[i] = oldHome; // if user clicks cancel keep old value
finish();
if((oldHome.length()>0) && newHome.length()<=0) // if number existed but no new number was entered
int answer = JOptionPane.showConfirmDialog(null,"You are about to remove the home number for "+name[i]+".\nAre you sure you would like to remove the home number for this contact?","Please confirm the following",JOptionPane.YES_NO_OPTION);
if(answer == JOptionPane.YES_OPTION) // user wishes to remove old number and leave no number in place
home[i] = newHome; // new number is saved into the array
else // user does not wish to remove number
home[i] = oldHome; // keep the old number
else // just replace the number with new one as everything seems fine
home[i] = newHome;
//To change the cell number
String oldCell = cell[i];
String newCell = JOptionPane.showInputDialog(null,"Please enter a new cell number if you would like to change the cell number for "+name[i]+". Or press cancel to exit");
if(newCell == null)
cell[i] = oldCell; // if user clicks cancel keep old value
finish();
if((oldCell.length()>0) && newCell.length()<=0) // if number existed but no new number was entered
int answer = JOptionPane.showConfirmDialog(null,"You are about to remove the Cell number for "+name[i]+".\nAre you sure you would like to remove the cell number for this contact?","Please confirm the following",JOptionPane.YES_NO_OPTION);
if(answer == JOptionPane.YES_OPTION) // user wishes to remove old number and leave no number in place
cell[i] = newCell; // new number is saved into the array
else // user does not wish to remove number
cell[i] = oldCell; // keep the old number
else // just replace the number with new one as everything seems fine
cell[i] = newCell;
found = true;
addTextToTextPane();
if(found == false)
JOptionPane.showMessageDialog(null,"No contact with that name found.","No result found",JOptionPane.INFORMATION_MESSAGE);
sort(name);
addTextToTextPane();
catch(BadLocationException ble)
System.err.println("Could not insert text.");
} // end of searchForName()
// finish method for cancel button
public void finish()
JOptionPane.showMessageDialog(null,"This program will now close and automatically save all data entered. You may restart the program to modify any changes.","Information Message",JOptionPane.INFORMATION_MESSAGE);
System.exit(0);
// method to save data to file
public void save()
try
for(int i=0; i < name.length; i++)
output.writeUTF(name[i]);
output.writeUTF(surname[i]);
output.writeUTF(work[i]);
output.writeUTF(home[i]);
output.writeUTF(cell[i]);
JOptionPane.showMessageDialog(null,"Data succesfully saved to file.","Information message",JOptionPane.INFORMATION_MESSAGE);
catch(IOException io)
System.exit(1);
public static void main(String[] args)
{ // start of main()
// Set look and feel of interface
try
{ // start of try block
UIManager.setLookAndFeel("com.sun.java.swing.plaf.windows.WindowsLookAndFeel");
} // end of try block
catch(Exception e)
{ // start of catch block
JOptionPane.showMessageDialog(null,"There was an error in setting the look and feel of this application","Error",JOptionPane.INFORMATION_MESSAGE);
} // end of catch block
ContactsListInterface cli = new ContactsListInterface();
cli.setDefaultCloseOperation(JFrame.DO_NOTHING_ON_CLOSE);
cli.setJMenuBar(cli.createMenuBar());
cli.setContentPane(cli.createContentPane());
cli.setSize(520,500);
cli.setVisible(true);
cli.setResizable(false);
} // end of main()
} //end of classBefore thinking I am lazy I dont want you to correct my code. Just give me a few pointers on how to get my arrays back from the file and how to set my strings to a non null value that wont show when my program starts.
Edited by: Yucca on Mar 24, 2008 7:24 PM
Yucca wrote:
It's pretty easy to write objects to file, but it depends on what you want to do with that file. Do you want it to be a human-readable text file? Is it only to be used by your program? The file is to be used by my program to save to and to read from. But I understand now that saving each entry as a string and not writing it to an array may be easier. Do I use the buffered reader instead of InputStreamReader? Oh sorry I forgot to mention that the file I save to will later be used when I convert my application to a database type/SQL tyype aplication.
Edited by: Yucca on Mar 24, 2008 8:06 PMIt sounds to me like object serialization would be the easiest for what you want to do. Read through this:
http://java.sun.com/developer/technicalArticles/Programming/serialization/
And these apis:
http://java.sun.com/j2se/1.5.0/docs/api/java/io/ObjectOutputStream.html
http://java.sun.com/j2se/1.5.0/docs/api/java/io/ObjectInputStream.html
Similar Messages
-
how do i get my itunes to be the same on my laptop, ipod touch and ipad???? ive sync'd them all, but each is still different, please help
Syning with iTunes is completely separate from iCloud, except that if you have elected to sync calendars and contacts with iCloud you cannot sync them with iTunes.
What iTunes media are you having problems syncing to your iPhone? -
My phone wont let me download anything even free stuff or update.it keep saying something wrong with my billing info so i fix it but still cant download.I signed out sign back in still nothing please help i'm getting angry
If it says your billing info is wrong that means that your credit card issuer is refusing to approve your account. You will have to solve the problem with your bank or credit card company.
-
Question
I am not able to launch FF everytime i try to open it, it says FF has to submit a crash report,and restore yr tabs. I even tried doing that and the report was submitted too, but still FF did not start, and the problem still persists, please help me solve this issue
'''(in English)'''Hi Danny,
Per my understanding that you can't get the expect result by using the expression "=Count(Fields!TICKET_STATUS.Value=4) " to count the the TICKET_STATUS which value is 4, the result will returns the count of all the TICKET_STATUS values(206)
but not 180, right?
I have tested on my local environment and can reproduce the issue, the issue caused by you are using the count() function in the incorrect way, please modify the expression as below and have a test:
=COUNT(IIF(Fields!TICKET_STATUS.Value=4 ,1,Nothing))
or
=SUM(IIF(Fields!TICKET_STATUS=4,1,0))
If you still have any problem, please feel free to ask.
Regards,
Vicky Liu
Vicky Liu
TechNet Community Support -
Early this morning from my way to office when I plug my iPhone 3gs to my itrip in my car it is working fine. But when somebody called in my iPhone it suddenly turn off, and I can not turn it on again. I really don’t know what to do, please help me?
Early this morning from my way to office when I plug my iPhone 3gs to my itrip in my car it is working fine. But when somebody called in my iPhone it suddenly turn off, and I can not turn it on again. I really don’t know what to do, please help me?
-
Today I updated, thru itunes, my iphone4, and restored backup, but am stuck in setup loop. After few screens of setup phone says "connect to itunes" or "connected to itunes". I turned off the phone and turned back on - still stuck. Help, please?
Unable to Update or Restore...?
See Here > http://support.apple.com/kb/HT1808
You may need to try this More than Once...
Be sure to Follow ALL the Steps... -
till not installed what i purchased but the amount already deduct please help me..
Assuming that you are referring to an in-app purchase, then if you haven't received it then try the 'report a problem' link to contact iTunes Support : http://reportaproblem.apple.com
If the 'report a problem' link doesn't work then you can try contacting iTunes Support via this page : http://www.apple.com/support/itunes/contact/ - click on Contact iTunes Store Support on the right-hand side of the page, then Purchases, Billing & Redemption -
In Siri, I can call by my voice, but why I can not use Siri voice call in my country (Laos), just can call only us phone number; my country we use like 3 number for option call, 8 numbers for call friend but Siri cannot use this please help us, thanks
And please help me can type Laos font in it like andrio phone.Hi Cozumel,
Thanks for posting. I'm sorry you're having problems with your bills. I can take a look at this for you. Drop me an email with your account details and a link to this thread for reference. You'll find the address in my profile.
Cheers
David
BTCare Community Mod
If we have asked you to email us with your details, please make sure you are logged in to the forum, otherwise you will not be able to see our ‘Contact Us’ link within our profiles.
We are sorry but we are unable to deal with service/account queries via the private message(PM) function so please don't PM your account info, we need to deal with this via our email account :-) -
I was filling a form online, then I got to where I had to upload a Microsoft document but when I clicked on upload document I only had the option of uploading photos and videos, but not Microsoft doc. Please help.... How do I upload Microsoft doc and other related office documents?
tis true
I know, I always do that but I was in a rush to get somewhere and I was relying on my thousand dollar Mac to do some kind of recovery or something. I know Microsoft always keeps temporary files (I think Mac does too, part of me asking here in this forum was for someone to tell me where I can find those files) and when you go to open Office Works then it gives you the option of opening the last recent documents, saved or not saved.
I usually copy paste into my emial just in case something goes wrong with the created document but I just didn't have the time to login and do all that My loss, you live and you learn, BUT still if ANYONE got any info on this, PLEASE DO CHIME IN *keeping the hope alive* -
My iPhone apps wouldn't open they just blink for a second and the home screen comes back again...i tried installing a free app from the AppStore but it didn't work and also tried resetting the iPhone but ddnt work as well please help what do i do??
Oh my gosh I had the EXACT same problem, and for ages I couldn't figure out how to fix it until today. Here's what I did:
First I went onto my computer, opened itunes, and un-installed tumblr, vine and kik. These were the apps I was having problems with (it said I had them on my phone but, like you, they didn't show).
Then I went to the itunes store, searched for each one, and it said I could update them so I did (just FYI: for tumblr a window popped up saying "please click ok to confirm you are 17 years or older", so I did that also)
When I went back to my phone and tried installing them again (still on my computer), it worked!
I hope this helps, because it was incredibly frustrating. Good luck! -
my ipad mini and iphone 4s are not connecting over bluetooth. iphone cannot locate ipad mini or says it is not supported. It used to work perfectly but now its not working. please help.
Hi
Thanks for the support but I had already tried this . Again did it as you advised. Still not able to connect the ipad mini with Bluetooth.
Could it be that some app is causing issue. I can connect my car and computer over Bluetooth but not ipad mini.
On the other had ipad is connecting to other iPhone but only not mine.
Still showing ipad not supported message. And also shows not paired.
Please help. -
WHere is the i tunes preferences i cant see it???????
I really want to find my i pod please help me!!!!!!
I need my i poddddddd and i need to know where is prenfences
to see my serial number
Message was edited by: Juan Camilo1Juan Camilo1 wrote:
12 views but 0 replies help
Perhaps they don't know either. Did you think of that? -
Updated my iphone4 with ios6.1 software. App store is not working. Tried rebooting, restoring, changing date, signing with another apple id etc. but no luck. can someone please help?
I guess I will wrap this up. I have abandoned iPhoto and viewing my Photo Streams using it and moved to Adobe products (Bridge + PS). So that's that.
-
I can't update iPhoto 9.4.1 to 9.4.3. Every time I click update, it tells me to sign in to the account I used to purchase it but it was preinstalled. Please help!!!
They are updated through the Software Update facility, not the Mac App Store.
Thanks for popping in....
My iLife apps are all from retail install disks predating Lion/ML; I am running 10.8.4 and as soon as I choose Software Update from the menu, the app store 'Updates" window opens with "checking for updates". I believe that behavior (SU being directed to MAS) was changed with ML? -
I just want to ask if there is any way i can fix my ipod touch 4G from watar damage and i dont think that a larg amount of water have entered and the ipod isnt working at all and i tried charging it but it didnt work so please help me, and thankyou.
Probably dead if you have tried to charge it.
You should never try to charge or turn on a wet electronic device.
You should let it dry for a week or so, then try.
Maybe you are looking for
-
Hi, I don't know who to turn to: the person who handles all the compter stuff is out of town, This A.M.I started up Firefox and there was a message re an update, I thoght I new just to click on install and wait to re start Firefox. But what I can rem
-
No internet after hard drive replacement
HI. After 4.5 years of abuse I decided to replace my internal hardrive on my Powerbook G4 1.25ghz. I did the repair my self and everything seemed to be working out well. I installed tiger 10.4.6 and the computer booted right up and was working just a
-
How do I open a .m4a file from Mail into Music app?
How do I open a .m4a file from Mail into Music app? I mixed down a song from my band's latest session and saved it as a .m4a file (Apple AAC Audio format) and I e-mailed it to myself. Then on my phone I opened the e-mail message in Mail and held a lo
-
Empty File Handling in SAP XI------Urgent
Hi Frnds, 1) I have one doubt XI will support Empty file processing. Suppose in my scenario In sender side i am having Empty file i want to process this file , what are necessary steps i need to take. 2) In my scenario XI will support only 10mb f
-
The guide to iMovie says if the location doesn't come up with the gps button, or you want to add a custom location, then type it into the box. Nope. If you type a custom location in, then it will search it's internal database which is unfortunately a