Crystal Reports (Web Viewer) Configuration Problem

Hi,
I am trying to show a simple report via JSP. But it gives an error that I could not understand. I think it is related with configuration files. Any recommendations would be helpful!
The error's print stack trace and my configuration file's contents are below.
Thanks in advance.
[15.04.2005 11:11:09:570 EEST] 200a3132 WebGroup E SRVE0026E: [Servlet Error]-[Failed to setup the formula service!]: com.crystaldecisions.sdk.occa.report.lib.ReportSDKException: Failed to setup the formula service!---- Error code:-2147467259 Error code name:failed
     at com.crystaldecisions.sdk.occa.report.lib.ReportSDKException.throwReportSDKException(Unknown Source)
     at com.crystaldecisions.reports.reportengineinterface.JPEReportSource.<init>(Unknown Source)
     at com.crystaldecisions.reports.reportengineinterface.JPEReportSource.a(Unknown Source)
     at com.crystaldecisions.reports.reportengineinterface.JPEReportSourceFactory.createReportSource(Unknown Source)
     at org.apache.jsp._deneme._jspService(deneme.jsp :4)
     at com.ibm.ws.webcontainer.jsp.runtime.HttpJspBase.service(HttpJspBase.java:89)
     at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
     at com.ibm.ws.webcontainer.jsp.servlet.JspServlet$JspServletWrapper.service(JspServlet.java:344)
     at com.ibm.ws.webcontainer.jsp.servlet.JspServlet.serviceJspFile(JspServlet.java:669)
     at com.ibm.ws.webcontainer.jsp.servlet.JspServlet.service(JspServlet.java:767)
     at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
     at com.ibm.ws.webcontainer.servlet.StrictServletInstance.doService(StrictServletInstance.java:110)
     at com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet._service(StrictLifecycleServlet.java:174)
     at com.ibm.ws.webcontainer.servlet.IdleServletState.service(StrictLifecycleServlet.java:313)
     at com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet.service(StrictLifecycleServlet.java:116)
     at com.ibm.ws.webcontainer.servlet.ServletInstance.service(ServletInstance.java:283)
     at com.ibm.ws.webcontainer.servlet.ValidServletReferenceState.dispatch(ValidServletReferenceState.java:42)
     at com.ibm.ws.webcontainer.servlet.ServletInstanceReference.dispatch(ServletInstanceReference.java:40)
     at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.handleWebAppDispatch(WebAppRequestDispatcher.java:983)
     at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.dispatch(WebAppRequestDispatcher.java:564)
     at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.forward(WebAppRequestDispatcher.java:200)
     at com.ibm.ws.webcontainer.srt.WebAppInvoker.doForward(WebAppInvoker.java:119)
     at com.ibm.ws.webcontainer.srt.WebAppInvoker.handleInvocationHook(WebAppInvoker.java:276)
     at com.ibm.ws.webcontainer.cache.invocation.CachedInvocation.handleInvocation(CachedInvocation.java:71)
     at com.ibm.ws.webcontainer.cache.invocation.CacheableInvocationContext.invoke(CacheableInvocationContext.java:116)
     at com.ibm.ws.webcontainer.srp.ServletRequestProcessor.dispatchByURI(ServletRequestProcessor.java:186)
     at com.ibm.ws.webcontainer.oselistener.OSEListenerDispatcher.service(OSEListener.java:334)
     at com.ibm.ws.webcontainer.http.HttpConnection.handleRequest(HttpConnection.java:56)
     at com.ibm.ws.http.HttpConnection.readAndHandleRequest(HttpConnection.java:618)
     at com.ibm.ws.http.HttpConnection.run(HttpConnection.java:439)
     at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:672)
Crystal-config.xml
<?xml version="1.0" encoding="utf-8" ?>
<crystal-configuration>
     <shared-location>
          <crystal-jar-location>C:\Program Files\Common Files\Crystal Decisions\2.5</crystal-jar-location>
     </shared-location>
     <build-language>
          en
     </build-language>
     <build-number>
          10
     </build-number>
