Setting VarChar Variable with String Parameter in Crystal Report Add Command

Setting a VarChar Variable with a String Parameter in a Crystal Report 2008 SP6.3 Add Command is causing an error with a SQL State of 42000.  The Error Code depends on which value I select for the parameter.  I created the @DateOpt string parameter in the Modify Command window, not in the report. If I comment out line 14 of the SQL the error does not occur.
I have attached the SQL Code and screen shots of the errors.   Please tell me what I am doing wrong.

Since your parameter is of type STRING, you need to enclose references to it within the Command inside single quotes.
For example, instead of
SET @BeginDate ={?BeginDate}
use
SET @BeginDate ='{?BeginDate}'
hth,
- ido

Similar Messages

  • (Bash) How to set a variable with text from a file? [SOLVED]

    I'm having a little problem.
    I have textfile with a single line of text. What I want to do is set a variable with that line of text. How do I go about doing that?
    A simple var="text" wont work in this case, since the text in the file changes with another script of mine.
    Thanks in advance.
    Last edited by Aziere (2007-03-27 09:07:03)

    if you have a file with more than one line but you only want the first line you could use 'head'
    VAR=`head -n 1 file`
    Last edited by SiD (2007-03-27 05:58:33)

  • I want to set a variable with default value and can be changed by the user

    hi,
    i want to set a variable with default value and can be changed by the user, so i new a variable with setting : customer exit, single value, optional, ready for input.
    in my customer exit code, i set a default value, eg. 20070530
    when the variable screen popup, it display the default value 20070530, i changed it to 20070529, but it doesn't work , it still display the data in 20070530, how can i solve this problem? 
    your help is appreciated.

    Liu,
       As mentioned by Anil, you need to restrict your customerr Exit code to I_STEP = 1.
    or.
       <u>Open your Variable in change mode, in the Last Page os the Variable Maintenance you can provide default value. Note: you are doing same thing in Customer Exit. In your case no need of Customer Exit.</u>
    Nagesh Ganisetti.
    Assign points if it helps.

  • BW Query variable default value put in Crystal report variable question

    Why BW Query variable default value put in Crystal report variable for BO InfoView to open crystal report.
    I using Analyzer to open bw query,variables had default value ,but crystal report can't had variable default value ,and can't search variable  value.
    pho:
    [http://file.itpub.net/f/e38876ad4f6efb7e73980488e7d71f8d/4ae940e9/day_091029/20091029_2b04da1232144feba180OrB23SNvXtoT.gif/p/1.gif]
    [http://file.itpub.net/f/d93ddfe61e0eaf80429726c61f1a02ff/4ae940e9/day_091029/20091029_3211ffe04bf0302fbab5FRKnbwmH80p7.gif/p/BW_QUERY_Crystal.gif]
    Edited by: flying on Oct 29, 2009 8:20 AM

    I Know what to do .
    but Crystal report date variable value are Garbage characters "###".
    PHO:
    [http://file.itpub.net/f/39a8510104476707ae21c945db93ecba/4ae97949/day_091029/20091029_32dcbb7e7d99141483aesJ9KBJHXN0Kj.gif/p/2.gif]

  • How to use Dynamic cascading parameter in crystal Report XI ?

    Hi,
    I want to use Dynamic cascading parameter in crystal Report XI which is to be viewed through the infoview without using the Business View.Is it possible?
    I could implemented Dynamic cascading parameter using the CR XI developer without using Business View, but cannot view the report when uploaded it to BOXI, through infoview.
    Please suggest..
    Thanks in advance..
    Rajneesh

    In the crystal reports field explorer>right click on parameter field>create new-->name the parameter field and select the type as dynamic. Now in the value field click the row and add the database field also add another field below that by clicking on the next row so..on. The order should be like this parent field first and then child field next...... Also click on the last column to add parmater for each level.
    Regards,
    Raghavendra

  • Optional Prompt for Date type parameter in Crystal Report.

    Hi Every One,
    I have a date type parameter in crystal report.When I am convert it to optional prompt it is showing following message.
    But the Type field is gray out when I was selecting list of values Dynamic.
    Please suggest.
    Thanks and Regards
    DEV

    Hi,
    Please check SAP note:
    1710595 - CR_Defining "Optional Prompt" as True for SAP Crystal
    Reports Does Not Work
    Thanks & Regards,
    Nagarajan

  • Crystal Report add-on SAP B1

    Hi Experts,
    I have successfully installed Crystal report add-on on SAP B1 server, I can see the attached report in all modules on server as well as client machine, but when i tried to open any report on client machine, it is not opening but it is properly display on server.
    Should i need to install crystal report runtime for all the client machine?
    Pls. guide me for the same.
    Regards
    Kamlesh Vagal

    Hi dear,
    Install the crystal report prerequisites on every client machine you want to show crystal reports.
    follow the below mentioned steps:
    1. The installation disk or folder will contain a single setup.exe
    2. Log on to the target PC as an administrator or admin type user (windows).
    3. copy the setup.exe to a convenient location on the target PC and run setup.exe
    4. Setup exe will install Crystal reports runtime (version 10), Microsoft runtime files and the add-on files. It is recommended that you keep the path selected by the installer. The default installation path for the Add-on files is C:\Program Files\SAP\SAP Business One\AddOns\SAP_CR_CRYSTAL_1_10.
    5. Once the setup.exe has completed, log on to SAP as manager or any other superuser.
    6. Using Administration | Addons | add-On Administration, register the Crystal Add-On, set the desired settings and restart SAP.
    7. There is a known issue within SAP where with multiple add-ons starting automatically with a super user, SAP will shutdown as soon as the user logs on. If this issue occurs always log in through the choose company screen. SAP is aware of this issue and will be rectifying this in a patch.
    8. Log on to SAP, as a super user.
    9. Run Account setup from Administration | Crystal Reports Administration | Account setup
    10. Type in the sa password for the SQL server that holds SAP databases, and click Update.
    11. Click the u201CCreate Ext Tablesu201D button. Add-on will create the additional tables now (this process must be performed for each new SAP company once).
    12. THE TASKS 3 TO 5 and task 10 INCLUSIVE WILL NEED TO BE RUN ON ALL PCS THAT NEEDS THE CRSYTAL ADD-ON. 13. Crystal add-on is ready to use. A help file is provided and you may test the add-on with the sample reports found in u2026\ SAP_CR_CRYSTAL_1_10\SampleReports. The help file can be found in u2026\SAP_CR_CRYSTAL_1_10
    this will solve your problem.
    Regards,
    Neetu

  • Crystal report SQL Command and using IN

    Post Author: geozuh
    CA Forum: Crystal Reports
    Does any one know how to get a multiple value prompts to work in Crystal report SQL Commands? I have an extremely large database and do not want to pull back all the records to the report. I know I can do the filtering in the report, but due to the size of the database, I am restricked from doing do.
    I would like to set the State as a multiple value parameter/prompt to be used in the SQL Command.
    Ex.
    Select CustID, FirstName, LastName
    from Customer
    where State in ('WI', 'IL', 'MN') --this would be turned into a parameter

    Post Author: yangster
    CA Forum: Crystal Reports
    you are over thinking the problemsimply create a parameter within crystal for your state and change it to allow multiple valuesthen in the select expert put in state = ?stateif you do show sql query you will see that the values are pushed down to the sql level thus no performance hit vs putting the parameter directly in the command itself

  • Crystal Report add-on Sample Reports

    Hi Experts,
    I am using Crystal report add-on in SAP B1 2007, i would like to know about sample reports for the same.
    has SAP provided any sample reports in crystal report add-on like they have for XL reporter?
    pls. give me the link if anybody knows.
    Regards
    Kamlesh Vagal

    Hi,
    I have two questions:
    I downloaded some sample reports, and try to connect them with the SBO database. When I use "Set Datasource Connection" I can see that the table in use is called "variance_xtab". This table does not exist in the SBO database, so I cant replace the connection.
    Some of the embedded sample reports you get when installing the CR add-on require a login to the "COIMBRA" database when I try to replace with my own SBO database.
    How can I get around this issues?
    Regards Per Nymo

  • Crystal Report Add On

    Dear All,
    I have SAP B1 crystal report add installed in my client computer.  And also i already setup display menu for each user (which module should appear for each user).  The problem is once i run crystal report add on, then SAP B1 will display all menu again for each user while they (user) don't want to see all these unused modules.  Is there any setting to avoid this problem?
    Thanks and Regards

    Hi,
    After staring the Crystal reports addon,again do the form setting for the respective user.
    Then close sap b1 session.
    Now log in sap b1,start the addon,all modules will not be displayed
    I have checked in my test system and i am getting the desired result.
    Kindly let us know if this solves your issue.

  • Crystal Report Add-On not working

    Hello Experts,
    We have freshly installed Crystal Reports Add-On. when we start the add-on it says it is connected but when we try to access any of the forms in the Crystal Reports sap screen comes up with a message window stating
    "There is already an open Datareader associated with this command which must be closed first"
    which does allow any further transactions in crystal reports screens.
    regards,
    shreyas

    Thread moved...
    Please post Crystal Reports related questions only in the forum
    Best regards,
    Darius

  • SAP B1 Crystal Reports Add On and Crystal Report 2008

    Hi,
    I have posted the question at SAP Reporting Forum, but not much luck.
    The following reports is created in Crystal report 2008.
    From  http://help.sap.com/businessobject/product_guides/cr2008V1/en/CR2008_SP2_Fixed_Issues_en.pdf, I tnocie there could be moemry leak for Sybase Connectivity, but we are using ODBC.
    My client is using SAP 2007 SP00 PL49, SAP Crystal Report Add on is 2.0.0.7 and they have Beas 6.70.07
    They have encountered problem "The request cannot be submitted for background processing" after printing about 8 times of the same reports consecutively.  It is a work order reports which my clients prints for one operations at a time, with each operations generated 8 pages of output.  There are 5 jpeg on the report, which is not huge.
    Yes, I am aware there could be any problem related to that.
    What I notice is, on the workstation with SAP Business One client running, whenever user print a report named "Work Order", in the temp folder it creates one .rpt and 26 tmp files (Note that I have made up the number)
    Work Order {C0ECP901-C6F6.......}.rpt
    ~cpe{51DD9109........}.tmp
    ~cpe{71DD9109........}.tmp
    ~cpe{52DD9109........}.tmp
    ~cpe{53DD9109........}.tmp
    ~cpe{54DD9109........}.tmp
    At the moment, for a temporary solutions, everytimes when the error comes up, my client have to log off from SAP Business One, clear the temp folder and then relogin before they can print the same report.
    Anyone encounter the problem and manage to resolve. it.
    Edited by: Shwu Hua Gan on Aug 12, 2010 8:43 AM

    In case anyone is interested.
    I managed to drill down and get around with the following solutions.  Still in progress of monitoring, but seems to solve part of the problem.
    1. Open up the JPEG in Accessories--> Paint and notice that the JPEG is too big and cannot be seen without adjustting the scrolling bar.  Reduce the image size seems to work.
    2. The report is using dynamic graphic and reading JPEG path from a UDT with column 'type' and 'path'.  Subreport is used with record selection Type='Precheck'. When there was no Precheck type JPEG, it seems to crash.  We have asked client to add in type='precheck' and hyphen in path when it is not applicable.  In that sense, it will return something to the report.
    3. We also have subreport that read material issues.  when there was no material issue in the subreport, it crash.  So, we do the following:
    - section express - tick suppress blank section
    - right click subreport, tick suppress blank subreport.
    - in Subreport, at report option, we select suppress printing when no records.
    Note that workaround in point 3 does not seem to work for pictures.  So, it might be worth suppressing with formulas.

  • Crystal Reports in Command Line mode

    Where can i find a complete list of the different parameters i can use crystal reports in command line mode with?

    Command-line mode?
    Sincerely,
    Ted Ueda

  • Crystal Report add on displays all modules

    Is there a possible way where i can retain the modules visibility setting once i run the crystal report add on?
    By default, once the add on is started, it displays all the modules in SBO even if I uncheck some modules to display.
    Thanks!

    I would want to restrict each user on the modules I wanted to display in their menu but once i run the crystal report, all modules are displayed even if the crystal report is the only option in each module.
    Edited by: Denisse Calaquian on Jan 29, 2010 4:28 AM

  • Action failed after start Crystal report add-on then Account Setup

    Dear All,
    We got an error message on a work station when start Crystal report add-on >> Go Account Setup >> type in sa password >> Action failed
    Then I tried on the server. It used to work before. I type in the same password, the error message said 'login failed...'
    The password is correct. I can login by using management studio.
    Then I changed the password of sa user in management studio. On the server, after I changed password in Account Setup, it works. But on the workstation, I still have the same error message Action failed.
    They are on SAP2007A PL06HF01, SQL2008, the OS of the workstation is Windows Vista business
    Any idea? Thanks a lot.
    Regards,
    Yuka

    Hi Yuka,
    I moved your post to the Integration Kit forum.
    Also be aware that CR 2008 supports MS SQL Server 2008 with Fix Pack 2.3 installed. MS also only supports MS SQL Server with their new Client. Go to the install CD for SQL Server and instlal the client Tools which installs a new driver.
    Need to know what version of CR you are using?
    Thank you
    Don
    Edited by: Don Williams on Feb 22, 2010 6:50 AM

Maybe you are looking for