Hi..getting error while previewing the report..hi i have the custom code

hi my custom code is as follows:
Public Shared Function SetColor(ByVal OrderYear As datetime,ByVal LineTotal As numeric(38,6)) As String
SetColor= "Transparent"
If Productid >= 20 Then
SetColor= "Green"
End IF
End Function
i'm getting error as 
"there is an error on line 0 of custom code:[BC30002] Type numeric is not defined:
i have same datatype for LineTotal in my database.
Please help.Thanks in advance..
lucky

Hi Lucky,
Just as the error message said, there is no such data type named numeric in Visual Basic. The data type is actually exist in
SQL Server, but it doesn’t means that it should also exist in
Visual Basic. And based on my research, I couldn’t find a strictly equivalent data type in Visual Basic.
Besides, it seems that there are something wrong in your code. For more details, please see:
There is no such variable named Productid in the code, we should define it in the SetColor function in advance. Because you it used in the condition of if statement.
We should remove the unused variable in the function. Such as OrderYear and LineTotal. If the function needs LineTotal variable, we can use double data type to define the data type of LineTotal after format it.
The following custom code is for your reference:
Public Shared Function SetColor(Productid As integer, ByVal LineTotal As Double) As String
SetColor= "Transparent"
If Productid >= 20 Then
SetColor= "Green"
End IF
End Function
Hope this helps.
Thanks,
Katherine Xiong
Katherine Xiong
TechNet Community Support

