Print, Export and Page Navigation Buttons in the Report

When I view a report through CR4E, the generated report has 3 buttons namely Print, Export and Page Navigation buttons. But when I click on either of the buttons I get a 'null pointer exception'. This is a critical error as I am unable to navigate past the first page. Do I have to add code to these buttons? If not, why am I getting an error? Kindly solve my problem as soon as possible.

<p>Looking at your code it appears that you are storing the ReportSource in session prior to passing in the ResultSet. This will create a problem when a postback is made on  the viewer page (which all of the viewer actions do). If you look at the sample code which is generated when you use the JSP Page Wizard you will notice that the ResultSet is passed to the ReportClientDocument object prior to it being stored in session. Then, when the page is called again this object is retrieved and the ReportSource is used by the viewer. You can quickly run the test using one of our sample reports to see what I am talking about. The code below was generated using the Consolidated Balance Sheet.rpt and did not experience any problems doing any of the viewer actions.</p><%@page import="com.businessobjects.samples.JRCHelperSample,<br />com.crystaldecisions.report.web.viewer.CrystalReportViewer,<br />com.crystaldecisions.reports.sdk.ReportClientDocument,<br />com.crystaldecisions.sdk.occa.report.application.OpenReportOptions,<br />com.crystaldecisions.sdk.occa.report.lib.ReportSDKExceptionBase,<br />com.crystaldecisions.sdk.occa.report.reportsource.IReportSource,<br />java.sql.Connection,<br />java.sql.DriverManager,<br />java.sql.ResultSet,<br />java.sql.SQLException,<br />java.sql.Statement"%><%<br /><br /><br />    try {<br /><br />        String reportName = "Sample Reports/Consolidated Balance Sheet.rpt";<br />        ReportClientDocument clientDoc = (ReportClientDocument) session.getAttribute(reportName);<br /><br />        if (clientDoc == null) {<br /><br />            clientDoc = new ReportClientDocument();<br />            <br />            // Open report<br />            clientDoc.open(reportName, OpenReportOptions._openAsReadOnly);<br /><br />  <br />            {<br />                // **** POPULATE MAIN REPORT ****<br />                {<br />                     // Connection Info for fetching the resultSet<br />                    String connectStr = "jdbc:derby:classpath:/Xtreme";<br />                    String driverName = "org.apache.derby.jdbc.EmbeddedDriver";<br />                    String userName = "dbuser";        // TODO: Fill in database user<br />                    String password = "dbpassword";    // TODO: Fill in valid password<br /><br />                    String query = "SELECT CUSTOMER_NAME FROM APP.CUSTOMER WHERE COUNTRY = &#39;Australia&#39;";<br /><br />                    <br />                    String tableAlias = "FINANCIALS";        // TODO: Change to correct table alias<br /><br />                     <br />                    JRCHelperSample.passResultSet(clientDoc, fetchResultSet(driverName, connectStr, userName, password, query),<br />                        tableAlias, "");<br />                }<br /><br /><br />            }<br />        <br />            // Store the report document in session<br />            session.setAttribute(reportName, clientDoc);<br /><br />        }<br /><br /><br />            {<br />                // Create the CrystalReportViewer object<br />                CrystalReportViewer crystalReportPageViewer = new CrystalReportViewer();<br /><br />                //    set the reportsource property of the viewer<br />                IReportSource reportSource = clientDoc.getReportSource();                <br />                crystalReportPageViewer.setReportSource(reportSource);<br /><br />                // set viewer attributes<br />                crystalReportPageViewer.setOwnPage(true);<br />                crystalReportPageViewer.setOwnForm(true);<br /><br />                // Process the report<br />                crystalReportPageViewer.processHttpRequest(request, response, application, null); <br /><br />            }<br />            <br /><br />    } catch (ReportSDKExceptionBase e) {<br />        out.println(e);<br />    } <br />    <br />%><%!<br />// Simple utility function for obtaining result sets that will be pushed into the report.  <br />// This is just standard querying of a Java result set and does NOT involve any <br />// Crystal JRC SDK functions. <br /><br />    private static ResultSet fetchResultSet(String driverName,<br />            String connectStr, String userName, String password, String query) throws SQLException, ClassNotFoundException {<br /><br />        //Load JDBC driver for the database that will be queried    <br />        Class.forName(driverName);<br /><br />        Connection connection = DriverManager.getConnection(connectStr, userName, password);<br />        Statement statement = connection.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_READ_ONLY);<br /><br />        //Execute query and return result sets<br />        return statement.executeQuery(query);<br /><br />}%><p>Try using the code generated from the wizard to see if it works for you as well. </p><p>Regards,<br />Sean Johnson (CR4E Product Manager) </p>

Similar Messages

  • How to use the Back and Next navigation buttons on the Skin

    Hi,
    I am a Tech Writer using RH7 for my current project. We are using a skin created by our company. I am not able to include the navigation buttons "Next" and "Previous" in my Webhelp output. They are shown in the skin editor (Picture attached), but not reflecting int he output. Can anyone help me with this. You can also suggest any alternative ways of navigation. "Next" option is mandatory for me.
    Vinay Jaassiel Kankipati.
    Technical Writer

    Hi there
    See if the link below helps with that.
    Click here to view
    Cheers... Rick
    Helpful and Handy Links
    RoboHelp Wish Form/Bug Reporting Form
    Begin learning RoboHelp HTML 7 or 8 within the day - $24.95!
    Adobe Certified RoboHelp HTML Training
    SorcerStone Blog
    RoboHelp eBooks

  • How to get the page navigation buttons back at the bottom of the page?

    After upgrading to Acrobat X I discovered that there is only one option for the page navigation buttons - at the upper left. I'm mystified as to why they put them there. Most users are right-handed. With the buttons at upper left it's awkward to reach up there, across the page, with the mouse cursor for every page turn (yeah, I know you can use the PgUp/PgDnkeyboard keys, but that requires taking your hand off the mouse every page turn).
    What I really want is to be able to put a copy of these buttons back down at the bottom center of the page, which was an option in previous versions. Is there some way to get those back at the bottom?

    Hi terpenoid,
    Have you tried Read Mode yet ( under the View menu)?  It displays a nivagation bar at the bottom of the PDF with next/previous page, zoom in/out, etc.
    Hope this helps,
    Dimitri
    WindJack Solutions
    www.windjack.com
    www.pdfscripting.com

  • Can't see the page navigation button in flash model?

    Can't see the page navigation button in flash model? how to do it?
    Thanks in advanced!

    Hello Wei Liu,
    For both WD and flash you have the following connectors: start, end, signal in, signal out, data store and user data.
    In WD you have in addition navigate.
    In flash you have popup signal and timer.
    See also SAP Note No. 936547.
    Best regards,
    Shay

  • I try to 'Print booklet' and receive an eror that "the active document uses multiple page sizes..."

    I try to 'Print booklet' and receive an eror that "the active document uses multiple page sizes..." but all the pages on my document are in the same size (as far as I know)
    How can I deal with this eror?

    This seems to be a bug, and so far the only workaround I know is  to copy/paste everything into a new file.

  • Print multiples of the same image on one paper. I tried to change the layout to 9 per page, but it's only showing up and printing one per page, though it is the size i would like. But only one image is showing up as opposed to 9

    I'm trying to print multiples of the same image on one paper. I tried to change the layout to 9 per page, but it's only showing up and printing one per page, though it is the size i would like. But only one image is showing up as opposed to 9. HELP!!Version 7.0 (826.4)
    I'm using Preview Version 7

    Hello @kgingeri1, 
    Welcome to the HP forums.
    If you have sent a test print via ePrint, and experience this issue, i would call the Cloud Services department.
    If ePrint works fine, it is definitely a Google Cloud Print issue.
    Also, when you print from your android device, are you using Google Cloud print or the HP ePrint app?
    Please call our Cloud Services at 855-785-2777.
    If you live outside the US/Canada Region, please click the link below to get the support number for your region. http://www8.hp.com/us/en/contact-hp/ww-phone-assist.html
    Hours:
    Mon-Fri. 8am - 11pm, Sat. 9am-8pm - EST
    Mon-Fri. 7am - 10pm, Sat. 8am-7pm - CST
    Mon-Fri. 6am - 9pm, Sat. 7am-6pm - MST
    Mon-Fri. 5am - 8pm, Sat. 6am-5pm - PST
    Aardvark1
    I work on behalf of HP
    Please click “Accept as Solution ” if you feel my post solved your issue, it will help others find the solution.
    Click the “Kudos Thumbs Up" on the right to say “Thanks” for helping!

  • Hide and Display submit button on the Simple search page.

    Heading 1: h1 Hide and Display submit button on the Simple search page.
    I'm trying to set the enabled property of the submit button on the simple search page. The business case is to disable the button if the VO has not returned any rows.
    The Submit button is on the page button bar.
    regards
    Abhi

    Hi,
    I have already added this in my ProcessRequest, the issue I am facing is it the submit button is disabled while I load >the page which is fine. but when I do a search and the query returns rows still the submit button is disabled.---Will nt reuired SPEL here..
    ---On go button click setsession value.
    Follow below steps:
    CO PR:*
    OASubmitButtonBean continueBtn=(OASubmitButtonBean)flowLayout.findChildRecursive("continueBtn");
    if(continueBtn != null && "D".equals(oapagecontext.getSessionValue("Flag"))
    continueBtn.setDisabled(false);
    else if(continueBtn != null )
    continueBtn.setDisabled(true);
    CO PFR:_
    if(pageContext.getParameter("Go") != null)
    oapagecontext.putSessionValue("Flag","D");
    Regards
    Meher Irk
    Edited by: Meher Irk on Mar 22, 2011 7:48 PM
    Edited by: Meher Irk on Mar 22, 2011 7:48 PM

  • Page navigation buttons not working properly

    Hi,
    I am having a multilingual Java Application (e.g. English, Japanese, French...).  In this application there are reports which display the data using locale parameter (like en_US, ja_JP etc.) to display the data in selected language.
    The problem comes up when I see Japanese reports on English operating system machine and vice versa.
    When I click any button of page navigation it changes the page number but does not load and display the page accordingly.
    It's like when I run the report it displays the first page, then clicking on Next button brings 2 in navigation field but the report  would still show first page, same happens for 3, 4.... all pages. 
    The other navigation buttons also do not work, they change the page number but display only the first page.
    This problem does not occur when I see Japanese reports on Japanese OS machine and English reports on English OS machine.
    However my clients need the first case, Japanese reports should work on English OS machine also.
    Please advise urgenly.

    Hi,
    I resolved the above issue by removing the call to method setProductLocale in jsp file (which was really unnecessary in code as product locale is meant to set languange for crystal report design environment ).
    Actually the problem was I had set locale at two place
                    1. using setLocale method of ReportClientDocument object) after the initialization of report client document object
                    2. using setProductLocale method of CrystalReportViewer object after the initialization of Crystal Report Viewer  object
    After commenting out code for setProductLocale, reports in all languages and all their functionalities started working 100% perfectly.
    Thanks.

  • I have a Time Capsule on which I back up 2 MacBooks and on my wife's machine she keeps having Airport Utility popping up all the time with a yellow button flashing on the left and a Red button on the right side with a "1" in the middle of it.

    I have a Time Capsule on which I back up 2 MacBooks and on my wife's machine she keeps having Airport Utility popping up all the time with a yellow button flashing on the left and a Red button on the right side with a "1" in the middle of it. Can any one tell me what is wrong. I read where when the yellow light was flashing there was a problem, but I am a novice at this and have no idea where to turn. It seems to be backing up on a regular basis.

    On the Mac......
    Open up Macintosh HD > Applicatons > Utilities > AirPort Utility
    Click on the Time Capsule icon, then click Edit in the small window that appears
    Click the Network tab at the top of the next window
    Change the setting for Router Mode from the current DHCP and NAT to read Off (Bridge Mode), then click Update at the lower right of the window, and wait a full minute for the Time Capsule to restart to a green light.
    Then.....very important
    Power off the Time Capsule and your Arris modem/router for a few minutes
    Start up the Arris first, and let it run a few minutes by itself
    Start up the Time Capsule next the same way
    Your network will now be correct, and your printing capabilities will improve.
    If Time Machine backups do not occur now, post back and we will tackle that next.

  • How to write code for page up and page down buttons on alv screen?

    Hi,
    Page up and page down buttons are not working in general alv report. Thease buttons are in disable mode. But is stnd. transactions (tcode : fbl5n)  these are enabled and working properly, but we can't debug this with /h
    How to write code for page up and page down buttons on alv screen?

    Poonam,
    On doing the screen debugging it took me over to    Include LSTXWFCC ,kindly check the below code.
    module cc_display.
      fcode = sy-ucomm(4).
      case sy-ucomm(4).
        when 'P--'.
          perform cc_firstpage.
        when 'P-'.
          perform cc_prevpage.
        when 'P+'.
          perform cc_nextpage.
        when 'P++'.
          perform cc_lastpage.
        when 'EX--'.
          perform cc_firstcopy.
        when 'EX-'.
          perform cc_prevcopy.
        when 'EX+'.
          perform cc_nextcopy.
        when 'EX++'.
          perform cc_lastcopy.
    I guess it can give you some lead.
    K.Kiran.

  • ThePrevious button, a choice, and a Next button in the tabel dont work (new

    Im writing the code like that for adf faces earlly access 13 but The Previous button, a choice, and a Next button in the tabel select one dont work i dont know why , they were working properly in the early access9 with the HR employees tabel with the same code but in the newest versions it dosent work .
    <af:table var="row"
    value="#{myEmployees.employees}" rows="10">
    <f:facet name="selection">
    <af:tableSelectOne text="Select Employee and "
    </af:tableSelectOne>

    what method does myEmployees.employees call?
    that method must cache the List.
    if a new List is returned each time, then the table resets to the first row.
    we have fixed this in EA15.

  • ThePrevious button, a choice, and a Next button in the tabel dont work

    The Previous button, a choice, and a Next button in the tabel select one dont work i dont know why , they were working properly in thw early access9 with the HR employees tabel but in the newest versions it dosent work and i dont know why.

    Could you clarify the technology and versions you're using - that'll make it much easier for us to understand the problem.

  • My iphone is showing the apple pic so i Pressed both home and sleep/wake buttons until the Apple logo appears, then release the sleep/wake button and continue pressing the home button alone until iTunes detects and Recoveys but it is gives an error 1051

    my phone was showing the apple pic when i eraseed all content and settings so i did Pressed both home and sleep/wake buttons until the Apple logo appeared, then released the sleep/wake button and continued pressing the home button alone until iTunes detected the phone in Recovery Mode but an error is coming (1015) plz help me!!!!

    plug into itunes and take it from there
    http://support.apple.com/kb/HT1808

  • "Freeze/Unfreeze" and "New View" buttons of the Structure window are gone

    Hello everyone!
    I'm using jDev 11.1.2.1.0 and for quite some time now I realized the "Freeze/Unfreeze" and "New View" buttons of the Structure window are gone.
    Have they moved or hide somewhere else, or they are gone for good?
    Thanks a lot
    ~apostolos

    Looks like this has been intentionally done
    Eliminate Freeze & New View (also in PI). These options were confusing users and for those who understood them found them not very usefulCourtesy - http://www.oracle.com/technetwork/developer-tools/jdev/jdev-11gr2-nf-404365.html.
    I'm not really sure though what you need to do if you actually need those features

  • How to set the a  graphic ( 3 radio buttons ) in the report ?

    Hi  Exports,
    1.  How to set the a  graphic ( 3 radio buttons ) in the report ?
    Acutely  I  want to  fetch the record from MCHB-CLABS and MCHB-CSPEM , if the data read from MCHB-CLABS will show the green light otherwise if read from MCHB-CSPEM, it will show red light.
    (e.g :  if syntax error in report  it is showing red light signal , like that how to set in report program)
    Thanking you.
    Subash

    Hi,
    In your internal table declaration, include yet another field for lights..
    DATA: begin of itab,
               lights type light,
              end of itab.
    DATA: GV_LAYOUT TYPE SLIS_LAYOUT_ALV.
    GV_LAYOUT-LIGHTS_FIELDNAME = 'LIGHTS'.
    Use the GV_LAYOUT in your FM to display the ALV.
    IS_LAYOUT                         = GV_LAYOUT
    If itab-lights = 1 => Error
      itab-lights = 3 => Success
      itab-lights =2 => Warning

Maybe you are looking for

  • Jabber Mobile Remote Access - No Audio

    Hi, I have a Jabber MRA setup with windows jabber client version 9.7.4. Internally everything works perfectly, while externally users can login but only chatting is working no audio is being passed to both parties. The setup consist of the following:

  • How to change Default Finder Windows Size?

    Hi all: New Finder windows show Macintosh HD and there is no problem in keeping the size or view options every time I open a new window (command + N). I can change "New Finder windows show" to another folder and works just as well. But when I open a

  • Itunes 7.4.1.2 interfering with wireless network

    This is a weird one, i hope someone can help!! I upgraded my ipod the other day to an 80Gb ipod classic (6th gen) and so i had to upgrade to the lastest version of iTunes. Having done this, 8 times out of 10 when i eject my iPod from within iTunes my

  • External hard drive won't appear on my desktop

    I'm trying to run a backup, but my hard drive won't appear on my desktop. I see it in Disk Utility, so I know it's there... ...any suggestions? Thanks, kevin

  • Performance issue in table S975

    hi experts, i have to block the inactive customers (customers for whom the transaction has not happened) for a specified number of month depending on the selection screen value.. now for that i have used the following query     SELECT SPMON VKORG VTW