How to add an image or static text in the header of EACH page of a cross-Tab report

Post Author: rtutus
CA Forum: General
Hi, I use Crustal 11.0.
I have a cross Tab. I display the items on the left column and the months horizontally, the items are grouped by category field. The values are the sum of quantities are displayed for each month. Like this:
                         Items         Jan       Feb       March .....................Total
Category 1                       
                         Item11         val11     Val12      Val13                     Total values
                         Item12         val21     Val22      Val23                     Total values
                         Item13         val31     Val32      Val33                     Total values
Category 2                       
                         Item21         val11     Val12      Val13                     Total values
                         Item22         val21     Val22      Val23                     Total values
                         Item23         val31     Val32      Val33                     Total values
Category 3                       
                         Item31         val11     Val12      Val13                     Total values
                         Item32         val21     Val22      Val23                     Total values
                         Item33         val31     Val32      Val33                     Total values
The problem, I want to add a page header for each page of the report.
When Crystal reports first displays my cross-tab in the designer, CR displays the cross tab in the Report header section. I d like to add text or image for each page and not only at the begining of my Cross-Tab.
If I just add an image or text at the top of the report designer, which is my report header, I get the image or text only on the begining of the 1st page of my report but never in the other following pages.
If I try to work around the problem and move the cross Tab to a group section instead, and then put the Image in the group header, I get what I want, but the problem is that:
The columns header: Jan, February....December are displayed for each group of my report and not only in the beginning of the report. I get something like this:
                         Items         Jan       Feb       March .....................Total
Category 1                       
                         Item11         val11     Val12      Val13                     Total values
                         Item12         val21     Val22      Val23                     Total values
                         Item13         val31     Val32      Val33                     Total values
                         Items         Jan       Feb       March .....................Total
Category 2                       
                         Item21         val11     Val12      Val13                     Total values
                         Item22         val21     Val22      Val23                     Total values
                         Item23         val31     Val32      Val33                     Total values
                         Items         Jan       Feb       March .....................Total
Category 3                       
                         Item31         val11     Val12      Val13                     Total values
                         Item32         val21     Val22      Val23                     Total values
                         Item33         val31     Val32      Val33                     Total values
You see the months get duplicated. Any way, my real need is to add an image or text in the header of EACH page of a cross-Tab report.
Thanks a lot for your help.

Hi Divya,
you could do for example in the wdDoInit() of the view
wdContext.currentContextElement().setPicture("picture.gif");
Now you assign this context variable to the Tab using the Tab_header's imageSource-Property. When you click on its value column, you see a button with three dots on it. If you click on this button, you will get all context nodes and attributes for this View. Usable variables are clearly marked, you now choose the one named Picture or what ever name you prefer to use. But it must correspond to the one set in the wdDoInit.
I think setting a picture (not necessarily for the tab-page) is done in one of the excellent tutorials. If you are a newcomer I strongly recommend doing some of the tutorials.  I have learned tremendously from them.
Hope this helped
Harald

