Printing graph and other text in the same page

Hi,
I am aware that for providing graphs in ABAP report we have a FM which is called via a pushbutton in the output screen generally.
Is there any way I can do away with the pushbutton and print the graph and other text in the same page at one go ? I think Smartforms will not allow graph printing.......any other method to achive this ?
The user wants to print the graph and other text in the same page.
Regards,
Sandip.

Hi ! no it is not related to smartforms
search for custom container on google you idea about custom container.
following code is for displaying alv on selection screen which is created using custom container
and docking container.
I hope you will get some idea about how to use custom container for your problem
DATA DECLARATIONS
DATA: CONT_DOCKING TYPE REF TO CL_GUI_DOCKING_CONTAINER,
GRID TYPE REF TO CL_GUI_ALV_GRID,
CUST_CONTAINER TYPE REF TO CL_GUI_CUSTOM_CONTAINER,
IT_FIELDCAT TYPE LVC_T_FCAT,
GS_LAYOUT TYPE LVC_S_LAYO.
*ITAB TYPE TABLE OF SBOOK.
*& SELECTION SCREEN PARAMETERS
*PARAMETERS:P_TEST TYPE I .
*& AT SELECTION SCREEN OUTPUT
AT SELECTION-SCREEN OUTPUT.
IF EBELN[] IS NOT INITIAL.
CREATE OBJECT CONT_DOCKING
EXPORTING
REPID = SY-REPID
DYNNR = SY-DYNNR
SIDE = CONT_DOCKING->DOCK_AT_BOTTOM
EXTENSION = 100.
IF CUST_CONTAINER IS INITIAL.
*----Create the alv with docking container
PERFORM CREATE_AND_INIT_ALV .
ENDIF.
ENDIF.
*& Form BUILD_FIELDCAT
FORM BUILD_FIELDCAT .
DATA WA_FIELDCAT TYPE LVC_S_FCAT.
WA_FIELDCAT-FIELDNAME = 'EBELN'.
WA_FIELDCAT-REPTEXT = 'Airline Code'.
APPEND WA_FIELDCAT TO IT_FIELDCAT.
WA_FIELDCAT-FIELDNAME = 'EBELP'.
WA_FIELDCAT-REPTEXT = 'Flight Connection Number'.
APPEND WA_FIELDCAT TO IT_FIELDCAT.
*WA_FIELDCAT-FIELDNAME = 'WUNIT'.
*WA_FIELDCAT-REPTEXT = 'Weight Unit'.
*APPEND WA_FIELDCAT TO IT_FIELDCAT.
*LOOP AT IT_FIELDCAT INTO WA_FIELDCAT.
*IF WA_FIELDCAT-FIELDNAME EQ 'WUNIT'.
*WA_FIELDCAT-EDIT = 'X'.
*WA_FIELDCAT-DRDN_HNDL = '1'.
*WA_FIELDCAT-CHECKTABLE = '!'.
*MODIFY IT_FIELDCAT FROM WA_FIELDCAT.
*ENDIF.
*ENDLOOP.
ENDFORM. "build_fieldcat
*& Form CREATE_AND_INIT_ALV
FORM CREATE_AND_INIT_ALV .
CREATE OBJECT GRID
EXPORTING I_PARENT = CONT_DOCKING.
*--perform build field catalog for alv display
PERFORM BUILD_FIELDCAT .
*--fill the drop down list values
PERFORM fill_dropdown_table .
*----fill final output table
SELECT * FROM EKPO
INTO CORRESPONDING FIELDS OF TABLE ITAB WHERE EBELN IN EBELN.
*UP TO 10 ROWS.
*---display alv
CALL METHOD GRID->SET_TABLE_FOR_FIRST_DISPLAY
CHANGING
IT_FIELDCATALOG = IT_FIELDCAT
IT_OUTTAB = ITAB[].
*---Set editable cells to ready for input initially
CALL METHOD GRID->SET_READY_FOR_INPUT
EXPORTING
I_READY_FOR_INPUT = 1.
ENDFORM. "create_and_init_alv
*& Form set_drdn_table
FORM fill_dropdown_table.
DATA: LT_DROPDOWN TYPE LVC_T_DROP,
LS_DROPDOWN TYPE LVC_S_DROP.
LS_DROPDOWN-HANDLE = '1'.
LS_DROPDOWN-VALUE = 'KG'.
APPEND LS_DROPDOWN TO LT_DROPDOWN.
LS_DROPDOWN-HANDLE = '1'.
LS_DROPDOWN-VALUE = 'G'.
APPEND LS_DROPDOWN TO LT_DROPDOWN.
LS_DROPDOWN-HANDLE = '1'.
LS_DROPDOWN-VALUE = 'B'.
APPEND LS_DROPDOWN TO LT_DROPDOWN.
LS_DROPDOWN-HANDLE = '1'.
LS_DROPDOWN-VALUE = 'T'.
APPEND LS_DROPDOWN TO LT_DROPDOWN.
CALL METHOD GRID->SET_DROP_DOWN_TABLE
EXPORTING
IT_DROP_DOWN = LT_DROPDOWN.
ENDFORM. "set_drdn_table

