Refresh Crystal Report Viewer By JavaScript or JQuery

hii every body here ...
i need to can refresh the crystal report viewer with javascript or jquery as like [refresh button] on toolbar
so i need to do that without using standard refresh button on toolbar or by server side code only by java script code is this possible or not
thanks for the repliers ...

thanks for replay my best friend but i need the below :
i using asp.net web application with crystal report 13
i use crystal report viewer on web page so ...
when i display the report some button inside the crystal report viewer toolbar like [refresh] button
i need to click this button by javascript/jquery becuase i will fire it on page_load from jquery
when page load from javascript [client side] i will fire the refresh button ....
soo if this an soluation can let me do this task or not
remember that : i dont need to refresh the report from server side methods .
thanks alot

Similar Messages

  • How to automatically refresh crystal report's viewer content

    Hello,
    How can I force a periodic reload of the contents of a report as displayed in crystal reports viewer? (without clicking anywhere)
    The idea is simply to update the content of the screen with fresh data, that could be used as a monitoring screen.
    The update must not require user intervention (no clicking, no prompting for parameters).
    We are using a jsp page CrystalReportsViewer.jsp , CRJ update 2
    I assume this is quite standard, and that there is a way using a javascript reload function, but I cannot find any example anywhere.
    Does someone know how to do this?
    Thanks in advance!
    Matt

    There's no public API on the client-side JavaScript to trigger the refresh button, but I do know some people trap the HTTP traffic (using something like Fiddler or Charles) to figure out what to do, then inject JavaScript.
    I personally don't have any sample codes for this.
    Sincerely,
    Ted Ueda

  • Crystal Report Viewer Page Change Refresh Issue

    Hello
    I hope this is an easy question for someone out there.
    I am using a crystal report viewer with the code contained in the page init event. The report has several pages and opens in a separate tab. There is also a on demand drilldown sub-report in the report.
    When I want to move to the second page the viewer seems to process the code again (like its runs the page init event) which takes several seconds so will not be satisfactory for the users. I tried the concatenate the pages using the 'SeparatePages' property but then the user can't select a specific page.
    Is there any way that the report can just open in the viewer and not have to reload everytime the user changes page?
    Thanks in advance
    Dave.

    Hi Dave
    In a web app, you could place the reports in session. See KBA: 1985571 - How to use sessions in web applications using the Crystal Reports viewer (the complete code)
    - Ludek
    Senior Support Engineer AGS Product Support, Global Support Center Canada
    Follow us on Twitter

  • Report Document not show on Crystal Report Viewer in C#

    My program is modified from VB.NET. Now I struck with Crystal Report that Crystal Report Viewer didn't show Report Document.
    Printing code is composed of two forms. One assign parameters and objects need. Other is Crystal Report Viewer form, CrystalReportForm. Last one run report by parameter from the first.
    When run this code that it didn't found any error but the problem is no report show on Crystal Report Viewer on second form. It just blank Crystal Report Viewer. There arm't any message response.
    Here is my code.
    // report caller form.
    private void Print()
       CrystalReportForm rptForm = new CrystalReportForm();
       string[] strtbl;
      strtbl = new string[1];
       string[] strqry;
      strqry = new string[1];
       // prepare var
       string myqry;
       string myrpt;
       // Pass The Table That you used in the crystal Report
      strtbl[0] = "r_receipts";
       // Pass the Query
      myqry = "SELECT * FROM r_receipts";
      myrpt = "rptReceipts.rpt";
      strqry[0] = myqry;
       //Pass For Mdi True
      rptForm.MdiParent = this.ParentForm;
      rptForm.ViewReport(myrpt, strtbl, strqry, "");
       //Parameter Value It is Optional
      rptForm.Show();
    // Crytal Report Viewer form.
    public void ViewReport(string ReportName , string[] TableName, string[] QueryString , string Parameter = "")
       //Me.MdiParent = mainpage;
       if (TableName.Length  != QueryString.Length  )
       MessageBox.Show("Passed Variable Are Not Correct", "Message", MessageBoxButtons.OK, MessageBoxIcon.Information);
       return;
       CrystalDecisions.CrystalReports.Engine.ReportDocument rpt = new CrystalDecisions.CrystalReports.Engine.ReportDocument();
       CrystalDecisions.Windows.Forms.CrystalReportViewer crv  = new CrystalDecisions.Windows.Forms.CrystalReportViewer();
      crv.ActiveViewIndex = 0;
      crv.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
      crv.ToolPanelView = CrystalDecisions.Windows.Forms.ToolPanelViewType.None;
      crv.Dock = System.Windows.Forms.DockStyle.Fill;
      crv.Location = new System.Drawing.Point(0, 0);
      crv.Name = "CrystalReportViewer";
       MySqlDataAdapter at =new MySqlDataAdapter();
       DataSet ds = new DataSet();
       for (int i = 0; i < TableName.Length; i++)
      at = GetDataAdeptor(QueryString[i]);
      at.Fill(ds, TableName[i]);
       string rptPath  = "";
      rptPath = Application.StartupPath + "\\" + ReportName;
      rpt.Load(rptPath);
      rpt.SetDataSource(ds);
       if (Parameter != "")
      rpt.SetParameterValue(0, Parameter);
      crv.ReportSource = rpt;
      crv.Refresh();
       //CrystalReportViewer.DataBind();
       //Me.Panel1.Controls.Add(CrystalReportViewer);
       Panel panel1 = new Panel();
      panel1.Controls.Add(crv);

    Hi Bhushan,
    It's not yet fixed. My dataset (ds) can't bine to DataGridView as
    DataGridView1.DataSource = ds
    But it could do like this
    DataGridView1.DataSource = ds.Tables[0];
    When I bine to Crystal Report Viewer setdatasource
    CrystalReportViewer1.setdatasource = ds.Tables[0];
    It still not work, anyway you suggest let me in the right way. I very confuse the thing I fix to bine to DataGridView
    Thank,
    Chaiwat

  • Crystal Reports Viewer 2008 and parameter fields

    Hello,
    I saw this product on the main Crystal Reports site this afternoon and decided to download it to try it out.  I have a number of users who would benefit from being able to preview their report results prior to actually running the report.  This seems like the perfect product.  I have a large number of Crystal Reports which were created in Crystal version XI.  I also downloaded the free 30 day version of Crystal Reports 2008 yesterday to see what new features are there.
    While testing Crystal Reports Viewer, I tried to run one of my reports which needs a parameter to run properly (account number).  This type of parameter is needed for probably 98% of this business' reports. 
    The problem: Crystal Reports Viewer does not prompt me to input the parameter.  In my actual Crystal Report, I had the box "Save Data with Report' left unchecked, as the account number frequently changes.  However, if that box is left unchecked, Crystal Reports Viewer will give me the error message "No Saved Data.  This report file does not contain saved data and cannot be viewed.  To get data into the report, please open and re-save it in the Crystal Reports designer application with the "Save Data with Report" option selected."
    Thinking that possibly it was the version of Crystal Reports in which the report was created (XI), I downloaded the free trial of Crystal 2008 and created a very simple test report with one parameter for account number where the account number is retrieved from our database.  And I am having the same trouble. 
    The "Help" section of Crystal Reports Viewer tells me that I can select my parameters in the parameter panel.  I do not see anything in my parameter panel other than the words "Current Data Set Last refreshed: 04/12/10 2:58 PM".  The help tells me that I can "select the parameter directly in this panel by entering a new value", but there is no option to do so.
    Any help would be appreciated.
    thanks,
    Noel

    What I've learned is that I was originally using Crystal Viewer XI and upon opening it I received a message indicating there was an update.
    I ran the update which put me on Crystal Viewer 2008.
    Since then I have not been able to refresh my screen to bring up the parameters.
    See the attached forum for another post concerning this same issue. 
    Paramter Prompts in Crystal Viewer

  • Crystal Reports Viewer - pdf, prompts, icons problem

    Hi all,
    I am a new in BO.
    I have some answer about Crystal Reports Viewer (not about setup.exe but about CRV application that I uploaded on Tomcat)
    1) The old version (11.5) works good, only Export to PDF functionality is wrong. There are in the pdf file wrong display of specific czech characters (charset)
    2) A new version, Crystal Reports Viewer 2008, show the same pdf mistake. I have J2SE Runtime Environment 5.0 Update 4 and Apache Tomcat 5.5.9.
    I upload application on Tomcat, configuration (web.xml, crconfig.xml and context.xml) is the same with version 11.5.
    Crystal Reports Viewer 2008 displayed reports, but the problem with PDF is present. The second problem is the look of CRV. First one, the icons (for export, print...all icons) are not displayd. I can copy old jar files into java (in application folder C:\WebReports\WEB-INF\lib), but then CRV looks like old version.
    And CRV 2008 doesn't display listbox in dynamic prompt on crystal report. What shall I set to displaying prompts in CRV 2008 (on CRV or on report in Crystal 2008)?
    Have you some idea? What and how can I set and configure application and where?
    Veronika

    Hi,
    To confirm, are you talking about "Crystal Reports Viewer 2008" http://www.sap.com/solutions/sapbusinessobjects/sme/reporting/viewer/index.epx
    I suggest sending in the report, in the viewer, select "Help" - "General Feedback" and then pick the option to attach the report.  In a couple of months there will be a refresh version of this view which will have Czech language support so it would be good if we could test out your PDF issue.
    As for showing parameters in the prompt panel in Crystal Reports Viewer 2008, since the viewer cannot refresh the data, make sure the parameter does not used in the record selection formula but only in the saved data selection formula.

  • Crystal Report Viewer Microsoft JScript runtime error

    When I use the crystal viewer control to render a report on the screen I receive the following error message:
    Microsoft JScript runtime error: Object doesn't support property or method 'isObject' ... and the following line is hilighted:
    if(!bobj.isObject(json)).
    Here is the markup for the test page I'm using
    {<body>
    <form id="form1" runat="server">
    <CR:CrystalReportViewer ID="CrystalReportViewer1" runat="server"
    AutoDataBind="true" ReportSourceID="crSource" />
    <CR:CrystalReportSource ID="crSource" runat="server">
    </CR:CrystalReportSource>
    </form>}
    I believe I set all info on crSource correctly (report path etc ...) because If I remove the Crystal reports viewer from the page and just use the crsource (i.e crptSource.ReportDocument.ExportToHttpResponse ...) I can export the report OK. Its only when I have the crViewer on the page Is when I recieve this error.
    Web Config
    <assemblies>
    <add assembly="CrystalDecisions.Web, Version=12.0.2000.0, Culture=neutral, PublicKeyToken=692fbea5521e1304" />
    <add assembly="CrystalDecisions.Shared, Version=12.0.2000.0, Culture=neutral, PublicKeyToken=692FBEA5521E1304" />
    <add assembly="CrystalDecisions.ReportSource, Version=12.0.2000.0, Culture=neutral, PublicKeyToken=692FBEA5521E1304" />
    <add assembly="CrystalDecisions.Enterprise.Framework, Version=12.0.1100.0, Culture=neutral, PublicKeyToken=692FBEA5521E1304" />
    <add assembly="CrystalDecisions.Enterprise.Desktop.Report, Version=12.0.1100.0, Culture=neutral, PublicKeyToken=692FBEA5521E1304" />
    <add assembly="CrystalDecisions.CrystalReports.Engine, Version=12.0.2000.0, Culture=neutral, PublicKeyToken=692FBEA5521E1304" />
    <add assembly="CrystalDecisions.Enterprise.InfoStore, Version=12.0.1100.0, Culture=neutral, PublicKeyToken=692FBEA5521E1304" />
    <add assembly="CrystalDecisions.ReportAppServer.ClientDoc, Version=12.0.1100.0, Culture=neutral, PublicKeyToken=692fbea5521e1304" />
    <controls>
    <add assembly="CrystalDecisions.Web, Version=12.0.2000.0, Culture=neutral, PublicKeyToken=692fbea5521e1304" namespace="CrystalDecisions.Web" tagPrefix="CR" />
    <http handlers>
    <add path="CrystalImageHandler.aspx" verb="GET" type="CrystalDecisions.Web.CrystalImageHandler, CrystalDecisions.Web, Version=12.0.2000.0, Culture=neutral, PublicKeyToken=692fbea5521e1304" />
    appsettings
    <add key="CrystalImageCleaner-AutoStart" value="true" />
    <add key="CrystalImageCleaner-Sleep" value="60000" />
    <add key="CrystalImageCleaner-Age" value="120000" />
    I am using crystal reports 2008, visual studio 2008, windows 7 pro, MS Sql Server 2005, IE9
    I uninstalled crystal reports, and reinstalled crystal reports 2008 sp3 (Full build) - No help
    When I goto help about visual studio it says crystal reports 2008 (No specific version info)
    Assembly cache on the machine has
    12.0.2000.0 and 12.0.1100.00 as the vast majority ... a few (Design and Engine) have older 10.5.3700 and so forth (There are so many)
    I found this problem on the web with different solutions involving frame work folder or not having IIS setup to server the crystal reports viewer ... this is happening to me on my local development machine using the ASP.Net Develepoment server included with VS2008 ..
    Any help you could give me would greatly be appreciated
    Thanks in advance
    Kevin

    Hi Kevin,
    Take a look at below SAP Note.
    [1531003 - Error: bobj undefined - javascript error |http://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/oss_notes_boj/sdn_oss_boj_bi/sap(bD1lbiZjPTAwMQ==)/bc/bsp/spn/scn_bosap/notes%7B6163636573733d36393736354636443646363436353344333933393338323636393736354637333631373036453646373436353733354636453735364436323635373233443330333033303331333533333331333033303333%7D.do]
    I got this result just by searching 'bobj is undefined javascript' in the top right search box.
    Thanks,
    Bhushan.

  • Error With Export/Print from Crystal Report Viewer

    Hello there,
    I've searched through the web and SAP discussion boards with not much luck with this issue.
    After working through this for some days now I've decided to look here for help.
    Environment:
    I have created a web Crystal Report viewer application(Developed with SBOP BI Platform 4.0 SP06 .NET SDK Runtime) that communicates with a managed Cyrstal Server 2011 SP4 (Product 14.0)
    I am able to connect and authenticate with the server, retrieve a token for communication and display reports in the Crystal report Viewer successfully.
    Problem:
    When I attempt to export, I receive the prompt to select format and pages.
    When I click export after selections most times I receive an error with the text
    Unable to cast COM object of type 'System.__ComObject' to interface type 'CrystalDecisions.ReportAppServer.DataDefModel.PropertyBag'. This operation failed because the QueryInterface call on the COM component for the interface with IID '{74EEBC42-6C5D-11D3-9172-00902741EE7C}' failed due to the following error: No such interface supported (Exception from HRESULT: 0x80004002 (E_NOINTERFACE)).
    Other times the page simply refreshes on export.
    When I click to print, no print dialog is displayed the page always refreshes and no error is displayed.
    No Print or Export document is ever created.
    As many print/export issues seems to be related, I'm guessing this two issues are as well.
    Notes:
    I am utilizing the ReportClientDocument model
    I am storing this in session to use as the crystal report viewer report source on postbacks
    I am assigning a subset of export formats to the crystal report viewer
    I am setting particular parameters as well on the report source
    At this point I would appreciate every assistance I may receive on this issue
    Thanks in advance,
    Below is the pertinent code
    Code:
    <aspx>
       <CR:CrystalReportViewer ID="CrystalReportViewer1" runat="server"
       AutoDataBind="true" EnableDatabaseLogonPrompt="False"
       BestFitPage="False" ReuseParameterValuesOnRefresh="True"
      CssClass="reportFrame" Height="1000px" Width="1100px" EnableDrillDown="False"
      ToolPanelView="None" PrintMode="Pdf"/>
    <Codebehind>
    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Web;
    using System.Web.UI;
    using System.Web.UI.WebControls;
    using CrystalDecisions.Enterprise;
    using CrystalDecisions.ReportAppServer.ClientDoc;
    using CrystalDecisions.ReportAppServer.CommonObjectModel;
    using CrystalDecisions.ReportAppServer.Controllers;
    using CrystalDecisions.ReportAppServer.DataDefModel;
    using CrystalDecisions.ReportAppServer.ReportDefModel;
    using CrystalDecisions.Shared;
    namespace ClassicInternalReportPage
        public partial class Reports : System.Web.UI.Page
            protected override void OnInit(EventArgs e)
                base.OnInit(e);
                if (!String.IsNullOrEmpty(Convert.ToString(Session["LogonToken"])) && !IsPostBack)
                    SessionMgr sessionMgr = new SessionMgr();
                    EnterpriseSession enterpriseSession = sessionMgr.LogonWithToken(Session["LogonToken"].ToString());
                    EnterpriseService reportService = enterpriseSession.GetService("RASReportFactory");
                    InfoStore infoStore = new InfoStore(enterpriseSession.GetService("InfoStore"));
                    if (reportService != null)
                        string queryString = String.Format("Select SI_ID, SI_NAME, SI_PARENTID From CI_INFOOBJECTS "
                           + "Where SI_PROGID='CrystalEnterprise.Report' "
                           + "And SI_ID = {0} "
                           + "And SI_INSTANCE = 0", Request.QueryString["rId"]);
                        InfoObjects infoObjects = infoStore.Query(queryString);
                        ReportAppFactory reportFactory = (ReportAppFactory)reportService.Interface;
                        if (infoObjects != null && infoObjects.Count > 0)
                            ISCDReportClientDocument reportSource = reportFactory.OpenDocument(infoObjects[1].ID, 0);
                            Session["ReportClDocument"] = AssignReportParameters(reportSource) ? reportSource : null;
                            CrystalReportViewer1.ReportSource = Session["ReportClDocument"];
                            CrystalReportViewer1.DataBind();
                //Viewer options
                // Don't enable prompting for Live and Custom
                CrystalReportViewer1.EnableParameterPrompt = !(Request.QueryString["t"] == "1" || Request.QueryString["t"] == "4");
                CrystalReportViewer1.HasToggleParameterPanelButton = CrystalReportViewer1.EnableParameterPrompt;
                CrystalReportViewer1.AllowedExportFormats = (int)(ViewerExportFormats.PdfFormat | ViewerExportFormats.ExcelFormat | ViewerExportFormats.XLSXFormat | ViewerExportFormats.CsvFormat);
            protected void Page_Load(object sender, EventArgs e)
                if (IsPostBack && CrystalReportViewer1.ReportSource == null)
                    CrystalReportViewer1.ReportSource = Session["ReportClDocument"];
                    CrystalReportViewer1.DataBind();
            private bool AssignReportParameters(ISCDReportClientDocument reportSource)
                bool success = true;
                if (Request.QueryString["t"] == "1" || Request.QueryString["t"] == "2" || Request.QueryString["t"] == "4" )
                    reportSource.DataDefController.ParameterFieldController.SetCurrentValue("", "STORE", Session["storeParam"]);
                    if (Request.QueryString["t"] == "2")
                        reportSource.DataDefController.ParameterFieldController.SetCurrentValue("", "FromDate", Request.QueryString["fromdate"]);
                        reportSource.DataDefController.ParameterFieldController.SetCurrentValue("", "ToDate", Request.QueryString["todate"]);
                else if (Request.QueryString["t"] == "3")
                    reportSource.DataDefController.ParameterFieldController.SetCurrentValue("", "SKU", Request.QueryString["sku"]);
                else
                    //Unknown report type alert
                    success = false;
                return success;

    Thanks Don for your response,
    I'm new to the SCN spaces and my content has been moved a couple of times already.
    In response to your questions
    The runtime is installed on the web application server, if by that you mean the machine hosting the created .NET SDK application.
    My question was whether it was also required on the Crystal Server 2011 (I.E. the main enterprise server with CMS and Report management and I guess RAS and all that). I figured this would remain untouched and queries would simply be made against it to retrieve/view reports e.t.c
    If install of the SDK on Crystal Server 2011 is indeed required should I expect any interruption to any of the core services after a restart. I.E. I'm hoping that none of the SDK objects would interfere with the existing server objects (in SAP Business Objects)Reason I ask is I note that much of the SDK install directories are similar to the existing Crystal Enterprise Server 2011 (Product 14.0.0)
    Is this temp folder to be manually created/configured or is it created by the application automatically to perform tasks. Or are you referring to the default C:\Windows\Temp directory and so saying that the application would try to use this for print and export tasks?Once I'm sure which I'd give the app pool user permission
    Printing is to be client side but I figured by default (with the Crystal Report Viewer) it would simply pool and print from the user's printer. This is how it works with the previously used URL reporting approach (viewrpt.cwr). Therefore a user can print the document from wherever they are with their own printer.We don't intend on printing from the server machine, but are you suggesting that a printer must be installed on server (which one web or enterprise server) for any client side printing to work.
    App pool is running in 32 bit mode
    Initially didn't get anything useful from fiddler but I'd try and look closer on your suggestion.
    It's also possible that some of my questions are a misunderstanding of APP vs RAS vs WEB, so please feel free to clarify. Currently I see the Web server as simply the created .NET SDK Application and RAS (Crystal Server 2011 e.t.c) as the existing fully established Application server which I simply pool for information.
    Thank you for your patience and advice,

  • Get blank report in Crystal Report Viewer when exporting to PDF

    I have an application that creates reports in the CrystalReportViewer while at the same time exports a PDF of that report.  I am having a problem in which
    performing the export causes the report in the ReportViewer and the PDF report to be blank. They have the header and column labels but no data.  If I
    comment out the Me.Export(reportExportOptions) line at the end of the exportPDFReport method the report in the ReportViewer works fine, displaying
    data on the report. 
    I have other forms that perfrom this same type of function on different reports and work fine.  In fact they use the same exportPDFReport method.  This leads
    me to believe that a difference in the reports may be causing the problem.  But I can't figure out why.
    I am using .net 3.5 with Crystal Reports 2008 (CR2008) full edition in Visual Studio 2008.  Although the reports that work were probably created using
    VS 2005 and the VS 2005 edition of Crystal, and which have since been updated to CR2008.
    Has anyone else experienced this problem?  If so, how did you resolve it?
    Thanks for any help!
    Code is below
    Public Class frmAgedReceivables
      Inherits CustomWinControls.CustomForm
      Implements ICustomForm
    ... other properties and methods
    Public Sub CreateAgedPremiumsReport()
        Dim billingType As String = "Direct"
        Dim reportType As String = String.Empty
        Dim frmDateProcess As New frmEnterProcessMonth()
        frmDateProcess.pikMonthYear.Value = TurmsController.CodeEffectiveDate
        frmDateProcess.lblMessage.Text = "Enter Processing Date"
        If frmDateProcess.ShowDialog(Me) = Windows.Forms.DialogResult.Cancel Then
          Return
        End If
        Me.InForceStripStatusLabel1.Text = "Creating Report"
        Me.Refresh()
        Dim report As New AgedReceivablesReport()
        report.Load(report.ReportPathAndName)
        Me.Refresh()
        Dim reportParmsArrayList As ArrayList = New ArrayList()
        reportParmsArrayList.Add(report.ParameterFields.Item(0).Name)
        reportParmsArrayList.Add(frmDateProcess.pikMonthYear.Value)
        reportParmsArrayList.Add(report.ParameterFields.Item(1).Name)
        If AgencyBillRadioButton.Checked Then
          billingType = "Agency"
        End If
        reportParmsArrayList.Add(billingType)
        reportParmsArrayList.Add(report.ParameterFields.Item(2).Name)
        reportParmsArrayList.Add(TurmsController.CurrentUser.UserName.Value)
        reportParmsArrayList.Add(report.ParameterFields.Item(3).Name)
        If NAICCheckBox.Checked Then
          reportType = "NAIC"
        End If
        reportParmsArrayList.Add(reportType)
        Dim parms As String() = {frmDateProcess.pikMonthYear.Value, billingType, reportType}
        Me.InForceStripStatusLabel1.Text = "Loading Data"
        Me.Refresh()
        report.getData(parms)
        Dim reportParms() = reportParmsArrayList.ToArray
        report.loadParameters(reportParms)
        report.ExportFileName = Microsoft.VisualBasic.Format(frmDateProcess.pikMonthYear.Value, "yyyyMM") + report.GetType.Name
        report.ExportFormat = CrystalDecisions.Shared.ExportFormatType.PortableDocFormat
        report.exportPDFReport()
        Me.CrystalReportViewer1.ReportSource = report
      End Sub
    End Class  
    Public MustInherit Class TurmsReport
      Inherits CrystalDecisions.CrystalReports.Engine.ReportDocument
    Implements _ITurmsReport
    ... other properties and methods
        Public Sub exportPDFReport() Implements _ITurmsReport.exportPDFReport
          Dim reportExportOptions As New ExportOptions
          Dim reportDiskFileDestinationOptions As New DiskFileDestinationOptions
          Dim reportFormatTypeOptions As New PdfRtfWordFormatOptions
          reportDiskFileDestinationOptions.DiskFileName = getExportPathAndName(ExportType.PDF)
          If Me.UsePageRange _
          AndAlso Me.FirstPageNumber > 0 _
          AndAlso Me.LastPageNumber > 0 Then
            reportFormatTypeOptions.UsePageRange = True
            reportFormatTypeOptions.FirstPageNumber = Me.FirstPageNumber
            reportFormatTypeOptions.LastPageNumber = Me.LastPageNumber
          End If
          With reportExportOptions
            .ExportDestinationType = CrystalDecisions.Shared.ExportDestinationType.DiskFile
            .ExportFormatType = ExportFormatType.PortableDocFormat
            .ExportDestinationOptions = reportDiskFileDestinationOptions
            .ExportFormatOptions = reportFormatTypeOptions
          End With
          If Not System.IO.Directory.Exists(Me.ExportFilePath) Then
            System.IO.Directory.CreateDirectory(Me.ExportFilePath)
          End If
          Me.Export(reportExportOptions)
      End Sub
    End Class 

    Pretty much. 
    Seems I had at one time hard coded a record selection statement that I forgot to remove which caused the report to be blank.  That solved my problem, but there still seems to be an issue in that the Crystal Report Viewer performed differently when I tried to export to PDF (no records displayed) then when I didn't (records displayed).
    Chip

  • One page turn out to be 4 pages in crystal report viewer, Bug?

    we are using crystalReports xi release 2, visual studio 2005,IIS in windows 2003 and asp.net. We have one crystal report viewer in web page to dispaly one report, It has been running properly for several months in production server. Now we run into big issues. In report Views, one page report always turn into  4 small size pages. When we test it in visual studio 2005, it still works correctly without any problem. Even we unstalled IIS and reinstalled IIS, deployed web again, the problem is still there. It is very strange and frustrating to developer! Now we are afraid of handling crystal report, which seem arise many potential unexpected issue down the road. any clue?
    the following is source got from IE browser, height for Viewer1 is only 367px,
    normal value is 1039px,That is reason why page seems significantly shorter.How can we control the height? Even specifing size in css, it just be ignored.
    LINK rel="stylesheet" type="text/css"  aspnet_client/System_Web/2_0_50727/CrystalReportWebFormViewer3/css/default.css"><table id="CrystalReportViewer1" align="center" cellpadding="0" cellspacing="0" style="display:inline-block;border-style:Solid;height:367px;width:149px;">
           style="width: 149px; height: 367px;position:relative"
    Thanks in advanced.
    Jim

    Hi Rizwan,
    You can't with the report itself because once the refresh is complete it requires a full refresh to update any page. And there is no option to for example refresh just the subreport.
    RAS SDK has samples on how to add subreports, see the OverView tab for a link to the samples, but it still requires a refresh to be called.
    One way may be to use Subreports on Demand, URL's to another report.... Each subreport would run individually without refreshing the main report. It would like a Table Of Contents report though.
    So to be clear, adding pages is the same thing as adding more data. Problem is most of the data needs to be complete so that summaries and running totals etc. type of objects require the data to be complete to be able to render each page.
    So why do you need to do this? Can you explain your workflow?
    Don

  • Crystal report Viewer Session times out for more data in Portal

    Hi All,         
         I am using below java SDK code to render a report in crystal report viewer. When i refresh report with more data(more parameter value) the server session times out in portal. Is there any way to fix this issue. The report loads data and then displays in Crystal report viewer, When more data is there the server times out as the server time is set to 60 sec. Is there any way to open the crystal report viewer as and when the report loads data to avoid server time out isse.
    Please help . Please let me know if I am missing something.. Thanks in Advance!!!
    CODE;
    <%@page language="java" contentType="text/html; charset=ISO-8859-1"
           pageEncoding="ISO-8859-1" session="false"%>
    <%@page
           import="com.crystaldecisions.sdk.occa.report.application.OpenReportOptions"%>
    <%@page
           import="com.crystaldecisions.sdk.occa.report.application.ReportClientDocument"%>
    <%@page
           import="com.crystaldecisions.sdk.occa.report.application.ParameterFieldController"%>
    <%@page
           import="com.crystaldecisions.sdk.occa.report.lib.ReportSDKException"%>
    <%@page
           import="com.crystaldecisions.report.web.viewer.CrystalReportViewer"%>
           <%@page import="com.crystaldecisions.report.web.viewer.*"%>
    <%@page
           import="com.crystaldecisions.sdk.occa.report.lib.ReportSDKExceptionBase"%>
    <%@page
           import="com.crystaldecisions.sdk.occa.report.reportsource.IReportSource"%>
    <%@page import="java.io.Writer"%>
    <%@page import="java.io.IOException "%>
    <%@ page import="com.crystaldecisions.report.web.viewer.ReportExportControl" %>
    <%@ page import="com.crystaldecisions.sdk.occa.report.exportoptions.ExportOptions" %>
    <%@ page import="com.crystaldecisions.sdk.occa.report.exportoptions.ReportExportFormat" %>
    <%@page
           import="com.crystaldecisions.sdk.occa.report.application.DatabaseController"%>
                  <%@page
           import="com.crystaldecisions.sdk.occa.report.application.ReportSaveAsOptions"%>
           <% response.setHeader("pragma","no-cache");//HTTP 1.1
    response.setHeader("Cache-Control","no-cache");
    response.setHeader("Cache-Control","no-store");
    response.addDateHeader("Expires", -1);
    response.setDateHeader("max-age", 0);
    //response.setIntHeader ("Expires", -1);
    //prevents caching at the proxy server
    response.addHeader("cache-Control", "private"); %>
    <%
           String reportPath,Sharedpath;
           ReportClientDocument reportClientDocument;
                ParameterFieldController parameterFieldController;
                try{
                    reportPath = "reportlocation";
                 Sharedpath = "Target Location";
                    reportClientDocument = new ReportClientDocument();
                    reportClientDocument.setReportAppServer(ReportClientDocument.inprocConnectionString);
                         reportClientDocument.open(reportPath, OpenReportOptions._openAsReadOnly);
                         reportClientDocument.getDatabaseController().logon("Dbname", "dbpassword");              
                         System.out.println("Connecting...");
                       parameterFieldController = reportClientDocument.getDataDefController()
                   .getParameterFieldController();
                    parameterFieldController.setCurrentValues("", "param 1",
                         new Object[] {1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,29});
    parameterFieldController.setCurrentValues("", "Param 2",
                  new Object[] {1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23});
    reportClientDocument.saveAs("Target Report Name","Target Location", ReportSaveAsOptions._overwriteExisting);
           reportClientDocument.close();
           System.out.println("Finished...");              
    CrystalReportViewer viewer = new CrystalReportViewer();
    viewer.setOwnPage(true);
    viewer.setPrintMode(CrPrintMode.ACTIVEX);
    viewer.setReportSource(Sharedpath);
    viewer.processHttpRequest(request, response, getServletConfig().getServletContext(), null);
                  System.out.println("Finished...");
           }  catch (ReportSDKException e) {
                  // TODO Auto-generated catch block
                  e.printStackTrace();
    %>

    Hi All,         
         I am using below java SDK code to render a report in crystal report viewer. When i refresh report with more data(more parameter value) the server session times out in portal. Is there any way to fix this issue. The report loads data and then displays in Crystal report viewer, When more data is there the server times out as the server time is set to 60 sec. Is there any way to open the crystal report viewer as and when the report loads data to avoid server time out isse.
    Please help . Please let me know if I am missing something.. Thanks in Advance!!!
    CODE;
    <%@page language="java" contentType="text/html; charset=ISO-8859-1"
           pageEncoding="ISO-8859-1" session="false"%>
    <%@page
           import="com.crystaldecisions.sdk.occa.report.application.OpenReportOptions"%>
    <%@page
           import="com.crystaldecisions.sdk.occa.report.application.ReportClientDocument"%>
    <%@page
           import="com.crystaldecisions.sdk.occa.report.application.ParameterFieldController"%>
    <%@page
           import="com.crystaldecisions.sdk.occa.report.lib.ReportSDKException"%>
    <%@page
           import="com.crystaldecisions.report.web.viewer.CrystalReportViewer"%>
           <%@page import="com.crystaldecisions.report.web.viewer.*"%>
    <%@page
           import="com.crystaldecisions.sdk.occa.report.lib.ReportSDKExceptionBase"%>
    <%@page
           import="com.crystaldecisions.sdk.occa.report.reportsource.IReportSource"%>
    <%@page import="java.io.Writer"%>
    <%@page import="java.io.IOException "%>
    <%@ page import="com.crystaldecisions.report.web.viewer.ReportExportControl" %>
    <%@ page import="com.crystaldecisions.sdk.occa.report.exportoptions.ExportOptions" %>
    <%@ page import="com.crystaldecisions.sdk.occa.report.exportoptions.ReportExportFormat" %>
    <%@page
           import="com.crystaldecisions.sdk.occa.report.application.DatabaseController"%>
                  <%@page
           import="com.crystaldecisions.sdk.occa.report.application.ReportSaveAsOptions"%>
           <% response.setHeader("pragma","no-cache");//HTTP 1.1
    response.setHeader("Cache-Control","no-cache");
    response.setHeader("Cache-Control","no-store");
    response.addDateHeader("Expires", -1);
    response.setDateHeader("max-age", 0);
    //response.setIntHeader ("Expires", -1);
    //prevents caching at the proxy server
    response.addHeader("cache-Control", "private"); %>
    <%
           String reportPath,Sharedpath;
           ReportClientDocument reportClientDocument;
                ParameterFieldController parameterFieldController;
                try{
                    reportPath = "reportlocation";
                 Sharedpath = "Target Location";
                    reportClientDocument = new ReportClientDocument();
                    reportClientDocument.setReportAppServer(ReportClientDocument.inprocConnectionString);
                         reportClientDocument.open(reportPath, OpenReportOptions._openAsReadOnly);
                         reportClientDocument.getDatabaseController().logon("Dbname", "dbpassword");              
                         System.out.println("Connecting...");
                       parameterFieldController = reportClientDocument.getDataDefController()
                   .getParameterFieldController();
                    parameterFieldController.setCurrentValues("", "param 1",
                         new Object[] {1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,29});
    parameterFieldController.setCurrentValues("", "Param 2",
                  new Object[] {1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23});
    reportClientDocument.saveAs("Target Report Name","Target Location", ReportSaveAsOptions._overwriteExisting);
           reportClientDocument.close();
           System.out.println("Finished...");              
    CrystalReportViewer viewer = new CrystalReportViewer();
    viewer.setOwnPage(true);
    viewer.setPrintMode(CrPrintMode.ACTIVEX);
    viewer.setReportSource(Sharedpath);
    viewer.processHttpRequest(request, response, getServletConfig().getServletContext(), null);
                  System.out.println("Finished...");
           }  catch (ReportSDKException e) {
                  // TODO Auto-generated catch block
                  e.printStackTrace();
    %>

  • Safari Browser issue on Mac with crystal report viewer JSP

    Safari Browser issue with crystal report viewer JSP
    This is my configuration:
    Operating System : Mac X
    Browser : Safari Browser 3.1.4
    Crystal Report : XII Release 2
    Application Server : Jboss 4.2.0
    I am using the following code to view the crystal report in jsp.
    <%@ page import="com.crystaldecisions.report.web.viewer.*" %>
    <%@ page import="com.crystaldecisions.sdk.occa.report.application.ReportClientDocument" %>
    <%@ page import="com.crystaldecisions.sdk.occa.report.reportsource.IReportSource" %>
    CrystalReportViewer theViewer = null;
    ReportClientDocument document = null;
    IReportSource reportSource = null;
    theViewer = new CrystalReportViewer();
    reportSource = document.getReportSource();
    reportSource.refresh();
    theViewer.setReportSource(reportSource);
    theViewer.setOwnPage(true);
    theViewer.setHasExportButton(true);
    theViewer.setHasPrintButton(true);
    theViewer.setHasRefreshButton(true);
    theViewer.setHasLogo(false);
    theViewer.setEnableParameterPrompt(true);
    theViewer.refresh();
    theViewer.processHttpRequest(request, response, getServletConfig().getServletContext(), null);
    theViewer.dispose();This code is working fine when the browser is IE or Firefox on Mac X.
    But it is giving me error message when the browser is Safari on Mac X.
    If there is no parameter in the report then the error message is:
    Null Totaller
    If there is parameter in the report then the error message is:
    Parameter prompting is not supported
    Please Help.
    Thanks
    Edited by: VINCEJOHNSON on Jul 30, 2008 7:11 AM

    I am having this exact same issue, only on an ASP.NET page. I can print the report, but it does not display at all.

  • Crystal report viewer not showing any option in browser at run time

    Hello concern
    I am mahendra gohil a student in computer science.
    I am using crystal report viewer with VS 10 . Every thing is fine code is running , in browser data are displayed but I didn't find any options that make print of my document . In my document has multiple pages but it displays only first page. all options are set to true with "pdf" as print mode.
    I have read all post regarding this issue , could not find any solution. Also set "Enable Acrobat Javascript " in adobe reader application.
    I have attached my project image with this question.
    Can any one plz help me to solve this ?

    I am using Firefox 20.0* and Crome 34.0.*
    Here is my code
    page :: viewreport.aspx
    <%@ Page Title="" Language="C#" MasterPageFile="~/ideal.master" AutoEventWireup="true" CodeFile="viewreport.aspx.cs" Inherits="Default3" %>
    <%@ Register assembly="CrystalDecisions.Web, Version=13.0.2000.0, Culture=neutral, PublicKeyToken=692fbea5521e1304" namespace="CrystalDecisions.Web" tagprefix="CR" %>
    <asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
        <style type="text/css">
        .style1
            width: 100%;
    </style>
    </asp:Content>
    <asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
        <table class="style1">
        <tr>
            <td>
                 </td>
            <td>
                 </td>
        </tr>
        <tr>
            <td colspan="2">
                <CR:CrystalReportViewer ID="CrystalReportViewer1" runat="server"
                    AutoDataBind="True" EnableDatabaseLogonPrompt="False"
                    GroupTreeImagesFolderUrl="" Height="50px"
                    ToolbarImagesFolderUrl="" ToolPanelWidth="200px" Width="881px"
                    ToolbarStyle-BackColor="#33CC33" ToolbarStyle-BorderColor="#FF5050"
                    ToolbarStyle-BorderStyle="Dashed" />
            </td>
        </tr>
    </table>
    </asp:Content>
    page :: viewreport.aspx.cs
                ReportDocument rp = new ReportDocument();
                rp.Load(Server.MapPath("IPD_BILL.rpt"));
                string payment_str = "SELECT * from report";
                DataSet ds = new DataSet();
                ds = conn.read_op(payment_str);       
                rp.SetDataSource(ds.Tables[0]);
                CrystalReportViewer1.ReportSource = rp;

  • Crystal Report Viewer 12

    I have Crystall Reports 8.5 and 11. Do i need to upgrade them to 12 when using Crystal Report Viewer 12, or Crystal Report Viewer 12 can run older versions without any problems?

    Hi,
    Crystal reports viewer 12 can open any .rpt files.  It is a off line viewer, it will not have any refreshing capabilities.
    Thanks,
    Sastry

  • Crystal Report Viewer shows blank but exporting shows results

    I'm getting a really strange issue when opening a report using the CrystalReportViewer class.  The Crystal Report Viewer shows up nicely in my webpage....but the report is completely blank.  When I click on the Export button in the Viewer & export to any format,  the results show up nicely.  Also when I right click on the Viewer page & view source, I can see all my report data there in Javascript....but for some reason it's just not being rendered on the page.
    I'm using Crystal Reports 2008 & I believe I've added the necessary jars & also included the entire crystalreportviewers folder (with all js files) in my Web folder.  Also, I don't see any exceptions in the crystal_exception_log_file.
    Any help would be greatly appreciated
    Thanks

    The same problem to me also.
        I was using the crystal report in visual studio 2008, the report was perfectly working. But when we migrated the project into visual studio 2010, the crystal report simply shows the blank report. But the javascript is having the actual data but not only rendered in the screen.
       Please anybody have valid solution for this, let us know.
    Thanks

Maybe you are looking for

  • Pop up box with Ok and Cancel choices, not working. Please Help.

    Hello! I am trying to create a pop up box that allows users to choose Ok and Cancel (i'm just testing with Ok and Cancel for now). For some reason when I run it a CMD line pops up and closes very quickly, but i do not get errors. Here is my code:    

  • Some photos do not populate in Safari, only blue box with question mark

    Examples: In Facebook and Pinterest some of the photos are showing, others just have a small blue box with a question mark in the middle. Any help would be appreciated!

  • Credit card orders restrict

    Hi, We have a requirement where we need to restrict the credit card sales orders for certian customers. for example customer A should not be able to book a order using a credit card. we are using the standard order OR for all credit card related acti

  • Black bars around my screen.

    I have recently gotten adobe premiere, and after effects. Everytime I export there is a black bar around the screen. http://us.toshiba.com/video-electronics/camcorders/camileo-x100/ That is the camera link , and it is 1080p 30fps. thank you in advanc

  • What is keeping my ActiveX program from working?

    I'm trying to access my computer at work. Microsoft office says there is something not allowing my Active X program to work. Is there any reason why Firefox would be the problem?