Promblem in PO smartforms which contain 90 pages.

Dear Experts ,
      I am unable to see the print preview of smartforms which contains 90 pages ,
and also unable to convert this smart forms to pdf format.
this issue is very urzent because of this i am unable to take print out of purchase order.
thanx in advance.
regards,
sonu

Do not post all letters in upper case please! (forum rules)
How many pages are displayed? Is it in the print preview or in spool display (SP01; by default, only 10 pages are displayed, but you can choose to display more via SP01 menu)
If you want to convert the smartform, you may either get its internal format (OTF) when generating the spool (you may then not generate the spool at all) and use CONVERT_OTF function module, or convert the spool CONVERT_OTFSPOOLJOB_2_PDF, or the user may preview the smartform and enter pdf! in okcode field. For more information please search the forum.

Similar Messages

  • I need the dialog box (which contains page selection etC) HOW TO MAKE IT?

    hi
    i have done an requirement in smartforms.
    i need the dialog box (which contains output device name, page selection etc) when i take the print (smartforms).
    And now i already can see a dialog box .but still it doesn't have the page selection.
    I mean if the smartforms which have 5 pages,and what i need is just print the page 1 and page 3 . so I need the page selection
    which can help me on this issue. 
    Would anyone know something about it  and give me some advice . I will be appericate it.

    Hi,
    Just check with the control parameters of the function module, if you have changed any of it.
    If you have changed it then try to give the no-dialog field of the control parameter table as space.
    If the dialog box which gives you the Output device name and others appears then just below the output device name you have the column for the page selection.Just pass the values of the pages separating them with comma(like 2, 5 will print second and fifth pages) and it prints only those pages.
    Regards
    Sarves

  • Error in smartform when printing multiple pages

    Hi,
    I m using a smartform which have two pages in it,
    i m able to save and activate it without any error message and when i run the function module generated to chk my smartform
    it runs fine and diplays two pages i m using.
    but as i m attaching this form with my driver program it is giving an error message while running . the error message is " No other output defined in main window."
    Please help me out to resolve the issue.

    Re: error in smartform when printing multiple pages
    dharani tadikonda
    Thanks for this answer. It is absolutely correct.

  • Error while running a page which contains a region

    Hi ADF Experts,
    I am having a jsff page fragment. The fragment has panelbox(with some content and button) and a panel group layout(which contains a region).
    On click of the button the panelbox is disclosed to false and the region is to be rendered.
    But on page load I am getting the below exception. Earlier the page was coming fine. After dragging the region I am getting this error.
    Hierarchy is as below:-
    <af:panelBox text="Search Filters" id="pb1" type="stretch"
                     inlineStyle="width:inherit; height:inherit;"
                     binding="#{pageFlowScope.TreeModel.searchFilterPanelBox}"
                     partialTriggers="cb3">
    <af:commandButton text="Search" id="cb3" partialSubmit="true"
                                    actionListener="#{pageFlowScope.TreeModel.searchorderProposal}"/>
    </af:panelBox>
    <af:panelGroupLayout id="pgl15" layout="scroll" binding="#{pageFlowScope.TreeModel.searchResultsDisplay}" rendered="false"
                            partialTriggers="cb3">
       <af:region value="#{bindings.BTFSearchResults1.regionModel}" id="r1"/>
    </af:panelGroupLayout>
    The region contains
    <af:panelGroupLayout id="pgl1" layout="scroll">
        <af:panelGroupLayout id="pgl16" inlineStyle="width:1239px; height:inherit;"
                             layout="horizontal">
    <!--some content-->
    </af:panelGrouplayout>
    onclick of the button the region is rendered as true and the disclosure of the panel box im setting as false.
    But after adding the region im getting below error.
    Caused by: java.io.FileNotFoundException: MDS-01500: The MDSObject /orderproposals.jsff is an XML document and cannot be loaded using StreamedObject API.
    Thanks in advance,
    Roy

    I'm not sure about this but using rendered is always a problem if you want to show show the element during a ppr (which is what you do AFAIK). Once a component has rendered='false' is removed from the component tree and can't be put back in there without a full page refresh.
    Try using the visible property instead or use an af:switcher component.
    Timo

  • In ALV I want to align Top-Of-Page in Center which contains some TEXT

    Hi Abap Gurus',
                          In ALV's i want to align TOP-OF-PAGE in center.
    Which contains some TEXT.
    Can you please help me out.
    Points will be Given.
    Many thanks
    Anil Roy.

    hi anil
    The header line is always left-justified .
    We basically have three options for formatting :
    S , A and H.
    every line in Alv top-of-page is of 60 char length(slis_listheader-info).so i think the only option we have is to add required spaces to the left and display the required string
    regards
    navjot
    reward if helpfull

  • Why my notebook sometimes blacks out, in Windows 7, when I watch video online or just browse some web pages which contains quite a lot pictures?

    Why my notebook sometimes blacks out, in windows 7,  when I watch video online or just browse some web pages which contains quite a lot pictures?
    1. I am not sure whether it is the problem of the graphic hardware, relevant softwares or the system itself.
    2. I am not sure whether browsing a webpage with a lot pictures would make the graphic hardware, or other hardwares if possible,  massively burdened and then just crash.
    3. Or if possible, is the reason that the heat dissipation doesn't work well?
    I am looking forward to any replies that might be helpful. Really appreciated.

    it could be heat, not enough RAM, but you don't tell us enough.
    There is no reason to assume this is anything other than running Windows natively btw.
    Browser  of course matters probably the most.
    I like IE10 now, but use to use FF until recently. I'd like Chrome except for a few concerns I have over using it, it can eat up a lot of RAM and it builds up HUGE disk cache if you don't clear history and cache on exit and run CCleaner regularly ( good for all browsers )
    So assuming 64-bit and 4GB or more and core i5 or better...
    Also make sure Wiindow has 10GB of free space or more.
    Biggest concern is what happens afterwards and whether you have run a check of your hard drive (chkdsk on startup) or if the problem cascades and gets progressively worse on top of the first - like do you have to do hard restart or able to bring up Task Mgr and kill or better yet, Resource Mgr and see if you have any thread locks.
    Safari is not well versed in multithreading and handling what you want to do and are doing. IE9 isi usually good but I found it could not handle a lot of tumblr photo streams and sites. Try Chrome. With Firefox, use noscript, blashblock and see how it goes.

  • Blank page in report o/p and o/p notprinted when contains multiple pages

    Dear Friends,
    I am facing couple of issues while modifying an existing report
    1. First page of the report is Blank
    2. Report output is not printed when the output contains multiple pages.
    Currently, along with the data, the report prints the output format in the first page and some totals in the last page.
    The requirement is that we do not want these first and last pages.
    For this, i made the following modifications to the report.
    In the Layout Model,
    *1. Under the body of Header section, we have a repeating frame which is printing the output format that comes out as report first page.*
    Both Horizontal and Vertical Elasticity are set to Fixed and below is the code in the format trigger on this repeating frame.
    function R_HEADER_PAGESFormatTrigger return boolean is
    begin
    if :p_header_pages = 0
    then return(false);
    else return(true);
    end if;  return (TRUE);
    end;I modified this format trigger to always return false as shown below
    begin
    return false; --statement added by me
    if :p_header_pages = 0
    then return(false);
    else return(true);
    end if;  return (TRUE);
    end;*2. Under the Body of Trailer section, we have a main frame which prints summary information.*
    Both Horizontal and Vertical Elasticity are set to Fixed and below is the contents of the Format trigger on this frame
    function M_CONTROL_GRPFRFormatTrigger return boolean is
    begin
    if :report_term_count > 0
    then return(true);
    else return(false);
    end if;  return (TRUE);
    end; I have modified this trigger to always return False as shown below
    function M_CONTROL_GRPFRFormatTrigger return boolean is
    begin
    return false; --statement added by me
    if :report_term_count > 0
    then return(true);
    else return(false);
    end if;  return (TRUE);
    end;When i run the report after doing these modifications, i am facing the above mentioned problems.
    Any idea on why a blank page is coming out before the actual data?
    Also when the report output contains multiple pages, the output is not printed. Any idea on this?
    Regards,
    Sreekanth
    Edited by: Sreekanth Munagala on Mar 23, 2012 1:15 AM
    Edited by: Sreekanth Munagala on Mar 23, 2012 1:18 AM

    Hi InoL,
    I have tried by setting vertical elasticity to variable but the blank plage is still coming in the output.
    Also, i am just wondering that blank page is not shown for the trailer page even though the Horizontal and Vertical Elasticty is set to Fixed.
    Could you please let me know if you have any idea on this?
    +InoL Wrote:+
    +And this didn't happen before you made the changes to the format triggers?+ Sorry for not mentioning that this happens when i delete the entire fields and frames in Header section.
    Setting the Vertical Elasticy of Header to False and returning false in Format trigger still prints the blank page in addition to the actual data pages.
    I have also tried setting the option BLANKPAGES=NO in the concurrent program execution options but still the blank page is not suppressed.
    Regards,
    Sreekanth
    Edited by: Sreekanth Munagala on Mar 25, 2012 8:33 PM

  • Smartform: windows in different pages having the same name

    Hi all gurus,
    first of all, please forgive me if I'm missing something, I'm quite new on the Smartform argument.
    Shortly; I have to modify some smartforms made by someone else in order to meet customer's desiderata.
    These smartforms are all different but share a common "structure", which is:
    2 pages definition, P_FIRST and P_FOLLOW, which have actually the same internal "structure": they have a LOGO window, then a TITLE window, then a MAIN window, then a FOOTER, and so on.
    In order to do my task, I added a new window in both P_FIRST and P_FOLLOW, let's call it CERTIFICATION_LOGO.
    Moreover, I inserted a new graphic element under the LOGO window.
    Modifying the smartforms, I noticed I have two different kind of behaviour:
    1) in almost all these SF, I add a window called CERTIFICATION_LOGO in P_FIRST, then I have to add a windows to P_FOLLOW which cannot have the same name ( e.g. I called it CERTIFICATION_LOGO_FOLLOW);
    2) in just one SF, when I add a window P_FIRST, then the exactly same window is added to P_FOLLOW. When I modify CERTIFICATION_LOGO window in P_FIRST, also CERTIFICATION_LOGO in P_FOLLOW is updated.
    I can't find a reason why such different behaviour. Actually I'm testing my solution and found that the only smartform that does not work is the only one which I have described with 2). So my guess is that there's some setting anywhere which leads to that different behaviour and this could be a cause of a raised exception... but maybe it's just a case, also because I found in debug that in this standard call in the form PROCESS_TEXT_WINDOW:
    perform xsf_window_open using docentry-tdwindow
                                    docentry-tdwtype.
    where docentry-tdwindow = 'LOGO' and tdwtype = 'T', the system exit the process at the first execution of:
    check xsfop-xsf = c_true.
      check not xsf_obj is initial.
    What does xsfop-xsf should mean? In my case xsfop-xsf = false and xsf_obj is initial... then the SF is not generated.
    What am I missing gurus?
    Thanks in advance,
    Matteo
    Edited by: Matteo Montalto on Aug 26, 2011 4:49 PM

    When you have common windows (LOGO on page first and logo on page next, etc.) you actually have one window definition.  What you put in the window is therefore always displayed for all pages.  In your case, instead of creating your new window and copying it into the follow page, you have two different windows, which now must be separately maintained, as to content, placement, borders, shading, conditions, etc.

  • Save/Open dialog crashes on opening a folder which contains multiple app. alias

    Hi:
    This is my first post in Apple forum, I've been searching some pages here, obviously I'm not the only one having this (or similar) problem but all existing threads are suggesting "Safe Mode" or "Disk Util" these useless things and never worked for me.
    I believe this is a bug from os x / Finder, not sure if this has been filed or not against Apple bug db.
    The problem:
    Save/Open dialog hangs up when loading / opening an existing folder which contains multiple application alias
    How to reproduce:
    1) Use any browser (I use Firefox and Chrome) to open a page and  print the page / or download something, or print something as PDF
    2) When Save dialog ( some people call it file picker or location selector, whatever) pops up, select a folder which contains multiple application alias
    3) Dialog hangs up, and the application icon on those  alias will not be loaded successfully. Need to Force Quit the browser.
    4) Issue cannot be reproduced always, but frequently enough if you have many application alias and files / subfolders in the target folder
    5) By removing all the application alias, can workaround the issue.
    6) The icons of application on those alias are loaded slowly in a successful loading (seems there are some performance issues)
    7) This issue has not been observed before upgrading to Mavericks
    Env:
    27 inch iMac Late 2012, 2.9GHz i5, 8G DDR3, NVIDIA GTX660M 512M, OS X 10.9.1
    Please anybody (not sure if Apple monitors this community) who knows details in regards to this, share some info. (or maybe there already is a fix ? ) .
    Thanks.
    Regards,
    Lyle.

    Launch the Console application in any of the following ways:
    ☞ Enter the first few letters of its name into a Spotlight search. Select it in the results (it should be at the top.)
    ☞ In the Finder, select Go ▹ Utilities from the menu bar, or press the key combination shift-command-U. The application is in the folder that opens.
    ☞ Open LaunchPad. Click Utilities, then Console in the icon grid.
    Make sure the title of the Console window is All Messages. If it isn't, select All Messages from the SYSTEM LOG QUERIES menu on the left. If you don't see that menu, select
    View ▹ Show Log List
    from the menu bar.
    Click the Clear Display icon in the toolbar. Then try the action that you're having trouble with again. Select any messages that appear in the Console window. Copy them to the Clipboard by pressing the key combination command-C. Paste into a reply to this message (command-V).
    When posting a log extract, be selective. In most cases, a few dozen lines are more than enough.
    Please do not indiscriminately dump thousands of lines from the log into this discussion.
    Important: Some private information, such as your name, may appear in the log. Anonymize before posting.

  • Need help - How to load data which contains \r\n

    Hi All,
    We have a requirement wherein we need to load the data from a .dat file, with fields separated by | symbol and the line separator specified as '\r\n'
    INFILE '/scratch/xyz/abcd.dat' "STR '\r\n'"
    FIELDS TERMINATED BY '|' OPTIONALLY ENCLOSED BY '"'
    Can you please help us load data which contains multiple lines in a single field to a database table field , keeping the line separator in ctl file as '\r\n' itself.
    When we try bringing the '\r\n' within a text field enclosed in "" , the '\r\n' , sqlldr considers it as the end of that record and not as a data which needs to go into a column.
    One option we have is to have the extraction process create the data in such a way that the fields with multiple lines , be brought in the .dat file enclosed in "" as
    "Test
    "|8989|abcd
    where the new line in the first field is just '\n' .
    Is there any other way in which the requirement can be addressed.
    Version: SQL*Loader: Release 11.1.0.7.0
    Thanks,
    Rohin

    In addition, you would need to know the character set encoding of the csv files (e.g. the code page used).
    Basically you need to have the facts about both client (csv file) and database character set.
    As suggested, use the available documentation - it's there to help you!
    http://www.oracle.com/technology/tech/globalization/htdocs/nls_lang%20faq.htm
    http://download.oracle.com/docs/cd/B19306_01/server.102/b14225/ch2charset.htm

  • How to display an HTML data which contains images in CR

    Hi Experts,
    I have a HTML file which contains images and text. I will store all this data in to the database as binary data(SQL server 2008). How can I display the whole  data in report.
    Thanks in advance,
    Salah

    hello all,
    most times when HTML is stored in a database there are many tags that will not work. the tags that will work are very basic and limited to the formatting types that you can do within a Text Object...so not much.
    if you need all of the HTML from a database interpreted, you need to activate pass-through html on your system. then if you put the field into a formula (one line in height) the HTML should be properly displayed. for more info on activating pass-through html see the beginning of the Users Guide for webelements that is in the main download [here|Crystal Reports webElements].
    please note that there are some major limitations in this method:
    1) you cannot print the html displayed when using the print button on the crystal reports toolbar as it will show up as text...you can try the browsers print functionality to see if that works for you
    2) you can not export the report and see the html displayed...it will show up as text
    3) pagination may not work for you...i.e. if you have an especially long section of html in your database, the page may not break where you want it to
    best of luck,
    jamie

  • Smartforms - issue in display page

    Hai ,
    I have to dispaly the smartform in the below mentioned way.
    it has to display mara records(no of records changes dependending on customer)  & the last page with
    terms & conditions.
    in the ablove scenario, depending on the no. of records in the Mara the pages may increase.
    for example : if mara records takes 2 pages..then the total SF contains 3 pages(including the terms & condition page).if the mara records spread across 3 pages for x customer the total pages in SF would become 4.
    Till here it is fine.
    Now I have another problem.
    for a particular customer say ABC,
    I need to display another information in separte page(say extrapage) after mara records & before terms & condition.this extra page may also spread across more than on page.
    This extra page is of type 'mara records page'(only the contents get changes for this  ABC customer).
    Now the problem is this extra page has to start from fresh page.
    But in my case it is been displayed from the end of the 'mara records page'.that is if mara records page takes 2 & half page the extra page contents stat printing from very next point.I want this to start form third page.once these contents are displayed it has to display the terms & conditions as usual.
    can any one have any idea abot this?
    sorry , I could n't find any better way to explain my problem:).it is bit lengthy.
    Thanks,
    Bhaskar.

    Hi:
    In the same page of the smartform, you should create 2 main windows.
    The first main window would execute for everyone and whenever the particular conditions would come like ABC customer, the next would execute for this, you have to put the condition within condition tab of 2nd window.
    Hopefully i have cleared my points and it would helpful to solve your problem.
    Regards
    Shashi

  • I want to run a form on web which contains activex

    can any one help me, how can i run a form on web which contains
    the activex control created with vb.
    according to activex, it has to register with the system
    registery. but in case of web what can i do?
    please help me if any one know the answer.
    thanks in advance.
    Sudhakar-D

    If your active X has a visual component then you can't run it
    inside forms on the web. If it is only running in the backend you
    can use OLE2 Package to activate it on the server.
    You can try and use Java Beans instead of your ActiveX they will
    work in forms.
    If your activeX can be embeded in an HTML page, you can call the
    HTML page using web.show_document.

  • Report which contain subreports is not rendered first time is processed.

    when I try to render report contains subreports from first time is not rendered but when i select regresh button the input screen is promb again and then i fill all input again and submit, as a result the report was rendered.
    why this happen? is this a know issue?

    after more testing that issue i discovered that when i try to render report of type "Table" then the report is rendered fom rthe first time i pass/set the input values of the report, but when i use reports of type "chart" the report is not rendered from first time and it need a refresh and then manually entering the values for the input.
    i am using the folloing version of JRC:
    com.businessobjects.sdks_.jrc_.11.8.0_11.8.5.v1197
    my code is a s follow:
    =========================
    <%@ page contentType="text/html; charset=utf-8" %><%@ page import="com.crystaldecisions.reports.sdk.ReportClientDocument"%>
    <%@ page import="com.crystaldecisions.report.web.viewer.*" %>
    <%@ page import="com.crystaldecisions.reports.sdk.DatabaseController" %>
    <%@ page import="com.crystaldecisions.sdk.occa.report.lib.ReportSDKException" %>
    <%@ page import="com.crystaldecisions.sdk.occa.report.lib.PropertyBag" %>
    <%@ page import="com.crystaldecisions.sdk.occa.report.data.*" %>
    <%@ page import="com.crystaldecisions.sdk.occa.report.lib.IStrings" %>
    <%@ page import="com.crystaldecisions.reports.sdk.ParameterFieldController" %>
    <%@ page import="com.crystaldecisions.reports.exportinterface.ExportFormatType" %>
    <%@ page import="com.crystaldecisions.sdk.occa.report.reportsource.IReportSource" %>
    <%@ page import="java.io.ByteArrayInputStream" %>
    <%@ page import="java.io.FileOutputStream" %>
    <%@ page import="com.crystaldecisions.sdk.occa.report.document.PrinterDuplex" %>
    <%@ page import="com.crystaldecisions.sdk.occa.report.document.PrintReportOptions" %>
    <%@ page import="com.crystaldecisions.sdk.occa.report.document.PaperSource" %>
    <%@ page import="com.crystaldecisions.sdk.occa.report.document.PaperSize" %>
    <%@ page import="com.crystaldecisions.sdk.occa.report.lib.ReportSDKExceptionBase" %>
    <%@ page import="com.crystaldecisions.sdk.occa.report.exportoptions.*" %>
    <%@ page import="java.io.OutputStream" %>
    <%@ page import="org.t2k.bl.reports.ReportsViewerManager" %>
    <%@ taglib prefix="lms_reports" tagdir="/WEB-INF/tags/lms/reports" %>
    <%!
    Utility method that demonstrates how to write an input stream to the server's local file system.
        private void writeToBrowser(ByteArrayInputStream byteArrayInputStream, HttpServletResponse response, String mimetype, String exportFile, boolean attachment) throws Exception {
            //Create a byte[] the same size as the exported ByteArrayInputStream.
            byte[] buffer = new byte[byteArrayInputStream.available()];
            int bytesRead = 0;
            //Set response headers to indicate mime type and inline file.
            response.reset();
            if (attachment) {
                response.setHeader("Content-disposition", "attachment;filename=" + exportFile);
            } else {
                response.setHeader("Content-disposition", "inline;filename=" + exportFile);
            System.out.println("aaaaaaaaaaaaaaaaaaaaaaaaaaaa");
            response.setContentType(mimetype);
            System.out.println("aaaaa1111");
            OutputStream outs = response.getOutputStream();
             System.out.println("aaaaa2222");
            //Stream the byte array to the client.
            while ((bytesRead = byteArrayInputStream.read(buffer)) != -1) {
                outs.write(buffer, 0, bytesRead);
            System.out.println("bbbbb");
            //Flush and close the output stream.
            outs.flush();
    //        outs.close();
            System.out.println("ccccc");
        /* Include the file AlwaysRequiredSteps.jsp, which contains the code to:
           - Create an Enterprise SessionMgr object
           - Log on to the CMS
           - Create an IInfoStore object
           - Query for and select a report
           - Create an IReportAppFactory object
           - Use the IReportAppFactory object to create a ReportClientDocument object with the IInfoObject that is retrieved from the query
    Logs on to all existing datasource
    @param clientDoc The reportClientDocument representing the report being used
    @param username    The DB logon user name
    @param password    The DB logon password
    @throws com.crystaldecisions.sdk.occa.report.lib.ReportSDKException
        public static void logonDataSource
                (ReportClientDocument
                        clientDoc,
                 String username, String
                        password
                throws
                ReportSDKException {
            clientDoc.getDatabaseController().logon(username, password);
    Changes the DataSource for each Table
    @param clientDoc The reportClientDocument representing the report being used
    @param username  The DB logon user name
    @param password  The DB logon password
    @param connectionURL  The connection URL
    @param driverName    The driver Name
    @param jndiName        The JNDI name
    @throws ReportSDKException
        public static void changeDataSource
                (ReportClientDocument clientDoc,
                 String username, String password, String connectionURL,
                 String driverName, String jndiName
                throws
                ReportSDKException {
            changeDataSource(clientDoc, null, null, username, password, connectionURL, driverName, jndiName);
    Changes the DataSource for a specific Table
    @param clientDoc The reportClientDocument representing the report being used
    @param reportName    "" for main report, name of subreport for subreport, null for all reports
    @param tableName        name of table to change.  null for all tables.
    @param username  The DB logon user name
    @param password  The DB logon password
    @param connectionURL  The connection URL
    @param driverName    The driver Name
    @param jndiName        The JNDI name
    @throws ReportSDKException
        public static void changeDataSource
                (ReportClientDocument
                        clientDoc,
                 String
                         reportName, String
                        tableName,
                                     String
                                             username, String
                        password, String
                        connectionURL,
                                  String
                                          driverName, String
                        jndiName
                throws
                ReportSDKException {
            PropertyBag propertyBag = null;
            IConnectionInfo connectionInfo = null;
            ITable origTable = null;
            ITable newTable = null;
            // Declare variables to hold ConnectionInfo values.
            // Below is the list of values required to switch to use a JDBC/JNDI
            // connection
            String TRUSTED_CONNECTION = "false";
            String SERVER_TYPE = "JDBC (JNDI)";
            String USE_JDBC = "true";
            String DATABASE_DLL = "crdb_jdbc.dll";
            String JNDI_OPTIONAL_NAME = jndiName;
            String CONNECTION_URL = connectionURL;
            String DATABASE_CLASS_NAME = driverName;
            // The next few parameters are optional parameters which you may want to
            // uncomment
            // You may wish to adjust the arguments of the method to pass these
            // values in if necessary
            // String TABLE_NAME_QUALIFIER = "new_table_name";
            // String SERVER_NAME = "new_server_name";
            // String CONNECTION_STRING = "new_connection_string";
            // String DATABASE_NAME = "new_database_name";
            // String URI = "new_URI";
            // Declare variables to hold database User Name and Password values
            String DB_USER_NAME = username;
            String DB_PASSWORD = password;
            // Obtain collection of tables from this database controller
            if (reportName == null || reportName.equals("")) {
                Tables tables = clientDoc.getDatabaseController().getDatabase().getTables();
                for (int i = 0; i < tables.size(); i++) {
                    origTable = tables.getTable(i);
                    if (tableName == null || origTable.getName().equals(tableName)) {
                        newTable = (ITable) origTable.clone(true);
                        // We set the Fully qualified name to the Table Alias to keep the
                        // method generic
                        // This workflow may not work in all scenarios and should likely be
                        // customized to work
                        // in the developer's specific situation. The end result of this
                        // statement will be to strip
                        // the existing table of it's db specific identifiers. For example
                        // Xtreme.dbo.Customer becomes just Customer
    //                    System.out.println(newTable.getQualifiedName() + "  -  " + origTable.getQualifiedName());
                        newTable.setQualifiedName(origTable.getAlias());
    //                    newTable.setAlias(origTable.getAlias());
                        // Change properties that are different from the original datasource
                        // For example, if the table name has changed you will be required
                        // to change it during this routine
                        // table.setQualifiedName(TABLE_NAME_QUALIFIER);
                        // Change connection information properties
                        connectionInfo = newTable.getConnectionInfo();
                        // Set new table connection property attributes
                        propertyBag = new PropertyBag();
                        // Overwrite any existing properties with updated values
                        propertyBag.put("Trusted_Connection", TRUSTED_CONNECTION);
                        propertyBag.put("Server Type", SERVER_TYPE);
                        propertyBag.put("Use ODBC", USE_JDBC);
                        propertyBag.put("Database DLL", DATABASE_DLL);
                        propertyBag.put("JNDIOptionalName", JNDI_OPTIONAL_NAME);
                        propertyBag.put("Connection URL", CONNECTION_URL);
                        propertyBag.put("Database Class Name", DATABASE_CLASS_NAME);
                        // propertyBag.put("Server Name", SERVER_NAME); //Optional property
                        // propertyBag.put("Connection String", CONNECTION_STRING); //Optional property
                        // propertyBag.put("Database Name", DATABASE_NAME); //Optional property
                        // propertyBag.put("URI", URI); //Optional property
                        connectionInfo.setAttributes(propertyBag);
                        // Set database username and password
                        // NOTE: Even if the username and password properties do not change
                        // when switching databases, the
                        // database password is not saved in the report and must be set at
                        // runtime if the database is secured.
                        connectionInfo.setUserName(DB_USER_NAME);
                        connectionInfo.setPassword(DB_PASSWORD);
                        // Update the table information
                        clientDoc.getDatabaseController().setTableLocation(origTable, newTable);
            // Next loop through all the subreports and pass in the same
            // information. You may consider
            // creating a separate method which accepts
            if (reportName == null || !(reportName.equals(""))) {
                IStrings subNames = clientDoc.getSubreportController().getSubreportNames();
                for (int subNum = 0; subNum < subNames.size(); subNum++) {
                    Tables tables = clientDoc.getSubreportController().getSubreport(subNames.getString(subNum)).getDatabaseController().getDatabase().getTables();
                    for (int i = 0; i < tables.size(); i++) {
                        origTable = tables.getTable(i);
                        if (tableName == null || origTable.getName().equals(tableName)) {
                            newTable = (ITable) origTable.clone(true);
                            // We set the Fully qualified name to the Table Alias to keep
                            // the method generic
                            // This workflow may not work in all scenarios and should likely
                            // be customized to work
                            // in the developer's specific situation. The end result of this
                            // statement will be to strip
                            // the existing table of it's db specific identifiers. For
                            // example Xtreme.dbo.Customer becomes just Customer
    //                        System.out.println(origTable.getQualifiedName());
                            newTable.setQualifiedName(origTable.getQualifiedName());
                            newTable.setAlias(origTable.getAlias());
                            // Change properties that are different from the original
                            // datasource
                            // table.setQualifiedName(TABLE_NAME_QUALIFIER);
                            // Change connection information properties
                            connectionInfo = newTable.getConnectionInfo();
                            // Set new table connection property attributes
                            propertyBag = new PropertyBag();
                            // Overwrite any existing properties with updated values
                            propertyBag.put("Trusted_Connection", TRUSTED_CONNECTION);
                            propertyBag.put("Server Type", SERVER_TYPE);
                            propertyBag.put("Use JDBC", USE_JDBC);
                            propertyBag.put("Database DLL", DATABASE_DLL);
                            propertyBag.put("JNDIOptionalName", JNDI_OPTIONAL_NAME);
                            propertyBag.put("Connection URL", CONNECTION_URL);
                            propertyBag.put("Database Class Name", DATABASE_CLASS_NAME);
                            // propertyBag.put("Server Name", SERVER_NAME); //Optional property
                            // propertyBag.put("Connection String", CONNECTION_STRING); //Optional property
                            // propertyBag.put("Database Name", DATABASE_NAME); //Optional property
                            // propertyBag.put("URI", URI); //Optional property
                            connectionInfo.setAttributes(propertyBag);
                            // Set database username and password
                            // NOTE: Even if the username and password properties do not
                            // change when switching databases, the
                            // database password is not saved in the report and must be
                            // set at runtime if the database is secured.
                            connectionInfo.setUserName(DB_USER_NAME);
                            connectionInfo.setPassword(DB_PASSWORD);
                            // Update the table information
                            clientDoc.getSubreportController().getSubreport(subNames.getString(subNum)).getDatabaseController().setTableLocation(origTable, newTable);
    %>
        try {
            // Create the ReportClientDocument object.
            ReportClientDocument clientDoc = new ReportClientDocument();
            clientDoc.open("Class Progress by AI.rpt", 0);
            //start sheeet code            -  work
            changeDataSource(clientDoc, "root", "eatmyshorts",
                    "jdbc:mysql://localhost:3306/lms",
                    "com.mysql.jdbc.Driver", "LMS_MySQL5.1");
            ParameterFieldController paramController = clientDoc.getDataDefController().getParameterFieldController();
            paramController.setCurrentValue("", "Type", "en_US");
            paramController.setCurrentValue("", "SchoolName", "general");
            paramController.setCurrentValue("", "StudyClassName", "classss");
            paramController.setCurrentValue("", "SegmentId", 6);
            paramController.setCurrentValue("", "LAID", 30);
            paramController.setCurrentValue("", "AIID", 205);
            paramController.setCurrentValue("", "LOID", 1);
            IReportSource reportSource = clientDoc.getReportSource();
            // Create a Viewer object
            CrystalReportViewer viewer = new CrystalReportViewer();
            // Set the report source for the  viewer to the ReportClientDocument's report source
            viewer.setReportSource(reportSource);
            // Set the name for the viewer
            viewer.setName("Crystal_Report_Viewer");
            viewer.setPrintMode(CrPrintMode.PDF);
            viewer.setEnableParameterPrompt(true);
            viewer.setEnableDrillDown(true);
            viewer.setOwnPage(false);
            viewer.setOwnForm(true);
            viewer.setDisplayToolbar(false);
            viewer.setDisplayGroupTree(false);
            viewer.setHasPageBottomToolbar(false);
            // Process the http request to view the report
            viewer.processHttpRequest(request, response, getServletConfig().getServletContext(), out);
            // Dispose of the viewer object
            viewer.dispose();
            // Release the memory used by the report
            clientDoc.close();
        } catch (ReportSDKExceptionBase e) {
            e.printStackTrace();
    %>

  • Confirmation requested - I can't have a header which changes per page?

    Hi,
    Could just do with someone confirming that I am right in this scenario:
    - Building a small webapp using Spring, JSF, hibernate ... (isn't everyone!?)
    - Trying to be all 'modular' and want to have a header include which contains top graphics, nav etc.
    - Top nav needs to be different depending on what page we are currently viewing
    For example, making the nav of the page you are currently on appears as bold and is not clickable etc. etc. In other words, the top nav varies depending on the page we are on.
    As far as I can see there is no way to do this in plain JSF??
    - You can't send params to includes giving 'current page' info
    - Can't see any components that will do the trick
    I would, of course, be grateful just for someone saying "yes, you're right, you can't do it", but if there is something I'm missing and I should be doing this another way, then please, pretty please, please with sugar on top let me know. Surely it must be possible somehow...
    Best,
    James.

    James.Minter wrote:
    - Building a small webapp using Spring, JSF, hibernate ... (isn't everyone!?)At least I don't use Spring.
    - Trying to be all 'modular' and want to have a header include which contains top graphics, nav etc.
    - Top nav needs to be different depending on what page we are currently viewing
    For example, making the nav of the page you are currently on appears as bold and is not clickable etc. etc. In other words, the top nav varies depending on the page we are on.
    As far as I can see there is no way to do this in plain JSF??
    - You can't send params to includes giving 'current page' info
    - Can't see any components that will do the trick
    I would, of course, be grateful just for someone saying "yes, you're right, you can't do it", but if there is something I'm missing and I should be doing this another way, then please, pretty please, please with sugar on top let me know. Surely it must be possible somehow...This article might give new insights: http://balusc.blogspot.com/2006/06/communication-in-jsf.html
    Also the knowledge that EL supports conditional expressions may help much in this. E.g.
    <h:outputLink value="page1" styleClass="#{myBean.page1 ? 'bold' : 'normal'}" />and so on.

Maybe you are looking for