Similar Messages

  • Is it possible to print JTable and custom JPanel on the same page?

    Hello everybody!
    I have a custom panel extending JPanel and implementing Printable.
    I am using paint() method to draw some graphics on it's content pane. I would like to print it, but first I would like to add a JTable at the bottom of my panel. Printing just the panel goes well. No problems with that.
    I was also able to add a JTable to the bottom of JFrame, which contains my panel.
    But how can I print those two components on one page?

    Hi, thanks for your answer, but I thought about that earlier and that doesn't work as well... or mybe I'm doing something wrong. Here is the sample code:
    import java.awt.BorderLayout;
    import java.awt.Dimension;
    import java.awt.Graphics;
    import java.awt.Graphics2D;
    import java.awt.print.PageFormat;
    import java.awt.print.Printable;
    import java.awt.print.PrinterException;
    import java.awt.print.PrinterJob;
    import javax.print.attribute.HashPrintRequestAttributeSet;
    import javax.swing.JFrame;
    import javax.swing.JOptionPane;
    import javax.swing.JPanel;
    import javax.swing.JTable;
    public class ReportFrame extends JFrame implements Printable {
         private static final long serialVersionUID = -8291124097290245799L;
         private MyPanel rp;
         private JTable reportTable;
         private HashPrintRequestAttributeSet attributes;
         public ReportFrame() {
              rp = new MyPanel();
              String[] columnNames = { "Column1", "Column2", "Column3" };
              String[][] values = { { "Value1", "Value2", "Value3" }, { "Value4", "Value5", "Value6" }, { "Value7", "Value8", "Value9" } };
              reportTable = new JTable(values, columnNames);
              add(rp, BorderLayout.CENTER);
              add(reportTable, BorderLayout.SOUTH);
              setTitle("Printing example");
              setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
              setPreferredSize(new Dimension(700, 700));
              pack();
              setVisible(true);
         @Override
         public int print(Graphics graphics, PageFormat pageFormat, int pageIndex) throws PrinterException {
              if (pageIndex >= 1)
                   return Printable.NO_SUCH_PAGE;
              Graphics2D g2D = (Graphics2D) graphics;
              g2D.translate(pageFormat.getImageableX(), pageFormat.getImageableY());
              return Printable.PAGE_EXISTS;
         public static void main(String[] args) {
              new ReportFrame().printer();
         class MyPanel extends JPanel implements Printable {
              private static final long serialVersionUID = -2214177603101440610L;
              @Override
              public int print(Graphics graphics, PageFormat pageFormat, int pageIndex) throws PrinterException {
                   if (pageIndex >= 1)
                        return Printable.NO_SUCH_PAGE;
                   Graphics2D g2D = (Graphics2D) graphics;
                   g2D.translate(pageFormat.getImageableX(), pageFormat.getImageableY());
                   return Printable.PAGE_EXISTS;
              @Override
              public void paint(Graphics g) {
                   super.paintComponent(g);
                   Graphics2D g2D = (Graphics2D) g;
                   int x = 0, y = 0, width = 70, height = 70;
                   for (int i = 0; i < 50; i++) {
                        g2D.drawOval(x + i * 10, y + i * 10, width, height);
         public void printer() {
              try {
                   attributes = new HashPrintRequestAttributeSet();
                   PrinterJob job = PrinterJob.getPrinterJob();
                   job.setPrintable(this);
                   if (job.printDialog(attributes))
                        job.print(attributes);
              } catch (PrinterException e) {
                   JOptionPane.showMessageDialog(this, e);
    }UPDATE:
    I've managed to get this to work, by calling 2 methods inside the outer frame's print method (lines 78 and 79)
    Those two methods are:
    rp.paint(g2D);
    reportTable.paint(g2D);but still it is not the way I would like it to be.
    First of all both the ReportPanel and ReportTable graphics are printed with the upper-left corner located in the upper-left corner of the JFrame and the first one is covering the second.
    Secondly, I would like to rather implemet the robust JTable's print method somehow, because it has some neat features like multipage printing, headers & footers. But I have no idea how to add my own graphics to the JTables print method, so they will appear above the JTable. Maybe someone knows the answer?
    Thanks a lot
    UPDATE2:
    I was googling nearly all day in search of an answer, but with no success. I don't think it's possible to print JTable using it's print() method together with other components, so I will have to think of something else i guess...
    Edited by: Adalbert23 on Nov 22, 2007 2:49 PM

  • How to align output formatted and output text in the same line?

    Hi All,
    I want an output formatted label and a text on the same line,. I've surrounded these components wth a panel form layout and they automatically align one below the other. how do I kepe them in the same line?
    Thanks.

    Try as per the code snippet below:
    <af:document title="TestPage.jspx" id="d1">
    <af:messages id="m1" inline="true"/>
    <af:form id="f1">
    *<af:panelGroupLayout id="pgl1" layout="horizontal">*
    *<af:outputFormatted value="outputFormatted1" id="of1"/>*
    *<h:outputText value="outputText1" id="ot1"/>*
    *</af:panelGroupLayout>*
    </af:form>
    </af:document>
    Thanks,
    Navaneeth

  • Code needed for "putting waveform graphs and 8bit images in the same window by Windraw"

    Hi Micheal, please sent the code example for my question:"putting waveform graphs and 8bit images in the same window by Windraw" , thanks.

    You can start from here ...
    Hope that helps,
    Michael
    Attachments:
    tester.vi ‏97 KB

  • Putting waveform graphs and 8bit images in the same window by Windraw

    How to put waveform graphs and 8bit images in the same window by Windraw VI?

    Use "Invoke Method: Get Image" to get a pic of your waveform graph/chart. Then combine this pic with your 8bit image using the IMAQ tools (IMAQ ImagetoImage). If you need an example send an e-mail again ...
    Michael

  • For iTunes Match, how come some songs "match" on an album and other songs on the same album "upload" without matching?

    For iTunes Match, how come some songs "match" on an album and other songs on the same album "upload" without matching?  All songs are available on iTunes.  I don't get it!  Any way to manually match songs that iTunes apparently can't match?  I have hundreds in this unmatched state.

    gsl wrote:
    Shazam has NO problem determining what these songs are. Maybe Apple needs to consider licensing their technology as it seems MUCH more accurate than what they are doing.
    You aren't comparing like with like.
    The main task that Shazam has is to identify the name or a track and the artist. I believe that it suggests the album as well, but if it gets that wrong then it doesn't really matter too much.
    With iTunes Match, getting the album (i.e. identifying which version it is) is much more important. If it gets that wrong then it breaks up the flow of an album. This makes the task that match has very much harder.
    In fact, there is a strong argument to say that currently the problem iTunes has is that it is matching too many songs, resulting in matches from different albums.
    I'm sure that match is not struggling to identify whether it has a song or not, but whether it has the correct version of a song. When you introduce different masterings into the process then, depending on the thresholds set, it is probably correct in concluding that it hasn't got a particular version, even if you think it has.
    The solution would appear to me to be a tweaking of the matching thresholds along with the ability to force an upload, but we just don't know what restrictions they have (remember that if Shazam gets it wrong the it doesn't present you with a copy of a new track that you didn't have previously). It is almost certainly not just a case of improving their technology.

  • Create A Link to More Text on the Same Page?

    I want to know how to make a link that says "MORE" that will reveal additional text on the same page.
    I am NOT referring to a link that will scroll the user to a different part of a page.
    I am talking about a page with a lenghty amount of text that is kept hidden, until the user clicks on the word "MORE" to expand it. (Or, I usppose, "LESS" to make it disappear again.)
    Thanks in advance.

    Have you looked at Spry Widgets?  Accordion or Collapsible panels might work.
    http://labs.adobe.com/technologies/spry/samples/accordion/AccordionSample.html
    http://labs.adobe.com/technologies/spry/samples/collapsiblepanel/CollapsiblePanelGroupSamp le.html
    Nancy O.
    Alt-Web Design & Publishing
    Web | Graphics | Print | Media  Specialists
    http://alt-web.com/
    http://twitter.com/altweb

  • In Pages 5.2.2: How do you go from 1 column to 2 and keep them on the same page?

    In Pages 5.2.2: How do you go from 1 column to 2 and keep them on the same page?

    Sorry, I tried to say your answer solved my question, but I guess I told it that my response to you solved it. Now that I liked it, the solved option doesn't appear.

  • Parent (Global) and Current (Navigation) on the Same Page

    Hello,
    I am using the managed metadata feature in a SharePoint 2013 publishing site.  I am trying to layout my navigation as shown in the diagram below.  I can not find a publishing master page that implements this parent child relationship.  My
    top navigation is use the markup:
    <PublishingNavigation:PortalSiteMapDataSource ID="topSiteMap" runat="server" EnableViewState="false" SiteMapProvider="GlobalNavigationSwitchableProvider" StartFromCurrentNode="false" StartingNodeOffset="0"
    ShowStartingNode="false" TrimNonCurrentTypes="Heading"/>
    <SharePoint:AspMenu ID="TopNavigationMenu" runat="server" EnableViewState="false" DataSourceID="topSiteMap" AccessKey="&lt;%$Resources:wss,navigation_accesskey%&gt;"
    UseSimpleRendering="true" UseSeparateCss="false" Orientation="Horizontal" StaticDisplayLevels="1" AdjustForShowStartingNode="true" MaximumDynamicDisplayLevels="1" SkipLinkText=""/>
    I have tried using the same markup, using a different StartingNodeOffset and SiteMapProviders, for the side menu with no success.
    Thanks,
    Bob

    Hi,
    According to your post, my understanding is that you wanted to create Parent (Global) and Current (Navigation) on the Same Page.
    You can make quicklaunch work contextually like structural nav quicklaunch using Managed Metadata navigation. Please refer to:
    Managed Metadata Navigation - How do you make quicklaunch work contextually like structural nav quicklaunch?
    In addition, you can used JQuery and CSS to achieve staticlevel left navigation in SharePoint 2013.
    Here is a similar thread for your reference:
    http://social.technet.microsoft.com/forums/sharepoint/en-US/54edc501-0594-49e3-86b2-40ecf72bc68e/show-2-level-hierarchy-in-managed-navigation-menucurrent-navigation-in-sharepoint-2013
    More information:
    Overview of managed navigation in SharePoint Server 2013
    Best Regards,
    Linda Li
    Linda Li
    TechNet Community Support

  • All of a sudden, my settings have been changed, my homepage, and EVERYTHING. No matter how many times I go in and change them again, the SAME pages open up when I start FireFox and I am constantly being asked if I want Yahoo as my start page and default s

    I don't know what happened. All of a sudden, my settings have been changed, my homepage, and EVERYTHING. No matter how many times I go in and change them again, the SAME pages open up when I start FireFox and I am constantly being asked if I want Yahoo as my start page and default search engine. I click the box 'do not ask me again' and it comes up EVERY TIME. I change things like I don't want history remembered, and when I reload FireFox again, it's back to the way it was BEFORE. EVERY SINGLE TIME. I don't know why this is happening, or how to fix it. What do I do??

    I do not want to download another virus program.. I do not believe it is a virus. I am running the full version of Norton 360 and it is doing a daily scan. I have Windows 7, 64 bit OS.
    This is very irritating !! If I wanted Yahoo I would ask for it !

  • When I click on my Yahoo bookmarks, I only get the download Yahoo toolbar page, I downloaded the toolbar again and I still get the same page when I hit bookmark icon - how do I get my bookmarks back - they still show on Microsoft Explorer

    Question
    When I click on my Yahoo bookmarks, I only get the download Yahoo toolbar page, I downloaded the toolbar again and I still get the same page when I hit bookmark icon - how do I get my bookmarks back - they still show on Microsoft Explorer

    julianscars wrote:
    I don't get a page, all I get is the player popping
    Click the green jelly button at the top left of the player.

  • Can i use one JSF component's value for other component in the same page.

    Can i use one JSF component's value for other component in the same page.
    For example
    I have a <h:selectBooleanCheckbox id="myChk"> in my jsf page, i want to access its value for another component like:
    <h:commandButton disabled="#{myChk.checked}" action="myAction" value="myValue" />
    ** "myChk.checked" >> I am just asuming "checked" property is available...

    Bind the checkbox to a UIInput myChk property. Then you can reference this property from the page, e.g.
    <h:selectBooleanCheckbox binding="#{myBean.myChk}" onchange="submit();" />
    <h:commandButton disabled="#{myBean.myChk.value}" action="myAction" value="myValue" />

  • Generating a print doc deletes other docs in the same directory

    Generating a new doc into a directory that contains a different doc generated off the same Word template causes the older doc to be deleted.
    MY RH8 project is set up with a number of Print Documentation SSLs, one for each chapter of a book, all to use styles from the same Word template. Each SSL has the same Location selected, so all the chapters are by default created in a common directory, where each can be tweaked as needed and later all merged into a single PDF for distribution.
    But as each doc is generated, the previously-generated doc in that directory disappears. The newer and older files have different file names, were generated by different RH Printed Documentation SSLs, but the SSLs refer to the same Word template. If a previously-generated doc is still open in Word when I generate the next, then I get the "[template name] is locked for editing" prompt, I select "Open a Read Only copy", it runs on to completion, and then both docs are present in the directory as expected.
    The selected output can be doc, docx, or pdf, and always the earlier file is deleted. The selected Location in which the files are created can be inside the project or outside the project. It makes no difference whether the template's properties are set to Read-only.
    An obvious workaround is to copy each file out to a different directory as soon as the file is generated. But RH deleting differently-named files is so obviously a malicious thing to do, I can't be working it right. Any ideas?

    When you generate a Print Doc SSL, a log file with name <ProjectName>.log is created along with the generated word doc(s) in the output folder. This log file contains the name of the previously generated word doc(s). When a Print Doc SSL is re-generated, it read the name of previous word doc from the log file and deletes it and creates a new word doc with possibly new name given in the SSL settings.
    So, this is the normal behaviour of RoboHelp and works correctly if each Print Doc SSL is generated in separate folders. But when all the Print Doc SSLs are generated in the same output folder then the current SSL reads the log file of the previous SSL and hence deletes the previously generated word doc in that output folder.
    Workaround:
    1. RoboHelp has an option to generate individual Word Document for each Chapter, it can be used instead of Multiple SSL with one Chapter each.
    2. If you can't use the first option for any reason, then delete the <ProjectName>.log before generating the each Print Doc SSL.

  • Designing for print, tablets and interactive pdfs at the same time

    Hi everyone,
    I have a large document of proposal master pages that I would like to update with CS6. My usual work flow, when I need to make a new proposal, is to open a new document and just move over the master pages I need. This depends on which products they want, etc. Then I override the master pages in the new document and make whatever customizations I need for that particular customer.
    Now with CS6, I'm thinking that I will just have the pages be pages (with fewer masters). I will make an alternate layout directed at each market segment we have, and also these pages for tablets and interactive PDFs. (Sometimes we are asked to provide a digital copy of proposals). Then, when I have a new proposal to do, I will do a Save As and make a copy of the main doc. Then I will just delete all the pages and the alternate layouts I don't need.
    A few questions:
    1. How do I set up my "intent." Most of these master pages are two pages, so I think the digital publishing intent messes that up.
    2. Do you think this new set up would make the file huge? I have had size issues in the past and the file is already very sluggish.
    3. Is this the best way to go about this work flow?
    Thank you guys so much. This forum has been so helpful to me!

    Hi everyone,
    I have a large document of proposal master pages that I would like to update with CS6. My usual work flow, when I need to make a new proposal, is to open a new document and just move over the master pages I need. This depends on which products they want, etc. Then I override the master pages in the new document and make whatever customizations I need for that particular customer.
    Now with CS6, I'm thinking that I will just have the pages be pages (with fewer masters). I will make an alternate layout directed at each market segment we have, and also these pages for tablets and interactive PDFs. (Sometimes we are asked to provide a digital copy of proposals). Then, when I have a new proposal to do, I will do a Save As and make a copy of the main doc. Then I will just delete all the pages and the alternate layouts I don't need.
    A few questions:
    1. How do I set up my "intent." Most of these master pages are two pages, so I think the digital publishing intent messes that up.
    2. Do you think this new set up would make the file huge? I have had size issues in the past and the file is already very sluggish.
    3. Is this the best way to go about this work flow?
    Thank you guys so much. This forum has been so helpful to me!

  • Can't print more than one photo on the same page

    Is there a lay-out option so I can print four 3X5 photos on the same page? iOS 10.9.3

    Yes.  In the Print window select the Custom layout and in the print size select Custom, 3 x 5.  That will give you this:
    It it doesn't show a fit the first time toggle the reverse button that't to the right of 3 in the screenshot.  That should get it to snap to four per page.
    OT

Maybe you are looking for