Variable displays at one part while does not in another part in a

Discussion in 'ASP General' started by Jack, May 9, 2005.

  1. Jack

    Jack Guest

    Hi,
    I got a asp page where a variable BudgetTotal is calculated as below:

    BudgetTotal = (rstemp.Fields("FedBudget") + rstemp.Fields("StateBudget") +
    rstemp.Fields("LocalBudget"))

    Initially, when I check this variable value, it displays according to
    the following command.
    Response.Write "Total Budget" & "<br>"
    Response.Write BudgetTotal & "<br>"
    Response.Write "End" & "<br>"
    However, this variable when used as a part of a table, does not display the
    value. No idea why that would be.
    The following is part of the code where the variable is used in a table:
    Response.write "<TD ALIGN=RIGHT WIDTH='10%' >" & FormatCurrency(BudgetTotal)
    & "</TD>" & vbCRLF

    Any help is appreciated in advance. Thanks.
     
    Jack, May 9, 2005
    #1
    1. Advertising

  2. Jack wrote:
    > Hi,
    > I got a asp page where a variable BudgetTotal is calculated as below:
    >
    > BudgetTotal = (rstemp.Fields("FedBudget") +
    > rstemp.Fields("StateBudget") + rstemp.Fields("LocalBudget"))
    >
    > Initially, when I check this variable value, it displays according to
    > the following command.
    > Response.Write "Total Budget" & "<br>"
    > Response.Write BudgetTotal & "<br>"
    > Response.Write "End" & "<br>"
    > However, this variable when used as a part of a table, does not
    > display the value. No idea why that would be.
    > The following is part of the code where the variable is used in a
    > table: Response.write "<TD ALIGN=RIGHT WIDTH='10%' >" &
    > FormatCurrency(BudgetTotal) & "</TD>" & vbCRLF
    >
    > Any help is appreciated in advance. Thanks.


    Sorry, we're not clairvoyant. Create a small test page that demonstrates
    this problem and show the code to us (perhaps the exercise of creating the
    small page will help you spot the problem yourself).

    Bob Barrows
    --
    Microsoft MVP -- ASP/ASP.NET
    Please reply to the newsgroup. The email account listed in my From
    header is my spam trap, so I don't check it very often. You will get a
    quicker response by posting to the newsgroup.
     
    Bob Barrows [MVP], May 9, 2005
    #2
    1. Advertising

  3. Jack

    Mark Schupp Guest

    What do you see in the column tag if you "view source" on the page.

    --
    --Mark Schupp


    "Jack" <> wrote in message
    news:...
    > Hi,
    > I got a asp page where a variable BudgetTotal is calculated as below:
    >
    > BudgetTotal = (rstemp.Fields("FedBudget") + rstemp.Fields("StateBudget") +
    > rstemp.Fields("LocalBudget"))
    >
    > Initially, when I check this variable value, it displays according to
    > the following command.
    > Response.Write "Total Budget" & "<br>"
    > Response.Write BudgetTotal & "<br>"
    > Response.Write "End" & "<br>"
    > However, this variable when used as a part of a table, does not display
    > the
    > value. No idea why that would be.
    > The following is part of the code where the variable is used in a table:
    > Response.write "<TD ALIGN=RIGHT WIDTH='10%' >" &
    > FormatCurrency(BudgetTotal)
    > & "</TD>" & vbCRLF
    >
    > Any help is appreciated in advance. Thanks.
     
    Mark Schupp, May 9, 2005
    #3
  4. Jack

    Jack Guest

    Re: Variable displays at one part while does not in another part i

    Thanks Mark and Bob for your respective advise.

    Here is the view source output for the budget line, Mark:
    <TD WIDTH='1%' >&nbsp</TD><TD WIDTH='1%' >&nbsp</TD><TD WIDTH='1%'
    >&nbsp</TD><TD WIDTH='1%' >&nbsp</TD><TD WIDTH='10%'

    ALIGN=RIGHT><B>BUDGET:</B></TD><TD ALIGN=RIGHT WIDTH='10%' >$0.00</TD>
    The above stillshows the BUDGET as $0.00. Any further thoughts. Regards.


    "Mark Schupp" wrote:

    > What do you see in the column tag if you "view source" on the page.
    >
    > --
    > --Mark Schupp
    >
    >
    > "Jack" <> wrote in message
    > news:...
    > > Hi,
    > > I got a asp page where a variable BudgetTotal is calculated as below:
    > >
    > > BudgetTotal = (rstemp.Fields("FedBudget") + rstemp.Fields("StateBudget") +
    > > rstemp.Fields("LocalBudget"))
    > >
    > > Initially, when I check this variable value, it displays according to
    > > the following command.
    > > Response.Write "Total Budget" & "<br>"
    > > Response.Write BudgetTotal & "<br>"
    > > Response.Write "End" & "<br>"
    > > However, this variable when used as a part of a table, does not display
    > > the
    > > value. No idea why that would be.
    > > The following is part of the code where the variable is used in a table:
    > > Response.write "<TD ALIGN=RIGHT WIDTH='10%' >" &
    > > FormatCurrency(BudgetTotal)
    > > & "</TD>" & vbCRLF
    > >
    > > Any help is appreciated in advance. Thanks.

    >
    >
    >
     
    Jack, May 9, 2005
    #4
  5. Jack

    Jack Guest

    Re: Variable displays at one part while does not in another part i

    Bob,
    I am going to work on creating a small test page to see if I can find out
    where the problem is. In case I still have no clue, I will further post. In
    any event I appreciate your advise. Regards.

    "Bob Barrows [MVP]" wrote:

    > Jack wrote:
    > > Hi,
    > > I got a asp page where a variable BudgetTotal is calculated as below:
    > >
    > > BudgetTotal = (rstemp.Fields("FedBudget") +
    > > rstemp.Fields("StateBudget") + rstemp.Fields("LocalBudget"))
    > >
    > > Initially, when I check this variable value, it displays according to
    > > the following command.
    > > Response.Write "Total Budget" & "<br>"
    > > Response.Write BudgetTotal & "<br>"
    > > Response.Write "End" & "<br>"
    > > However, this variable when used as a part of a table, does not
    > > display the value. No idea why that would be.
    > > The following is part of the code where the variable is used in a
    > > table: Response.write "<TD ALIGN=RIGHT WIDTH='10%' >" &
    > > FormatCurrency(BudgetTotal) & "</TD>" & vbCRLF
    > >
    > > Any help is appreciated in advance. Thanks.

    >
    > Sorry, we're not clairvoyant. Create a small test page that demonstrates
    > this problem and show the code to us (perhaps the exercise of creating the
    > small page will help you spot the problem yourself).
    >
    > Bob Barrows
    > --
    > Microsoft MVP -- ASP/ASP.NET
    > Please reply to the newsgroup. The email account listed in my From
    > header is my spam trap, so I don't check it very often. You will get a
    > quicker response by posting to the newsgroup.
    >
    >
    >
     
    Jack, May 9, 2005
    #5
  6. Jack

    Mark Schupp Guest

    Re: Variable displays at one part while does not in another part i

    I think you will need to look at all of the code between the point where you
    can get the value and where you cannot.

    Gradually move your debugging display code down the page until it no longer
    shows the expected value.

    Also:

    Does it display if it is not formatted using FormatCurrency?
    Do you have "implicit none" at the top of the page?

    --
    Mark Schupp



    "Jack" <> wrote in message
    news:...
    > Thanks Mark and Bob for your respective advise.
    >
    > Here is the view source output for the budget line, Mark:
    > <TD WIDTH='1%' >&nbsp</TD><TD WIDTH='1%' >&nbsp</TD><TD WIDTH='1%'
    > >&nbsp</TD><TD WIDTH='1%' >&nbsp</TD><TD WIDTH='10%'

    > ALIGN=RIGHT><B>BUDGET:</B></TD><TD ALIGN=RIGHT WIDTH='10%' >$0.00</TD>
    > The above stillshows the BUDGET as $0.00. Any further thoughts. Regards.
    >
    >
    > "Mark Schupp" wrote:
    >
    > > What do you see in the column tag if you "view source" on the page.
    > >
    > > --
    > > --Mark Schupp
    > >
    > >
    > > "Jack" <> wrote in message
    > > news:...
    > > > Hi,
    > > > I got a asp page where a variable BudgetTotal is calculated as below:
    > > >
    > > > BudgetTotal = (rstemp.Fields("FedBudget") +

    rstemp.Fields("StateBudget") +
    > > > rstemp.Fields("LocalBudget"))
    > > >
    > > > Initially, when I check this variable value, it displays according to
    > > > the following command.
    > > > Response.Write "Total Budget" & "<br>"
    > > > Response.Write BudgetTotal & "<br>"
    > > > Response.Write "End" & "<br>"
    > > > However, this variable when used as a part of a table, does not

    display
    > > > the
    > > > value. No idea why that would be.
    > > > The following is part of the code where the variable is used in a

    table:
    > > > Response.write "<TD ALIGN=RIGHT WIDTH='10%' >" &
    > > > FormatCurrency(BudgetTotal)
    > > > & "</TD>" & vbCRLF
    > > >
    > > > Any help is appreciated in advance. Thanks.

    > >
    > >
    > >
     
    Mark Schupp, May 10, 2005
    #6
  7. Jack

    McKirahan Guest

    Re: Variable displays at one part while does not in another part i

    "Mark Schupp" <> wrote in message
    news:...
    > I think you will need to look at all of the code between the point where

    you
    > can get the value and where you cannot.
    >
    > Gradually move your debugging display code down the page until it no

    longer
    > shows the expected value.
    >
    > Also:
    >
    > Does it display if it is not formatted using FormatCurrency?
    > Do you have "implicit none" at the top of the page?
    >
    > --
    > Mark Schupp


    [snip]

    Do you mean "Option Explicit"?

    I've never heard of "implicit none".
     
    McKirahan, May 10, 2005
    #7
  8. Jack

    Mark Schupp Guest

    Re: Variable displays at one part while does not in another part i

    You're right. "Option Explicit" is what I meant.

    "implicit none" is from Fortran (that was a looooong time ago for me).
    memory is a strange thing sometimes.

    --
    Mark Schupp



    "McKirahan" <> wrote in message
    news:...
    > "Mark Schupp" <> wrote in message
    > news:...
    > > I think you will need to look at all of the code between the point where

    > you
    > > can get the value and where you cannot.
    > >
    > > Gradually move your debugging display code down the page until it no

    > longer
    > > shows the expected value.
    > >
    > > Also:
    > >
    > > Does it display if it is not formatted using FormatCurrency?
    > > Do you have "implicit none" at the top of the page?
    > >
    > > --
    > > Mark Schupp

    >
    > [snip]
    >
    > Do you mean "Option Explicit"?
    >
    > I've never heard of "implicit none".
    >
    >
     
    Mark Schupp, May 10, 2005
    #8
  9. Jack

    Jack Guest

    Re: Variable displays at one part while does not in another part i

    Thanks Mark for following up with this issue. I actually checked the value of
    FormatCurrency(BudgetTotal) and it too gives me the correct value when I do a
    response.write on the above. I will follow your and Bob's advise and see if I
    could resolve this problem. Sorry for the late response. Had to handle other
    IT issues. Regards.

    "Mark Schupp" wrote:

    > You're right. "Option Explicit" is what I meant.
    >
    > "implicit none" is from Fortran (that was a looooong time ago for me).
    > memory is a strange thing sometimes.
    >
    > --
    > Mark Schupp
    >
    >
    >
    > "McKirahan" <> wrote in message
    > news:...
    > > "Mark Schupp" <> wrote in message
    > > news:...
    > > > I think you will need to look at all of the code between the point where

    > > you
    > > > can get the value and where you cannot.
    > > >
    > > > Gradually move your debugging display code down the page until it no

    > > longer
    > > > shows the expected value.
    > > >
    > > > Also:
    > > >
    > > > Does it display if it is not formatted using FormatCurrency?
    > > > Do you have "implicit none" at the top of the page?
    > > >
    > > > --
    > > > Mark Schupp

    > >
    > > [snip]
    > >
    > > Do you mean "Option Explicit"?
    > >
    > > I've never heard of "implicit none".
    > >
    > >

    >
    >
    >
     
    Jack, May 10, 2005
    #9
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Chumley Walrus
    Replies:
    1
    Views:
    12,183
    =?Utf-8?B?QnJpYW4gQnJvd24=?=
    Dec 16, 2004
  2. loveNUNO
    Replies:
    2
    Views:
    924
    loveNUNO
    Nov 20, 2003
  3. Web Developer
    Replies:
    1
    Views:
    443
    Ben Voigt
    Jan 5, 2007
  4. Robert Cohen
    Replies:
    3
    Views:
    277
    Andrew Durstewitz
    Jul 15, 2003
  5. cayenne
    Replies:
    19
    Views:
    666
    John W. Krahn
    May 20, 2004
Loading...

Share This Page