Results 1 to 4 of 4

Thread: Confused By Field References

  1. #1

    Thread Starter
    New Member
    Join Date
    Nov 2007
    Posts
    10

    Confused By Field References

    All:

    New to VB6 & the IDE Crystal Reports engine; so apologies in advance if this seems elementary.

    (Did my best search for this quesion/subject; but did not find; but if it exists, feel free to foward me there too... )

    Now, on with it...

    Web based application developed by a 3rd party. SQL Server 2k5 db being queried / reported by the VB application.

    Several reports developed with the Crystal Reports native engine (Visual Studio.NET).

    Within the reports typically have a common field <<MonthTotals>>.

    <<MonthTotals>> itself fills @20 additional variables that are also themselves "independent" fields used elsewhere in the report.

    (...looks a bit redundant -2- me; but for now that's the design to the best of my description...)

    So... after an extended series of calculations, the formula editor closes with a series of statements similar to:
    (DV=DeclaredVariable; and FV=FilledVariable)

    Code:
    DV1 = DV1 + FVa
    DV2 = DV2 + FVb
    DV3 = DV3 + FVc
    ...my confusion is that while it's easily apparent how FVa, FVb, and FVc are being filled;

    ...DV1 is only represented by a line

    Code:
    formula = DV1
    Now... I mentioned above that each of these variables are themselves also listed as "independent fields..."

    In other words within the Field Explorer, alongside my field <<MonthTotals>> there are also <<DV1>>, <<DV2>>, and <<DV3>>.

    (I should mention here that <<MonthTotals>>
    declares each of the <<DVx>> variables
    as GLOBAL VARIABLES.)


    In many cases the field reference repeats the exact formula that was applied in <<MonthTotals>>;

    ...so that if <<MonthTotals>> listed the following...
    Code:
    FVa = (value1+value2) * value3
    ...then also in the list of Formula Fields you will find <<FVa>> whos Formula Editor reads
    Code:
    FVa = (value1+value2) * value3

    However,... within <<MonthTotals>> I also have <<DV1>>, where the <<MonthTotals>> formula editor simply reads...
    Code:
    DV1 = DV1+FV
    and/or
    Code:
    formula=DVx
    What seemed logical, was that DVx is a GLOBAL VARIABLE that must be filled elsewhere; so find that and you can understand DV itself.

    However, when I find the field <<DVx>> consistently the Formula Editor for this field only reads :
    Code:
    formula=DVx
    (excluding the GLOBAL Declaration within the individual field as well)


    So... I'm afraid I'm a bit lost as to how to understand the role of this code

    ...can someone please help me understand the syntax
    Code:
    formula = DVx
    ...and suggestions on how to find where this variable is actually filled?

    ALL INPUT SUGGESTIONS ARE WELCOME AND APPRECIATED!
    THANK YOU IN ADVANCE!

  2. #2
    Frenzied Member
    Join Date
    May 2006
    Location
    some place in the cloud
    Posts
    1,886

    Re: Confused By Field References

    Could You post a Report Definition

    Click on Export icon / Select Format = Report Definition & Destination = Disk File

  3. #3

    Thread Starter
    New Member
    Join Date
    Nov 2007
    Posts
    10

    Re: Confused By Field References

    jggtz:

    ...love to, but...

    Cannot seem to follow your instructions

    No [EXPORT] icon on the active toolbars:
    CrystalReportsInsert,
    CrystalReportsMain,
    Standard

    Did a bit of GOOGLE on your instructions and saw some direction to export from the FILE menu, however EXPORT is not part of the root FILE menu;

    VS Help does not return anything relevant to a report for a search on EXPORT.

    Can you offer some more detail as to how one would export this report from within VisualStudio.net?

  4. #4
    Hyperactive Member
    Join Date
    Jul 2007
    Posts
    479

    Re: Confused By Field References

    It appears that your DVx formulas and fields are in the Details section and if so, then because the DVx variables are global, they contain the running total of DVx formulas. For each iteration of the formula field on each row, the total is added to.
    Hope this helps

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width