</crystal-configuration>
CrystalReportEngine-config.xml
<?xml version="1.0" encoding="utf-8"?><CrystalReportEngine-configuration>
<reportlocation>../..</reportlocation>
<timeout>10</timeout>
<keycode>A2960-01C00EA-00000YK</keycode></CrystalReportEngine-configuration>
helloworld.jsp (code part)
    String report = "helloWorld.rpt";
    IReportSourceFactory2 rptSrcFactory = new JPEReportSourceFactory();
    IReportSource reportSource = (IReportSource) rptSrcFactory.createReportSource(report, request.getLocale());
    CrystalReportViewer viewer = new CrystalReportViewer();
    viewer.setReportSource(reportSource);
    viewer.refresh();
    viewer.processHttpRequest(request, response, getServletConfig().getServletContext(), out);
    viewer.dispose();//-----------------------------------------------------------
I use WepSphere, Crystal Reports 10.
My web project folder hierarchy:
/WebContent/WEB-INF/classes/Crystal-config.xml
/WebContent/WEB-INF/classes/CrystalReportEngine-config.xml
/WebContent/crystalreportviewers10/
/WebContent/helloworld.jsp
/WebContent/helloworld.rpt
Any information would be greately appreciated!!
Thanks,
Ismail.

Hi,
Yes I have copied all the far files into web-inf/lib directory. I think .jar files are not the problem. But I can try any proposal about this. Because I have to solve this problem.
If you have any idea please tell me.
isturk.