Similar Messages

  • Getting error while running SSRS report in SharePoint 2010

    Hi,
    I am getting below error while running a SSRS reports in SharePoint. Your help will be appreciated
    Webpage error details
    User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; WOW64; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; .NET4.0C; .NET4.0E)
    Timestamp: Wed, 5 Nov 2014 11:58:42 UTC
    Message: Sys.WebForms.PageRequestManagerServerErrorException: An unknown error occurred while processing the request on the server. The status code returned from the server was: 503
    Line: 5
    Char: 62123
    Code: 0
    Thanks,
    Manjunath

    Hi,
    According to your post, my understanding is that you get error while running SSRS reports.
    Basically, If the Request Management service is enabled, it manages all incoming requests by evaluating logic rules against the user requests in order to determine what\which action to take and which machine or machines (targets) in the farm should handle
    the request.
    By default the Request time out value for Request Management service are as follows,
    RequestTimeout                    : 00:01:40
    RequestExecutionTimeout       : 01:00:00
    So the error throws from RM service for those reports who take more than 1 minute to generate the report.
    To solve this issue, we can stop the Request Management service.
    Or increase the time out
    value by making use of following PowerShell  script.
    $waUrl = "URLofWEbApp"
    $wa = Get-SPWebApplication $waUrl
    $rmSettings = $wa | Get-SPRequestManagementSettings
    $req=$wa.RequestManagementSettings
    $timeout2= New-TimeSpan -minutes 5
    Sreq.Requesttimeout=$timeout2
    $req.update()
    For more information:
    http://blogs.technet.com/b/sajiths/archive/2014/08/19/ssrs-reports-timed-out-with-39-503-39-error-sharepoint-2013.aspx
    Thanks & Regards,
    Jason
    Jason Guo
    TechNet Community Support

  • Getting Error while integrating Crystal reports with Java

    Hi All,
    I am getting below error while integrating crystal report with java
    [java] os.arch = x86
    [java] java.lang.NoSuchMethodError: com.crystaldecisions.Utilities.d.<init>
    (Ljava/awt/Image;I)V
    [java] at com.crystaldecisions.Utilities.af.try(Unknown Source)
    [java] at com.crystaldecisions.Utilities.af.a(Unknown Source)
    [java] at com.crystaldecisions.Utilities.af.<init>(Unknown Source)
    [java] at com.businessobjects.crystalreports.viewer.applet.g.a(Unknown
    Source)
    [java] at com.crystaldecisions.ReportViewer.ReportViewer.start(Unknown
    Source)
    [java] at ReportViewerFrame.<init>(ReportViewerFrame.java:51)
    [java] at JRCViewReport.launchApplication(JRCViewReport.java:29)
    [java] at JRCViewReport$1.run(JRCViewReport.java:50)
    [java] at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:
    178)
    [java] at java.awt.EventQueue.dispatchEvent(EventQueue.java:443)
    [java] at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDi
    spatchThread.java:190)
    [java] at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDisp
    atchThread.java:144)
    [java] at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.j
    ava:138)
    [java] at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.j
    ava:130)
    [java] at java.awt.EventDispatchThread.run(EventDispatchThread.java:98)
    Any help can be appreciated
    Kalyan

    Hi All,
    For got to mention i am using crystal reports XI release 2 with JDK1.4.
    Kalyan

  • OBIEE : Getting Error while running a report from the Answers tab

    Hi,
    I have recently installed OBIEE 10.1.3.4.2 and Oracle XE databse in a Windows XP (Professional version 2002 Service Pack 3) virtual machine on my Windows 7 machine.
    Created and loaded the Default rpd file. I have used "Oracle in XE" as driver in the DSN and in the Connection Pool the Call Interface is ODBC 3.5.
    In the Presentation Services I have logged on as Administrator, selected a Subject Area, then selected a single column from the list of columns and ran Display results. I am getting the following error :
    Odbc driver returned an error (SQLExecDirectW).
    Error Details
    Error Codes: OPR4ONWY:U9IM8TAC:OI2DL65P
    State: HY000. Code: 10058. [NQODBC] [SQL_STATE: HY000] [nQSError: 10058] A general error has occurred. [nQSError: 16001] ODBC error state: IM003 code: 160 message: Specified driver could not be loaded due to system error 1114 (Oracle in XE).. (HY000)
    SQL Issued: SELECT TEST_PERIOD.PER_KEY saw_0 FROM TESTUSER ORDER BY saw_0
    Can anyone help me with this problem.
    Thanks
    Sanjay

    I restrated the VM and that has fixed the problem.
    Thanks

  • Error while previewing Crystal Reports in SAP B1

    Dear Experts,
    I have installed the Crystal Reports Addon to SAP B1 2007B, and it works fine with the sample reports in B1.
    My problem is as given below.
    I have created Covering Letter report for the Cheque printing functionality. Preview and all is ok in the Crystal Report designer.
    But it shows error while trying to preview it in SAP B1.
    The Error Message is: Failed to retrieve data from the database. Details:  [Database vendor code: 207]
    I have used the Command Query while creating the report, and is given below:
    SELECT     ODSC_BankMaster.BankName, OCHO_ChequePaymentHd.CheckNum, OCHO_ChequePaymentHd.CheckDate,
                          CHO1_ChequePaymentDt.LineDitail, CHO1_ChequePaymentDt.LineMoney, OCHO_ChequePaymentHd.AcctNum, OCHO_ChequePaymentHd.TransRef,
                          OCHO_ChequePaymentHd.CheckSum, OCRD_BusinessPartner.CardName, CRD1_BusinessPartnerAddress.Address,
                          CRD1_BusinessPartnerAddress.Street, CRD1_BusinessPartnerAddress.City, CRD1_BusinessPartnerAddress.Block,
                          CRD1_BusinessPartnerAddress.ZipCode, OVPM_OutgoingPayment.U_AMTWRDS, OVPM_OutgoingPayment.Comments, OADM_CompanyDetails.CompnyName,
                          OADM_CompanyDetails.CompnyAddr, OADM_CompanyDetails.Phone1, OADM_CompanyDetails.Phone2, OADM_CompanyDetails.Fax,
                          OCHO_ChequePaymentHd.Address AS ToAddress
    FROM         CHO1 AS CHO1_ChequePaymentDt INNER JOIN
                          OVPM AS OVPM_OutgoingPayment INNER JOIN
                          OCHO AS OCHO_ChequePaymentHd ON OVPM_OutgoingPayment.DocEntry = OCHO_ChequePaymentHd.PmntNum ON
                          CHO1_ChequePaymentDt.CheckKey = OCHO_ChequePaymentHd.CheckKey INNER JOIN
                          ODSC AS ODSC_BankMaster ON OCHO_ChequePaymentHd.BankNum = ODSC_BankMaster.BankCode INNER JOIN
                          OCRD AS OCRD_BusinessPartner ON OCHO_ChequePaymentHd.VendorCode = OCRD_BusinessPartner.CardCode INNER JOIN
                          CRD1 AS CRD1_BusinessPartnerAddress ON OCRD_BusinessPartner.CardCode = CRD1_BusinessPartnerAddress.CardCode AND
                          OCRD_BusinessPartner.BillToDef = CRD1_BusinessPartnerAddress.Address CROSS JOIN
                          OADM AS OADM_CompanyDetails
    WHERE     (OCHO_ChequePaymentHd.Printed = 'Y') AND (OCHO_ChequePaymentHd.Canceled = 'N') AND               (OCHO_ChequePaymentHd.BankNum ='{?BankCode}') AND (OCHO_ChequePaymentHd.CheckNum BETWEEN {?ChequeNoFrom} and {?ChequeNoTo}) 
    ORDER BY OCHO_ChequePaymentHd.CheckNum
    If I use the tables directly in the reports, the above query would contain the database base name also as prefix to the table in the FROM clause.
    Eg
    DBName.dbo.OCHO
    How to avoid it? Is there any settings in the designer?
    Query in the Sample report doesnot have the database name as prefix.
    What shall I do for that?
    Hope that my problem is clear.
    Please Help. Thanks in advance
    Regards,
    Toms Abraham

    Dear Toms,
    DBName.dbo.OCHO is the right format for CR.  You could not avoid it.  Why should you?
    On the other hand,  it is not a good idea to rename DB name to such a long name.  What is the purpose?
    Thanks,
    Gordon

  • Getting error while running crystal reports on SAP BW Query

    Hi
    I have installed Crystal Reports 2008 SP3 and then SAP Integration Kit. I'm able to connect to SAP BW but after adding the query to crystal and while refreshing the report i'm getting an error
    Database Connection Error: 'BAPI Error #:0' Error occured when starting the parser: timeout during allocate/CPIC-CALL:'ThSAPCMRCV'.
    Please help how to overcome this error.
    Thanks
    Raghavendra.G

    Check the following SAP note
    https://service.sap.com/sap/support/notes/1032461
    Regards,
    Stratos

  • Getting error while concatenating in reports 6i

    Hi I build one report and in one of the formula column i am concatenating 2 field based on some condition example is below
    there are 5 fields all of them are varchar2
    Ship_to_customer_name
    ship_address1
    ship_address2
    ship_address3
    ship_address4
    and I have declared a variable in the function
    V_VARIABLE varchar2(2000);
    now if the ship_address1 is not null then
    V_VARIABLE := substr(:Ship_to_customer_name,1,40) || '*' || substr(:ship_address1,1,40);
    then else part is there
    PROBLEM : I am getting error as below
    " REP -1401 'formuale_name' :fatal Pl/SQL error occured
    ORA - 06502 pl/sql : numric or value error
    If I remove the concatenate and simply use below
    V_VARIABLE := substr(:Ship_to_customer_name,1,40)
    then it is fine .
    I am working on reports 6i and data base is 10g
    Thanks in advance

    check the data type and size of the formula column('formuale_name). It's the error related to data type and size. If it's less than the variable value then it will throw that error

  • Getting Error :  WebDynpro Exception: IDs with Namespace Must Have the

    Hi Experts,
    I am getting following error while running Webdynpro application, Please give me solution
    The following error text was processed in the system E6I : WebDynpro Exception: IDs with Namespace Must Have the Format /<namespace>/<id>
    The error occurred on the application server HCSAP2950-1_E6I_00 and in the work process 0 .
    The termination type was: RABAX_STATE
    The ABAP call stack was:
    Method: RAISE of program CX_WD_GENERAL=================CP
    Method: CONSTRUCTOR of program CL_WDR_VIEW_ELEMENT===========CP
    Method: CONSTRUCTOR of program CL_WD_TABLE_COLUMN============CP
    Method: NEW_TABLE_COLUMN of program CL_WD_TABLE_COLUMN============CP
    Method: IF_WDR_VIEW_DELEGATE~WD_CREATE_UI_TREE of program /1BCWDY/AK98KQL1OONYBLIT9ARC==CP
    Method: CREATE_UI_TREE of program CL_WDR_DELEGATING_VIEW========CP
    Method: INIT_CONTROLLER of program CL_WDR_VIEW===================CP
    Method: INIT of program CL_WDR_CONTROLLER=============CP
    Method: GET_VIEW of program CL_WDR_VIEW_MANAGER===========CP
    Method: BIND_ROOT of program CL_WDR_VIEW_MANAGER===========CPThanks,
    satish

    Hi,
    SAP Notes 1242377, 1381873, 1389146
    Threads:
    WebDynpro Exception: IDs with Namespace Must Have the Format /<namespace>/<
    regards, Lukas

  • Getting error while running Oracle universal installer to run the deinstall

    I am running oracle universal installer to run the deinstallation process and getting an error "java runtime environment was not found at C:\TEMP\OraInstall2011-11-14_01-31-42PM\jre\bin\javaw.exe hence oracle universal installer cannot be run. Please visit www.javasoft.com and install jre 1.3.1 or higher and try again"
    Is there any workaround for this?

    This is regarding an issue while trying to unistall Fusion middleware (11g forms, reports) from the server.
    I am running oracle universal installer to run the deinstallation process and getting an error "java runtime environment was not found at C:\TEMP\OraInstall2011-11-14_01-31-42PM\jre\bin\javaw.exe hence oracle universal installer cannot be run. Please visit www.javasoft.com and install jre 1.3.1 or higher and try again"
    Is there any workaround for this?

  • Getting error while opening a saved for later notification: The selected action is not available. The cause may be related to security. Contact your system administrator to verify your permission level for this action.

    Hi All,
    While opening a saved for later notification, we are getting "The selected action is not available. The cause may be related to security. Contact your system administrator to verify your permission level for this action". error.
    This is a custom notification.
    Please help.
    Thanks
    Raghava

    HI All,
    Please help on this issue.
    Thanks
    Raghava

  • Getting error while loading CCR report

    Hello All,
    When i am trying to load CCR report via 'Load result of other Comparisons', it display the select save results screen.
    But when i am trying to get inconsistency report, it through an error, "Product for external product number 199939097_0_B08 and BSG B00 does not exist"  Message no. /SAPAPO/MAT040
    Could anyone help me to deal with this issue.
    regards
    Vivek Agarwal

    Hello Tiemin,
    Thanks a lot for your suggestion,
    But Correction of SAP Note 1376385  for SCM Version of 7.0 are delivered in Support Pack 6. Similarly the other note 1296063 are delivered in support Pack 3.
    As we are already on support Pack 9. So both of these notes are not relevant.
    Regards
    Vivek Agarwal

  • Error while previewing webi reports

    Hi experts,
    We are getting u201CNot a valid logon token. (FWB 00003)u201D error from our XI 3.1 Infoview only if we try to view any webi report from our production environment.
    What can be possible cause behind getting this error message?
    Thanks in advance for your suggestions/ help.
    Regards,
    Chinmay

    Hi,
    Did you restart the Web Intelligence Report servers so they generate a new server logon token?
    CMS prematurely deletes all Webi server's server logon token after it crashes.
    This issue is being tracked as Problem Report .
    Regards,
    Bashir Awan

  • Getting error while creating a new web app saying "The password supplied with the username domainname\username was not correct. Verify that it was entered correctly and try again"

    Hi ,
    I am trying to create a new web app using Central Administration in Sharepoint 2010 and getting an error "The password supplied with the username  was not correct. Verify that it was entered correctly and try again".
    I tried running this command also "stsadm -o updatefarmcredentials -userlogin <domain\username> -password <newpassword>" but when it got executed it showed me "Access Denied".
    What should i do ??
    Thanks in advance.
    Regards, Anurag

    HI,
    right click on command icon and click run as administrator then use above stsadm commend to update credential. If still you face same issue then try with powershell as mention in below link: (make sure that you open sharepoint powershell as run as administrator)
    http://smartrider.wordpress.com/2010/07/15/powershell-script-to-create-web-application-and-site-collection-in-sharepoint-2010/
    let us know your result
    Hemendra: "Yesterday is just a memory,Tomorrow we may never see"
    Whenever you see a reply and if you think is helpful, click "Vote As Helpful"! And whenever
    you see a reply being an answer to the question of the thread, click "Mark As Answer

  • Getting Error while runmning XML Report

    Hi,
    I developed one XML report, it is running some times fine and some times it is giving error like "Beginning post-processing of request 913517 on node ABHRPROD at 01-MAR-2011 18:50:28.
    Post-processing of request 913517 failed at 01-MAR-2011 18:50:29 with the error message:
    One or more post-processing actions failed. Consult the OPP service log for details."
    but it is running every time fine in development Instance..Pls suggest how to resolve this issue..
    Thanks in advance,
    Hanimi...

    What is the application release?
    Post-processing of request 913517 failed at 01-MAR-2011 18:50:29 with the error message:
    One or more post-processing actions failed. Consult the OPP service log for details."As mentioned above, please check the OPP log file for details about the error. The OPP log file FNDOPP*.txt can be found under $APPLCSF/$APPLLOG directory.
    Thanks,
    Hussein

  • Getting error while refreshing the Webi report

    Hi Guys,
    I am getting error, while refreshing Webi reports. Error like:
    A database error occured. The database error text is: Error in MDDataSetBW.GetCellData. Time limit exceeded.. (WIS 10901)
    Could anyone please reply.
    Regards,

    Hi,
    If it's not the universe limits, then I think you've hit the "MDX result contains too many cells" (more than 1million) problem.
    So, I suspect a long running query, no filters/variable restrictions, and You've probably got a dump in ST22.
    I don't know what BW you have, but if it is BW 7, do you have Enhancement Pack 01 and SP05<->10  ?
    You should check out all the latest corrections from component BW-BEX-OT-MDX
    the final proof of the pudding would be to enable MDA / SOFA log , capture the MDX SELECT statement and test it in BW MDXTEST - i bet you get the same error there.
    regards,
    H

Maybe you are looking for

  • JCo Call RFC

    I have defined a RFC and call it via JCo. The RFC is used to fill data to my table. The problem is the data can be fill via the import parameter, but the table parameter is not work. I have tested the RFC in function builder and it work. Here is my R

  • How to load mssql in java api setup

    i m workiong on core java application. i have mssql databaseconnectivity. i want to ask if i want to run this api on the pc which dont have sql install then how to make database to be run on that pc with setup. isearched abt it i found sql script, sq

  • A question before buy movie and music, please help.

    Hi, I've just created itunes account and planing to buy some music and movie. But I've got my worries so before I buy I want to make sure. I'm sorry if someone has already ask them. 1. If I buy music from itunes can I play it on my Nokia phone? I hav

  • TIGER FIREWALL

    FELLOW LOGICIANS!! I used to just use my MAC for music. No internet connection, no games, no ****, nothing. But after realizing how handy it is to have my MAC plugged into the matrix, i'd like to what's the best firewall to use for TIGER....just 2 b

  • Entourage 2008 to Outlook 2011

    I have a user that was recently moved from Entourage 2008 to Outlook 2011. There seem to be two things that are not working properly: 1) The exported/imported contacts do not work in Outlook. The user gets a 5.5.4 invalid email address error. 2) I ca