Declaring Variables
frenz,
Pg 101 User Manual tells that in basic script
dim i,j=0 can be used for declaring more than one variable.
for example:
dim i,j,k=0
for i=0 to <count(MasterData1)>
j=j+1
k=k+1
next
memo4.text=j
memo5.text=k
The Proerties of memo has beeen changed to number so
there is no need for using any conversion function.
THe PBM is if i execute the above program i'm getting
Invariant type Conversion..WHYYY????
Pg 101 User Manual tells that in basic script
dim i,j=0 can be used for declaring more than one variable.
for example:
dim i,j,k=0
for i=0 to <count(MasterData1)>
j=j+1
k=k+1
next
memo4.text=j
memo5.text=k
The Proerties of memo has beeen changed to number so
there is no need for using any conversion function.
THe PBM is if i execute the above program i'm getting
Invariant type Conversion..WHYYY????
Comments
At least let me get answer for this question.
i want to display (a* + (c*d) in a Memo
So i made display format of this memo as number.The delimiter
for memo is <,>.
i'm getting syntax error if i use (a* +(c*d) and i hav tried putting
delimiters also.
wat to do now???
Friends kindly help me
no need to change delimiters.
a tfrxmemoview has a memo property, it is a multilined text object, it may contain static text, datafields, variables, expressions or a combination of all.
in any case anything passed into the memo.text property from code must be in the form of a string more on this later.
a memo containing a data field or a variable from the the categorized variable list
would contain [Customers."Company"] or for a variable [myvarname].
When the engines parser encounters the delimiter in then subtitutes the value for what is contained within the delimiter
variables created in script code can be displayed within the memo as well
by enclosing in a delimter
[a] or [a*b] or [(a*b)+c] are valid examples.
creating variables in script code
at the begining of the code page before the empty begin end block
declare variables of the type you require, these will be global and are available to all the events of any internal report object.. they can be initialized to a value in the empty begin end block or in any event of any object, but they must have a value before being displayed in an object.
this type of variable can be modified or acessed within script code without any <>,
in contrast to categorized variables which need the get or set method
ie assume a b c were created as integers , and initialized to some value
code in an obp event of a band containg a memoview
c = a+b or c = (a+b) would be valid.
pass the variable in to the memo
memo1.memo.text = '[c]' or memo1.memo.text = inttostr© would be valid.
watch the behavior of aggregate functions, untill they have been used for example in a footer memo they are not available in code.
hope this helps you out.
BTW
when posting formulas turn off emoticons.
Regards