Crystalreportviewer print button event postback issue

Post Author: krishna.moorthi
CA Forum: Crystal Reports
I have the VS2003.Net and crystalreports10 for developing reports in our appliction.
When the print button clicked in the crystalreportsviewer,based on the entered no of pages in printerdialog the page_load is happening multiply with the no of pages .
Example: I have entered Pages =2 then the page_load will execute the 4 time (CRViewer having the 7 pages)
why this is happening ...in behind any reason for this ..help would be highly appreciated.
thanks in advance.

Look for the search box in the top right corner of this web page. Enter the following string: 'Communication error crystal net'. You should get a number of results. See if any of those help.
Ludek
Follow us on Twitter http://twitter.com/SAPCRNetSup
Got Enhancement ideas? Try the [SAP Idea Place|https://ideas.sap.com/community/products_and_solutions/crystalreports]

Similar Messages

  • Printer Button Event

    Hi,
    We are wanting to record each time a report is printed off. We are using VS.NET2005 and CRXI.
    We want to do this by entering a ReportName and DateTime record into a Table that will hold information about the Report Print
    We are trying to find the event that is associated with the OK button of the PrintDialog form in CrystalViewer.
    Can anyone help, or offer an alternative method. Perhaps the event for the Print button in the CrystalViewer that shows this PrintDailog form??
    Many thanks Stuart
    Edited by: Stuart Kearney on Feb 3, 2010 5:09 PM

    Imports CrystalDecisions.CrystalReports.Engine
    Imports CrystalDecisions.Shared
    Imports CrystalDecisions.Windows.Forms
    Public Class Form1
        Dim myopenDialog As OpenFileDialog
        Public Sub New()
            ' This call is required by the Windows Form Designer.
            InitializeComponent()
            CrystalReportViewer1.ReportSource = "C:\Crystal\test\printer\portrait.rpt"
            CrystalReportViewer1.ShowPrintButton = False
            ' Add any initialization after the InitializeComponent() call.
            HideCRVImage(CrystalReportViewer1)
        End Sub
        'Private Sub InitializeComponent()
        'End Sub
        Friend WithEvents myLoadReport As ToolStripButton
        Private Sub ToolStripButton1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles myLoadReport.Click
            Dim crReportDocument As New CrystalDecisions.CrystalReports.Engine.ReportDocument()
            Dim printDialog1 As New System.Windows.Forms.PrintDialog
            crReportDocument.Load("C:\Crystal\test\printer\portrait.rpt")
            If printDialog1.ShowDialog() = System.Windows.Forms.DialogResult.OK Then
                'Get the Copy times
                Dim intCopy As Int16 = printDialog1.PrinterSettings.Copies
                'Get the number of Start Page
                Dim intFromPage As Int16 = printDialog1.PrinterSettings.FromPage
                'Get the number of End Page
                Dim intToPage As Int16 = printDialog1.PrinterSettings.ToPage
                'Get the printer name
                crReportDocument.PrintOptions.PrinterName = printDialog1.PrinterSettings.PrinterName
                If printDialog1.PrinterSettings.DefaultPageSettings.Landscape = True Then
                    crReportDocument.PrintOptions.PaperOrientation = PaperOrientation.Landscape
                Else
                    crReportDocument.PrintOptions.PaperOrientation = PaperOrientation.Portrait
                End If
                crReportDocument.PrintToPrinter(printDialog1.PrinterSettings, printDialog1.PrinterSettings.DefaultPageSettings, True) '(intCopy, True, intFromPage, intToPage)
            End If
        End Sub

  • Print button issues.

    Hello everyone,
    In order to 'flatten' our pdf forms so that they cannot easily be modified, we have decided to print all of our completed forms to a virtual .pdf writer. Now, we could have all of our users click file-->print-->select 'cutePDF Writer' from the printer drop-down-->hit OK-->Type in a file name for the new .PDF-->hit OK... but I was hoping that I could make their lives easier by adding a button to do most of this for them.
    After scowering the depths of the internet, I found this script that I've added to the click event of a button:
    var objPrintParams = event.target.getPrintParams();
    objPrintParams.interactive = objPrintParams.constants.interactionLevel.silent;
    objPrintParams.printerName = "cutePDF Writer";
    event.target.print(objPrintParams);
    This effectively handles everything up to 'Type in a file name for the new .PDF' step... but there are some issues.
    The first is that some of our users may not have cutePDF installed. As it is, the script doesn't throw an error if the printer does not exist. Without the printer installed, clicking the button seems to have no effect. Both pre- and post-print events fire as if the printing worked, even though it didn't. I would like to have a helpful message for the user, but I can't think of a way to check if it failed. If I could get a list of printers, I could check it before trying to print... but event.target.printerNames(); doesn't work, and that was the only thing that i could find to list printer names.
    The second issue is that a message is displayed to inform the users the the document is trying to print. "This document is trying to print..." I get that this is a security measure, but the user is pressing a button called print, and having to click a second time may get annoying. Additionally, if they click no by accident, this response is stored until they restart reader... clicking the print button again does nothing.
    Ultimately, I'd like to get rid of this message... but if I can't do that, I'd like for it to show each time that the user presses it, both for consistancy, and to allow them to change their minds without having to close out reader, losing all of the filled fields that they entered.
    I know that this might be asking the impossible, but I would appreciate any help with this.
    - Scott

    In the designer, highlight the print button. On the Object palette locate the presence dropdown (near the bottom of the palette). Change the pressence to "Visible (Screen Only)".

  • Print Button in CrystalReportViewer 64-bit x64 VS2005 does not respond

    Hello,
    I'm using the CrystalReportViewer-Control comes with VS2005 CR.
    When I deploy the application to a W2008 R2-System the print button shows no response.
    I'm still installed the CR-Runtime for x64 Systems on the Target-Server: CRRedist2005_X64.msi
    For testpurposes I installed a VS2005 on a W2008 R2 Server. On this platform I installed the CR-SP1-Patch for the environment: crvs05sp1.exe. After that the print button responds on the test-system.
    Then I created a setup project on this test-system with mergemodules: CrystalReportsRedist2005_x64.msm and deployed it to the target-server. But with no success. The button does not respond. It is not important for me, wether I deploy the CR-Runtime on the target-servers with the CRRedist2005_X64.msi or with a own setup-project. Because there are only six servers must be deployed.
    Any ideas? Thank you in advance
    Rolf

    The CRRedist2005_x64.msi with Date 10/24/2007 is good. So we need to look for other issues. Are you using the ActiveX print control? If you are then the control must be downloaded from teh SAP website. There should be a directive for that in the web.config (assuming this is a web app). What you may need to do is documented at the below link:
    http://msdn.microsoft.com/en-us/library/ms225384(VS.80).aspx
    The print control cab file is here:
    http://support.businessobjects.com/CRforVS2005/PrintControl.cab
    Also, see if kbse #[1356727|http://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/oss_notes_boj/sdn_oss_boj_dev/sap(bD1lbiZjPTAwMQ==)/bc/bsp/spn/scn_bosap/notes.do] will help here.
    2) Popup blocker in play?
    3) Is this a new app or an upgrade?
    Ludek

  • Program at print button in 'Issue output to'

    Hello Experts,
    There is an existing output X which triggers only when output BA00 is printed from the print button in the pop up of sales order when you go to 'Isssue output to'
    When trying to process the sales order output BA00 throu standard program SD70AV1A, the output X is not triggered.
    Now, we have a requirement to process BA00 from another interface where we are using SD70AV1A, but output X is not triggering in this case.
    So, please suggest a way through which we can use the program at print button in this requirement.
    Thanks in advance.
    Paritosh

    Hello Max,
    Thanks for your reply
    BA00 is printed by program, no issues there. But, there is a requirement on other output X(medium 5) , that it should process immediately along with BA00, which is not happening with this program SD70AV1A.
    Paritosh

  • Event on Print Button

    Hello ABAPers,
    I use an ALV in a screen, and use a copy of the standard status (from the function group SALV) STANDARD_FULLSCREEN, which contains the menu and ALV toolbars.
    If the user chooses Print (fcode = $RNT) and executes the printing, I must execute some code (e. g. change some ALV data).
    1) Is it possible to catch the event of clicking the Print menu button?
    2) How could I implement my own user_command to handle the function codes (right now it goes to the standard user_command provided by the standard status)
    Thanks in advance,
    Ivson

    Hi Ivson,
    Write a class which implements the method handle_user_command for the event user_command of class cl_gui_alv_grid.
    In this method you have to handle the print.
    Set handler for the alv.
    Then the control goes to the method when the print button is selected on the alv toolbar.
    check the program : BCALV_TEST_GRID_EVENTS
    you can handle the event : user_command or before_user_command.
    hope this helps you.
    regards,
    prasanth
    reward all helpful points

  • Print Button issue... Acrobat won't print

    We have one particular machine here at work where Acrobat will not print. You can bring up the Print dialogue box and change all the print settings, but when it comes time to actually print the document, it's like the "Print" button does not work. It is highlighted, but just does not depress. Hitting Enter does not work either. We've tried installing different versions of Acrobat and Acrobat Reader, and the same thing happens, yet other Adobe applications print without issue. OS is Tiger. We've tried Acrobat 6, 7, and Reader 8 & 9.
    Is there a preference I could kill which might reset this?

    Just saw your post. I've been having similar problems. I've reinstalled the printer, reset the printing system, and still had problems. However, it SEEMS as if I've had some success when I do a "page setup" in Acrobat before going to the print command. Let me know if this helps you.

  • Sharepoint 2010 SSRS Report Viewer Print button not doing anything

    We are having trouble printing reports from report viewer integrated in SharePoint 2010. On IE 11 compatible mode clicking print button does nothing.

    Hi,
    Please test the issue on different browsers and client PCs.
    Did you find any related error message in ULS log or event log?
    If you are recieving the error “Unable to load client print control”, please refer to the link below and see if it can be help:
    http://blogs.msdn.com/b/mariae/archive/2010/04/13/error-unable-to-load-client-print-control-when-printing-reports-in-reporting-services-summary-of-all-possible-causes-at-april-2010.aspx
    Regards,
    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact
    [email protected] .
    Rebecca Tu
    TechNet Community Support

  • Print Button Not Working if i not inital the Crystal Report Viewer

    hiii every body here
    i have problem on my web application with framework (4.0)
    i use crystal report viewer (crystal report 13) and i installed the engine of crystal report and use dataset as datasource to my report and my report work fine but ....
    my problem is :
    i cannot export or print my crystal report 13 if i put my code on sub like that :
    protected void btn_print_Click ( object sender , EventArgs e )
                SP_testTableAdapter adpter = new SP_testTableAdapter();
                adpter.Fill(ds.SP_test);
                Reports.Learning.CrystalReports.CR_testreport my_report = new Reports.Learning.CrystalReports.CR_testreport();
                my_report.SetDataSource(ds);
                CrystalReportViewer1.ReportSource = my_report;
                CrystalReportViewer1.DataBind();
    when i use this i cannot print or export it say to me login to database fail message although i use dataset not direct database connection that mean it not need to give the report source every use of it the connection of my server details like username , password
    but if i put this code to my page load the report run and showing and print correctly , i need to can use print,export and every button on reportviewer toolbar
    without put the code that display report on page_load i need to put code on button event only and when i click the button it show the report and can print and export , and not need to use sesssion
    need help plz ................

    An assumption here is that this is a web app. That being the case, you need to worry about post backs when you print or export. E.g.; almost any action the viewer will cause a post back and thus what ever data you sent to the report is now forgotten. Place the report in session and this will eliminate the issue. Search for KBA 1985571. I document the full code needed there.
    - Ludek

  • Print button in Webdynpro

    Hi all,
    This is a very old functionality am stuck with..
    I need to print the Table in Webdynpro Screen.
    Donts :
    I dont have a PrintButton UI element present in my NWDS7.0 Version.Sp13.
    I dont have the "com.sap.tc.webdynpro.clientserver.print.api" API to get the Print Service.
    I dont want to export the Table into EXCEL and then give a print, due to some performance issues.
    Could anyone pls suggest if there is any solution for this.
    Thanks & Regards,
    Sirisha.RS

    hi,
    Overwrite the following javascript to the click event of the print button...
    xfa.host.print(0, "0", (xfa.host.numPages -1).toString(), 0, 1, 0, 0, 0);
    By
    Parthi

  • Crystal reportviewer print button problem

    Post Author: ftsoft
    CA Forum: .NET
    in the click event for a button, the reportview.reportsource is set string reportPath = Server.MapPath("rptCensusTract.rpt");        CrystalReportViewer1.ReportSource = reportPath;  this works fine. the report is displayed, and the print button works. when I change the code to use a report document ( for setting the logon infor )     private ReportDocument myreport;..... myreport = new ReportDocument();        string reportPath = Server.MapPath("rptCategoryHour.rpt");        myreport.Load(reportPath);.....CrystalReportViewer1.ReportSource = myreport;  the report is displayed, but nothing happens when the print button is clicked.  not even an error message. any idea what is happening here? thanks for any help  

    Make sure you have SP 2:
    https://smpdl.sap-ag.de/~sapidp/012002523100009038092009E/cr2008win_sp2.exe
    with FP 2.5 on top:
    https://smpdl.sap-ag.de/~sapidp/012002523100002975192010E/cr2008fp25.exe
    If the issue persists, since it is in the CR designer, post to the CR design forum:
    SAP Crystal Reports
    You need to resolve this in the designer, before trying to resolve it in a .NET application.
    Ludek
    Follow us on Twitter http://twitter.com/SAPCRNetSup

  • Print button not working w/mandatory checkbox

    I have a form with a mandatory checkbox at the end of form that prevents the user from submitting the form unless they click the acknowledgment that is working great.
    My is issue is the print button is not working - what sort of javascript should be included so that the form will print?

    It is not working, this is what my source code looks like:
    <field name="CheckBox1" y="254.043mm" x="6.177mm" w="189.44mm" h="6mm">
                <ui>
                   <checkButton>
                      <border>
                         <fill>
                            <color value="255, 255, 255"/>
                         </fill>
                         <?templateDesigner StyleID apcb1?></border>
                   </checkButton>
                </ui>
                <font typeface="Myriad Pro"/>
                <margin leftInset="1mm" rightInset="1mm"/>
                <para vAlign="middle"/>
                <value>
                   <integer>0</integer>
                </value>
                <caption placement="right" reserve="182.44mm">
                   <para vAlign="middle" spaceAbove="0pt" spaceBelow="0pt" textIndent="0pt" marginLeft="0pt" marginRight="0pt"/>
                   <font size="8pt" typeface="Arial" baselineShift="0pt"/>
                   <value>
                      <text>Please certify that this abstract does not contain classified information.</text>
                   </value>
                </caption>
                <items>
                   <integer>1</integer>
                   <integer>0</integer>
                   <integer>2</integer>
                </items>
                <event activity="initialize" name="event__initialize">
                   <script contentType="application/x-javascript">
        this.mandatory = "error";
        this.mandatoryMessage = "Must certify that this abstract does not    contain classified information before submitting!";
    </script>

  • Not able to capture button event in extended controller

    Hi Gurus,
    I am not able to capture the button event (of seeded controller) in extended controller.
    I have written code in extended controller like below:
    public void processFormRequest(OAPageContext pageContext, OAWebBean webBean){
        String str = pageContext.getParameter("event"); // copied from seeded controller for the button event //
          if ("editLines".equals(str)) {
            //cutom validation
      super.processFormRequest(pageContext, webBean);
    Please help me in resolving the issue.
    Thanks,
    Srinivas
        ///my cutom validateion

    Hi Bm,
    Thanks for your response.
    I have tried the same but no luck.
    Please help in getting this resolved.
    Thanks,
    Srinivas

  • Creating a print button to call a Report Query and pass filters

    If i use the REPORT QUERY option in APEX 4 to create an statement that is the same one used in an interactive report, can I create a link or button to the REPORT QUERY and pass all the session and filter information from the interactive report to the report query?
    This way I can have the interactive report screen where the user can do all sorts of modifications and such and then pass those to the REPORT QUERY so I can call that from a custom link or button.
    You may ask "why does he need another print button?"
    Answer: I am using a view that has some embedded HTML tags to format the output really nicely. The HTML download version created by the interactive reports works beautifully. The customer also wants a PDF version (meh) which does not render the HTML tags and actually echos them as part of the text. I found that I can create another view that uses the CHR function to create all the breaks and such I was doing with HTML and these do render properly in PDF. So, I figured just have 2 reports: 1 Interactive and 1 using a REPORT QUERY. I just want to call the REPORT QUERY version but use the Interactive Search form to set all the parameters.
    Or, am I over thinking this and there is an easier method?
    I made a previous post where I showed how I got the APEX printing to work and i hoped that helped someone out - fixing this issue would put the whole thing to rest.
    Thanks

    Is BI Publisher desktop (MS Word add-in) a possibility? This would allow you to use MS Word to create your output template (RTF) that would result in a properly formatted PDF. Of course, you'd have to right an updated version of the query without HTML embedded. Just thinking outside of the box.

  • Print button on Web report.

    Hi gurus,
    We were trying to add a print button on Web report for printing the result area on the Web report.
    We followed the steps which has given in the How-to-guide How To Web Printing with Microsoft
    Excel document.
    In the document it has mentioned that
    1. Support package should be above 19 for BW 3.5 version
    2. Add HTML code in the WAD Template
    3. Import Transport file into the System.
    4. Apply OSS notes 736568 and 737082 to BW
    We upgraded the support package to 22, added the html code in the WAD template, imported the transport file into the BW system and applied the OSS notes as per the mentioned in the document.
    The transport file contains the Package u201CZPK_WEB_PRINTING_WITH_EXCELu201D and ABAP Classes u201CZCL_RSR_XLS_GRIDu201D,
    u201CZCL_RSR_XLS_HELP_WINDOW_PRINTu201D,
    u201CZCL_RSR_XLS_ITEM_CONDITIONu201D,
    u201CZCL_RSR_XLS_ITEM_EXCEPTIONu201D,
    u201CZCL_RSR_XLS_ITEM_GRIDu201D,
    u201CZCL_RSR_XLS_ITEM_TEMPLATEu201D,
    u201CZCL_RSR_XLS_ITEM_TEXT_ELEMENTSu201D,
    u201CZCL_RSR_XLS_TABLEu201D
    After import the transport file into BW, some of the objects in the ABAP Classes were not activated. I was trying to activate manually but those were not activating.
    Please guide me how to resolve the above issue or is there any way to get the printing the web report?
    Thanks in advance.
    Venkata.

    Hi
    If you want to print the web page directly then you can define a button using Java script and you can do it.
    Define java script code to print the page
    for ex define a button and call function for print.
    i cannot attach the code. but you can solve with java script
    Regards
    M.A
    Edited by: M.A on Jul 24, 2008 4:22 PM

Maybe you are looking for