Crystal Report Windows Form Viewer - Error in compiling SQL Expression

I am using C# and the Crystal Reports API to render reports in a windows application. Recently we decided to start using SQL Expressions in our reports. The reports developers are able to use them in development, but as soon as we deploy the reports to production, we are seeing the following error.
Why does this work when developing forms but not when using the C# API?

Hi Adam
I pinged couple of people here, but so far have not got a reply. I'll update this post as soon as I get anything.
- Ludek
Senior Support Engineer AGS Product Support, Global Support Center Canada
Follow us on Twitter

Similar Messages

  • Crystal Report Windows Forms Viewer Error in 1 Workstation after upgrade of PL

    Hi all,
    We just upgraded SAP from 8.82 PL02 to 8.82 PL15.
    Afterwards, in just 1 workstation, Crystal Reports layouts have Crystal Report Windows Forms Viewer error I attach.
    Before the upgrade this error did not happen.
    No permissions or authorizations were changed  in the workstation.
    The Crystal Reports layouts remain working fine in server and in the other workstations.
    In the workstation following are installed:
    - Operating System Windows 7;
    - Microsoft .NET Framework 4.5;
    - SAP Crystal Reports runtime engine for. NET Framework;
    - Crystal Report 2008 Runtime SP6;
    - Microsoft SQL Server 2008 R2 Native Client.
    All, but the operating system, are equal to the other workstations.
    User has edit access to SAP folders, temp and access to the attach path.
    We already uninstalled SAP client and client agent and re-installed it but with no avail.
    Can anyone help me?
    Thanks in advance.
    Best regards,
    Pedro Mariano

    Hi San Xu,
    Thank you for your input.
    However I'm facing problem with each software is suitable.
    I installed SAP Crystal Reports for SAP Business One (CR 2011 V14.0.4.738), but with no avail.
    Thanks in advance.
    Best regards,
    Pedro Mariano

  • Crystal report windows forms viewer - error in file

    I am using visual basic - visual studio 2005 with crystal reports version 11.5 and am getting the following error when deploying to a windows 7 32 bit machine
    Error in file
    c:\users\username\appdata\local\temp\tempmanynumbersandcharacters.rpt
    The request could not be submitted for background processing.
    All six reports for this application give the same error.  There is not a problem when it is deployed to a windows xp machine.  I have three other applications that do not have problems in windows xp or windows 7 32 bit.  I can't see any difference between these three apps and the one have a problem in windows 7.
    Thanks,
    Jay

    You do not mention if you searched the forums and the Kbase for the error... Using the search box in the top right corner of this web page will return KBases, Blogs, Wikis, articles and more. The following article should have been returned with a simple search;
    [Causes of "Background Processing" error|http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/50a6f5e8-8164-2b10-7ca4-b5089df76b33]
    See if it helps. If not, do a few searches as there may be other reasons not documented in the articles.
    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]

  • Crystal Report Windows Forms Viewer error: "The field name is not known"

    Hi,
    My report runs fine in the Crystal Reports viewer.  When we try to view the crystal report through a piece of 3rd party software, I start to get errors in a few of my formulas indicating that "the field name is not known".  I can clearly see that the field is in my crystal report.  Has anyone else had this problem?  Any ideas on what might be happening?
    Thank you.

    Just to provide some further clarification on my problem:
    The "field name is not known" error seems to be occurring only in a few formulas where I have a statement like this:
    if ISNULL({somefieldfromdatabase}) Then
    I've used this for many other formulas and not had an issue with them.  I've verified that the database and the stored procedure contain this field.

  • Crystal Report Windows Forms Viewer problems - table could not be found

    Hi,
    I installed Crystal Report Viewer in SAP Business One 2007. All the while, I can run the reports without any problem. but when I loaded some of the new report, it gives me the following error message:
    the caption says: "Crystal Reports Windows Forms Viewer"
    the message says: "The table 'paymentVoucher' could not be found.
    Error in file C:\...paymentVoucher.rpt. The table could not be found."
    By the way, I can run the report in another workstation.
    Any help or ideas of why this is happening or how to solve this will be greatly appreciated.
    Thanks in advance.

    The report is not created by me. I just help others to transfer the report from one workstation to another workstation. PaymentVoucher is a view in the database and it is being put at a workstation that can be shared by everyone.
    I've go through other forums and found out that it might be permission issues and now managed to solve the problem already.
    Thanks everyone for the advice.

  • Crystal Report Windows Forms Viewer - No Error Popup

    Similar to this post:  Error message that says "No Error" from CR Viewer, I have just upgraded by Application to .net 4.0 and Crystal Reports 2010. The report viewer works fine the first time a report is loaded, but when I change the parameters on the report, and put the updated report back into the report viewer, I get the message shown above.  The report does not change its parameters and the updated report is not displayed.  The code in question is setting the date parameters for the report.  The user can select new date parameters from the form that encloses the report viewer.  The code subclasses the Report Object code to add additional functions through interfaces.  The IDateRange interface provides a starting and ending date range for the report using a property on the report class as follows:
        Public Property EndingDate() As Date Implements IDateRange.EndingDate
            Get
                Return _endingDate
            End Get
            Set(ByVal value As Date)
                _endingDate = value
                Me.SetParameterValue("EndingDate", value)
            End Set
        End Property
    In addition, the immediate Window shows the following message:
    A first chance exception of type 'System.Runtime.InteropServices.COMException' occurred in CrystalDecisions.CrystalReports.Engine.dll
    The code in the Report Viewer looks like this, see line marked in blue for when pop-up appears:
    ''' <summary>
    ''' Sets the report period and displays it.
    ''' </summary>
    ''' <param name="Report">The Report.</param>
    ''' <param name="Refresh">if set to <c>true</c> force a refresh.</param>
    Private Function PFSetReportPeriod(ByVal Report As Object, Optional ByVal Refresh As Boolean = True) As Boolean
        Dim fld As FormulaFieldDefinition
        Dim bRefresh As Boolean = False
        Dim rpt As ReportClass = CType(Report, ReportClass)
        Try
            If CRV.ReportSource IsNot Nothing Then
                rpt = CType(CRV.ReportSource, ReportClass)
            End If
    If TypeOf rpt Is IDateRange Then
        With DirectCast(rpt, IDateRange)
    .        StartingDate = dtpFromDate.Value
    .        EndingDate = dtpToDate.Value
        End With
        SetTitleLine2(DirectCast(Report, ReportClass), bRefresh)
        bRefresh = True
    Else
        If TypeOf rpt Is ReportClass Then
           fld = rpt.DataDefinition.FormulaFields("FromDate")
           If Not fld Is Nothing Then
                fld.Text = "Date(" & dtpFromDate.Value.Year & "," & dtpFromDate.Value.Month & "," & dtpFromDate.Value.Day & ")"
                bRefresh = True
            End If
            fld = rpt.DataDefinition.FormulaFields("ToDate")
            If Not fld Is Nothing Then
                fld.Text = "Date(" & dtpToDate.Value.Year & "," & dtpToDate.Value.Month & "," & dtpToDate.Value.Day & ")"
                bRefresh = True
            End If
            SetTitleLine2(rpt, bRefresh)
        End If
    End If
        If Refresh And bRefresh Then
            If dtpToDate.Value <> CDate(dtpToDate.Tag) OrElse _
               dtpFromDate.Value <> CDate(dtpFromDate.Tag) Then
                    System.Windows.Forms.Application.DoEvents()
                If CRV.Visible Then CRV.ReportSource = rpt ' The popup appears when this statement is executed.
                If CRV.Visible = True Then CRV.Refresh()
                dtpToDate.Tag = dtpToDate.Value
                dtpFromDate.Tag = dtpFromDate.Value
               Return True
            End If
        End If
    Catch ex As Exception
        DisplayException(ex)
    End Try
    Return False
    End Function

    Problem has been resolved.  I downloaded Support Pack 8 (v.13.0.8.1216) from this location.  I then applied the fix from the entry above:
    With CRV ' Report Viewer Control
        If .Visible Then
            If .ParameterFieldInfo IsNot Nothing Then .ParameterFieldInfo.Clear()
            .ReportSource = rpt
            .Refresh()
        End If
    End With
    And no more annoying "No Error" messages.

  • Error Crystal Report Windows Forms Viewer in Windows 8.1

    As you can see from the picture I get this error when trying to load the report anyone have any suggestions?, This happens with windows 8 on windows 7 I have no problems with the application

    Hi,
    The error is not having connection to the database, the error is that it can not open the temporary file that Crystal Report generates before opening the report but it only gives the error when running on Windows 8, Windows 7 not same program fails.
    It conect to a MySql database using. Net Framework Data Provider for MySQL in a 32 Bits

  • Error in compiling SQL Expression

    In the [Error in SQL Expression; thread, Kurt Reinhardt wrote "Please note, a SQL Expression can only return a single, distinct value per each record in the main recordset.", I tried this where my main Record Selection's SQL query is:
    {GLF_LDG_ACC_TRANS.ldg_name} = {@&CH_LDG_GL_ACT_CURR} and
    {GLF_LDG_ACC_TRANS.period} = {@&CH_PERIOD_GL_CURR} and
    {GLF_LDG_ACC_TRANS.ACCNBRI}  "99991103" and
    {GLF_LDG_ACC_TRANS.DOC_REF1}  "{%SundryCreditors}" and
    {GLF_LDG_ACC_TRANS.DOC_TYPE} = "$APINVCE"
    My SQL Expression %SundryCreditors is:
    select doc_ref1
    from glf_ldg_acc_trans
    where ldg_name = 'APLED09'
      and period = "GLF_LDG_ACC_TRANS"."PERIOD"
      and doc_ref1 = "GLF_LDG_ACC_TRANS"."DOC_REF1"
      and accnbri like 'SUNDRY%'
    which essentially queries the same table as the main recordset using the same key fields, and returns one row only. However, when I click on the Check button in the Formula Workshop window, I get the error message "Error in compiling SQL Expression : Database Connection Error: '42000:MicrosoftODBC SQL Server DriverSQL ServerIncorrect syntax near the keyword 'select'. Database Vendor Code: 156 '".
    Do you know what is my issue?

    If you know what you're doing, you can add a full select statement into a SQL Expression... And Kurt is correct when he says that it may only return a single row of info. Don is also correct when he says that this not what SQL commands are designed for.
    Here's what's happening...
    When you link your tables in the Database Expert and drop fields onto the design surface (and optionally, add criteria to the Select Expert), CR builds out a SQL statement that can is to be sent out to the db server so that the data can be returned. You can view this SQL by going to Database > Show SQL Query...
    When you add a SQL Expression, CR inserts it into the SQL Query as another data column. This is typically done to take advantage of functions that are available in the data base but not in CR.
    A few crafty individuals, like Kurt, have figured out that you can in fact inset a full SELECT query into a SQL Expression and it will be inserted into the CR generated querie's SELECT list as a sub-query.
    Bear in mind 2 things... #1) You have to be familiar with SQL syntax, namely you have to know the proper syntax for using sub-queries in a SELECT list in your data base. #2) CR doesn't officially support is behavior and they won't offer you any help if the current functionality is removed in later versions.
    HTH,
    Jason

  • Set a timeout for crystal sessions while using the Windows.Forms.Viewer?

    Hi,
    I am looking for a way to set the timeout for the crystal report sessions when using the Windows.Forms.Viewer in a .NET application. I guess that the default value is 20 minutes (like in the entperprise installations) but we cannot afford to keep many sessions open for that long. Is there a registry entry which can be set? Or even a way to do this programmatically?
    Thank you in advance,
    Stratos

    Hi David,
    we are talking here about a standalone .NET application where the reports are installed locally (like the application itself). We are not retrieving the reports from a server. The whole thing was developed using the crystal report viewer model probably because it was easier to do so. Is there a method in this model to tell the crystal runtime to do the clean-up work either for a report (like the ReportDocument.Close() ) or for the entire runtime instance. Dispose() does not seem to help us. If you say that there is no other way than redesign then we have to consider this option also.
    Cheers
    Stratos
    PS: What I was thinking of (as Plan B instead of using the ReportDocument object model) is to instantiate the crystal report viewer object in a separate process (.exe). Please note that we open a new crystal report viewer windows for each report, which is displayed. Closing the viewer window (ie. terminate the process) will at least then clean up and release the crystal DLLs and hopefully close the database connections. Or am I missing something here?
    Edited by: Efstratios Karaivazoglou on Jul 29, 2008 10:05 PM

  • How to Call a Crystal Report from Form 6i?

    Dear All,
    Can anybody tell me how to call a crystal report, designed using Crystal Report 9, in form 6i? I tried one solution by using the host command but it was not working properly. The code I was tried is like:
         f_name varchar2(240);
         f_name :='C:\Program Files\Crystal Decisions\Crystal Reports 9\crw32.exe D:\Form16\Form16_Rep\bin\Debug\Form_16_character_emp.rpt';
                   host(f_name);
    This open the crystal report in design view. So how we call a report which run automatically like in .Net. How to pass the connection info of the database schema?
    Thanks & Regards
    Sunil

    Hi
    First see the built in run_product function.
    You can create a parameter list, add the
    "MAXIMIZE" paramter in it and then call your
    report with run_product passing your parameter list in it.
    hence the called report will be maximized.
    null

  • Crystal report add on installation error

    Hi ,
    While starting the crystal report addon  following the error is coming--> retrieving the COM class factory component with CLSID{3EBB7859-E4 E3-4D77-B ,our operting system -- windows 2003 server-- 64 bit ,
    Regards
    Naresh K

    Hi Naresh,
    You can find more information on the thread:
    SAP Business One and Crystal Reports
    There are quite few threads in 10 pages for Crystal Reports. You may post it there too.
    Thanks,
    Gordon

  • FAQ: Crystal Reports を使用した Windows フォームアプリケーションが原因でシャットダウンできない

    【タイトル】
    Tip: Crystal Reports を使用した Windows フォームアプリケーションが原因でシャットダウンできない
    【詳細/質問】
    Visual Studio がインストールされた環境にて、Crystal Reports を使用したアプリケーションを閉じる際に次のようなエラーが発生する。
    "Title: Microsoft Visual C++ Runtime Library Runtime Error!
    Program: u2026\TestReport.vshost.exe
    This application has requested the Runtime to terminate it in an unusual way.
    Please contact the applicationu2019s support team for more info."
    【対象製品】
    Crystal Rpeorts 2008
    【原因】
    レポートがXMLデータソースへの接続を行う際に crdb_xml.dll を使用します。 このDLLファイルは java.exe を呼び出しバックグランドで使用されます。 Visual Studio はJava Virtual Machine を正常に終了することができないため、反応が無くなるかもしくはエラーを発生をさせます。
    【解決策/回答】 
    レポートの使用時に XMLデータソースへの接続方法として ADO.NET(XML) を選択します。 この接続方法を使用することで、crdb_adoplus.dll が使用され当該現象を回避できます。

    Re: HELP - setting page margins doesn`t work correctly
    上記スレッド内のRASを使う方法で、一応解決致しました。
    【手順】
    参照設定に以下を追加
    CrystalDecisions.ReportAppServer.ClientDoc;
    CrystalDecisions.ReportAppServer.Controllers;
    CrystalDecisions.ReportAppServer.DataDefModel;
    CrystalDecisions.ReportAppServer.ReportDefModel;
    余白の設定を以下に変更
    CrystalDecisions.ReportAppServer.ClientDoc.ISCDReportClientDocument rcd;
    rcd = report.ReportClientDocument;
    CrystalDecisions.ReportAppServer.Controllers.PrintOutputController poc;
    poc = rcd.PrintOutputController;
    poc.ModifyPageMargins(margins.leftMargin, margins.rightMargin, margins.topMargin, margins.bottomMargin);
    poc.PrintReport(null);
    これで、通常使うプリンタに正しい余白で出力する事ができました。
    過去スレッドの探索不足でした、お騒がせして申し訳ありません。

  • PASSING PARAMETERS TO CRYSTAL REPORTS THRU FORMS!

    Hi! all,
    Is there someone who passed parameters to crystal reports from
    forms 5.0?
    The problem is when I call the report executable from the form,
    its giving a login prompt again which is not desirable as @ this
    stage the user has already logged in once. So is there a way to
    pass this as a parameter to crystal or may be any better way???
    Thanx for the solution,
    Hima
    null

    First make sure you are on SP 3:
    https://smpdl.sap-ag.de/~sapidp/012002523100007123572010E/cr2008_sp3.exe
    SP 3 msi     
    https://smpdl.sap-ag.de/~sapidp/012002523100007123592010E/cr2008sp3_redist.zip
    SP 3 msm     
    https://smpdl.sap-ag.de/~sapidp/012002523100007123582010E/cr2008sp3_mm.zip
    Have a look at [Crystal Reports for Visual Studio 2005 Walkthroughs|https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/2081b4d9-6864-2b10-f49d-918baefc7a23]
    (The above does apply to your version of CR also)
    Have a look at the samples:
    https://wiki.sdn.sap.com/wiki/display/BOBJ/CrystalReportsfor.NETSDK+Samples
    And look at the Developer Help file:
    http://help.sap.com/businessobject/product_guides/boexir31/en/crsdk_net_dg_12_en.chm
    And don't forget to use the search box at the top right corner of this web page. It will bring up KBases, blogs, wikis, articles and more. Searching these forums is also a good idea.
    - Ludek

  • Crystal Reports Active X Viewer 64-Bit

    Hi All,
    I am searching for some information regarding support of the Crystal Reports Active X viewer with 64-Bit Internet Explorer (version 8)
    We use Cyrstal Report 9, 10, 11 and 11.5 on our clients servers and have no issues with the 32 bit version of Internet Explorer (including on 64-bit operating systems). We have one client attempting to use 64 bit Internet Explorer 8 but this is not showing any reports.
    Even when having manually installed the Active X dll's it still does not work.
    Can someone advise if this set up is possible/supported?
    As I understand it, it is not possible.
    Regards
    Matthew Haines

    Hello,
    All of those versions are 32 bit only and I doubt 64 bit IE will support 32 bit ActiveX controls. No solution for you.
    Possibly moving to CR For VS 2010 and the Cr .NET assemblies may work.
    64 bit IE is not very stable and not many people use it. I suggest you recommend staying away from it at this time. Or at lease CR doesn't like it either.
    Good luck
    Don

  • Syntax Error when using SQL Expression

    Morning all,
    When I try to type any SQL Expression within Crystal I am getting syntax errors, even when I type only SELECT {field name} FROM {table name}.
    Here is the query I did which gave me the following error:
    Query
    SELECT  order_progress . date_created
    FROM order_progress
    WHERE  order_progress . order_no = order_header . order_no
    AND  order_progress . order_status =77
    ORDER BY  order_progress . date_created DESC
    Error
    Error in compiliing SQL Expression
    Database connector Error: 'HY000[Informix] [Informix ODBC Driver]General Error. Syntax Error[Database Vendor Code-11060]'.
    Now this means, 1: I am getting a connection error with my db, for no apperent reason. 2: my syntax is not approved?!
    Can someone explain why is this happening and how to resolve this?
    many thanks
    Kind Regards
    Jehanzeb

    Morning Kyle,
    Thanks for the informative answer, I have found out the formula which counts number of days however, I am not sure what you meant by the following:
    >
    Kyle McAdam wrote:
    > create a formula that does the datediff....this will be a group.
    Done this, it counts the working days as in weekdays and takes bank holidays out as well
    here is the formula:
    WhileReadingRecords;
    //{order_progress.order_status}= 77;
    //{order_header.order_status}>=77;
    Local DateVar Start := {order_header.date_entered};   // Starting Date
    Local DateVar End := {order_header.act_despatch};  // Ending Date
    Local NumberVar Weeks;
    Local NumberVar Days;
    Local Numbervar Hol;
    DateVar Array Holidays;
    Weeks:= (Truncate (End - dayofWeek(End) + 1
    - (Start - dayofWeek(Start) + 1)) /7 ) * 5;
    Days := DayOfWeek(End) - DayOfWeek(Start) + 1 +
    (if DayOfWeek(Start) = 1 then -1 else 0)  +
    (if DayOfWeek(End) = 7 then -1 else 0);  
    Local NumberVar i;
    For i := 1 to Count (Holidays)
    do (if DayOfWeek ( Holidays<i>) in 2 to 6 and
      Holidays<i> in start to end then Hol:=Hol+1 );
    Weeks + Days - Hol;
    You will then have a formula field that is evaluated to 1, if the status is 77.
    you mean second formula? How I used,
    If Order_header.Order_Status=77 then
    1
    else
    2;
    however this doesn't seem to be working.
    > Now, sum that formula in each group footer. Suppress the detail lines...
    which formula to sum up?
    > **Don't use a cross tab with this solution. For a cross tab, you would have to calculate the totals in a different manner.
    so far I used Cross tab and it is showing the right days, however not showing the correct jobs per day.
    You might be right there that it calculates the totals differently, additionally how am I suppose to get the right Percentage if using the Cross tab. The percentage should be, count of number of jobs % Total jobs.
    hence:
    {#NumofJobs} % {#Total_Jobs}
    however, when I create this formula it does not let me add that into the cross tab.
    I also need to put a subreport in my report, can I use Crosstab to contain a link to my subreport?
    Many thanks
    Kind Regards
    Jehanzeb

Maybe you are looking for

  • With Open ESB CD in hand, how do I get started?

    I spent time at the Open ESB booth at JavaOne 2007 talking with the Sun representatives and engineers about Open ESB. I'm glad I did, but I'm having a heck of a time getting started. I have all of the requirements set-up running on Solaris 10 develop

  • How to find cost element group linked to account number

    Hi all, I have following scenario. I have account number and i want to find out it's cost element group. In t-code KAH3 when i enter cost element group i get all the account number in that group. But the problem is that i have account number and i wa

  • How to use dynamic column fields in formulas

    Hi, we changed from CR 8.5 to CR XI R2. Many of our reports use dynamic queries with different count of columns. These reports are designed for the maximum count of columns. This works fine with CR 8.5 but with CR XI R2 it seems to be that if one of

  • Still images shaky

    Hello, I am new to Final Cut Express. When I use the "Freeze Frame" option to make a picture from a frame of video it makes my still images shaky. I know in other programs I have had to deinterlace my video when I did this. Do I have to do this in FC

  • J2EE Thin Client for BEA

    I need to run reports from WebLogic. I downloaded Oracle9i Reports - J2EE Thin Client (J2EE Thin Client for BEA). I am stuck on step 10 of Readme: 10. Shut down the existing Weblogic server and restart it using startExamplesServer.cmd on the command