locked
Crystal Report's CrystalReportViewer doesn't work on SharePoint site RRS feed

  • Question

  • Hi,

    I tried to place crystal report's (Crystal Report for VS 2005) CrystalReportViewer control to the sharepoint webpart. When I bind data by:

    ReportDocument.SetDataSource( DataSet dataSet )

    I get this message:

    CrystalDecisions.CrystalReports.Engine.DataSourceException: Unknown Query Engine Error Error in File C:\WINDOWS\TEMP\Customer {E6CF813B-0A4B-4A60-8113-05E6E850454C}.rpt: Unknown Query Engine Error ---> System.Runtime.InteropServices.COMException (0x800002C2): Unknown Query Engine Error Error in File C:\WINDOWS\TEMP\Customer {E6CF813B-0A4B-4A60-8113-05E6E850454C}.rpt: Unknown Query Engine Error at CrystalDecisions.ReportAppServer.Controllers.DatabaseControllerClass.ReplaceConnection(Object oldConnection, Object newConnection, Object parameterFields, Object crDBOptionUseDefault) at CrystalDecisions.CrystalReports.Engine.Table.SetDataSource(Object val, Type type) at CrystalDecisions.CrystalReports.Engine.ReportDocument.SetDataSourceInternal(Object val, Type type) --- End of inner exception stack trace --- at CrystalDecisions.ReportAppServer.ConvertDotNetToErom.ThrowDotNetException(Exception e) at CrystalDecisions.CrystalReports.Engine.ReportDocument.SetDataSourceInternal(Object val, Type type) at CrystalDecisions.CrystalReports.Engine.ReportDocument.SetDataSource(DataSet dataSet) at SPPortal.Reports.PrintJunketStatementReport.ConfigureCrystalReports() at SPPortal.Reports.PrintJunketStatementReport.OnInit(EventArgs e) at System.Web.UI.Control.InitRecursive(Control namingContainer) at System.Web.UI.Control.AddedControl(Control control, Int32 index) at System.Web.UI.ControlCollection.Add(Control child) at SPPortal.Controls.PPWebPartSimple.CreateChildControls()

    When I try same stuff on normal asp.net page (not sharepoint) everything works well.
    I don't know if this is problem from Crystal Report or Sharepoint, but I think there is no reason it shouldn't work.

    Thanks for help...

    Tomas
    Friday, June 1, 2007 7:40 AM

All replies

  • this problem from crystal report side.

    rebuild rpt file or change file name and check your code and check parameters if you using it.

     

     

    Monday, June 4, 2007 1:17 PM
  • This is not problem for only one my report. I tried other example, which works outside sharepoint - same behavior...
    Monday, June 4, 2007 2:53 PM
  • I am getting the 'Unknown Query Engine Error' as well and as I was writing up my addition info, I solved the problem!! The main problem is to do with code access security.  You will need to modify your policy configuration file in C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\CONFIG\

     

    Add the following CodeGroup near the bottom near the CodeGroup with name Microsoft_Strong_Name and Ecma_Strong_Name.

     

    <CodeGroup class="UnionCodeGroup" version="1" PermissionSetName="FullTrust" Name="Crystal_Strong_Name" Description="This code group grants code signed with the Crystal Reports strong name full trust. ">
     <IMembershipCondition class="StrongNameMembershipCondition" version="1" PublicKeyBlob="0024000004800000940000000602000000240000525341310004000001000100f1191170c753924fe8b624c15216d8d4869e4f37d0e7941b77c05c67ba0662a7ad9099e1041739a3b1f33255c4f8c878649a558b7aaef8e08c7ce3edc2275cbda2608381813fc038db8e5792a729658c59e73121691f22197aa92c7e715d7dfdbb2730b037ccdfcd2708fbfc8c9a1a60be50c635975afce4e4b1e3e12613cfc2" />
    </CodeGroup>

    Note the public key blob was determined by running the command:

     

      sn -Tp crdb_adoplus.dll

     

    in C:\Program Files\Common Files\Business Objects\2.7\bin\

     

    After making your CAS changes (be sure to reset IIS), your error might change to something like:

     

    CrystalDecisions.CrystalReports.Engine.LoadSaveReportException: Access denied.
    Error in File E:\temp\EncountersReport {36809C11-BDF1-4326-A1C8-426C30D71602}.rpt:
    Access to report file denied. Another program may be using it. ---> System.Runtime.InteropServices.COMException (0x80000220): Access denied.
    Error in File E:\temp\EncountersReport {36809C11-BDF1-4326-A1C8-426C30D71602}.rpt:
    Access to report file denied. Another program may be using it.

     

    If this is the case, you will want to ensure the service account running has proper ACL permissions to the TMP directory. I used filemon to diagnose that.

     

    Phil Bolduc

    Vancovuer, BC

    MSDN Canada Code Awards Team winner 2007

    http://msdn.microsoft.com/canada/codeawards5/winners.aspx

    Friday, August 3, 2007 9:30 PM
  • Hi, Phi Bolduc

    I have the same problem but I couldn't understand your solution can you explain me step by step and explain more
    Tuesday, August 18, 2009 10:30 AM
  • I am getting the 'Unknown Query Engine Error' as well and as I was writing up my addition info, I solved the problem!! The main problem is to do with code access security.  You will need to modify your policy configuration file in C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\CONFIG\

     

    Add the following CodeGroup near the bottom near the CodeGroup with name Microsoft_Strong_Name and Ecma_Strong_Name.

     

    <CodeGroup class="UnionCodeGroup" version="1" PermissionSetName="FullTrust" Name="Crystal_Strong_Name" Description="This code group grants code signed with the Crystal Reports strong name full trust. ">
     <IMembershipCondition class="StrongNameMembershipCondition" version="1" PublicKeyBlob="0024000004800000940000000602000000240000525341310004000001000100f1191170c753924fe8b624c15216d8d4869e4f37d0e7941b77c05c67ba0662a7ad9099e1041739a3b1f33255c4f8c878649a558b7aaef8e08c7ce3edc2275cbda2608381813fc038db8e5792a729658c59e73121691f22197aa92c7e715d7dfdbb2730b037ccdfcd2708fbfc8c9a1a60be50c635975afce4e4b1e3e12613cfc2" />
    </CodeGroup>

    Note the public key blob was determined by running the command:

     

      sn -Tp crdb_adoplus.dll

     

    in C:\Program Files\Common Files\Business Objects\2.7\bin\

     

    After making your CAS changes (be sure to reset IIS), your error might change to something like:

     

    CrystalDecisions.CrystalReports.Engine.LoadSaveReportException: Access denied.
    Error in File E:\temp\EncountersReport {36809C11-BDF1-4326-A1C8-426C30D71602}.rpt:
    Access to report file denied. Another program may be using it. ---> System.Runtime.InteropServices.COMException (0x80000220): Access denied.
    Error in File E:\temp\EncountersReport {36809C11-BDF1-4326-A1C8-426C30D71602}.rpt:
    Access to report file denied. Another program may be using it.

     

    If this is the case, you will want to ensure the service account running has proper ACL permissions to the TMP directory. I used filemon to diagnose that.

     

    Phil Bolduc

    Vancovuer, BC

    MSDN Canada Code Awards Team winner 2007

    http://msdn.microsoft.com/canada/codeawards5/winners.aspx

    In web.config of wss change <trust level="Full" originUrl="" />

     

     

     


    Gleisson Ricardo Pinheiro [MSP] - Moderador DotNetRaptors
    Tuesday, April 5, 2011 2:41 PM