Get entire record from Crystal report viewer

Hi,
I'm using Crystal 2008 .Net components to view reports from within an application.
I would like to write a custom drill down event so that users can link back from a record on the report they are previewing to somewhere else in the application. In order to do this I need access to the whole record's data for the object that they clicked on.
It's not really much good if I just have the value, name and table of the field they clicked on, since it is probably not a unique value within that table, and therefore I couldn't drill back to the specific record they selected. Also, if it's not a database field in the first place then I have no way of going anywhere. But if I can get the whole record they are on then I'll already know which primary key field I want, and I could then get the appropriate value from the record.
Is this possible?
Richard

You can get at specific objects using events,  but not a whole record.
Can't think of any way of doign this at all...
Ludek

Similar Messages

  • Printing from Crystal Reports Viewer

    I have an issue with a customer demanding to print Post Script from Crystal Report Viewer.  When we print using the PS driver we get the form, but the data is blank.  If we use PCL the report prints fine.  Is there any recommendations for using PCL or PS.  Customer says that Crystal reports are Post Script driven and the PS driver should work.  Any help with this would be appreciated.

    Thank you Mariellen for posting the solution.
    Also note that we have only tested the Zebra Printer with the Zebra Print Drivers. I worked with their developers and they said all drivers use the same under laying code so they should all work.
    The other requirement is you must define your paper size in the driver config tool for each size you are going to use, have a separate Printer defined on your PC.
    Thank you
    Don

  • How to print directly to Printer from Crystal Report Viewer ?

    Hi All,
    We are integrating our Java Web Application with Crystal report XI, currently using JRC and export to PDF for user to preview and print to local printer.
    Now there is new requirement :
    Some clients is using thin client terminal (no harddisk, only has OS +Browser in ROM), so I cannot install Acrobat Reader for them to preview&print the report.
    So I am looking at  Crystal Report Viewer, the question is : Can I print from Crystal Report Viewer directly to local printer without first converting it to PDF (because I can't have acrobat reader installed) ??
    Thank you very much,
    Krist
    Indonesia

    Hi,
    It can't be achieved through XI.
    JRCXI R2 SDK offers the ability to print the report server side
    using the PrintOutputController using printReport(PrintReportOptions printReportOptions) method.
    Here is the code(for XIR2):
    import="com.crystaldecisions.reports.sdk.*"
    import="com.crystaldecisions.sdk.occa.report.lib.*"
    import="com.crystaldecisions.sdk.occa.report.document.*"
    try {
    final String REPORT_NAME = "Inventory.rpt";
    ReportClientDocument reportClientDoc = new ReportClientDocument();
    reportClientDoc.open(REPORT_NAME, 0);
    //Create and set print options.
    PrintReportOptions printOptions = new PrintReportOptions();
    //Note: Printer with the 'printer name' below must already be configured.
    printOptions.setPrinterName("
    10.10.45.220
    BOBJ 2C");
    printOptions.setJobTitle("Sample Print Job from JRC.");
    printOptions.setPrinterDuplex(PrinterDuplex.horizontal);
    printOptions.setPaperSource(PaperSource.auto);
    printOptions.setPaperSize(PaperSize.paperLetter);
    printOptions.setNumberOfCopies(1);
    printOptions.setCollated(false);
    PrintReportOptions.PageRange printPageRange = new PrintReportOptions.PageRange(1,1);
    printOptions.addPrinterPageRange(printPageRange);
    //NOTE: If parameters or database login credentials are required, they need to be set before.
    //calling the printReport() method of the PrintOutputController.
    reportClientDoc.getPrintOutputController().printReport(printOptions);
    reportClientDoc.close();
    out.println("Successfully sent report to the printer.");
    catch(ReportSDKException ex) {     
         out.println(ex);
    Please revert in case you have any query.
    Thanks,
    Neeraj

  • 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,

  • Can't Print Landscape from Crystal Reports Viewer XI

    Post Author: conrad
    CA Forum: General
    Product: Crystal Reports Viewer XI, version 12.0.0.r130_v20070725 and
    Crystal Reports XI, version 11.0.0.1282
    Patches Applied: none
    Operating System(s): XP Pro SP2
    Database(s):
    Error Messages: noneSteps to Reproduce:
    Download and install Crystal Reports Viewer XI
    Open a Crystal Report that prints landscape.
    Save report with data.
    Open that report with Crystal Reports Viewer XI.  Report will display landscape.
    Click Print..OK
    Viewer will attempt to scale output to fit on portrait paper, with varying degrees of success.
    Checking the properties of the report from Viewer (File...Report Properties...) shows a "Page Orientation" of "Landscape" and a message "Page Orientation and size defined by the application (no page information set by report author)."
    Any ideas on how to get the report to print landscape?  It prints that way from Crystal Reports XI.

    Hello Glenda,
    as you refer to the legacy technology I recommend to post this query to the [Legacy Application Development SDKs|SAP Crystal Reports - Legacy SDKs; forum.
    This forum is dedicated to topics related to legacy SDKs, including the Report Designer Component (RDC), OCX, VCL, and Crystal Reports Print Engine (CRPE).
    It is monitored by qualified technicians and you will get a faster response there.
    Also, all Legacy Application Development SDKs queries remain in one place and thus can be easily searched in one place.
    Thanks a lot,
    Falk

  • Cannot Send Email from Crystal Reports Viewer; MAPI:Overflow

    I am trying to send a report via email with crystal reports, but i get the following error message:
    "The following unexpected error occured while trying to send the report to MAPI: Overflow."
    I am using Outlook 2010, Win 7 x64 bit.
    Does anyone have any ideas or thoughts?

    Yes, it is a 3rd party app that opens Crystal Reports Viewer.  Attached are the screen shots I get when try to send the report as an email.
    -Dan

  • How to get actual error from Crystal Report

    We are using Crystal report in web service.
    We faced some problem due to crystal report unexpected error.
    Refer the below error message.
    Xception E NSF NSFZ1100 20100608 145511565 GPRAB0 : GPRZ10 GUEC0001 [1] AbstractService Showing a modal dialog box or form when the application is not running in UserInteractive mode is not a valid operation. Specify the ServiceNotification or DefaultDesktopOnly style to display a notification from a service application.
    Xception E NSF NSFZ1100 20100608 145511972 GPRAB0 : GPRZ10 GUEC0001 [1] AbstractService at System.Windows.Forms.MessageBox.ShowCore(IWin32Window owner, String text, String caption, MessageBoxButtons buttons, MessageBoxIcon icon, MessageBoxDefaultButton defaultButton, MessageBoxOptions options, Boolean showHelp)
    at System.Windows.Forms.MessageBox.Show(String text, String caption, MessageBoxButtons buttons, MessageBoxIcon icon)
    at CrystalDecisions.Windows.Forms.CrystalReportViewer.HandleExceptionEvent(Object eventSource, Exception e, Boolean suppressMessage)
    at CrystalDecisions.Windows.Forms.CrystalReportViewer.HandleExceptionEvent(Object eventSource, Exception e)
    at CrystalDecisions.Windows.Forms.ReportDocumentBase.GetLastPageNumber()
    at CrystalDecisions.Windows.Forms.ReportDocumentBase.GetLastPage()
    at CrystalDecisions.Windows.Forms.DocumentControl.ShowLastPage()
    at CrystalDecisions.Windows.Forms.PageView.ShowLastPage()
    at Biz.Nissan.Cats.CORE.REPORT.LibCrystalReport.TotalPageCount(ReportDocument Rpt)
    at Biz.Nissan.Cats.CORE.REPORT.LibCrystalReport.Print(BaseReport RptDefinition)
    at Biz.Nissan.Cats.CORE.REPORT.MCTLIST260Print.Print(IFData ifData)
    at Biz.Nissan.W3.CATS.BC.Service.DistributeService.ExecuteMpp()
    How we get the actual error from crystal report?
    Thanks in Advance

    Same as
    crystal report unexpected error in Web service (IIS)
    Closing this thread.
    Ludek

  • Printing from Crystal Report Viewer in Powerbuilder

    I have a Crystal Report Viewer Control placed on a Powerbuilder window. I have my own Print button placed on the window. The code I have in the clicked event of this button is as follows
    g_ole_crx_report.PrintOut(True,1,False)
    This code displays a Print dialog box where I can select the printer.
    I want to implement a functionality which checks whether the printing was successful . If it was successful I want to update a table in the DB else do not update.If I click Cancel on the Print dialog the DB table should not be updated.
    Is it possible to implement such functionality?
    I am using CR XI RDC with Powerbuilder 9.0.
    Thanks,

    Only option I can think of, is to create your own printer dialog and capture the cancel print event there.
    You will not be able to get at the print cancel event of the printer dialog displayed by the CR viewer print button.
    Ludek

  • Getting syntax error in Crystal Report Viewer

    The web application that I am supporting has reports that are presented through CR Viewer. The problem that I am facing is that if I pass a value to get the report, its giving the following error.
    The syntax of the value of prompt 'name_of_paramente_passing' is incorrect. Please check the syntax and try again.
    I am not getting this error if I run the same report through the actual Crystal report program.
    So when I pass 123.1 to the crystal web viewer it wont give me any trouble. But If I pass 123.1(a) , it throws that error.
    somehow the combination of pareanthesis and the alphabet is causing some trouble....
    Is this a bug or some other problem.?
    Version that I have:
    Crystal Report web Viewer Control 11.5
    Crystal Developer 11.0.0.1282
    Please reply if you have any work around for this.
    Thank you,
    Santhosh

    Thanks Mohammed. But our application is trying to pass a parameter which contains user data like section numbers....
    So when we pass the value 123.1(a) , here what is happening behind the scene of CR viewer
    webSource0.AddParameter "promptex-NAMEOFPARAMETER", "123.1%28a%29"
    and it throws up the error
    "The syntax of the value for prompt 'NAMEOFPARAMETER' is incorrect. Please correct the syntax and try again"
    I have no idea why it is throwing up this errror....

  • Cannot export crystal report in excel format from crystal report viewer

    This problem occurs on only one workstation.
    Open Advanced Reports > Enter workorder # > Click on 'workorder work(uninvoiced)' > Work order opens.
    Click on icon "Export report"
    Save as type: change to .xls
    Error: Crystal Report Windows Forms Viewer. Error in file
    SAP.......rpt:
    Error detected by export DLL:
    Export failed.

    Try adding c:\Program Files\Business Objects\BusinessObjects Enterprise 12.0\win32_x86 to your windows enviroment variable PATH then restart.

  • Get the Picture object location path from crystal report using CRAXDRT.DLL

    Post Author: hpatel_it
    CA Forum: Crystal Reports
    Hi All,I am working on one project - Crystal report to SQL Report conversion and I am using CRAXDRT.DLL to open and read crystal report.I have done conversation of all controls but I am not able to get PICTURE object from Crystal report and also PICTURE object source path.I am using CRAXDRT.OLEOBJECT to get the path of the picture object.if someone have knowledge of CRAXDRT please help me.Regards,Harry

    You can get at specific objects using events,  but not a whole record.
    Can't think of any way of doign this at all...
    Ludek

  • How can I get the View Tab name on the Crystal Report Viewer at runtime?

    When a report is displayed in the Windows Forms Crystal Report Viewer and the user drills into the report, the drill down view is displayed in a seperate view and is identified via a View tab at the top of the report.  I can determine the index of the view tab that is currently selected, but I need to access the text that is on the View tab.  The only properties that I've found that pertain to the "view" on the Crystal Report viewer are the ActiveViewIndex and the ViewCount.  Unfortunately, neither of these items help me because they are not specific to a certain section of the report.  Has anyone had any luck accessing the View Tab properties ?  Thanks.

    The tabs at the top of the page are nested within some of the viewers controls. Through trial and error you just have to find the right one. In this case the main part of the report is in the first control. This happens to be a TabControl. From there you can loop through the TabPages on the TabControl to grab the names of the tabs.
    Here is a quick example of what I did to get the tab text. All this code was in a button click event.
    Control oControl = crystalReportViewer1.Controls[0];
    TabControl oTabControl = (TabControl)oControl.Controls[0];
    foreach (TabPage oTabPage in oTabControl.TabPages)
         MessageBox.Show(oTabPage.Text);

  • Export from Crystal Reports 2008 viewer fails if run on separate thread

    I have a windows desktop application written in Visual Basic using Visual Studio 2008.  I have installed and am trying Crystal Reports 2008 to run a report.  Everything seems to work well except that when I preview a report (using the viewer control) and click the export button found in the upper left corner of that control, I get the following message:
    Error 5: Current thread must be set to single thread apartment (STA) mode before OLE calls can be made.  Ensure that your Main function has STAThreadAttribute marked on it.  This exception is only raised if a debugger is attached to the process.
    I am a little confused on what to do exactly.  Is the problem because I am running in the Visual Studio 2008 IDE?  It says this exception is only raise if a debugger is attached to the process.  No, I tried running it outside the IDE.  The exception wasn't generated but the application hung when the button was clicked.
    It says the current thread must be set to single thread apartment (STA) mode.  If the report is run on its own thread, is the "current" thread the thread the report is running on or is the main application's UI thread?  I don't think I want to set my main application to single thread apartment mode because it is a multi-threaded application (although I really don't know for sure because I am new to multi-threaded programming). 
    My objective is to allow reports to run asynchronously so that the user can do other things while it is being generated.  Here is the code I use to do this:
        ' Previews the report using a new thread (asynchronously)
        Public Sub PreviewReportAsynch(ByVal sourceDatabase As clsMainApplicationDatabase)
            Dim backgroundProcess As System.ComponentModel.BackgroundWorker
            ' Start a new thread to run this report.
            backgroundProcess = New System.ComponentModel.BackgroundWorker
            Using (backgroundProcess)
                ' Wire the function we want to run to the 'do work' event.
                AddHandler backgroundProcess.DoWork, AddressOf PreviewReportAsynch_Start
                ' Kick off the report asynchronously and return control to the calling process
                backgroundProcess.RunWorkerAsync(sourceDatabase)
            End Using
        End Sub
        Private Sub PreviewReportAsynch_Start(ByVal sender As Object, ByVal e As System.ComponentModel.DoWorkEventArgs)
            ' The source database needed to call preview report was passed as the only argument
            Call PreviewReport(CType(e.Argument, clsMainApplicationDatabase))
        End Sub
        ' Previews the report.  From the preview window, the user can print it.
        Public Function PreviewReport(ByVal sourceDatabase As clsMainApplicationDatabase) As FunctionEndedResult
            Dim errorBoxTitle As String
            Dim frmPreview As frmReportPreview
            ' Setup error handling
            errorBoxTitle = "Preview " & Name & " Report"
            PreviewReport = FunctionEndedResult.FAILURE
            On Error GoTo PreviewError
            ' Set up the crxReport object
            If InitializeReportProcess(sourceDatabase) <> FunctionEndedResult.SUCCESS Then
                GoTo PreviewExit
            End If
            ' Use the preview form to preview the report
            frmPreview = New frmReportPreview
            frmPreview.Report = crxReport
            frmPreview.ShowDialog()
            ' Save any settings that should persist from one run to the next
            Call SavePersistentSettings()
            ' If we got this far everything is OK.
            PreviewReport = FunctionEndedResult.SUCCESS
    PreviewExit:
            ' Do any cleanup work
            Call CleanupReportProcess(sourceDatabase)
            Exit Function
    PreviewError:
            ' Report error then exit gracefully
            ErrorBox(errorBoxTitle)
            Resume PreviewExit
        End Function
    The variable crxReport is of type ReportDocument and the windows form called 'frmPreview' has only 1 control, the crystal reports viewer. 
    The print button on the viewer works fine.  Just the export button is failing.  Any ideas?

    Hi Trevor.
    Thank you for the reply.  The report document is create on the main UI thread of my application.  The preview form is created and destroyed on the separate thread.  For reasons I won't get into, restructuring the code to move all the initialization stuff inside the preview form is not an option (OK, if you a really curious, I don't always preview a report, sometimes I print and/or export it directly which means the preview form isn't used).
    What I learned through some other research is that there are some things (like COM calls and evidently some OLE automation stuff) that cannot be run on a thread that uses the MTA threading model.   The export button probably uses some of this technology, thus the message stating that an STA threading model is required.  I restructured the code as follows to accomodate this requirement.  Here is a sample:
    ' Previews the report using a new thread (asynchronously)
        Public Sub PreviewReportAsynch(ByVal sourceDatabase As clsMainApplicationDatabase)
            Dim staThread As System.Threading.Thread
            ' Start the preview report function on a new thread
            staThread = New System.Threading.Thread(AddressOf PreviewReportAsynchStep1)
            staThread.SetApartmentState(System.Threading.ApartmentState.MTA)
            staThread.Start(sourceDatabase)
        End Sub
        Private Sub PreviewReportAsynchStep1(ByVal sourceDatabase As Object)
            Dim staThread As System.Threading.Thread
            ' Initialize report preview.  This includes staging any data and configuring the
            ' crystal report document object for use by the crystal report viewer control.
            If InitializeReportProcess(DirectCast(sourceDatabase, clsMainApplicationDatabase)) = FunctionEndedResult.SUCCESS Then
                ' Show the report to the user.  This must be done on an STA thread so we will
                ' start another of that type.  See description of PreviewReportAsynchStep2()
                staThread = New System.Threading.Thread(AddressOf PreviewReportAsynchStep2)
                staThread.SetApartmentState(System.Threading.ApartmentState.STA)
                staThread.Start(mcrxReport)
                ' Wait for step 2 to finish.  This blocks the current thread, but this thread
                ' isn't the main UI thread and this thread has no UI anymore (the progress
                ' form was closed) so it won't matter that is it blocked.
                staThread.Join()
                ' Save any settings that should persist from one successful run to the next
                Call SavePersistentSettings()
            End If
            ' Release the crystal report
            Call CleanupReportProcess(DirectCast(sourceDatabase, clsMainApplicationDatabase))
        End Sub
        ' The preview form must be launched on a thread that use the single-threaded apartment (STA) model.
        ' Threads use the multi-threaded apartment (MTA) model by default.  This is necessary to make the
        ' export and print buttons on the preview form work.  They do not work when running on a
        ' thread using MTA.
        Public Sub PreviewReportAsynchStep2(ByVal crxInitializedReport As Object)
            Dim frmPreview As frmReportPreview
            ' Use the preview form to preview the report.  The preview form contains the crystal reports viewer control.
            frmPreview = New frmReportPreview
            frmPreview.Report = DirectCast(crxInitializedReport, ReportDocument)
            frmPreview.ShowDialog()
        End Sub
    Thanks for your help!
    Andy

  • Running a crystal reports viewer from forms

    Greetings,
    I am using Oracle Forms 10g!!
    I have a form that is used to invoke a crystal report viewer using the HOST command. The viewer has the ability to pass in a id and password. When I try to run it I get:
    Logon failed.
    Details: IM003:Specified driver could not be loaded due to system error 998 (Oracle in Oracle_HOME)
    The report runs fine otherwise.
    Regards,
    Bill Chadbourne

    I have the following in my WHEN-BUTTON-PRESSED trigger:
    CLIENT_HOST('cmd /c "C:\Program Files\Jeff-Net Report Runner Viewer\JNRRE.EXE" jnreport=H:\OC\Computer Services\Oracle Database\DFACrystalReports\EPA_PTS\COST_RECOVER.RPT jnid=rs_ray jnpassword=rs_ray') ;
    When I click the button I receive:
    Logon failed.
    Details: IM003:Specified driver could not be loaded due to system error 998 (Oracle in Oracle_HOME)
    If I change the trigger text to:
    CLIENT_HOST(' cmd /c "C:\Program Files\Jeff-Net Report Runner Viewer\JNRRE.EXE jnreport=H:\OC\Computer Services\Oracle Database\DFACrystalReports\EPA_PTS\COST_RECOVER.RPT jnid=rs_ray jnpassword=rs_ray" ') ;
    (From the CMD window) 'C:\Program' is not recognized as an internal or external command, operable program or batch file.
    I would rather not use a .bat file, if possible.
    Regards,
    Bill Chadbourne

  • Passing Value from Crystal Report (special function) to Business View parameter

    Friends,
                 Í have a scenario where i need to pass value from Crystal Report to a Business view's parameter.
    Eg : CurrentCEUsername (func in crystal report)-- gives login user  which i should pass to parameter in a Business view (used in the same report).
    Will be able to explain more if required.
    Thanks in Advance,
    Bharath

    I guess you got the picture wrong.  User_id is not a report_level parameter .
    In Data Foundation, below query is used..
    select Acc_Number, Account_Group,User_id  from Accounts where user_id={?User_id}
    where in {?User_id}  is the BV parameter...
    The Filter was a solution. But it takes long time to Query all the data from DB and then filter at BV level.
    How do i pass the CurrentCEUsername to {?User_id}
    Value should ve CurrentCEusername always. so that query will be
    select Acc_Number, Account_Group,User_id  from Accounts where user_id=CurrentCEusername
    It will restrict the data pulled from DB to BV .. right?

Maybe you are looking for