Passing value to formula field in CR XI from vb6

currently using vb6 and testing CR XI.  Attempting to pass a value to a formula field in a CR XI report and getting the an "invalid use of property"  How do you pass a value from code in vb6 to the formula in the report?
current code is as follows:
Set app = New craxdrt.Application
Set cr = app.OpenReport("test.rpt")
Dim crystalFormFieldDefns As craxdrt.FormulaFieldDefinitions
Dim crystalFormFieldDefn As craxdrt.FormulaFieldDefinition
Set crystalFormFieldDefns = cr.FormulaFields
Set crystalFormFieldDefns.Item(0).FormulaFieldName = ("{@InvList}")
crystalFormFieldDefn.Text = Chr$(34) & selFormula & Chr$(34)
crvInvoice.ReportSource = cr
crvInvoice.ViewReport

Hi, Gerry;
I think the logic is off a bit.
Instead of:
Set crystalFormFieldDefns.Item(0).FormulaFieldName = ("{@InvList}")
Try:
For Each crystalFormFieldDefn In crystalFormFieldDefns
If crystalFormFieldDefns.Name = "{@InvList}" Then
crystalFormFieldDefn.Text = Chr$(34) & selFormula & Chr$(34)
Regards,
Jonathan

Similar Messages

  • How to set a new value for formula field in crystal reports xi?

    <p>How to set a new value for formula field in crystal reports xi?</p><p>//formula</p><p>{@description}</p><p> </p><p>exemplo in VB6</p><p>crxSubreport.FormulaFields.Item(1).Text =  "&#39;Subreport Formula&#39;"  or</p><p>crxSubreport.FormulaFields.Item("description").Text =  "&#39;Subreport Formula&#39;"</p><p>How to in JRC?</p><p> </p><p> </p><p> </p><p> </p><p> </p><p> </p><p> </p><p> </p>

    Hi,
    This functionality is known to be very important and is a key part of the next major release of the JRC planned for the first half of 2008.
    Regards,
    <p>Blair Wheadon</p>
    <p>Product Manager, Crystal Reports</p>

  • Pass value to a field dynamically..

    Hi Experts,
    Can any one solve this issue?.
    I want to pass value to different fields dynamically..
    Egu2026
    I have work are having fields
    lwa_table-var1,
    lwa_table-var2,
    lwa_table-var3,
    lwa_table-var4,
    u2026.. up to lwa_table-var100.
    My logic is I have to pass l_tot value .. based on the last letter like below.
    if l_tot value is 1 we have pass to lwa_table-var1
    if l_tot value is 2 we have pass to lwa_table-var2
    if l_tot value is 3 we have pass to lwa_table-var3
    if l_tot value is 100 we have pass to lwa_table-var100.
    <removed_by_moderator>
    Thanks in advance.
    Regards,
    Kumar.
    Edited by: Julius Bussche on Aug 12, 2009 8:41 AM

    Hi Friend,
    U can do Following.....
    data:  text(12) type c.
    data : num type n.
    data: int type i.
    data: begin of wa_test,
          var1,
          var2,
          var3,
          var4,
          end of wa_test.
    FIELD-SYMBOLS <fs_wa> TYPE ANY.
    do 4 times.
      int = int + 1.
      num = int.
      CONCATENATE 'wa_test-' 'var' num into text.
      ASSIGN (text) to <fs_wa>.
    <fs_wa> = num.
      UNASSIGN <fs_wa>.
    enddo.
      write : wa_test-var1 , wa_test-var2 , wa_test-var3 ,wa_test-var4 .
    ouput will be :     1 2 3 4.
    Lets take Your Scenario----
    >>>>>>>>>>>>>>>>>
    Data: begin of lwa_table,
    Var1,
    Var2,
    Var3,
    u2026..
    u2026u2026
    Var100,
    End of lwa_table.
    Data: l_tot type i.
    u2022     For example l_tot = 36.
    u2022     Then u want to pass the same to lwa_table36.
    For this do followingu2026..
    Now Define-->>>
    data: text(13) type c.
    data : num type n.
    FIELD-SYMBOLS <fs_wa> TYPE ANY.
    *Now till now we done all the data definitions now u have to do following to pass it dynamically,
    l_tot = 36.
    Num  =  l_tot.
    CONCATENATE lwa_table-' 'var' num into text.
    ASSIGN (text) to <fs_wa>.
    <fs_wa> = num.
    UNASSIGN <fs_wa>.
    Write : lwa_table-var36.
    Output will be 36.
    Hope this resolves ur issue,
    Regards,
    Akash Rana
    Edited by: AKASH RANA on Aug 12, 2009 8:53 AM

  • Passing value to a field of SAP Program which do not have "Parameter ID"

    Dear Experts,
    My requirement is that i need to pass a value from my dialog program to a field of SAP Program which do not have "Parameter ID" attached to it.
    For example: If you run SAP Transaction CS14, it has two sections viz., Primary BOM and Secondary BOM. I need to copy and create own screen using Dialog program. The screen appears in custom screen would be similar to that of the SAP Transaction CS14. If you check the fields, all the fields have "Parameter ID" attached to it, except for the following fields which do not have Parameter IDs are "Alternative", "Valid From" and "Required Qty".
    Hence how do i pass value to those fields? Kindly help me
    To those fields where "Parameter IDs" are attached, i can use below two statements:
    Set parameter id <par> field <field>.
    call transaction 'CS14' and skip first screen.
    Regards,
    Ramesh Manoharan

    Hi Harald Boeing,
    Thanks you very much. My problem is solved.
    Rewarded Points.
    Regards,
    Ramesh Manoharan

  • How to pass values in dynamic fields in LX03

    HI ,
    i  want to pass values for dyanmic fields in lx03 program by calling this in my own program through  call transction or submit report .

    LX03 is the report program so you have to use Submit report.
    See the simple example :
    REPORT ZTEST_98 .
    DATA: t_param LIKE rsparams OCCURS 10 WITH HEADER LINE.
    parameters p_LGNUM like lagp-lgnum obligatory.
    start-of-selection.
          t_param-selname = 'S1_LGNUM'.
          t_param-kind = 'P'.
          t_param-low  = p_lgnum.
          APPEND t_param.
    *-- Period
    SUBMIT RLS10030 VIA SELECTION-SCREEN
                              WITH SELECTION-TABLE t_param
                              AND RETURN.
    Just press F1 on submit and you get good documentation.
    Thanks
    Seshu

  • Passing values to formula

    Hi All,
            Is there any function module to create and read formula?Here I need to calculate the price for purchased material.i am using  formula to calculate price.Each tax code having its won formula.
          I would like to store these formula in z-table and use it in my program.So there is no need to change my program when changes occurs.My Question is how to read this field value as formula?.........for reference refer the table tc25.
    example: (pb00+jin2) / menge.
    pb00 - base value,
    jin2- service tax,
    menge -quantity.
    How should i pass the value to pb00,jin2 and menge.
    Let me know if there is any doughts in my questions. It will be geartful if u share ur ideas with me pl.
    Thanks in Advance!!!

    Hi Karthik,
            Thanks for ur reply....Actualy that is one option....I found some FM module to create and execute formulas....but i am not able create fromula using this......can u pl tel me whether thse FM will be useful for my requirement.did u seen tc25 table?There thay are maintaining some formulas right?Thats y i prefered formula option.
    CHECK_FORMULA    
    EVAL_FORMULA     
    FORMULA_CHECK    
    FORMULA_EVALUATION
    FIMA_FORMULA_CREATE.

  • Passing value to paramater field in the crystal report

    Hai,
    I have done the following thing.
    1. Created SBO screen using screen painter.
    2. Added one text box, button in the screen painter.
    3. Created one Windows screen and attached Crystal report viewer.
    4. As soon as the button clicked in the SBO screen i am able to open the crystal report.
    But now i need values which i have typed in the text box should be passed to the crystal report. how this can be done . I have attached the code please let me know where is the error. I have also created paramater filed in the crystal report name "From_dt".
    As soon as the screen opened from SBO. It is asking for discreate value. But i have already passed the value from the SBO. I need to pass the value dyanamical from SBO screen.
              Dim oRpt As New Myreport
                            Dim myTable As CrystalDecisions.CrystalReports.Engine.Table
                            Dim oLI As New CrystalDecisions.Shared.TableLogOnInfo
                            For Each myTable In oRpt.Database.Tables
                                oLI = myTable.LogOnInfo
                                oLI.ConnectionInfo.Password = "sapb1@sql"
                                oLI.ConnectionInfo.UserID = "sa"
                                myTable.ApplyLogOnInfo(oLI)
                            Next
                            Dim Crviewer As New Frm_rptwaste
                            Crviewer.CrystalReportViewer1.ReportSource = oRpt
                            Dim ParameterField1 As New CrystalDecisions.Shared.ParameterField
                            Dim ParamterFields As New CrystalDecisions.Shared.ParameterFields
                            Dim ParamterDescreteValue1 As New CrystalDecisions.Shared.ParameterDiscreteValue
                            ParameterField1.ParameterFieldName = "From_dt"
                            ParamterDescreteValue1.Value = txtcode.Value
                            ParameterField1.CurrentValues.Add(ParamterDescreteValue1)
                            ParamterFields.Add(ParameterField1)
                            Crviewer.CrystalReportViewer1.ParameterFieldInfo = ParamterFields
                            Crviewer.CrystalReportViewer1.RefreshReport()
                            Crviewer.ShowDialog()

    Hi Suresh,
        Instead of Parameter, you try Formula field and assign desired value to formula.
    HTH
    B Ravi Shankar

  • Pass values to formula with cr4e

    Post Author: gionnyDeep
    CA Forum: JAVA
    I need urgently to find a way for passing a value to formula runtime using cr 4 eclipse.
    Hope this is implemented in some way.

    Post Author: Jason
    CA Forum: Formula
    OK here is what I have:
    First Field:Dim strReqClass as stringif  {#GroupWeight} > 30 and val({vocDangerousGoods.Code}) > 2 then     strReqClass = "Class: " & {vocDangerousGoods.Class}    formula = strReqClassend if
    Second Field:Dim strReqClass as Stringformula = strReqClass
    If I understand what you said in your replay, then the second field should display the result of the first. However, it doesn't. I'm pretty new to this but to me the way we have declared the variables are private to that field. Is there a way to declare a global variable? If so, how?
    Thanks for your help.

  • PASS VALUES TO FORMULAS

    hi all
    Anyone knows how to pass values to a formula in a report.
    I mean i do not neet to pass value to a record selection formula .
    I need to pass to a formula!
    With java and CR4E exists any interface that does this?
    please help it's really urgent!

    See my comment on your post in another forum:
    http://diamond.businessobjects.com/node/4228
    -MJ

  • Passing values to hidden fields in screens

    Hi ,
    I have designed a screen which has i field which is output only, and two fields which are hidden.. the output only field gets populated when i select value from an alv tht pops up on the screen based on certain conditions.. the hidden fields should also be populated than.. but the hidden fields are not getting populated i think..
    i have assigned a t-code to this screen,
    and i need to call this transaction from another program passing values to all the fields.. i used parameter id for all teh fields, but values are not getting populated in the hidden and display fields. i gets in when i make it input enabled.. but i cannot let users enter values in 1 field, and i do not want users to see the other field.. What do i do???? please give your valuable suggestions. .a ny idea how to correct the issue?
    Regards,
    Suzie

    Hi,
    If you want one of the fields to be grey mode you can do that statically in the screen painter or dynamically in the progarm
    in PBO
    loop at screen
    if screen-name = 'TO_BE_GREY_MODE'.
    SCREEN-INPUT = 0
    ENDIF
    endloop
    for hidden fields if the screen name and the variable name in the program are same the data transfer takes place but the users cannot see this.
    Regards
    Ramchander Rao.K

  • Passing values to another field in APEX form

    Hi,
    How do I pass a value in 1 field to another field in APEX form ?
    I have a hidden field and I need to populate this field by another field.
    thanks

    I found the solution to my problem.
    [1] Create a "After Submit" under Computations.
    [2] Select 'Item Value' under Type in Item Name
    [3] Select "After Submit" under Computation Point
    [3] Enterer Item Name, which value needs to be passed in 'Source'
    thanks

  • How to set values of formula fields during runtime in crystal reports

    Hello All,
    Could any one help in letting me know how to set the values of a formula in the runtime.
    I tried using the below systax in the formula field
    Assume that I have 2 formula fields
    1. format_count
    2. format_display
    my formula is like below:
    in the formula field format_count i have
    format_display=pagenumber
    when checking for errors its throwing error stating "stamement is expected"
    Could any one help in resolving this
    Thanks

    Hi Ranjeet,
    Whenever you assign values to a variable, you need to use :=
    Like this:
    numbervar x := pagenumber
    And what exactly are you trying to do anyway?
    -Abhilash

  • Regarding how to pass values to the fields of a screen.

    Hi  all :
         there is a field called approver on screen. I'd like to pass value to it ,
         may I use the statement  like      approver-text = 'xxx'. ?
         is this ok?
         Thanks for any of your reply.

    Hi,
    Parameters: p_name type char20 default 'XXX'.
    you can give like this.
    or
    parameters: p_name type char20.
    Initialization.
    p_name = 'XXX'.
    both these will work
    regards
    Sarves

  • Pass values to formulas runtime using cr4e

    I need urgently to find a way for passing a value to formula runtime using cr 4 eclipse.
    Hope this is implemented in some way.

    <p>You should be able to use the FormulaField&#39;s setText() method to pass a formula (which evaluates to some value) at runtime.  Take a look at the <a href="http://devlibrary.businessobjects.com/BusinessObjectsXIR2SP2/en/en/JRC_SDK/jrc_java_api_doc/doc/jrcsdk_java_apiRef/index.html" target="_blank">JRC API Reference</a> on the DevLibrary for details.</p><p>-MJ</p>

  • Popup2 in SQL report not passing values of table fields

    Hello All,
    Can some one help me with this popup 2 case statement.
    Instead of the values behind the fields being passed the literal text of "A.Metric" & "A.Month" is beaing passed into the new page instead.
    A.Metric has a value of 10 and A.Month has a value of '01/May/2008'
    CASE WHEN ANALYSIS IS NOT NULL THEN
    '<a href="javascript:popUp2('''
               || 'f?p=&APP_ID.:305:&SESSION.::&DEBUG.::'
               || 'P305_METRIC_TYPE,P305_METRIC_MONTH:A.METRIC_TYPE,A.MONTH'
               || ''', 890, 460);style="text-decoration:underline;color:black; font-size: 90%">'
    || '<img src="#APP_IMAGES#notes.jpg">'
    || '</a>' END "Analysis"
    Frank

    Species 5618 wrote:
    Hello All,
    Can some one help me with this popup 2 case statement.
    Instead of the values behind the fields being passed the literal text of "A.Metric" & "A.Month" is beaing passed into the new page instead.
    A.Metric has a value of 10 and A.Month has a value of '01/May/2008'
    ----------------------------------------------------------------------------------------------------------------------<font face="Arial">CASE WHEN ANALYSIS IS NOT NULL THEN
    '&lt;a href=&quot;javascript:popUp2('''
               || 'f?p=&amp;APP_ID.:305:&amp;SESSION.::&amp;DEBUG.::'
               || 'P305_METRIC_TYPE,P305_METRIC_MONTH:'
               ||  A.METRIC_TYPE,A.MONTH
               || ''', 890, 460);&quot;style=&quot;text-decoration:underline;color:black; font-size: 90%&quot;&gt;'
               || '&lt;img src=&quot;#APP_IMAGES#notes.jpg&quot;&gt;'
               || '&lt;/a&gt;' END &quot;Analysis&quot;</font>
    Franksorry did not realise that my text was being changed by this forum's application edit tool
    Here is the SQL statement again
    Frank
    Edited by: Species 5618 on Apr 15, 2009 10:03 AM
    I also Tried this with no success (&
    <font face="Arial">CASE WHEN ANALYSIS IS NOT NULL THEN
    '&lt;a href=&quot;javascript:popUp2('''
               || 'f?p=&amp;APP_ID.:305:&amp;SESSION.::&amp;DEBUG.::'
               || 'P305_METRIC_TYPE,P305_METRIC_MONTH:'
               ||  &A.METRIC_TYPE.,&A.MONTH.
               || ''', 890, 460);&quot;style=&quot;text-decoration:underline;color:black; font-size: 90%&quot;&gt;'
               || '&lt;img src=&quot;#APP_IMAGES#notes.jpg&quot;&gt;'
               || '&lt;/a&gt;' END &quot;Analysis&quot;</font>
    Edited by: Species 5618 on Apr 15, 2009 10:10 AM

Maybe you are looking for

  • Network key for wifi, not password

    I am trying to set up a new iphone on my verizon account.  I backed up the old iphone on the icloud first.  Now I can't activate the new one without a wifi connection, but it won't give me the option to use a network key instead of a password to conn

  • How do I add an airport extreme to existing time capsule network and be able to use the router ethernet ports?

    Good day everyone.  I recently upgraded my airport extreme network by replacing the base station with a time capsule router.  Since I now have an "extra" airport extreme router, I've set it up on the other side of the house to both extend the wireles

  • OSX Lion won't boot after Bootcamp installation interrupted

    Hello, I started a Bootcamp installation on my OSX Lion Mac Pro. Once I realized that I could only use Windows 7, I had to hold off on the installation until I located my Windows 7 disk. I had set the Bootcamp partition size to 100 GB on a 500 GB Dri

  • No menu presets in Encore.

    Hi, I'm sure I'm doing something wrong, but after 3 hours of trying to figure it out myself, I'm tired. I have linked to Encore from Premiere Pro CS4. When I get over to Encore, I attempt to create a Menu. I go over to the lower right had corner wher

  • Fixed right-click issue in Save/Open Dialogue Photoshop crash

    Not sure where to post this, so I also started this new Topic... I have to share this somewhere... I've been dealing this problem for months and I finally fixed it on my own. My Antivirus, AVG, which is great, except for this glitch, was the root cau