Similar Messages

  • Parenthesis in a parameter throws error in Crystal Reports Web Viewer.

    The application that I am working on is passing 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 following 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.... and we cannot avoid parenthesis.
    It works without any error in the actual crystal report developer.
    Is this some kind of bug or is there any workaround for this.
    Version that I have:
    Crystal Report web Viewer Control 11.5
    Crystal Developer 11.0.0.1282
    Thank you,
    Xavier

    I figured out the answer. It was the ASCII notation for double qoutes which was confusing crystal.
    %22 is the ASCII for ", but it is then converted to %2522 which confuses crystal
    so I used HTML notation for  double quote instead of %22 and is converted to %22 , and it works fine.
    Thanks for the help anyways
    Edited by: xavier on Dec 18, 2008 4:03 PM

  • Crystal Reports Web Viewer Control Error

    I have a very odd problem that I am trying to solve.  I was able to dumb the problem down to the Crystal Report Viewer control.  I am using the control in an web user control and using that control in a web page.  The problem is that when I use the control inside a web user control I get the following error:
    A string is required here. Details: errorKind Error in File Client_Info {D911348D-2CAA-49F8-B77D-1288E7D5ABA2}.rpt: Error in formula Project_Labor_Multiplier: 'if ' A string is required here. Details: errorKind
    However, when I use the control in the page itself I do not get that error.  I have tested the report via the design/preview in the VS IDE and it works fine.  I have about 30 reports and they all fail like this if they have a formula.  If they do not have a formula, they work fine.  They do not fail on my personal development machine, but they do fail on our test server.  So this is VERY hard to identify and fix. 
    All that I know is that the formula's are causing this.  They do not occur on my development machine (win7 64-bit) and they do occur on the the test server (winServer 64-bit)... but NOT when I put the Report Viewer control directly in a page and not in a user control.   
    Odd stuff.  Not sure what is going on here.  Why would nesting the viewer control in a web user control cause this?  This was migrated from an application written in 2005.  So maybe the RPT files from 2005 are causing this?
    Any thoughts as to what might cause such an odd effect on Windows Server?  
    Any suggestions or thoughts would be very much appreciated.  This one has me stumped.
    Best regards, 
    Jon

    Hello Jon
    Some thoughts on the issue:
    The error is thrown with a 64 bit runtime, but not 32bit.  Iu2019m guessing that on your development computer, you may be testing \ running from the .NET IDE. E.g.; Cassini, which runs in 32bit process. On the server we're running in a 64bit process.
    Since it is a formula throwing the error, I wonder if you are using any Crystal Reports User Function Libraries (UFL)? If these are compiled as 32 bit, they will fail when run in a 64 bit process. Or, these libraries must be deployed in addition to the normal CR runtime. Failing that will also cause formula errors.
    Are you able to run this app from IIS on your development computer as a 64 bit process (e.g.; HTTP, not Cassini or file system)?
    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]

  • Parameters Panel empty in Crystal Reports web viewer (infoView)

    Hello experts,
    here is my situation:
    While viewing my reports, any of them, even the examples that come with installation, and I click on the button to show the Parameters Panel it just shows a blank (gray) panel....
    so then I'm unable to change any parameter like a range of dates for example, and my report shows only the information related to the parameters I choose when I was in Crystal Reports 2008 and published it.
    How could I solve this issue enabling again that panel?
    Thanks in advance,
    Carlos Henrique Matos da Silva - SAP BusinessObjects BI - Brazil.

    Hello Tracy,
    thanks for the reply.
    yes, I already have some parameters set up there as you said and I can view them while developing in Crystal Reports 2008 and I can change whenever I want......
    the issue is just when viewing in infoView, or also in the HTML preview in CR2008. In this case it shows me a panel without anything in it (gray), it's like something is missing to load it properly.
    Please advise.
    Thanks in Advance,
    Carlos Henrique Matos da Silva - SAP BusinessObjects BI - Brazil.

  • Suppress Export Option Using Crystal Reports Web Report Viewer (viewrpt.cwr

    We have an existing Crystal Report that is being displayed using the Crystal Enterprise Web Viewer (viewrpt.cwr) in a call like this: http://<servername>:8080/CrystalReports/viewrpt.cwr?id=<an id value>etc.
    When the report is displayed, the toolbar has an export icon that allows the user to export the report to PDF, Excel, etc.
    I want to suppress the export feature, but retain the print feature.  I have read the documentation that I could find on the web for this viewer and have been unable to find a way to do this.
    Does anyone know how this could be done or a different way to display the report with a different viewer that would avoid having to redesign the report itself?

    CMC is Central Management Console. Logon to CMC
    http://server:8080/businessobjects/enterprise115/admin/en/admin.cwr
    Now select the report from the folder and click on the tab Rights and click on the advanced option for the user and here Under the report you have an option "Export the report data" check the deny option for this and apply. Now this option will apply for that particular user only, if you want to apply for all the users under one group then click on advanced for that group and change the option.
    Regards,
    Raghavendra.G

  • SAP Crystal Reports data source connection problem using sap business one

    Hi,
    I m facing a problem regarding: SAP Crystal Reports data source connection problem using sap business one
    I am trying to create a Crystal report but when I try to configure a new connection it does not work.
    I select Sap Business One data source and try to complete the information required to connection but it does not list my companies databases, what is the problem?
    Our Current SAP related software details are as follows:
    OS: Windows Server 2008
    SAP B1 Version: SAP B1 9 (902001) Patch 9
    SAP Crystal Report Version: 14.0.4.738 RTM
    Database: MS SQL Server 2008 R2
    I have also added some screenshots of the issues.
    Please have a look and let me know if you have any questions or any further clarifications.
    I m eagerly waiting for a quick and positive reply.

    Hi,
    There is problem with SAP Business One date source.
    I had faced same problem, I used OLEDB Data-source, and it worked fine for me.
    So, try to use OLEDB.
    Regards,
    Amrut Sabnis.

  • U201Ccom.crystaldecisions.report.web.viewer-600,000 milliseconds timeout

    Could you please help me as I am getting the following error when I run the report fro GUI.
    I am using the CR10 on UNIX env and Webshere.
    u201Ccom.crystaldecisions.report.web.viewer.ReportExportControl The request timed out because there has been no reply from the server for 600,000 millisecondsu201D
    But when i ran the same report from Crystal Manaagement console - It works fine.
    Please help me

    Could you please help me as I am getting the following error when I run the report fro GUI.
    I am using the CR10 on UNIX env and Webshere.
    u201Ccom.crystaldecisions.report.web.viewer.ReportExportControl The request timed out because there has been no reply from the server for 600,000 millisecondsu201D
    But when i ran the same report from Crystal Manaagement console - It works fine.
    Please help me

  • Crystal Reports 2008 viewer, print function, Comunication error

    I installed cr2008 on a web server and isntalled sp0
    if I bring up a reprot in smartviewer from a client it works and I can print
    once I installed sp1, sp2 and or sp3 for crystal reports 2008 the print button in crystal reports viewer gives an error when I click the print button.
    If I remove and re-isntall cr2008 and just installed sp0 the print button works again
    Is there a fix to make the print button work in crystal reports smart viewer once sp1 or above have been installed
    thank you
    ted

    Translating the error message on bablefish I get:
    Mistake with the store of the data bank information. Mistake in the file Report {C6512421-348A-4621-B1ED-895D28646A0A} .rpt
    Which I'm sure is not 100% accurate, but it gives a good hint. As well, because of this:
    "Do I need to install an additional / diffrent runtime than 2008 Runtime"
    I wonder how you installed the CR 12 runtime on that computer? For more info on CR runtimes, see [this|https://wiki.sdn.sap.com/wiki/display/BOBJ/CrystalReportsforVisualStudio.NETRuntimeDistribution-Versions9.1to12.0] wiki.
    If my suggestion above does not help, make sure the Win\temp directory can be accessed buy the application. Crystal Reports runtime needs to write and read files from the temp directory.
    Ludek

  • Error Crystal report When viewed through SAP B1

    Dear Experts
    SAP B1 8.8 PL 16,SQL 2008
    I am facing error (Unable to retrive data from database)(Vendor code-156) while accessing Crystal report from client machine throgh SAP B1.I have imported Crystal report through manage layout.The crystal reported is in shared in SAP server B1 SHR folder.I am able to access data from crystal report when viewed otherwise.When accessed crsytal report through SAP b1 on SAP Server crystal report is working fine.
    Thanks & Regrds
    Saurabh Lamba

    Hi Saurabh Lamba,
    Go To Administration / System Initialisation / Authorisation / General Authorisation & Set Authorisation for user.
    If you have to Set Authorisation for user allready then follow this steps.
    1.Restore Database as Test Company.
    2.Export Report From Live Company.
    3.Import this Report in Test Company as different name.
    4.Export Report from Test Company have you Imported as deifferent name.
    5.Again Import this Report in Live company as different name
    I don't know what's the logic behind it.
    Thanks,
    Srujal Patel

  • Barcode not displaying/printing in Crystal Report java viewer

    We have written a Crystal report (in Developer XI release 2 with service pack 4 installed) which produces barcode labels.  The barcodes are Code 39 barcodes and are generated by printing the string \*data_field\* in a Code 39 barcode font.  The asterisk is the character used for the Code 39 start/stop sequence in the barcode font.
    In Developer everything works fine and prints out and scans correctly. When we make the report available to our end users in the Crystal Reports java viewer all we get where the barcode should appear is white space on screen or when we print.  (The rest of the report behaves correctly). 
    We have tried a few things and have found that if both asterisks or the starting or ending asterisk is left in a different font (i.e. not the barcode font) then the rest of the string displays and prints in the barcode font.  (unfortunately without bot asterisks you don't get a scanable barcode).
    Has anyone got any suggestions on how to fix this?
    (In case it might be relevant the barcode font we are using is this one: http://www.barcodesinc.com/free-barcode-font/)
    Thanks
    Trevor

    Hello Ludek,
                    I have found that the issue is caused by the bold attributes of my field.
                    You can try the following and you should encounter the same issue:
                                    - Create a Report
                                    - Create a formula with many characters
                                    - Put you field in Times New Roman bold 8.
                    The following Font Size in  Times New Roman are in issue: 5 u2013 8 u2013 11- 14
                    The following Font Size in  Arial are in issue: 8 u2013 11 u2013 12 u2013 14
    Thank you.
    Charles
    Edited by: Charles Gagnon on May 2, 2011 5:38 PM

  • Crystal Report Activex Viewer Control

    <p>&#160;</p><p>Our users are prompted to download: Crystal Report Activex Viewer Control -- when trying to view reports. Since they do not have Admin rights on their PC, they are unable to install this Activex Control. Is there a setup file available someplace that can deployed to the user&#39;s pc that would intsall the activex control?</p><p>Any help would be appreciated.</p><p> Thanks,</p><p>Anupam</p>

    http://support.businessobjects.com/communitycs/technicalpapers/cr_troubleshooting_activex_viewer.pdf
    says
    bq.
    Manual installation
    To manually install the ActiveX Viewer on the client computer:
    1. Copy the ActiveXViewer.cab file from the server to the client computer, and extract its contents to a temporary folder.
    2. Move the files Crviewer.dll, Crviewer9.dll, Sviewhlp.dll, and Swebrs.dll to the System32 folder. Keep this folder visible.
    3. On the Start menu, click Run. The Run dialog box appears.
    4. In the Open box, type âu20ACu0153regsvr32âu20AC and then drag and drop the Crviewer.dll file icon from the System32 folder onto the Run dialog box.
    5. Click OK.
    6. Repeat steps 3 and 4 for the files Crviewer9.dll, Sviewhlp.dll, and Swebrs.dll.
    But I haven't tried it myself yet. I have so much crystal stuff on my PC. I'm going to set up a virtual PC that has never had crystal and see if it works.

  • Cannot load report from server in Crystal Reports 2013 Viewer

    Hello,
    I am having trouble opening a report that is hosted on a Crystal Reports Server (2013) from the Crystal Viewer.  I've created and uploaded the reports using the report designer (version 2013).  The reports have been uploaded using the "Save As -> Enterprise" to save to my enterprise server.  This part works fine.  I then navigated to the Crystal Reports Viewer to open my report (that I just uploaded w/ the designer) from the server.  Depending on the report, one of two things happens:
    1.) I get a loading bar at the bottom right of the screen that says "Operation in progress . . ." followed by an error message:
    Unable to Refresh Report
    A problem occurred while refreshing on the server. The report may not be configured properly for refresh.
    Please contact your server administrator. (me)
    2.) I get a loading bar at the bottom right of the screen that says "Refreshing <file name of the report> (<server name>)" followed by... nothing.  The loading bar goes away and nothing happens.  It goes back to the screen that shows when the application first loads (blank canvas).
    I've taken some basic troubleshooting steps to try and rule out any potential issues that came to mind, but I've not been successful.
    Any help would be appreciated, thanks!

    Hi
    Check the below thread
    Crystal Reports 2013 data didn't refresh using OLE DB Provider for SQL Server
    With Regards
    Balaji Sampath

  • Crystal Report JRC and JNDI problem

    I need to convert one of our internal web application from using Crystal Report Server 10 RAS to using Crystal Report XI Java Component (JRC). I found several examples from SAP/BusinessObjects but am stuck with a database connectivity problem.
    The basic enviornment info:
    JBoss 4.0.3 SP1
    Crystal Report JRC XI
    Windows XP/Server 2003
    JDK 1.5.x
    MS SQL Server 2005
    The error I am getting is "Error finding JNDI name (xxx)", although the application is already using the same JNDI and was able to display data on the web.
    I added debug code:
                    Context initialContext = null;
                    try {
                        initialContext = new InitialContext();
                        DataSource ds = (DataSource) initialContext.lookup("java:MYAPP");
                        String t = ds.toString();
                        log.debug(t);
                    } catch (NamingException e) {
                        log.error(e);
    I was able to get the data source successfully. The actual report file uses JDBC with JNDI named as "MYAPP". When I call the viewer, it gives
    Error finding JNDI name (MYAPP)
    message.
    Any comment or help would be appreciated.
    Thanks.

    How are you setting your connection info?
    This is what we do:
    IConnectionInfo connectionInfo = new ConnectionInfo();
    PropertyBag propertyBag = new PropertyBag();                    
    propertyBag.put("JNDI Datasource Name", reportJndiName);
    propertyBag.put("Database DLL", DATABASE_DLL); // required!!! (but we don't actually provide a DLL, or even run in windows)
    connectionInfo.setAttributes(propertyBag);
    connectionInfo.setKind(ConnectionInfoKind.SQL);
    ConnectionInfos connectionInfos = databaseController.getConnectionInfos(null);
    IConnectionInfo oldConnectionInfo = connectionInfos.getConnectionInfo(0);
    databaseController.replaceConnection(oldConnectionInfo, connectionInfo, null, DBOptions._useDefault );

  • 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

  • Crystal Report + Web Services Security Help!

    Hello all,
    I am trying to design a Crystal Report (using CR XI 2 and/or CR 2008) and using a web service as a data source.  I've developed the web service in .NET and have control over the IIS directory it is hosted on.  I've set the authentication for the folder with "Anonymous Access" turned off and Integrated Windows Authentication.
    I'd like Crystal to pass the current user id (NT Id) over to the web service when the report is created.  My web service will take the user id and return only the data that the user is allowed to view (security is all in the web service).
    The problem I am having is after setting up my connection in Crystal Designer, when I click preview, I am getting an unauthorized (401) error. 
    It seems that CR isn't passing any type of user credentials to IIS.  Does anyone know if there is a way to do this so I can test this in the designer?
    Thanks!

    Nope, nothing yet.  The problem seems to be that Crystal doesn't currently allow SSO or the SSO credentials to be passed through to IIS.  Therefore, IIS never gets any security tokens for validation.  Maybe you can do this with an SDK?  I don't know.
    The only half solutions I can think of are:
    1.  Allowing "Anonymous Access" authentication to your web service on IIS.  The downside is that the user token doesn't get passed through, so if you are looking to use the current user security context, you're outta luck.  You'll get the impersonated IIS account instead.
    2.  Hosting your crystal report file behind IIS in your vritual directory.  I think this works since by the time you get to the report, it has already been authenticated via IIS.  However, you don't get the luxury of the BOE servers.
    So sadly, no answer yet.  I've decided to just code everything into my stored procedures as I am short on time.  It seems odd that CR doesn't seem to support this yet, but who knows what the future holds
    If you find anything out, please let me know.  Thanks!

Maybe you are looking for

  • Problems starting Server on OSB 11g

    Hi Everybody, I have a problem, I just installed the Service Bus 11g on Red Hat and I have problems when I start the server. I particular first I start the Admin_Server without any exception and then I start the Server but I get this excedption: PATH

  • ABAP business system vs. 2 integration systems - using proxy

    Hi guys, is it possible to use one abap ECC with 2 PI systems and using proxy classes for both PIs? Thanks

  • Global Catalog binding thru JNDI

    Hi, Has anyone tried binding to the Global Catalog thru JNDI, if Yes can you send some pointers on how to achieve it. TIA, Raj.

  • C code with developer 6i

    hi i want to design seven segment LEDs which should get an input from developer forms and display a number on LED attached at printer port. since C code need to be run for that . can i embed C code with the developer 6i forms to fullfill teh task reg

  • The New E65 is Officially Announced

    There has appeared the info with the status official on the new Nokia E-series smartphone. It features GSM/3G networking (GSM 850/900/1800/1900 and WCDMA 2100), Wi-Fi adapter, Series 60 v3.0 platform and a high resolution display for the most comfort