Need help with simple report built in CR in Eclipse

I'm using the Java SDK in Eclipse to be able to leverage a function that does not appear to be native in Crystal Reports - auto refresh.  Looking at the SDK, it appears straight forward to create a viewer on an existing report (built via Crystal Reports) and then refresh the data in a loop.  First glance at the SDK it appeared CrystalReportViewer would be the right class, but I didn't find that in the CR Java Runtime Library that comes with cr4e download.  So, I used ReportViewerBean, at least to prove out the concept.  Here's the prototype code (high-level), using the bean:
public static void main (...) throws ReportSDKException
     ReportViewerBean viewer = new ReportViewerBean();
     viewer.setReportSource(path to the .rpt file);
     viewer.init();
     viewer.start();
     while (...) {
          viewer.refreshReport();
What else is needed to display the report?
Thanks,
Roger

I'm using the Java SDK in Eclipse to be able to leverage a function that does not appear to be native in Crystal Reports - auto refresh.  Looking at the SDK, it appears straight forward to create a viewer on an existing report (built via Crystal Reports) and then refresh the data in a loop.  First glance at the SDK it appeared CrystalReportViewer would be the right class, but I didn't find that in the CR Java Runtime Library that comes with cr4e download.  So, I used ReportViewerBean, at least to prove out the concept.  Here's the prototype code (high-level), using the bean:
public static void main (...) throws ReportSDKException
     ReportViewerBean viewer = new ReportViewerBean();
     viewer.setReportSource(path to the .rpt file);
     viewer.init();
     viewer.start();
     while (...) {
          viewer.refreshReport();
What else is needed to display the report?
Thanks,
Roger

Similar Messages

  • Need Help With Simple ABAP Code

    Hello,
    I'm loading data from a DSO (ZDTBMAJ) to an Infocube (ZCBRAD06). I need help with ABAP code to some of the logic in Start Routine. DSO has 2 fields: ZOCTDLINX & ZOCBRDMAJ.
    1. Need to populate ZOCPRODCD & ZOCREFNUM fields in Infocube:
        Logic:-
        Lookup /BI0/PMATERIAL, if /BIC/ZOCBRDMAJ = /BIC/OIZOCBRDMAJ
        then /BIC/ZOCPRODCD = ZOCPRODCD in Infocube
               /BIC/ZOCREFNUM = ZOCREFNUM in Infocube         
    2. Need to populate 0G_CWWTER field in Infocube:
        Logic:
        Lookup /BIC/PZOCTDLINX, if /BIC/ZOCTDLINX = BIC/OIZOCTDLINX
        then G_CWWTER = 0G_CWWTER in Infocube.
    I would need to read single row at a time.
    Thanks!

    I resolved it.

  • Need help with simple XML validation

    I am new to Spry and need some help creating a simple
    validation. There is a form field which must not contain a value
    already in the database. I have a script which accepts a parameter
    and returns a boolean result. Here is the XML:
    <samples>
    <sample>
    <ISFOUND>0</ISFOUND>
    </sample>
    </samples>
    1. How do I call this script when the form field changes and
    pass the form value as the parameter?
    2. How do I check the returned value in the XML and throw an
    error if true?
    I appreciate any help with this. Please let me know if there
    is a better way to achieve the same result.
    Thanks,
    Rich

    I enabled the call to the XML response. However, I am having
    trouble identifying when the call is complete so I can parse the
    result. How do I run my check after the data load and display the
    proper message?

  • Beginner needs help with simple code.

    I just statrted learnind java, and I need some help with this simple program. For some reason everytime I enter my Farenheit value, the Celsius conversion returns as 0.0. Would really appreciate the help. Thanks.
    Here's the code:
    public class TempConverter
    public static void main(String[] args)
    double F = Double.parseDouble(args[0]);
    System.out.println("Temperature in Farenheit is: " + F);
    double C = 5 / 9;
    C *= (F - 32);
    System.out.println("Temperature in Celsius is: " + C);
    }

    double C = 5 / 9This considers "5" and "9" to be integers and does an integer division, discarding the remainder. The result of that division is 0. Trydouble C = 5.0/9.0;

  • Need Help with simple array program!

    Hi, I have just recently started how to use arrays[] in Java and I'm a bit confused and need help designing a program.
    What this program does, it reads in a range of letters specified by the user. The user then enters the letters (a, b or c) and stores these characters into an array, which the array's length is equal to the input range the user would enter at the start of the program. The program is then meant to find how many times (a,b and c) appears in the array and the Index it first appears at, then prints these results.
    Here is my Code for the program, hopefully this would make sense of what my program is suppose to do.
    import B102.*;
    class Letters
         static int GetSize()
              int size = 0;
              boolean err = true;
              while(err == true)
                   Screen.out.println("How Many Letters would you like to read in?");
                   size = Keybd.in.readInt();
                   err = Keybd.in.fail();
                   Keybd.in.clearError();
                   if(size <= 0)
                        err = true;
                        Screen.out.println("Invalid Input");
              return(size);
         static char[] ReadInput(int size)
              char input;
              char[] letter = new char[size];
              for(int start = 1; start <= size; start++)
                   System.out.println("Please enter a letter (a, b or c) ("+size+" max), enter # to stop:");
                   input = Keybd.in.readChar();
                   while((input != 'a') && (input != 'b') && (input != 'c') && (input != '#'))
                        Screen.out.println("Invalid Input");
                        System.out.println("Please enter a letter (a, b or c) ("+size+" max, enter # to stop:");
                        input = Keybd.in.readChar();
                                    while(input == '#')
                                                 start == size;
                                                 break;
                   for(int i = 0; i < letter.length; i++)
                        letter[i] = input;
              return(letter);
         static int CountA(char[] letter)
              int acount = 0;
              for(int i = 0; i < letter.length; i++)
                   if(letter[i] == 'a')
                        acount++;
              return(acount);
         static int CountB(char[] letter)
              int bcount = 0;
              for(int i = 0; i < letter.length; i++)
                   if(letter[i] == 'b')
                        bcount++;
              return(bcount);
         static int CountC(char[] letter)
              int ccount = 0;
              for(int i = 0; i < letter.length; i++)
                   if(letter[i] == 'c')
                        ccount++;
              return(ccount);
         static int SearchA(char[] letter)
              int ia;
              for(ia = 0; ia < letter.length; ia++)
                   if(letter[ia] == 'a')
                        return(ia);
              return(ia);
         static int SearchB(char[] letter)
              int ib;
              for(ib = 0; ib < letter.length; ib++)
                   if(letter[ib] == 'b')
                        return(ib);
              return(ib);
         static int SearchC(char[] letter)
              int ic;
              for(ic = 0; ic < letter.length; ic++)
                   if(letter[ic] == 'c')
                        return(ic);
              return(ic);
         static void PrintResult(char[] letter, int acount, int bcount, int ccount, int ia, int ib, int ic)
              if(ia <= 1)
                   System.out.println("There are "+acount+" a's found, first appearing at index "+ia);
              else
                   System.out.println("There are no a's found");
              if(ib <= 1)
                   System.out.println("There are "+bcount+" b's found, first appearing at index "+ib);
              else
                   System.out.println("There are no b's found");
              if(ic <= 1)
                   System.out.println("There are "+ccount+" c's found, first appearing at index "+ic);
              else
                   System.out.println("There are no c's found");
              return;
         public static void main(String args[])
              int size;
              char[] letter;
              int acount;
              int bcount;
              int ccount;
              int ia;
              int ib;
              int ic;
              size = GetSize();
              letter = ReadInput(size);
              acount = CountA(letter);
              bcount = CountB(letter);
              ccount = CountC(letter);
              ia = SearchA(letter);
              ib = SearchB(letter);
              ic = SearchC(letter);
              PrintResult(letter, acount, bcount, ccount, ia, ib, ic);
              return;
    }     Some errors i get with my program are:
    When reading in the letters to store into the array, I get the last letter I entered placed into the entire array. Also I believe my code to find the Index is incorrect.
    Example Testing: How many letters would you like to read? 3
    Enter letter (a, b or c) (# to quit): a
    Enter letter (a, b or c) (# to quit): b
    Enter letter (a, b or c) (# to quit): c
    It prints "There are no a's'" (there should be 1 a at index 0)
    "There are no b's" (there should be 1 b at index 1)
    and "There are 3 c's, first appearing at index 0" ( there should be 1 c at index 2)
    The last thing is that my code for when the user enters "#" that the input of letters would stop and the program would then continue over to the counting and searching part for the letters, my I believe is correct but I get the same problem as stated above where the program takes the character "#" and stores it into the entire array.
    Example Testing:How many letters would you like to read? 3
    Enter letter (a, b or c) (# to quit): a
    Enter letter (a, b or c) (# to quit): #
    It prints "There are no a's'" (should have been 1 a at index 0)
    "There are no b's"
    and "There are no c's"
    Can someone please help me??? or does anyone have a program simular to this they have done and would'nt mind showing me how it works?
    Thanks
    lou87.

    Without thinking too much...something like this
    for(int start = 0; start < size; start++) {
                System.out.println("Please enter a letter (a, b or c) ("+size+" max), enter # to stop:");
                input = Keybd.in.readChar();
                while((input != 'a') && (input != 'b') && (input != 'c') && (input != '#')) {
                    Screen.out.println("Invalid Input");
                    System.out.println("Please enter a letter (a, b or c) ("+size+" max, enter # to stop:");
                    input = Keybd.in.readChar();
                if(input == '#') {
                        break;
                letter[start] = input;
            }you dont even need to do start = size; coz with the break you go out of the for loop.

  • I need help with simple problems. im a student.

    i'd like to be advanced with my studies so i will post questions.. i need help on how to answer. thank you.
    1. create a java program that will evaluate if the value entered is a positive, negative, vowel, consonant and special characters.
    im actually done with the positive and negative using if else statements.. i used an integer data type. now my question is how do conjoin the characters when i need to evaluate a vowel and a consonant. i cant use char either. please help. i dont know what to do yet.
    2. create java program that will translate the input from numbers to words. e.g. input:123 output: one hundred twenty-three.
    i have an idea to use a switch case statement. but i have no idea on how will i be able to do it. so if you guys can help me.. well then thankies..

    Welcome to the Sun forums. First, please note that you have posted in the wrong forum. This forum is for topics related to Sun's JavaHelp product. You should post your questions in the New to Java forum.
    As part of your learning, you will have to develop the ability to select an approach to a problem, create a design that reflects that approach, and then implement the design with code that you create.
    So, it's inappropriate for us to take the problem statement that you have been given and short-circuit your learning process by giving you the implemented problem solution. We can comment on the individual questions that you may have, and point out problems and errors that we see in the code that you develop.
    As a hint, when you are stuck, forget about Java and programming. Just start with a sheet of paper and a pencil, and figure out how to layout the task on paper. The consider how to translate that to programming.
    If you have problems, post short example code that shows the problem, and explain your question clearly. We can't read minds.
    Make sure you post code correctly so that it's not mangled by the forum software, and so that formatting is maintained. Select your typed or pasted code block and press the CODE button above the typing area.

  • Need help with matrix report

    Hi all...
    I am having a problem with one of my report.
    I have a report of a tabular style...just a simple one. It has about 15 column heads like employeeID, employeename, salary , allowance, provident fund and so on. What I need to do is to insert a matrix into this existing report for allowance types (like ...to show what sort of allowance an employee is getting and the sum of allowance). The report column heads should look as follows
    emp ID|emp name|salary|allowance|(allowance type from matrix)|provident fund|......and so on.
    So, I want the allowance type matrix after allowance and before other columns in the report.
    I have already built this report. The problem is that the report doesn't fit in one page and expands to multiple pages. It is acceptable for the report to take more than one page...but the report breaks after the matrix prints and continues in the next page leaving the gap.
    I have tried all the combination of frames but still doesn't work..
    Any suggestions

    Dear ,
    In Matrix Report , There are 2 or more then 2 Repeating frames , As report in going out of page u may have to set the Left to Right Repeating Frame
    Sajid

  • Need help with simple file sharing application

    I have an assignment to build a Java File Sharing application. Since I'm relatively new to programming, this is not gonna be an easy task for me.
    Therefore I was wondering if there are people willing to help me in the next few days. I will ask questions in this thread, there will be loads of them.
    I already have something done but I'm not nearly halfway finished.
    Is there a code example of a simple file sharing application somewhere? I didn't manage to find it.
    More-less, this is what it needs to contain:
    -client/server communication (almost over)
    -file sending (upload, download)
    -file search function (almost over)
    -GUI of an application.
    GUI is something I will do at the end, hopefully.
    I hope someone will help me. Cheers
    One more thing, I'm not asking for anyone to do my homework. I will only be needing some help in the various steps of building an application.
    As I said code examples are most welcome.
    This is what I have done so far
    Server:
    package ToJeTo;
    import java.io.*;
    import java.net.*;
    public class MultiServer {
        public static ServerSocket serverskiSoket;
        public static int PORT = 1233;
        public static void main(String[] args) throws IOException {
            try {
                serverskiSoket = new ServerSocket(PORT);
            }catch (IOException e) {
                System.out.println("Connection impossible");
                System.exit(1);
            do {
                Socket client = serverskiSoket.accept();
                System.out.println("accepted");
                ClientHandler handler = new ClientHandler(client);
                handler.start();
            } while(true);
    }Client:
    package ToJeTo;
    import java.io.IOException;
    import java.io.PrintWriter;
    import java.net.*;
    import java.util.Scanner;
    public class MultiClient {
        public static InetAddress host;
        public static int PORT = 1233;
        public static void main(String[] args) {
            try {
                host = InetAddress.getLocalHost();
            }catch (UnknownHostException uhe) {
                System.out.println("Error!");
                System.exit(1);
            sendMessages();
        private static void sendMessages() {
            Socket soket = null;
            try {
                soket = new Socket(host, PORT);
                Scanner networkInput = new Scanner(soket.getInputStream());
                PrintWriter networkOutput = new PrintWriter(soket.getOutputStream(), true);
                Scanner unos = new Scanner(System.in);
                String message, response;
                do {
                    System.out.println("Enter message");
                    message = unos.nextLine();
                    networkOutput.println(message);
                    response = networkInput.nextLine();
                    System.out.println("Server: " + response);
                }while (!message.equals("QUIT"));
            } catch (IOException e) {
                e.printStackTrace();
            finally {
                try{
                    System.out.println("Closing..");
                    soket.close();
                } catch (IOException e) {
                    System.out.println("Impossible to disconnect!");
                    System.exit(1);
    }ClientHandler:
    package ToJeTo;
    import java.io.*;
    import java.net.*;
    import java.util.*;
    public class ClientHandler extends Thread {
        private Socket client;
        private Scanner input;
        private PrintWriter output;
        public ClientHandler(Socket serverskiSoket) {
            client = serverskiSoket;
            try {
            input = new Scanner(client.getInputStream());
            output = new PrintWriter(client.getOutputStream(), true);
            } catch (IOException e) {
                e.printStackTrace();
            public void run() {
                String received;
                do {
                received = input.nextLine();
                output.println("Reply: " + received);
                } while (!received.equals("QUIT"));
                try {
                    if (client != null)
                        System.out.println("Closing the connection...");
                        client.close();
                }catch (IOException e) {
                    System.out.println("Error!");
    }Those three classes are simple client server multi-threaded connection.

    Now the other part that contains the search function looks like this:
    package ToJeTo;
    import java.io.*;
    import java.util.*;
    public class User {
        String nickname;
        String ipAddress;
        static ArrayList<String> listOfFiles = new ArrayList<String>();
        File sharedFolder;
        String fileLocation;
        public User(String nickname, String ipAddress, String fileLocation) {
            this.nickname = nickname.toLowerCase();
            this.ipAddress = ipAddress;
            sharedFolder = new File(fileLocation);
            File[] files = sharedFolder.listFiles();
            for (int i = 0; i < files.length; i++) {
                listOfFiles.add(i, files.toString().substring(fileLocation.length()+1));
    public static void showTheList() {
    for (int i = 0; i < listOfFiles.size(); i++) {
    System.out.println(listOfFiles.get(i).toString());
    @Override
    public String toString() {
    return nickname + " " + ipAddress;
    User Manager:
    package ToJeTo;
    import java.io.*;
    import java.util.*;
    class UserManager {
        static ArrayList<User> allTheUsers = new ArrayList<User>();;
        public static void addUser(User newUser) {
            allTheUsers.add(newUser);
        public static void showAndStoreTheListOfUsers() throws FileNotFoundException, IOException {
            BufferedWriter out = new BufferedWriter(new FileWriter("List Of Users.txt"));
            for (int i = 0; i < allTheUsers.size(); i++) {
                    System.out.println(allTheUsers.get(i));
                    out.write(allTheUsers.get(i).toString());
                    out.newLine();
            out.close();
    }Request For File
    package ToJeTo;
    import java.util.*;
    public class RequestForFile {
        static ArrayList<String> listOfUsersWithFile = new ArrayList<String>();
        Scanner input;
        String fileName;
        public RequestForFile() {
            System.out.println("Type the wanted filename here: ");
            input = new Scanner(System.in);
            fileName = input.nextLine();
            for (User u : UserManager.allTheUsers) {
                for (String str : User.listOfFiles) {
                    if (str.equalsIgnoreCase(fileName))
                        listOfUsersWithFile.add(u.nickname);
        public RequestForFile(String fileName) {
            for (User u : UserManager.allTheUsers) {
                for (String str : User.listOfFiles) {
                    if (str.equalsIgnoreCase(fileName))
                        listOfUsersWithFile.add(u.nickname);
        public static List<String> getAll() {
            for (int i = 0; i < listOfUsersWithFile.size(); i++) {
                //System.out.println("User that has the file: " + listOfUsersWithFile.get(i));
            return listOfUsersWithFile;
    }Now this is the general idea.
    The user logs in with his nickname and ip address. He defines his own shared folder and makes it available for other users that log on to server.
    Now each user has their own list of files from a shared folder. It's an ArrayList.
    User manager class is there to store another list, a list of users that are connected with server.
    When the user is searching for a particular file, he is searching through all the users and their respective files lists. Therefore for each loop inside a for each loop.
    Now the problem is how to connect all that with Client and Server class and put it into one piece.
    GUI should look somewhat like this:

  • Need Help with Simple Chat Program

    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("");

    Thanks for ur help!i have moved BufferedReader outside the loop. I dont think i am getting exception as i can c the output once.What i am trying to do is repeat the process which i m getting once.What my method does is first one sends the packet to multicasting group (UDP) and other method receives the packets and prints.

  • Need help with a report design- 11.1.1.5(11g)

    Hello Experts
    I have a report with Category(Electronics, Home App..), Brand(Philips, samsung,..), products(TV, Laptop, Lamps..), % Expenses, % Profit and now the users want this report in such a way that Category, Brand and Products has to come under one column not a traditional way as above.
    In the subject area i have column variables Category, brand, Products and division is a custom name the users given to us in a design document. Any ideas how i can get this from presentation layer. please let me know if i am not clear.
    Division % Expenses % profit
    Electronics 20% 40%
    Home APP 15% 29%
    Philips 23% 31%
    Samsung 19% 54%
    TV 33% 48%
    Laptop 12% 26%
    Lamps 41% 62%
    Thanks,
    RC
    Edited by: user1146711 on May 30, 2012 1:31 PM
    Edited by: user1146711 on May 30, 2012 1:39 PM
    Edited by: user1146711 on May 30, 2012 1:44 PM
    Edited by: user1146711 on May 30, 2012 1:46 PM

    user1146711 wrote:
    Hello Experts
    I have a report with Category(Electronics, Home App..), Brand(Philips, samsung,..), products(TV, Laptop, Lamps..), % Expenses, % Profit and now the users want this report in such a way that Category, Brand and Products has to come under one column not a traditional way as above.
    In the subject area i have column variables Category, brand, Products and division is a custom name the users given to us in a design document. Any ideas how i can get this from presentation layer. please let me know if i am not clear.
    Division % Expenses % profit
    Electronics 20% 40%
    Home APP 15% 29%
    Philips 23% 31%
    Samsung 19% 54%
    TV 33% 48%
    Laptop 12% 26%
    Lamps 41% 62%
    Thanks,
    RC
    What you are trying to achieve is determined by how the data are set up in the repository. In order to get all the values under one heading called "division," it needs to be in the hierarchy that would than allow you to choose "division" and then the corresponding expenses and profits, regardless of the category, brand or porduct. If the category, brand and products columns don't have a corresponding "division" entry in the table, you will not be able to achieve what you desire.

  • URL: newbie needs help with simple programming question!

    Hi everyone,
    Please direct me to a FAQ or other resource, or help me with this problem:
    I want to create a text field (or similar container) that contains both ordinary text AND a URL/hyperlink in it. For example, the following text might appear in the text field:
    "I have many _pictures_ from my vacation"
    where the word "pictures" is actually a hyperlink to a web site, and the other portions of the string are simple text.
    All advice and help is appreciated!
    -Dennis Reda
    [email protected]

    Well here is one way you code do it but if you do alittle research on them links above it will explain how this code works.Well it will explain how jeditorpane and hyperlinklistener work
    import javax.swing.*;
    import java.awt.*;
    import javax.swing.event.*;
    import java.net.*;
    public class b extends javax.swing.JApplet implements HyperlinkListener  {
       JEditorPane field = new JEditorPane();
      public b() {
        Container pane = getContentPane();
        FlowLayout flo = new FlowLayout();
        pane.setLayout(flo);
        field.setPreferredSize(new Dimension(200, 25));
        field.setEditable(false);
        pane.add(field);
        setContentPane(pane);
         String gg1 = "<html><body>I have many_<a    href='http://www.home.com'>pictures</a>_from my vacation</body></html>";
         field.addHyperlinkListener(this);
         field.setContentType("text/html");
         field.setText(gg1);
      public void hyperlinkUpdate(HyperlinkEvent e) {
         if (e.getEventType() == HyperlinkEvent.EventType.ACTIVATED) {
          try{
            URL url = new URL("http://www.msn.com");
            getAppletContext().showDocument(url,"_self"); 
            }catch(Exception r) {};
      public void init()  {
         b c = new b();
    ps hope this helped                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

  • Headless Mac Pro getting stuck - need help with Crash Report

    I have a headless Mac Pro being used as a server. It has recently begun to have problems such as slowing down for a few minutes with apps being slow or non-reponsive. It may serve pages, but the database or FTP may not respond. When logging with VNC (screen sharing) we may get a blank screeen or a screeen with lots of black squares and artifacts. If often clears up, but if fully black will usually require that I log on via SSH and reboot. It may be fine for a day and other days may slow down a few times.
    The only apps are Abyss Web Server, Panorama database, CrushFTP (uses JAVA), and Backuplist+. Temperatures seem to be okay with the highest being the Nortbridge Heat Sink (167 degrees) and a memory module (163 degrees). The primary disks are a few months old and have over 200 GB of free space. I have done maintenance with Applejack, Onyx, and Disk Warrior.
    It finally crashed altogether and I am not experienced at interpreting the reports so here is the crash report in the hopes that someone can help determine the problem:
    Interval Since Last Panic Report:  101039853 sec
    Panics Since Last Report:          1
    Anonymous UUID:                    8DD159F4-CE66-4B72-9F40-E4800A0F5E65
    Sat Sep  7 18:15:27 2013
    panic(cpu 1 caller 0x006376A4): NVRM[0]: Read Error 0x0008804c: BAR0 0xf1000000 0x6fd0b000 0x04b300a2 D0 P0/1
    Backtrace (CPU 1), Frame : Return Address (4 potential args on stack)
    0x5c356158 : 0x12b4c6 (0x45f91c 0x5c35618c 0x13355c 0x0)
    0x5c3561a8 : 0x6376a4 (0x867e80 0x867e80 0x82c6d4 0x0)
    0x5c356208 : 0x67a18c (0x6f91404 0x796f804 0x8804c 0x909def)
    0x5c356248 : 0x8ebf91 (0x796f804 0x8804c 0x4c 0x713455c0)
    0x5c3562a8 : 0x9006da (0x796f804 0x7532004 0x1 0xa)
    0x5c356308 : 0x7390a3 (0x796f804 0x74a0004 0x0 0x0)
    0x5c356348 : 0x67950b (0x74a0004 0x1388 0x0 0x0)
    0x5c356398 : 0x90fa88 (0x796f804 0x5c356488 0x5c356488 0x8)
    0x5c3564c8 : 0x910086 (0x796f804 0x7869604 0x0 0x0)
    0x5c356528 : 0x683736 (0x796f804 0x7869604 0x7a2cb04 0x0)
    0x5c3565a8 : 0x644c49 (0xc1d00041 0xbeef0003 0xbeef0202 0x6b0a100)
    0x5c3565e8 : 0x635804 (0x5c356778 0x6 0x0 0x0)
    0x5c356748 : 0x62736c (0x0 0x600d600d 0x7058 0x5c356778)
    0x5c356808 : 0xe8f917 (0xc1d00041 0xbeef0003 0xbeef0202 0x6b0a100)
    0x5c356848 : 0xe8f9ee (0x46873000 0x6b0a100 0xcac000 0x0)
    0x5c356878 : 0xe4ff9f (0x46873000 0x6b0a100 0xcac000 0x0)
              Backtrace continues...
          Kernel loadable modules in backtrace (with dependencies):
             com.apple.GeForce(5.4.8)@0xe3c000->0xed3fff
                dependency: com.apple.NVDAResman(5.4.8)@0x61e000
                dependency: com.apple.iokit.IONDRVSupport(1.7.3)@0x610000
                dependency: com.apple.iokit.IOPCIFamily(2.6)@0x5e2000
                dependency: com.apple.iokit.IOGraphicsFamily(1.7.3)@0x5f3000
             com.apple.nvidia.nv40hal(5.4.8)@0x87d000->0xa47fff
                dependency: com.apple.NVDAResman(5.4.8)@0x61e000
             com.apple.NVDAResman(5.4.8)@0x61e000->0x87cfff
                dependency: com.apple.iokit.IONDRVSupport(1.7.3)@0x610000
                dependency: com.apple.iokit.IOPCIFamily(2.6)@0x5e2000
                dependency: com.apple.iokit.IOGraphicsFamily(1.7.3)@0x5f3000
    BSD process name corresponding to current thread: AppleVNCServer
    Mac OS version:
    9L31a
    Kernel version:
    Darwin Kernel Version 9.8.0: Wed Jul 15 16:55:01 PDT 2009; root:xnu-1228.15.4~1/RELEASE_I386
    System model name: MacPro1,1 (Mac-F4208DC8)
    System uptime in nanoseconds: 65137051142183
    unloaded kexts:
    com.apple.driver.AppleHDAPlatformDriver          1.7.1a2 - last unloaded 131738816746
    loaded kexts:
    com.bresink.driver.BRESINKx86Monitoring          9.0 - last loaded 71732761724
    com.apple.driver.AppleHWSensor          1.9d0
    com.apple.filesystems.autofs          2.0.2
    com.apple.driver.AppleHDAPlatformDriver          1.7.1a2
    com.apple.driver.AppleUpstreamUserClient          2.7.5
    com.apple.driver.AppleHDAHardwareConfigDriver          1.7.1a2
    com.apple.driver.AppleHDA          1.7.1a2
    com.apple.GeForce          5.4.8
    com.apple.driver.AppleHDAController          1.7.1a2
    com.apple.Dont_Steal_Mac_OS_X          6.0.3
    com.apple.iokit.IOFireWireIP          1.7.7
    com.apple.driver.AudioIPCDriver          1.0.6
    com.apple.nvidia.nv40hal          5.4.8
    com.apple.driver.AppleMCEDriver          1.1.7
    com.apple.driver.ACPI_SMC_PlatformPlugin          3.4.0a17
    com.apple.driver.AppleLPC          1.3.1
    com.apple.driver.AppleTyMCEDriver          1.0.0d28
    com.apple.driver.MaxTranserSizeOverrideDriver          2.0.9
    com.apple.driver.iTunesPhoneDriver          1.0
    com.apple.iokit.IOUSBMassStorageClass          2.0.8
    com.apple.driver.AppleUSBComposite          3.2.0
    com.apple.driver.PioneerSuperDrive          2.0.9
    com.apple.iokit.SCSITaskUserClient          2.1.1
    com.apple.driver.AppleRAID          3.0.19
    com.apple.driver.XsanFilter          2.7.91
    com.apple.iokit.IOATAPIProtocolTransport          1.5.3
    com.apple.iokit.IOAHCIBlockStorage          1.2.2
    com.apple.driver.AppleFileSystemDriver          1.1.0
    com.apple.driver.AppleUSBHub          3.4.9
    com.apple.iokit.IOUSBUserClient          3.5.2
    com.apple.driver.AppleAHCIPort          1.7.0
    com.apple.driver.AppleFWOHCI          3.9.7
    com.apple.driver.AppleIntelPIIXATA          2.0.1
    com.apple.driver.AppleIntel8254XEthernet          2.1.2b1
    com.apple.driver.AppleUSBEHCI          3.4.6
    com.apple.driver.AppleUSBUHCI          3.5.2
    com.apple.driver.AppleEFINVRAM          1.2.0
    com.apple.driver.AppleACPIButtons          1.2.5
    com.apple.driver.AppleRTC          1.2.3
    com.apple.driver.AppleHPET          1.4
    com.apple.driver.AppleACPIPCI          1.2.5
    com.apple.driver.AppleSMBIOS          1.4
    com.apple.driver.AppleACPIEC          1.2.5
    com.apple.driver.AppleAPIC          1.4
    com.apple.security.seatbelt          107.12
    com.apple.nke.applicationfirewall          1.8.77
    com.apple.security.TMSafetyNet          3
    com.apple.driver.AppleIntelCPUPowerManagement          76.2.0
    com.apple.driver.DiskImages          199
    com.apple.BootCache          30.4
    com.apple.driver.DspFuncLib          1.7.1a2
    com.apple.iokit.IOHDAFamily          1.7.1a2
    com.apple.iokit.IOAudioFamily          1.6.9fc5
    com.apple.kext.OSvKernDSPLib          1.1
    com.apple.NVDAResman          5.4.8
    com.apple.iokit.IONDRVSupport          1.7.3
    com.apple.iokit.IOGraphicsFamily          1.7.3
    com.apple.driver.IOPlatformPluginFamily          3.4.0a17
    com.apple.driver.AppleSMC          2.3.1d1
    com.apple.iokit.IOSCSIMultimediaCommandsDevice          2.1.1
    com.apple.iokit.IOSCSIBlockCommandsDevice          2.1.1
    com.apple.iokit.IOBDStorageFamily          1.5
    com.apple.iokit.IODVDStorageFamily          1.5
    com.apple.iokit.IOCDStorageFamily          1.5
    com.apple.iokit.IOSCSIArchitectureModelFamily          2.1.1
    com.apple.iokit.IOAHCIFamily          1.5.0
    com.apple.iokit.IOFireWireFamily          3.4.9
    com.apple.iokit.IOATAFamily          2.0.1
    com.apple.iokit.IONetworkingFamily          1.6.1
    com.apple.iokit.IOUSBFamily          3.5.2
    com.apple.driver.AppleEFIRuntime          1.2.0
    com.apple.iokit.IOSMBusFamily          1.1
    com.apple.iokit.IOHIDFamily          1.5.5
    com.apple.iokit.IOStorageFamily          1.5.6
    com.apple.driver.AppleACPIPlatform          1.2.5
    com.apple.iokit.IOPCIFamily          2.6
    com.apple.iokit.IOACPIFamily          1.2.0

    THIS:
    panic(cpu 1 caller 0x006376A4): NVRM[0]: Read Error
    ... Correlates with NVIDIA graphics card failure OR the use of two NVIDIA cards simultaneously in the same Mac Pro in 10.8 and later.
    The Apple-firmware 5770, about US$250,  works in every model Mac Pro, and drivers are in 10.6.5 and later.
    If you decide to do a Conversion of your Server from 10.5 to 10.6, it is not too bad. Just plan on a brief downtime -- I tried to keep it all running 24/7 by creating a new Servername for the new one, and that serious mistake still haunts me.
    You should plan on such a conversion to get closer to current security updates -- 10.5 is not getting those updates, and you should really disconnect your 10.5 Server from the Internet.

  • Need help with simple problem.......

    Hello, I'm fairly new to Java, taking my first year in it. I have a little applet that I have to write up but I'm having some difficulties. Someone please help :)
    OBJECTIVE: Print out the following using a FOR loop.
    OUTPUT:
    JavaProgramming
    JavaProgramming
    JavaProgramming
    JavaProgramming
    JavaProgramming
    I am really having trouble doing the loop and spacing, so that it would have "JavaProgramming" appear 5 times and automatically indent 2 spaces everytime. I've done a "HSA" Console Program (NOT APPLET) where there are 5 words that are not spaced but when I try to do the same in an applet, it simply wont repeat in the loop. Below is the program where there are 5 words WITHOUT spacing in my applet program, I don't know how to repeat it 5 times and have it space 2 times everytime :(
    public class Test extends Applet
        // Place instance variables here
        public void init ()
        } // init method
        public void paint (Graphics g)
            for (int i = 0 ; i < 5 ; i++)
                g.drawString ("JavaProgramming", 20, 20);
        } // paint method
    } // Test classThis will only show "JavaProgramming" once when i run the program. I need it to show 5 times, with 2 spaces indented every time!

    this:
    g.drawString ("JavaProgramming", 20, 20);
    probably needs to be something like:
    g.drawString("JavaProgramming", 20+(i*10), 20+(i*10));
    i.e: increase x and y pos for each iteration.

  • Need help with my Report Header

    Hi
    I have this report that I had to add a column to. which i did. but the problem is I can't find where the report getting its header information from so that I can shift it so that it apears correct format.
    Here is the code
    *& Report  ZSALES                                                      *
    * Report runs by sales employee, by period (invoice month).  It        *
    * displays the contract number, invoice number & amount for the period *
    * and sold-to and ship-to partners of the contract.                    *
    *  MODIFICATION LOG                                                    *
    *    DATE          AUTHOR          DESCRIPTION                         *
    *   10/12/98       gubbi           Original Version                    *
    *   01/14/99       gubbi           added selection criteria - material *
    *                                  sold-to and bill-to parties         *
    *   05/23/99       bchakraborty    added the contract type select      *
    *                                  criteria                            *
    *  04/25/07        akabir          adding Emp#                         *
    REPORT  ZSALES
                     LINE-SIZE 260 LINE-COUNT 65(3).
    TABLES: S006,
            TVAKT,
            VBRP,     "Billing: Item Data
            VBRK,     "Billing: Header Data
            VEDA,
            VBAP,
            ENT6030,
            ENT6418,  "Partner sales activity-employee-assignment
            STXL,     "STXD SAPscript text file lines
            VBPA.
    DATA: BEGIN OF REC OCCURS 0,
          VRTNR LIKE S006-VRTNR,           " sales employee
          SPBUP LIKE S006-SPBUP,           " period of analysis
          VBELN LIKE ENT6418-VBELN,        " contract number
          POSNR LIKE ENT6418-POSNR,        " contract line item number
          MATNR LIKE VBAP-MATNR,           " material number
          VBEGDAT LIKE VEDA-VBEGDAT,       " contract begin date
          VENDDAT LIKE VEDA-VENDDAT,       " contract end date
          PSTYV LIKE VBAP-PSTYV,           " item category
          INVOICE LIKE VBRP-VBELN,         " invoice number(billing doc.)
          ITEM LIKE VBRP-POSNR,            " invoice line item number
          SOLD_TO LIKE ENT6030-KUNNR,      " sold-to party
          SHIP_TO LIKE ENT6030-KUNNR,      " ship-to party
          BILL_TO LIKE ENT6030-KUNNR,      " bill-to party
          FKDAT LIKE VBRK-FKDAT,           " invoice date
          FKART LIKE VBRK-FKART,           " billing type
          NETWR LIKE VBRK-NETWR.           " invoice amount
    DATA: END OF REC.
    DATA: T_PERNR LIKE PERNR-PERNR,
          TEMP(6),
          PRINT_OUT, GET_MATRL.
    * MES Moved to Global
    DATA: BEGIN OF ADDR,
          NAME1 LIKE KNA1-NAME1,
          NAME2 LIKE KNA1-NAME2,
          END OF ADDR.
    SELECTION-SCREEN BEGIN OF BLOCK ELMO WITH FRAME TITLE TEXT-001.
    SELECT-OPTIONS: D_VKORG FOR S006-VKORG,       " sales organization
                    DST_CHAN FOR S006-VTWEG,      " distribution channel
                    DIV FOR S006-SPART,           " division
                    EMPL_NO FOR S006-VRTNR,       " sales employee number
                    SOLD_TO FOR ENT6030-KUNNR,    " sold to party
                    BILL_TO FOR ENT6030-KUNNR,    " bill to party
                    SHIP_TO FOR ENT6030-KUNNR,    " ship to party
                    MATERIAL FOR S006-MATNR,      " material number
                    PERIOD FOR S006-SPBUP,        " analysis period
                    D_AUART FOR TVAKT-AUART.      "Contract type
    SELECTION-SCREEN END OF BLOCK ELMO.
    SELECTION-SCREEN BEGIN OF BLOCK CHARLY WITH FRAME TITLE TEXT-002.
    PARAMETERS: INVOICE RADIOBUTTON GROUP Z1,
                COMISION RADIOBUTTON GROUP Z1.
    SELECTION-SCREEN END OF BLOCK CHARLY.
    "==================== Start Program ====================================
       TOP-OF-PAGE.
    *   perform print_page_headings.
       END-OF-PAGE.
       SKIP 1.
       FORMAT INTENSIFIED OFF.
    *   write: / 'Note:  INVOICE TEXT IS BASED ON CURRENT INFORMATION',
    *          / '       AND MAY NOT MATCH THE ORIGINAL INVOICE'.
       FORMAT RESET.
       START-OF-SELECTION.
    * commission report
       IF COMISION EQ 'X'.
       SELECT DISTINCT VRTNR  FROM S006  INTO T_PERNR
                          WHERE VKORG IN D_VKORG AND
                                SPART IN DIV AND
                                VRTNR IN EMPL_NO AND
                                VTWEG IN DST_CHAN AND
                                SPBUP IN PERIOD.
            AUTHORITY-CHECK OBJECT 'V_VBAK_VKO'
                     ID 'VKORG' FIELD S006-VKORG
                     ID 'VTWEG' FIELD S006-VTWEG
                     ID 'SPART' FIELD S006-SPART
                     ID 'ACTVT' FIELD '03'.
           IF SY-SUBRC EQ 0.
           SELECT * FROM ENT6418 WHERE PERNR = T_PERNR AND
                                         PARVW = 'VE' AND  "sales employee
                                         VBELN >= '0090000000'.
                 MOVE: ENT6418-PERNR TO REC-VRTNR.
                 PERFORM GET_INVOICE_NUMBER.
                 CLEAR: REC, TEMP.
           ENDSELECT.
           ENDIF.
       ENDSELECT.
    * invoice registry report
       ELSEIF INVOICE EQ 'X'.
          SELECT * FROM VBRK
                          WHERE VKORG IN D_VKORG AND
                                SPART IN DIV AND
                                VTWEG IN DST_CHAN.
            AUTHORITY-CHECK OBJECT 'V_VBAK_VKO'
                     ID 'VKORG' FIELD VBRK-VKORG
                     ID 'VTWEG' FIELD VBRK-VTWEG
                     ID 'SPART' FIELD VBRK-SPART
                     ID 'ACTVT' FIELD '03'.
           IF SY-SUBRC EQ 0.
               PERFORM GET_SALES_EMPLOYEE.
               PERFORM GET_INFORMATION.
               CLEAR: REC, TEMP.
           ENDIF.
          ENDSELECT.
       ENDIF.
       END-OF-SELECTION.
       PERFORM PRINT_DATA.
    *&      Form  GET_CONTRACT_NUMBER
    *       text
    FORM GET_CONTRACT_NUMBER.
       SELECT SINGLE * FROM VBRP WHERE VBELN = ENT6418-VBELN AND
                                       POSNR = ENT6418-POSNR.
       IF SY-SUBRC EQ 0.
           MOVE: VBRP-AUBEL TO REC-VBELN,       " contract number
                 VBRP-POSNR TO REC-POSNR.       " contract item number
           SELECT SINGLE * FROM VBAP WHERE VBELN = REC-VBELN AND
                                           POSNR = REC-POSNR.
           IF SY-SUBRC EQ 0.
              MOVE: VBAP-MATNR TO REC-MATNR,
                    VBAP-PSTYV TO REC-PSTYV.
           ENDIF.
           SELECT SINGLE * FROM VEDA WHERE VBELN = REC-VBELN.
           IF SY-SUBRC EQ 0.
              MOVE: VEDA-VBEGDAT TO REC-VBEGDAT,
                    VEDA-VENDDAT TO REC-VENDDAT.
           ENDIF.
       ENDIF.
       MOVE: ENT6418-VBELN TO REC-INVOICE,     " invoice number
             ENT6418-POSNR TO REC-ITEM.        " invoice item number
    ENDFORM.                    " GET_CONTRACT_NUMBER
    *&      Form  GET_INVOICE_NUMBER
    *       text
    FORM GET_INVOICE_NUMBER.
           SELECT SINGLE * FROM VBRK WHERE VBELN = ENT6418-VBELN.
           IF SY-SUBRC EQ 0.
               PERFORM GET_INFORMATION.
           ENDIF.
           CLEAR: TEMP, REC.
    ENDFORM.                    " GET_INVOICE_NUMBER
    *&      Form  GET_SOLD_TO_SHIP_TO_PARTY
    *       text
    FORM GET_SOLD_TO_SHIP_TO_PARTY.
       SELECT * FROM VBPA WHERE VBELN = REC-VBELN.
    *                 ( PARVW = 'AG' OR PARVW = 'WE' OR PARVW = 'RE' ).
          IF VBPA-PARVW EQ 'AG'.
             MOVE: VBPA-KUNNR TO REC-SOLD_TO.
          ELSEIF VBPA-PARVW EQ 'WE'.
             MOVE: VBPA-KUNNR TO REC-SHIP_TO.
          ELSEIF VBPA-PARVW EQ 'RE'.
             MOVE: VBPA-KUNNR TO REC-BILL_TO.
          ENDIF.
       ENDSELECT.
    ENDFORM.                    " GET_SOLD_TO_SHIP_TO_PARTY
    *&      Form  PRINT_DATA
    *       text
    FORM PRINT_DATA.
           DATA: NAME(25),
                 TEXT LIKE TVFKT-VTEXT.
           SORT REC BY SPBUP
                       VRTNR
                       INVOICE ITEM.
           FORMAT RESET.
           LOOP AT REC.
              AT NEW SPBUP.
    *             new-page.
              ENDAT.
    * Get contract type first for selection criteria
              PERFORM GET_CONTRACT_TYPE.
    * only continue if contract type is in selection
           IF PRINT_OUT = 'Y'.
    * Employee name note required
              PERFORM GET_EMPLOYEE_NAME USING NAME.
              perform get_billing_type_text using text.
    *          write: / 'Sales Employee: ', rec-vrtnr, name.
              write: 1 rec-vrtnr.
              clear: name.
              IF REC-FKART EQ 'S1'.
                 FORMAT COLOR COL_NEGATIVE.
              ENDIF.
              WRITE: 170 REC-INVOICE, REC-ITEM. " Invoice #
    *          write: /10 'Billing Type: ', 30 rec-fkart, text.
              FORMAT RESET.
              CLEAR: TEXT.
    *          write: /10 'Invoice Date: ',
               WRITE:  185 REC-FKDAT MM/DD/YY,
                       (10) REC-NETWR, 'USD'.
    *          write: /10 'Sold-to Party: ', 30 rec-sold_to.
              WRITE: 11 REC-SOLD_TO. " 10 addr.
              PERFORM GET_CUSTOMER_NAME USING REC-SOLD_TO.
    *          write: /10 'Ship-to Party: ', 30 rec-ship_to.
              WRITE: 60 REC-SHIP_TO. " 60 addr.
              PERFORM GET_CUSTOMER_NAME USING REC-SHIP_TO.
    *          write: /10 'Bill-to Party: ', 30 rec-bill_to.
    *          perform get_customer_name using rec-bill_to.
    *          write: 0 rec-bill_to, 10 addr.
              WRITE: 155 REC-VBELN. " , rec-posnr. "Contract
              WRITE: 220 REC-VBEGDAT, REC-VENDDAT.
    *          perform get_contract_type.
    *          perform get_item_category_text.
    *          perform get_long_text.
            IF GET_MATRL NE 'N'.
               PERFORM GET_MATERIAL_TEXT.
            ENDIF.
    *         write: 105 rec-invoice, rec-item. " Invoice #
    WRITE:/.
    *         uline.
    ENDIF.   " if contract selection
              AT LAST.
              SUM.
              WRITE: /55 'Totals:        ', (10) REC-NETWR.
              ULINE.
              ENDAT.
           ENDLOOP.
    ENDFORM.                    " PRINT_DATA
    *&      Form  GET_EMPLOYEE_NAME
    *       text
    FORM GET_EMPLOYEE_NAME USING    P_NAME.
    CALL FUNCTION 'Z_GET_EMPLOYEE_NAME'
         EXPORTING
              EMPL_NO = REC-VRTNR
        IMPORTING
             NAME    = P_NAME
         EXCEPTIONS
              OTHERS  = 1.
    ENDFORM.                    " GET_EMPLOYEE_NAME
    *&      Form  GET_LONG_TEXT
    *       text
    FORM GET_LONG_TEXT.
           DATA: DUMMY LIKE THEAD-TDNAME,
                 LINES TYPE I.
           DATA: BEGIN OF TABLE_LINES OCCURS 0.
                 INCLUDE STRUCTURE TLINE.
           DATA: END OF TABLE_LINES.
           DATA: BEGIN OF IN_LINES OCCURS 0.
                 INCLUDE STRUCTURE TLINE.
           DATA: END OF IN_LINES.
           CONCATENATE REC-VBELN REC-POSNR INTO DUMMY.
           SELECT * FROM STXL WHERE TDOBJECT = 'VBBP' AND
                                TDNAME = DUMMY.
           CALL FUNCTION 'READ_TEXT_INLINE'
                EXPORTING
                     ID              = STXL-TDID
                     INLINE_COUNT    = 1
                     LANGUAGE        = 'E'
                     NAME            = DUMMY
                     OBJECT          = 'VBBP'
    *           IMPORTING
    *                HEADER          =
                TABLES
                     INLINES         = IN_LINES
                     LINES           = TABLE_LINES
                EXCEPTIONS
                     ID              = 1
                     LANGUAGE        = 2
                     NAME            = 3
                     NOT_FOUND       = 4
                     OBJECT          = 5
                     REFERENCE_CHECK = 6
                     OTHERS          = 7.
          DESCRIBE TABLE TABLE_LINES LINES LINES.
          IF SY-SUBRC EQ 0.
             SKIP 1.
             WRITE: / 'Item Text: '.
          ENDIF.
          CLEAR LINES.
          LOOP AT TABLE_LINES.
             WRITE: / TABLE_LINES-TDLINE.
          ENDLOOP.
          REFRESH TABLE_LINES.
          CLEAR: TABLE_LINES.
          ENDSELECT.
    ENDFORM.                    " GET_LONG_TEXT
    *&      Form  GET_CUSTOMER_NAME
    *       text
    FORM GET_CUSTOMER_NAME USING    P_CUST_NO.
    *data: begin of addr,
    *      name1 like kna1-name1,
    *      name2 like kna1-name2,
    *      end of addr.
    DATA: STREET LIKE KNA1-STRAS,
          CITY LIKE KNA1-ORT01,
          STATE LIKE KNA1-REGIO,
          ZIP LIKE KNA1-PSTLZ.
    CALL FUNCTION 'Z_GET_CUSTOMER_NAME_ADDRESS'
         EXPORTING
              CUST_NO = P_CUST_NO
        IMPORTING
             NAME1   = ADDR-NAME1
             NAME2   = ADDR-NAME2
             STREET  = STREET
             CITY    = CITY
             STATE   = STATE
             ZIP     = ZIP
         EXCEPTIONS
              OTHERS  = 1.
       CONDENSE ADDR.
    * MES Don't need to print in this report
      WRITE: ADDR(20).
    *         /30 street,
    *         /30 city, state, zip.
       CLEAR: ADDR, STREET, CITY, STATE, ZIP.
    ENDFORM.                    " GET_CUSTOMER_NAME
    *&      Form  PRINT_PAGE_HEADINGS
    *       text
    FORM PRINT_PAGE_HEADINGS.
       DATA: MO(2), YR(4),
             TEMP_NAME(80) VALUE SPACE.
       WRITE: / SY-REPID.
       IF COMISION EQ 'X'.
           CALL FUNCTION 'Z_PRINT_PAGE_HEADINGS'
                EXPORTING
                       STRING  = 'COMMISSION REPORT'
                EXCEPTIONS
                       OTHERS  = 1.
       ELSE.
           CALL FUNCTION 'Z_PRINT_PAGE_HEADINGS'
                EXPORTING
                       STRING  = 'INVOICE REPORT'
                EXCEPTIONS
                       OTHERS  = 1.
       ENDIF.
       TEMP_NAME = 'PERIOD: '.
       MO = REC-SPBUP+4(2).
       YR = REC-SPBUP(4).
       FORMAT INTENSIFIED ON.
       CONCATENATE TEMP_NAME MO '/' YR INTO TEMP_NAME.
       WRITE: / TEMP_NAME CENTERED.
       CLEAR: MO, YR, TEMP_NAME.
       IF D_VKORG <> SPACE.
          TEMP_NAME = 'SALES ORGANIZATION:'.
          IF D_VKORG-HIGH <> SPACE.
              CONCATENATE TEMP_NAME D_VKORG-LOW ' TO:' D_VKORG-HIGH INTO
                                TEMP_NAME.
          ELSE.
              CONCATENATE TEMP_NAME D_VKORG-LOW INTO TEMP_NAME.
          ENDIF.
       ENDIF.
       IF TEMP_NAME <> SPACE.
              WRITE: / TEMP_NAME CENTERED.
              CLEAR TEMP_NAME.
       ENDIF.
       IF DST_CHAN <> SPACE.
          TEMP_NAME = 'DISTRIBUTION CHANNEL:'.
          IF DST_CHAN-HIGH <> SPACE.
              CONCATENATE TEMP_NAME DST_CHAN-LOW ' TO:' DST_CHAN-HIGH INTO
                                TEMP_NAME.
          ELSE.
              CONCATENATE TEMP_NAME DST_CHAN-LOW INTO TEMP_NAME.
          ENDIF.
       ENDIF.
       IF TEMP_NAME <> SPACE.
              WRITE: / TEMP_NAME CENTERED.
              CLEAR TEMP_NAME.
       ENDIF.
       IF DIV <> SPACE.
          TEMP_NAME = 'DIVISION:'.
          IF DIV-HIGH <> SPACE.
              CONCATENATE TEMP_NAME DIV-LOW ' TO:' DIV-HIGH INTO
                                TEMP_NAME.
          ELSE.
              CONCATENATE TEMP_NAME DIV-LOW INTO TEMP_NAME.
          ENDIF.
       ENDIF.
       IF TEMP_NAME <> SPACE.
              WRITE: / TEMP_NAME CENTERED.
              CLEAR TEMP_NAME.
       ENDIF.
    * uline.
       FORMAT RESET.
    ENDFORM.                    " PRINT_PAGE_HEADINGS
    *&      Form  GET_SALES_EMPLOYEE
    *       text
    FORM GET_SALES_EMPLOYEE.
       SELECT SINGLE * FROM ENT6418 WHERE VBELN = VBRK-VBELN AND
                                          PARVW = 'RE'.
       IF SY-SUBRC EQ 0.
          MOVE: ENT6418-PERNR TO REC-VRTNR.
       ENDIF.
       SELECT SINGLE * FROM ENT6418 WHERE VBELN = VBRK-VBELN AND
                                          PARVW = 'WE'.
    ENDFORM.                    " GET_SALES_EMPLOYEE
    *&      Form  GET_INFORMATION
    *       text
    FORM GET_INFORMATION.
               TEMP = VBRK-FKDAT(6).
               CHECK TEMP IN PERIOD.
               MOVE: VBRK-FKDAT TO REC-FKDAT,  " invoice date
                     VBRK-FKART TO REC-FKART,  " billing type
                     TEMP TO REC-SPBUP.
    * subtract the amount if the invoice is cancelled.
    * chakraborty. added the G2 and RE criteria to billing type
               IF REC-FKART EQ 'S1'.         " cancellation of inventory
                     REC-NETWR = -1 * VBRK-NETWR.  " invoice amount
               ELSEIF REC-FKART EQ 'G2'.     "  credit memo
                     REC-NETWR = -1 * VBRK-NETWR.
               ELSEIF REC-FKART EQ 'RE'.     " credit for returns
                     REC-NETWR = -1 * VBRK-NETWR.
               ELSE.
                     REC-NETWR = VBRK-NETWR.
               ENDIF.
               PERFORM GET_CONTRACT_NUMBER.
               PERFORM GET_SOLD_TO_SHIP_TO_PARTY.
               IF REC-SOLD_TO IN SOLD_TO AND REC-BILL_TO IN BILL_TO AND
                              REC-MATNR IN MATERIAL AND
                              REC-SHIP_TO IN SHIP_TO.
                   APPEND REC.
               ENDIF.
               CLEAR REC.
    ENDFORM.                    " GET_INFORMATION
    *&      Form  GET_BILLING_TYPE_TEXT
    *       text
    FORM GET_BILLING_TYPE_TEXT USING    P_TEXT.
       TABLES: TVFKT.
       SELECT SINGLE * FROM TVFKT WHERE SPRAS = 'E' AND
                                        FKART = REC-FKART.
       IF SY-SUBRC EQ 0.
          MOVE: TVFKT-VTEXT TO P_TEXT.
       ENDIF.
    ENDFORM.                    " GET_BILLING_TYPE_TEXT
    *&      Form  GET_CONTRACT_TYPE
    *       text
    *  -->  p1        text
    *  <--  p2        text
    FORM GET_CONTRACT_TYPE.
        TABLES: VIVEDA.
    *            TVAKT.
        DATA: P_T_BEZEI LIKE TVAKT-BEZEI,
              P_T_AUART LIKE TVAKT-AUART.
        SKIP 1.
        SELECT SINGLE AUART FROM VIVEDA INTO P_T_AUART
                               WHERE VBELN = REC-VBELN AND
                                     POSNR = REC-POSNR.
       IF P_T_AUART = 'ZWV'.
          SELECT SINGLE BEZEI FROM TVAKT INTO P_T_BEZEI
                              WHERE AUART = P_T_AUART AND SPRAS = 'E'
                              AND AUART IN D_AUART.
        WRITE: /110 P_T_AUART, 117 P_T_AUART , P_T_BEZEI.
       ENDIF.
       IF P_T_AUART IN D_AUART.
          PRINT_OUT = 'Y'.
         WRITE: /210 P_T_AUART.
       ELSE.
          PRINT_OUT = 'N'.
       ENDIF.
        CLEAR: P_T_AUART, P_T_BEZEI.
    ENDFORM.                    " GET_CONTRACT_TYPE
    *&      Form  GET_ITEM_CATEGORY_TEXT
    *       text
    *      -->P_I_TEXT  text                                               *
    FORM GET_ITEM_CATEGORY_TEXT.
       TABLES: TVAPT.
       SELECT SINGLE * FROM TVAPT WHERE SPRAS = 'E' AND
                                        PSTYV = REC-PSTYV.
       IF SY-SUBRC EQ 0.
          WRITE: /20 'Item Category: ', REC-PSTYV, TVAPT-VTEXT.
       ENDIF.
    ENDFORM.                    " GET_ITEM_CATEGORY_TEXT
    *&      Form  GET_MATERIAL_TEXT
    *       text
    *  -->  p1        text
    *  <--  p2        text
    FORM GET_MATERIAL_TEXT.
       TABLES: MAKT.
       SELECT SINGLE * FROM MAKT WHERE MATNR = REC-MATNR AND
                                       SPRAS = 'E'.
       IF SY-SUBRC EQ 0.
          WRITE: 110 REC-MATNR, 117 MAKT-MAKTX(35).
       ENDIF.
    ENDFORM.                    " GET_MATERIAL_TEXT
    I was wondering if one of the experts can tell me how to get to the header.
    There r previously wrtten code for header in there which is * marked. so its not using it. but may be I am missing some thing here

    Thanks but the line that calling that Form is * marked
    *   perform print_page_headings.
    It never reaches there and the following is the code from that function which got just the title not the header stuff.
    FUNCTION Z_PRINT_PAGE_HEADINGS.
    *"*"Local interface:
    *"  IMPORTING
    *"     VALUE(STRING) LIKE  IFLOTX-PLTXT OPTIONAL
    DATA: V_HEAD_STRING(255) VALUE SPACE.
    FORMAT INTENSIFIED OFF.
    WRITE: / 'Printed By: ', SY-UNAME,
             'On ', SY-DATUM MM/DD/YY,
             'At ', SY-UZEIT,
             65 'Page No. ', SY-PAGNO.
    SKIP 1.
    FORMAT RESET.
    FORMAT INTENSIFIED ON.
        V_HEAD_STRING = 'BGM INDUSTRIES INC.'.
        WRITE: / V_HEAD_STRING CENTERED.
        IF STRING <> SPACE.
            V_HEAD_STRING = STRING.
            WRITE: / V_HEAD_STRING CENTERED.
        ENDIF.
    FORMAT RESET.
    ENDFUNCTION.
    I am looking for the header stuff. when I run the report the above stuff doesn't even appear and understandably so as its commented out.

  • Need help with a report

    hello,
    I'm new to htmldb. I'd like to fetch data from a table. the table contains news.
    here are the colums of the table: id, headline, body, date
    I want all news displayed like this
    headline (bold, different color) <br>
    body (bold) <br>
    date <br>
    Can some please help me. I've used the report template (value attribute pairs) but how can I display the headline in bold and in a different color?
    I hope it's not a stupid question
    thanks in advance
    david
    Message was edited by:
    user463901

    I'm afraid thats not what I need to know. <br>
    I want my report to look like this:<br><br>
    < span class="someclass">headline< /span>< br><br>
    < span class="someclass">body< /span>< br><br>
    < span class="someclass">date< /span>< br><br><br>
    You know, I want that 'span tag' wrapped arround my columns. and a < br> tag after every column.

Maybe you are looking for

  • How to reinstall OS X on a windows Macbook Pro?

    I have a Macbook Pro model A1286. An employee installed bootcamp and now only windows shows on startup. How do I get OS X back on the device? Only the windows partition shows on bootup with options pressed. Is there a way to download the OS through a

  • Does Photoshop Elements 4 function in Leopard on Intel Mac?

    I am aware that it is not at all supported by Adobe, but has anyone been successfully using Photoshop Elements 4 on Leopard and Intel macs of any sort? thank you

  • Number to date

    Hi Experts, I have a DATE_WID column as Number(10). I want to convert this to Date format in MM/DD/YYYY in BMM layer. How can I do that? thx, parag

  • Wireless keyboard stucks on fn   function key

    Hello Guys, i bought a brand-new Apple Wireless Keyboard and its working very smoothly, but i have some problems with the fn + function keys Combo. I'm using Mac OS X 10.7.3 and when i press FN + F11 (for example, but it's concerning all function key

  • Separate drives for samples and audio files..?

    Hello all I am moving to Macbook Pro (previous gen) with Logic Studio after years of PC (feel like I'm standing on the edge of a precipice staring anxiously down!). Will be looking to use it live in our 3-piece band to run existing MIDI Files and liv