Original Post
http://puu.sh/1nA8n
As you can see from this image, the current print out of the hardware store is suppose to be like that but I got it like this:
http://puu.sh/1nA7i
here is the code that prints the hardware store.
please let me know if there's anything else you need.
As you can see from this image, the current print out of the hardware store is suppose to be like that but I got it like this:
http://puu.sh/1nA7i
here is the code that prints the hardware store.
public void printReport()
{
// get the hardware stock from the store.
HardwareStock stock = store.getStock();
int length = stock.listSize();
String message = " ";
HardwareItem item = null;
message ="itemID ItemName pOrdered pInstore pSold manuPrice selling Price \n";
if(store.getFileLoaded() || length > 0)
{
for(int index = 0; index < length; index++)
{
item = stock.elementAt(index);
message += String.format("%d %s %d %d %d %.2f %.2f%n", item.getItemID(), item.getItemName(), item.getNumOfPartsOrdered(),
item.getNumOfPartsLeft(), item.getNumOfPartsSold(), item.getManufactuaterPrice(), item.getStoreSellingPrice());
}
this.reportTA.setText(message);
}
}
please let me know if there's anything else you need.