IF Statement Help in Crystal Report

Hi
I have written a SQL Query to use in my Crystal Report but it is wrong:
IF Currency = 'ZAR'
BEGIN
(SELECT LineTotal FROM PCH1)
END
ELSE
BEGIN
(SELECT TotalFrgn FROM PCH1)
END
Basically I am wanting to create a field in the Crystal Report that checks the Price Currency (PCH1) and if a specific currency then select the relevant PCH1 Table, so if it is ZAR then LineTotal will be shown in the report, IF USD is displayed then TotalFrgn.
Not to sure how to acheive this in Crystal as I used the Crystal Syntax fields but no luck (IF, THEN, ELSE), and if I select LineTotal it will display the converted LC for the report and not the USD value.
Any Ideas?
Regards
Kurt Walters

Hi..
Check this thread you will get idea for If Condition on Crystal Report
[crystalreport variable problem.;
Regards,
Bhavank

Similar Messages

  • Need help Connecting Crystal Reports 8.5 with GBS Agency Expert 6.7.6c

    Need help Connecting Crystal Reports 8.5 with GBS Agency Expert 6.7.6c.  I need assistance on connecting these together so I can run a report.  I am not an IT person so if someone could dumb it down it would be great.
    Thanks,
    NBGHealth

    Hello,
    I assume GBS Agency Expert 6.7.6c is some sort of database or data source? If you have an ODBC driver then create or use a System DSN to the database. Then you can create a report using that DSN.
    Otherwise I suggest you contact the makers of GBS Agency Expert 6.7.6c and ask them how to connect to the database.
    Let them know CR is ANSII 92 ODBC 3 compliant.
    Thank you
    Don

  • HELP !  Crystal Report 2011 TRIAL -  Can't Open Program WITHOUT AN ERROR

    Server: windows 2008 R2
    1) Crystal Reports 2011 was installed using the Trial version.
    2) Added the trial key in the form - OK.
    3) Clicked to start Crystal Reports 2011 and a dialog box pops up:
    CRYSTAL REPORTS STOPPED WORKING
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    Problem signature:
      Problem Event Name: APPCRASH
      Application Name: crw32.exe
      Application Version: 14.0.0.760
      Application Timestamp: 4d688f61
      Fault Module Name: crw32.exe
      Fault Module Version: 14.0.0.760
      Fault Module Timestamp: 4d688f61
      Exception Code: c0000005
      Exception Offset: 00028ada
      OS Version: 6.1.7600.2.0.0.16.7
      Locale ID: 1033
      Additional Information 1: 0a9e
      Additional Information 2: 0a9e372d3b4ad19135b953a78882e789
      Additional Information 3: 0a9e
      Additional Information 4: 0a9e372d3b4ad19135b953a78882e789
    Read our privacy statement online:
      http://go.microsoft.com/fwlink/?linkid=104288&clcid=0x0409
    If the online privacy statement is not available, please read our privacy statement offline:
      C:\Windows\system32\en-US\erofflps.txt
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    FROM EVENT LOG - MORE INFORMATION
    ~~~~~~~~~~~~~~~~
    EVENT LOG
    ~~~~~~~~~~~~~~~~
    CRYSTAL REPORTS 011 - 32 Bit
    Windows 2008 R2 Statndard
    64 bit, 16 GB ram
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    Fault bucket 2445902896, type 1
    Event Name: APPCRASH
    Response: Not available
    Cab Id: 0
    Problem signature:
    P1: crw32.exe
    P2: 14.0.0.760
    P3: 4d688f61
    P4: crw32.exe
    P5: 14.0.0.760
    P6: 4d688f61
    P7: c0000005
    P8: 00028ada
    P9:
    P10:
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    Faulting application name: crw32.exe, version: 14.0.0.760, time stamp: 0x4d688f61
    Faulting module name: crw32.exe, version: 14.0.0.760, time stamp: 0x4d688f61
    Exception code: 0xc0000005
    Fault offset: 0x00028ada
    Faulting process id: 0x1be0
    Faulting application start time: 0x01cc367d04e5e87c
    Faulting application path: C:\Program Files (x86)\SAP BusinessObjects\SAP BusinessObjects Enterprise XI 4.0\win32_x86\crw32.exe
    Faulting module path: C:\Program Files (x86)\SAP BusinessObjects\SAP BusinessObjects Enterprise XI 4.0\win32_x86\crw32.exe
    Report Id: 486fd25a-a270-11e0-b215-842b2b4c199e
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    Attached files:
    C:\Users\jyanagi\AppData\Local\Temp\WERF967.tmp.WERInternalMetadata.xml
    These files may be available here:
    C:\Users\jyanagi\AppData\Local\Microsoft\Windows\WER\ReportArchive\AppCrash_crw32.exe_149624126266436fca64902e9d839546696c19_00630da2
    Analysis symbol:
    Rechecking for solution: 0
    Report Id: 486fd25a-a270-11e0-b215-842b2b4c199e
    Report Status: 0
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    The description for Event ID 1904 from source HHCTRL cannot be found. Either the component that raises this event is not installed on your local computer or the installation is corrupted. You can install or repair the component on the local computer.
    If the event originated on another computer, the display information had to be saved with the event.
    The following information was included with the event:
    about:blank
    http://go.microsoft.com/fwlink?LinkID=45840
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    APPLICATION ERROR - EventID 1000
    Faulting application name: crw32.exe, version: 14.0.0.760, time stamp: 0x4d688f61
    Faulting module name: crw32.exe, version: 14.0.0.760, time stamp: 0x4d688f61
    Exception code: 0xc0000005
    Fault offset: 0x00028ada
    Faulting process id: 0x3644
    Faulting application start time: 0x01cc367c5f8cd8b8
    Faulting application path: C:\Program Files (x86)\SAP BusinessObjects\SAP BusinessObjects Enterprise XI 4.0\win32_x86\crw32.exe
    Faulting module path: C:\Program Files (x86)\SAP BusinessObjects\SAP BusinessObjects Enterprise XI 4.0\win32_x86\crw32.exe
    Report Id: a1c2265e-a26f-11e0-b215-842b2b4c199eGet Windows Live Mail to create your own photo e-mails

    Hi,
    Thanks for your reply.  I followed the other link and it didn't help my current situation.
    Is there a link for paid support .. all I need to do is the following for a client:
    1) Install Crystal report 2011 on a Microsoft 2008 Server R2.. my error message is above.
    Resolve the error on start up of Crystal reports..
    It's already been over 1 week .. and I can't seem to get a live person on SAP that can help me... once this is resolved I think I will be ok.
    I have CR XI on running on another server with no issues.. I don't know if the above is due to a service pack issue, security issue on installation, ...  its a production server so I just want to resolve this quick.
    Any help you can give me on getting alive person that I can talk to will be greatly appreciated.
    Thank you.
    Edited by: Mitsuokbs on Jul 1, 2011 10:38 AM

  • Pls Help: View Crystal Report Via Oracle Form Builder

    Hi!!
    I want to know how to view the .rpt report (report made from Crystal Report) via Oracle Form Builder. I've to do it in my project. If you know, please tell me.
    Thanks in advance,

    I don't know how does crystal reports work, and I would guess you should ask the crystal guys to help you with this. find out if they have a command line interface that you can invoke from the host command in forms.
    We can help you do it with Oracle Reports though :-)
    http://otn.oracle.com/products/reports

  • Needed a help in Crystal Report

    Dear Experts,
    As am developing a crystal report layout for sales order in which i required a condition field columns that if given parameter say "YES" then Unit price & Row total to be displayed or if the given the parameter value say "NO" then only Remarks to be displayed.
    Here the Unit price & Rowtotal were in two different columns with vertical lines drawn between both. But for the case of "NO" value passed in the parameter then both the column with vertical lines should to be suppressed into one single column as Remarks.
    Is it possible in crystal report, if any body had customized this kind of crystal report please assist me how to do...
    Thanks in advance,
    Regards,
    Krishnakumar
    Edited by: krishnaoctopus on Sep 24, 2010 11:25 AM

    Hi..
    Take Parameter Field and use Same Parameter in Report Section & Make Fields Suppress on Particular Condition as YES & NO,you can hide fields using Suppress which you can apply on particular field by select that report field>right click and goto format text>Apply Suppress on particular condition of YES & NO
    Regards,
    Bhavank

  • Help ! Crystal Reports 2008 for Visual Studio Hangs

    I am using CR 2008 in VS 2008. When I try to set a data source in a crystal reports viewer the first time it hangs. This only occurs on the very first viewer that gets set. Once the first one works, I never have a problem again.
    This has been a problem through a number of CR releases. It is not a new issue.
    Thanks.

    And like all other releases the delay is due to the first time your app loads CR runtime is takes time do so, all programs do this. CR simply doesn't load in your memory space until it's called.
    Load a dummy report on the Main Form when your app is loading then close the dummy report, it will add additional time to load your main app but it appears then CR loads the reports quickly.
    No way around this. Also, make sure your reports have the Verify Database on first load or any of the Verify options, CR will try to connect to the DB and verify which can also take time.
    Don

  • Need help in crystal reports...

    Hi developers,
    I've downloaded crystal report plugin for eclipse.
    Now I want to show report on JSP file with that control.
    I got how to show it with .rpt file (which contains all data within rpt).
    but I 've rpt file with structure only.... No data included...
    I want to pass data to that rpt file dynamically...
    How can I do that?
    Thanx in advanced...

    Within the Business Objects Portal, go to the Support link (top left), and then the Business Objects Downloads. 
    From the drop downs choose Crystal Reports, then XI R2, then Samples.  On the second page is CR XI R2 JRC Web Sample apps.  This gives you most of the standard samples used most often by people developing with the JRC.
    There is a sample that shows how to add a datasource at runtime to a report.

  • Help with Crystal Reports changing SQL Server

    I am doing a web site cutover to a new server for a client and have the server up and running using crystal reports server xi r2 sp2 under windows server 2003r2 32bit.
    When I run a report via the webpage it generates a blank page.
    I've edited the old web developers crystal report files and updated the database path howerver when i type in the new SQL server and authenticate to it using the SA account  it then pops up a window asking me to enter values
    has items such as
    @sUserID
    @sSubUserID
    @iSessionID
    etc
    the only way i can continue through this is to check a box for each value 'set to null' which i dont' think is correct.
    What values should I be putting in these areas or should I be getting this infomation from the previous developer?
    much appreciated

    Hello,
    I don't recognize those variables as CR ones so it's likely something the original developer is setting in code.
    You'll have to discuss with that person.
    If your have SDK issues then post your question to one of the .NET or Java SDK forums.
    Thank you
    Don

  • Need help in crystal report

    i am facing problem in one of my Order report which shows the different info of item with the current order based on month, its check the PO table where GRN qty is 0, its add the ite_qty and display. now i have given the task to display the two previous month PO Qty too. Order is on monthly base..Main report have 6 main tables and for po i add another subreport to calculate it.
    The problem is in current po i only see where grn is 0.(not order delivered qty) but rest of the records are too much but i need only two previous (previous months) qty.

    Hi,
    Do you have a Record Selection formula to return the three months of POs (current plus previous 2 months)?
    What does GRN mean?  I'm not familiar with that term.  It may be better to help you if you can show us a screenshot of the report.  I'm having a hard time figuring out what the actual problem is.
    Thanks,
    Brian

  • Help diagnose Crystal Reports for Enterprise error message

    When I attempt to open a specific report from our server using CRE, I receive the error message:  "Unable to Open Report", "A problem occurred while opening the report from the server."  "Please contact your server administrator."
    The report runs fine as part of a publication.  I have been able to make copies of the report on the server, but CRE will not open the copies either.
    Can anyone please point this newish BOE/CRE user in the right direction for finding a solution to this problem?  Where can I look for further information about what the error really means.
    THANKS!
    Carl Lance

    Hi Abhilash,
    I am able to open and edit other reports on the server without problem.  I believe that they are the same version and pack.  Here are my versions:
    CR for Enterprise Version 14.1.3.1257, Build 2013 Support Pack 3.
    SAP BusinessObjects BI Platform 4.1 Support Pack 3, Version 14.1.3.1257
    When CRE displays an error like this, is there further information in a log or recorded anywhere else?  How does one go about finding details?

  • Need help with Crystal Report Formula

    IF {GfCnSpSpBio.GfCnSpSpBio_Spouse_ID} > 0 and {GfCnBio.GfCnBio_Key_Indicator} = "I"
    Then
      {GfCnBio.GfCnBio_Title_1} + " & " +  {GfCnSpSpBio.GfCnSpSpBio_Title_1} + {GfCnBio.GfCnBio_Last_Name}
    else if {GfCnBio.GfCnBio_Key_Indicator} = "I" Then
    {GfCnBio.GfCnBio_Title_1} + {GfCnBio.GfCnBio_Last_Name};
    I am trying to code a salutation.  If the person is a individual and does nto have a spouse just put in Mr.Jackson.  if the person has a spouse put in
    Mr & Mrs Jackson.  When put this in my report.  I get a record with an individual who is not married and it still shows up as
    &Stirr.
    I am not sure what i am doing wrong in this code.

    i would probably add this to your formula
    ( IF {GfCnSpSpBio.GfCnSpSpBio_Spouse_ID} > 0 and {GfCnBio.GfCnBio_Key_Indicator} = "I"
    Then
    {GfCnBio.GfCnBio_Title_1} + " & " + {GfCnSpSpBio.GfCnSpSpBio_Title_1} + {GfCnBio.GfCnBio_Last_Name}
    else
    if {GfCnSpSpBio.GfCnSpSpBio_Spouse_ID} = 0 AND {GfCnBio.GfCnBio_Key_Indicator} = "I" Then
    {GfCnBio.GfCnBio_Title_1} + {GfCnBio.GfCnBio_Last_Name});
    see if that works for you

  • Crystal Reports 2008; Can't select the certain table. Why?

    Please help me everyone!
    problem note:
    I'm using Crystal Report 2008 to access MS SQL Server 2005 Database.
    Everything was good until last month.
    But somehow when I select the table "FTABLE11C", Crystal Repors hanging-up and no more Crystal Reports works.
    If I copy the FTRAN11C to different name such as "aaa" using following statement and use Crystal Reports then I can select the "aaa" whthout problems.
    Select * into aaa from FTRAN11C.
    So, I drop the tbale FTRAN11C and copy FTRAN11C from aaa table using following statement,
    select * into FTRAN11C from aaa
    and select the FTRAN11C again on Crystal Reports 2008, Crystal Reports 2008 hanging-up again.
    I'd like to know how to solve this situation.
    Thanks.
    1. We didn't have any patch on SQL Server.
    2. I delete one field on table that named "FTRAN11C".
       That's all.
    3. I tried following steps;
       a. Copy the file to another name.
            Select * into aaa from FTRAN11C
       b. Droped the bad table.
            Drop table FTRAN11C
       c. Copy back from saved table.
            Select * into FTRAN11C from aaa
    4. Open Crystal Reports 2008
       a. Connect to database with OLD DB.
           Crystal Reports shows all the tables within database without any problems.
       b. Select the table aaa.
           No problems. It shows on right side box.
       c. Select the table FTRAN11C that is recently created from saved table.
           Now we have problems.
            It does not shows on right side box.
            Little circle displaying forever.
            If I click right side x, Crystal Reports 2008 is closed.
    5. If I use following command on SQL Server Management Studio Express, all of data shows without any problems.
           Select * from FTRAN11C

    Install all patches as you are on the original release:
    Be sure you have the keycode, used to install the product, I will not be able to get you a new one if you lose it or don't have it available.
    The easiest way to update is to uninstall CR 2008 and then install Service Pack 3 full build:
    https://smpdl.sap-ag.de/~sapidp/012002523100009989492010E/cr2008_sp3_fullbuild.zip
    Then install SP 4:
    https://smpdl.sap-ag.de/~sapidp/012002523100008782452011E/cr2008sp4.exe
    Then test your reports again.
    As for using/upgrading to CR 2011 it's not required and likely won't make any difference but you can upgrade if you want of course.
    Don

  • Crystal report 2008 for B1 hyperlink to purchase order window

    HI all,
    I am developing a crystal report in sap business one 8.8. I read SAP document '"How to working with crystal report in sap business one"  I know we could link report field to Item master data window use 'http://$b1$/link?table=OITM&key='+{POR1.ItemCode}
    I also can use 'http://$b1$/link?table=OCRD&key='+{OPOR.CardCode} to link to business partner window.
    But I have trouble use purchase DocNum to link to purchase order window. First I get error of formular require string when use
    'http://$b1$/link?table=OCRD&Key='+{OPOR.DocNum}
    I did some search and found ('http://$b1$/link?table=OINV&key=' & totext({OINV.DocNum},0)). I add totext into my formular
    'http://$b1$/link?table=OPOR&Key='+totext({OPOR.DocNum},0)   
    I run that report and get IE open when click DocNum  with   http://$b1$/link?table=OPOR&Key=9,917   rather than open purchase order window.
    Please help me crystal report experts. I know I must miss something in there.

    Hi Rob,
    thanks very much for your help. that is working Now.
    I post the hypherlink code here. I hope that will be useful for someone.
    if {Command.ObjType}='22' then 'http://$b1$/link?table=OPOR&key='+ totext({Command.DocEntry},0,"","") // link purchase order
    else if {Command.ObjType}='20' then  'http://$b1$/link?table=OPDN&key='+ totext({Command.DocEntry},0,"","")// link good receipt
    else if {Command.ObjType}='21' then 'http://$b1$/link?table=ORPD&key='+ totext({Command.DocEntry},0,"","")// good retun
    else if {Command.ObjType}='18' then 'http://$b1$/link?table=OPCH&key='+ totext({Command.DocEntry},0,"","") // A/P Invoice
    else if {Command.ObjType}='19' then 'http://$b1$/link?table=ORPC&key='+ totext({Command.DocEntry},0,"","")  // A/P credit memo

  • Crystal Reports 2008 export to PDF does not render Japanese fonts

    Hello,
    I have searched the forums for this issue, and there does not seem to be a clear resolution to this problem.  We are using CR2008 to create RPT files that are bundled with our custom .NET 2005 application, which then generates reports in PDF format by running the RPT files against an access mdb database using the CR2008 runtime (our application is deployed on a different machine than the one that is used to create the RPT files).  The issue we are having occurs when data in the access mdb file contains Strings with Japanese characters.  The system that our application is running on does contain the eastern asian language fonts so if a user opens the mdb file using access, they can see the Unicode strings in the database rendered properly (rather than the usual boxes and garbage).  However, once our application generates the report filling in the rpt file with data from the mdb and exporting the report to pdf format, the entries that should contain Japanese font data, which leads me to believe the problem is in the export pdf function of the crystal reports 2008 runtime.  Is there anyway we can configure the runtime to properly embed the fonts in the PDF so that the users can view the Japanese content from the database.  Our users end up viewing reports on both OSX and Windows using Adobe Acrobat Reader.
    Thank you very much in advance

    Thanks for the quick reply!
    1) Exact version of Crystal Reports. (Open Crystal Developer. Go to Help> About Crystal Reports).
    12.0.0.683
    Type: Full
    2) What happens if you export the report to PDF format from the standalone Crystal Reports Designer?
    Same result.  The entry shows up as giberish in the report designer preview...however, by doing this I stumbled upon something.  See below
    3) Are you able to export the report to other formats without any issue?
    See Note below
    NOTE:
    In another part of the report, I just put the fields in question directly in the report (that is, not embedded in a text object).  That part of the report when run produces the correct non-gibberish, properly rendered Japanese result (in the CR designer preview).  The same field, however, when embedded in a text object, results in the gibberish being shown in the designer preview as well.
    Now when I export this to PDF, that ends up turning both areas into the incorrect, gibberish result.  Both the one that did properly render in the preview (field not embedded in text object) and the one in the text object.
    Exporting to any other format (tried xls, rtf and html) results in correct rendering for the field not embedded in the text object and incorrect rendering for the field embedded in a text object.
    Hope this helps with the problem, and I think it means this thread probably still belongs under this current forum.
    Cheers

  • Crystal Report Error Message

    I searched first for this error and did not see anything...
    One (very useful) Crystal Report I've created work well then one day I'll get:
    Failed to open rowset.
    Details: S0000(ProvideX)(ODBC Driver)(FileIO)No data dictionary found for specified database
    (Parentheses are actually brackets but don't "Preview" as such.)
    I've tried re-establishing the database in Database Source and still nothing.  I can re-create it
    from scratch and it works fine again, then bang - the above error.  I first use the BI Reporter to
    setup the report, then switch to Crystal to edit and format it.  This works fine for many other
    reports created.
    Any help or direction is greatly appreciated.
    Thanks,
    Dave

    1.Exactly at what stage or step do you get the error.
    2.Does is point to a specific formula/object at this stage.
    2.What is the crystal reports version(Help>>About Crystal Reports)
    3.Database type and version.Database driver name and version.
    4.What happens if a new report is created using the same odbc connection.
    5. Has anything changed at the databse end.

Maybe you are looking for

  • Posting between customer reconciliation account

    Dear Experts, We have wrong posting in Customer account XXX (with reconcl.account A) then we should reclass/transfer posting from the wrong reconciliation account A to reconciliation account B (customer YYY). Which transaction code to be used?Is it p

  • Officejet pro 8600 won't print

    Hi, I have an Officejet pro 8600 wireless with a Mac OSx 10.6. All has worked fine up to now - I have owned for a few months. Today it stopped printing for me. No error messages, just any print job stuck in the queue - Printer just says 'Idle' or 'Re

  • Mail viewer window doesn't open

    Just bought a new Mac (of course, the new software comes out next month), I transferred my old stuff from Time Capsule, everything works except Mail. When I open Mail no viewer window appears. When I try to open one nothing happens. When I try to qui

  • Iphoto 08 lost archives of one photo

    Every time I open iPhoto this happens. I think lost archives of one photo and now I get a message coming up on the screen saying 'iPhoto library found a photo that was not imported' 'Would you like to import it?' Whether I say yes or no another messa

  • Samba on Solaris 10 x86

    I tried to install Samba (samba-3.0.10-sol10-intel-local.gz) on my Solaris 10 OS that is running on VMWare5. Samba reports an error message: ld.so.1: ./smbd: fatal: libiconv.so.2: open failed: No such file or directory Killed. Prior to Samba installa