Similar Messages

  • How to add multiple images to a JLabel from the jar file

    I want to add multiple images in a JLabel but the icon property only allows me to add one. I thought I could use html rendering to add the images I need by using the <img> tab, but I need to use a URL that points to the image.
    How do I point to an image inside the jar file? If I can't, is there another way to show multiple images in a JLabel from the jar file?

    Thanks, it works perfectly. It's a really smart way of fixing the problem too :)
    I also found your toggle button icon classes which is something I've also had a problem with.
    Thanks.

  • Insert a image or text at the bottom of each page.

    Hi,
    I'm VERY new to reports and I'm trying to add a image or a text block at the bottom of each page. How is it done??
    Help!!!,
    Larry

    Hi Kartracer
    1-Select main Section button on the tool bar wich have a little blue arrow,u will see the displayed hint that says
    2- Select the insert menu and then the image and define ur image path.
    Tell me then what's happened...
    Regards,
    Abdetu..

  • How to put report title and page no to appear in multiple pages,when using cross tab reports

    Post Author: shaminranaweera
    CA Forum: General
    I am using crystal reports 9.0 with odbc foxpro database conectivity
    I have designed a cross tab report and it is on the report header part and all the report details  are fine,except that the report title and  and page no's only show on the first page of my report.Pls tell me how can i put my report title and page no on all the pages in my crosstab.

    Post Author: foghat
    CA Forum: General
    You need to put your title in the page header if you want it to appear on every page.  The report header only displays once per report.

  • Printing text on the back of each page

    I have a question about printing on the "back" of each page. I am trying to create documents (like Purchase Orders, Order Acknowlegments, Invoices) that have Legal Terms and Conditions that need to print on the back of each printed page(so it needs to be every other page). I can't figure out how to make that happen with reports. My report output is pdf.
    I see that a Trailer page has a "Repeat On" property...but that is based on groups. I need it to be based on pages. Even so, they all print at the end.
    I also see there is a between_pages report trigger...can I somehow use that?
    Using Reports 10.1.2.0.2 with Unix App Server(hp-ux).

    Hi curiouslyfun,
    You wrote:
    I'm working on a long document.
    Peter wrote:
    I suspect that it may ultimately be a matter of just how much document can be held in RAM and calculated as to its layout, something Pages is not noticeably efficient at doing.
    Ahem.
    Pages is a $20 word processor. It is not a clone of Microsoft Word. Pages is a user-friendly app for short documents. If you need strong horsepower, buy and use Word for Mac.
    Popcorn wrote:
    an editor will get the document. They requested pages.
    Hi Pop, perhaps your editor will accept your work in a number of small Pages documents. Split your work into several "chapters" in separate Pages docs. If your editor is a Pages user, they will understand.
    Ian.

  • How to use CreateInsert in inseting new row at the beginning of each page

    I would like to insert new row in an editable table bu using CreateInsert. How to insert that at the beginning of every pagination. Let us say, if my pagination is 10, when I insert the record in pagination 21-30, the new record will be inserted and will be the new 21st record. In pagination 1-10, the new inserted row will be the 1st record, and so on.
    The default behavior is the newly inserted record will be at the top of the record where the focus is located. I want the behavior to be always at the top of every pagination. Pls help

    Probably you have to create your own createAndInsert method in view object implementation class and expose it to the client. Then use this method instead of default create and insert action.
    In your new method use createRow() and insertRowAtRangeIndex() methods to insert record exactly where you want.
    Rado

  • How to insert page number on each page for Cross-Tab report?

    Hi,
    I have created a Cross-Tab in the section Report Header via Crystal Reports 11.
    Now, I want to created more Cross-Tabs, and each page has one Cross-Tab.
    So, I insert Report Headers to contain Cross-Tabs. But, the report only shows the page number at the last page.
    How to insert page number on each page?
    Thanks in advance.

    Hi,
    Well, the easiest solution is to place the Cross-tab in the Report Footer, Of course, ONLY if the report contains this single object which I'm assuming is not the case.
    If you do not wish to place the cros-tab in the Report Footer, here's what you need to do:
    1) Create a formula;
    whilereadingrecords;
    2) Create a group on this formula. If the report already contains groups, move this formula to the top of the grouping list. It won't affect the other groups or records in any way.
    3) Move the Cross-tab from the Report Header to the Group Header1 and suppress Group Footer1
    4) Add the Page Number field to the Page Footer
    Let me know how this goes!
    -Abhilash

  • How to add an image file to Oracle db?

    Need help urgently....Anybody knows how to add an image file (example: jpg)into one of the fields in Oracle database??

    This will do the job..
    package forum;
    import javax.servlet.*;
    import javax.servlet.http.*;
    import java.io.*;
    import java.util.*;
    import java.sql.*;
    import oracle.jdbc.driver.*;
    //import oracle.sql.*;
    Wanneer een request.getInputStream wordt geconferteerd naar een "String" (zie later) dan ziet de output in tekstformaat er als volgt uit:
    -----------------------------7d280152604f4 Content-Disposition: form-data; name="oploadfile"; filename="C:\WINNT\Profiles\mvo\Desktop\boodschap.txt" Content-Type: text/plain Deze boodschap dient te worden ge-insert in de database. -----------------------------7d280152604f4 Content-Disposition: form-data; name="StadID" 1234 -----------------------------7d280152604f4 Content-Disposition: form-data; name="SuccessPage" /forum/error.jsp -----------------------------7d280152604f4--
    of opgesplitst
    contentType........... multipart/form-data; boundary=---------------------------7d235ade00f0
    filename.............. "C:\Documents and Settings\Administrator\Desktop\boodschap.txt"
    MIME type............. text/plain
    Wat in database moet.. Dit is de eigenlijke boodschap die moet worden ge-insert in de database.
    Eind boundary......... -----------------------------7d235ade00f0 Content-Disposition: form-data; name="file1"; filename="" Content-Type: application/octet-stream -----------------------------7d235ade00f0--
    We gaan achtereenvolgens:
    1. Kijken of het van het "multipart/form-data" type is (uploaden) en strippen van eerste boundery.
    1.a Geen "multipart/form-data" ? dan... error message
    1.b Groter dan MAX_SIZE ?..dan .. error message
    2. Filenaam van de te uploaden file uitlezen
    3. Mimetype bepalen en bepalen in welke positie van de string het Mimetype ophoudt, cq waar te uploaden file begint
    4. Bepalen waar eind boundery begint
    5. De eigenlijke file uitlezen
    6. Terug converteren naar bytes
    public class WriteBlob extends HttpServlet {
    public static final int MAX_SIZE = ParameterSettings.imageUpload;
    String successMessage = "";
    public void init(ServletConfig config) throws ServletException {
    super.init(config);
    * Process the HTTP Get request
    public void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
    DataInputStream in = null;
    FileOutputStream fileOut= null;
    PrintWriter out = response.getWriter();
    int kb_size = 0;
    boolean pass2 = true;
    String message = "";
    String responseRedirect = "/forum/uploaden.jsp?message="+" Uploaden geslaagd";
    try
    //get content type of client request
    String contentType = request.getContentType();
    // Start stap 1...content type is multipart/form-data
    if(contentType != null && contentType.indexOf("multipart/form-data") != -1)
    //open input stream
    in = new DataInputStream(request.getInputStream());
    //get length of content data
    int formDataLength = request.getContentLength(); // totale lengte van de inputstream
    //initieer een byte array om content data op te slaan
    byte dataBytes[] = new byte[formDataLength];
    //read file into byte array
    int bytesRead = 0;
    int totalBytesRead = 0;
    int sizeCheck = 0;
    while (totalBytesRead < formDataLength)
    //kijken of de file niet te groot is
    sizeCheck = totalBytesRead + in.available();
    if (sizeCheck > MAX_SIZE)
    pass2 = false;
    message = "Sorry. U kunt slechts bestanden uploaden tot een grootte van 500KB";
    responseRedirect = "/forum/uploaden.jsp?message="+message;
    bytesRead = in.read(dataBytes, totalBytesRead,formDataLength);
    totalBytesRead += bytesRead;
    if (pass2==true)
    kb_size = (int)(formDataLength/1024);
    //create string from byte array for easy manipulation
    String file = new String(dataBytes);
    /*get boundary value (boundary is a unique string that separates content data)
    contentType........... multipart/form-data; boundary=---------------------------7d235ade00f0
    int lastIndex = contentType.lastIndexOf("=");
    String boundary = contentType.substring(lastIndex+1, contentType.length());
    // Stap 2.....bepaal de naam van de upload file
    // filename.............. "C:\Documents and Settings\Administrator\Desktop\boodschap.txt"
    String saveFile = file.substring(file.indexOf("filename=\"")+10);
    saveFile = saveFile.substring(0,saveFile.indexOf("\n"));
    saveFile = saveFile.substring(saveFile.lastIndexOf("\\")+1,saveFile.indexOf("\"")); //naam van de file...boodschap.txt
    String saveFileName = saveFile;
    // Stap 3..Bepaal MIME Type en de positie van eind mime type in string
    voorbeeld: -----------------------------7d23d21220524 Content-Disposition: form-data; name="file0"; filename="C:\WINNT\Profiles\mvo\Desktop\z clob.txt" Content-Type: text/plain
    String restant = "";
    int pos; //position in upload file
    // bijv .. filename="C:\Documents and Settings\Administrator\Desktop\boodschap.txt"
    pos = file.indexOf("filename=\"");
    //find position of content-disposition line
    pos = file.indexOf("\n",pos)+1; // eing file naam + spatie
    // onderstaand geeft bijv Content-Type: text/plain
    restant = file.substring(pos,file.indexOf("\n",pos)-1);
    restant = restant.substring(restant.indexOf(":")+2,restant.length()); // MIME type
    String mimeType = restant;
    //find position of eind content-type line
    pos = file.indexOf("\n",pos)+1;
    //find position of blank line
    pos = file.indexOf("\n",pos)+1;
    int start = pos;
    // Stap 4 eind boundary
    /*find the location of the next boundary marker (marking the end of the upload file data)*/
    int boundaryLocation = file.indexOf(boundary,pos)-4; //waarom -4 ..? ziet er uit als linebreak spatie--boundary=-----------------------------7d21c9ae00f0
    // Stap 5 en 6..de eigelijke te uploaden file in nieuwe byte file inserten
    byte dataBytes2[] = new byte[boundaryLocation-start]; //declareren
    for (int i=0;i<(boundaryLocation-start);i++) // inserten BELANGRIJK !!
    dataBytes2=dataBytes[start+i];
    String next_id = "0";
    Statement statement = null;
    Connection conn = null;
    boolean pass = true;
    ResultSet rs = null;
    Statement stmt_empty = null;
    oracle.sql.BLOB blb = null;
    try
    int vendor = DriverUtilities.ORACLE;
    String username = ConnectionParams.userName;
    String password = ConnectionParams.passWord;
    String connStr = DriverUtilities.makeURL(vendor);
    DriverManager.registerDriver(new oracle.jdbc.driver.OracleDriver());
    conn = DriverManager.getConnection(connStr,username, password);
    if (conn==null){pass=false;}
    } catch (Exception e){out.println("<P>" + "There was an error establishing a connection:");}
    if (pass==true)
    try
    String seq_nextval ="select forum_blob_seq.nextval from dual";
    statement = conn.createStatement();
    ResultSet rset = statement.executeQuery(seq_nextval);
    while (rset.next())
    next_id = rset.getString(1);
    if (next_id.equals("0"))
    message = "Uploaden mislukt !...Er ging wat fout tijdens de interactie met de database";
    responseRedirect = "/forum/uploaden.jsp?message="+message;
    pass = false;
    } catch (Exception e1) { out.println("Error blob1 : "+e1.toString()); };
    } // end pass
    if (pass==true)
    try
    Statement stmt2 = conn.createStatement();
    String insert_empty_blob = "INSERT INTO test_blob(id "+
    ",filename "+
    ",mimetype "+
    ",kb) "+
    "VALUES("+Integer.parseInt(next_id) +
    ",'"+saveFileName+"'"+
    ",'"+mimeType+"'"+
    ","+kb_size+")";
    stmt2.executeQuery(insert_empty_blob);
    conn.commit();
    if (stmt2!= null) {stmt2.close();}else{stmt2.close();pass = false;}
    } catch (Exception e2){
    message = "Uploaden mislukt !...Er ging wat fout tijdens de interactie met de database";
    responseRedirect = "/forum/uploaden.jsp?message="+message;
    out.println("<P>" + "2. There was an error inserting mime type:");}
    } //end pass
    if (pass==true)
    try
    conn.setAutoCommit(false);
    } catch (Exception e3) { pass = false; out.println("Error blob 3: "+e3.toString()); };
    } //end pass
    if (pass==true)
    try
    String Query_blob ="Select test_blob FROM test_blob where id="+next_id+" FOR UPDATE";
    stmt_empty = conn.createStatement();
    rs=stmt_empty.executeQuery(Query_blob);
    } catch (Exception e4) {
    pass = false;
    out.println("Error blob 4: "+e4.toString());
    message = "Uploaden mislukt !...Er ging wat fout tijdens de interactie met de database";
    responseRedirect = "/forum/uploaden.jsp?message="+message;};
    } //end pass
    if (pass==true)
    try
                             if (rs.next())
                             blb = ((OracleResultSet)rs).getBLOB(1);
                        OutputStream stmBlobStream = blb.getBinaryOutputStream();
                             try {
                                  int iSize = blb.getBufferSize();
                             byte[] byBuffer = new byte[iSize];
                             int iLength = -1;
    ByteArrayInputStream stmByteIn = new ByteArrayInputStream(dataBytes2);
                                  try {
    // while ( (iLength = in.read(byBuffer, 0,      iSize)) != -1 )
    while ( (iLength = stmByteIn.read(byBuffer, 0,      iSize)) != -1 )
                                       stmBlobStream.write(byBuffer, 0, iLength);
                                       stmBlobStream.flush();
                                       } // end while
    } catch (Exception e5) {
    pass=false;
    out.println("Error blob 5: "+e5.toString());
    message = "Uploaden mislukt !...Er ging wat fout tijdens de interactie met de database";
    responseRedirect = "/forum/uploaden.jsp?message="+message; }
                                  finally { conn.commit();     }
    } catch (Exception e6) { out.println("Error blob 6: "+e6.toString()); };
                             } //end if rs.next()
                             else {      throw new SQLException("Could not locate message record in database."); }
    } catch (Exception e7) { out.println("Error blob : "+e7.toString()); };
    } // end pass
    } // end pass2
    else //request is not multipart/form-data
    message = "Uploaden mislukt !...Gegevens niet verstuurd via multipart/form-data.";
    responseRedirect = "/forum/error.jsp?message="+message;
    out.println("Request not multipart/form-data.");
    catch(Exception e)
    try
    //print error message to standard out
    out.println("Error in doPost: " + e);
    //send error message to client
    out.println("An unexpected error has occurred.");
    out.println("Error description: " + e);
    }catch (Exception f) {}
    response.sendRedirect(responseRedirect);
    public void doGet(HttpServletRequest request,
    HttpServletResponse response)
    throws ServletException, IOException {
    doPost(request,response);
    Regards
    Martin

  • How to add an image in a JPanel

    Hi All,
    How to add an image in a JPanel and make it display.
    Thanks,

    I have tried with the below code. If I there is any fault please correct me.
    import java.awt.event.*;
    import java.awt.*;
    import javax.swing.*;
    public class HomePage extends JFrame implements     ActionListener {
        JButton cmdClick;
        JLabel label;
        JPanel homePanel = new JPanel();
        JPanel headPanel = new JPanel();
        JPanel btPanel = new JPanel();
        private JPanel mainPanel = new JPanel(new CardLayout());
        CardLayout cl;
        CalScenario calcFrame = null;
        public HomePage() {
           setTitle("Test Kit");
           setSize( 1008,399);
           setBackground( Color.gray );
           setResizable(false);
           Dimension screen = Toolkit.getDefaultToolkit().getScreenSize();
           Rectangle window = getBounds();
           setLocation((screen.width - window.width) / 2, (screen.height - window.height) / 2);
           setVisible(true);
            homePanel.setLayout(new BorderLayout());
            headPanel.setPreferredSize(new Dimension(1008,153));
            label = new JLabel("Main menu");
            headPanel.add(label);
            headPanel.setBackground(Color.CYAN);
            ImageIcon icon = new ImageIcon("images/slash.gif");
            JLabel imglabel = new JLabel();
            imglabel.setIcon(icon);
            headPanel.add(label);
            this.getContentPane().add(headPanel);
            btPanel.setBackground(Color.ORANGE);
            cmdClick = new JButton("Click here");
            btPanel.add(cmdClick);
            cmdClick.addActionListener(this);
            homePanel.add("North",headPanel);
            homePanel.add("West",btPanel);
            calcFrame = new CalScenario(mainPanel);
            mainPanel.add(homePanel, "HomePanel");
            mainPanel.add(calcFrame, "CalcFrame");
            cl = (CardLayout) (mainPanel.getLayout());
            add(mainPanel);
            setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
        public void actionPerformed(ActionEvent source)  {
          if (source.getSource() == (JButton) cmdClick) {
                cl.show(mainPanel, "CalcFrame");
        public static void main( String args[]) {
             HomePage homeFrame = new HomePage();
             homeFrame.setVisible(true);
    }

  • How to add internal table fileds in Text module in smart forms

    Hi Friends,
        How to add internal table fileds in Text module in smart forms?
    Thanks & Regards,
    Vallamuthu.M

    Hi Vallamuthu ,
    how did you solve your problem?
    thanks,

  • How to add an image to combo box model in java

    i want to display a images.for that i take a combox.in that i want to add al images those i want to display, while clicking the image in combo box the image will be display.there is no problem for displaying an image, but i dont know how to add
    an image to a combo box model in net beans. please help me. if u have any idea plese forward to this mail
    [email protected]

    Hi Thomas,
                     You need to create an image field and in the source choose 'graphic content ; give the name of the variable which has the binary data . and give the type as 'MIME/image'.

  • How to add an image to an IMAGE control in Java WebDynpro

    hi
    How to add an image to an IMAGE control in Java WebDynpro.
    Please give me the steps to assign an image to an IMAGE control.
    Advanced Thanks
    brahma

    Thank You Mathan MP,
    i tried these steps, but whenever i selected the source property of image UI control, it opens a context window, but this context window does't contain any thing for selection.
    so how to solve this problem ?
    the link whatever u provided is not opened, please send the correct link.
    http://127.0.0.1:1284/help/index.jsp?topic=/com.sap.devmanual.doc.user/f3/1a61a9dc7f2e4199458e964e76b4ba/content.htm
    Thanks in Advance
    brahma

  • Web UI How to add an Image in a custom view

    I want to add a image, similar to one in the screenshot attached in the view. Can anyone suggest how this can be done.

    Hi  bubai chowdhury
    Please need to follow 2 below steps :
    Write below code in layout section of  ".htm" page of view  and define  gv_url  TYPE saeuri at controller class of view:
    <thtmlb:image src    = "<%= controller->gv_url %>"
                   width  = "200"
                   height = "200" />
    And set variable gv_url value at do_prepare_output method which url point to image.
    If you have requirement to upload image in same view (in SAP) & display  then as suggested by Kumar Gaurav pl refer http://scn.sap.com/community/crm/webclient-ui-framework/blog/2012/07/25/form-iterator-for-chtmlbconfig
    Let me know if anything.
    Regards,
    Arjun

  • How to add an image in multiple pages?

    Hi,
    First be aware that before posting this, I digged into Google but could not find a solution.
    How to add an image in the footer section of a PDF document of size, say, 500pages? I am not going to add it one by one in very page, it's too time consuming.
    Is there a way to add it in the footer section or any other alternative, so that I end up with the same image in an exact position in all 500 pages?
    Thanks for your reply
    Best,
    Eric

    Answer:
    Answer: http://forums.adobe.com/message/3437269#3437269

  • How to add an image to a JPanel ?

    hi,
    do you now how to add an image to a JPanel ?
    thanks a lot !

    You can either use the Graphics method drawImage from the panel's paintComponent(Graphics g) method, or you can create an ImageIcon, with your Image in its constructor. And then create a JLabel, passing that ImageIcon in its constructor. Then, you can simple use the panel.add() method to add that JLabel.
    For using the paintComponent method, check out the thread already posted above (I'll type it in again just in case)
    http://forum.java.sun.com/thread.jsp?forum=31&thread=288769
    If you want to use a JLabel, you can do something like this:
    Image img;
    JLabel label = new JLabel(new ImageIcon(img));
    JPanel panel = new JPanel();
    panel.setLayout(new FlowLayout());
    panel.add(label);Val

Maybe you are looking for