KNOWLEDGE BASE
Log In    |    Knowledge Base    |    4D Home
Tech Tip: Don't use variables called C1, C2, C3, etc.
PRODUCT: 4D | VERSION: | PLATFORM:
Published On: November 19, 1999
Your current browser may not allow you to download the asset. We recommend Mozilla Firefox or Google Chrome.
Log In

You should never use variables called C1, C2, C3 etc in your 4D Databases - at least, if you want to use the Quick Report feature.

The reason is that as you generate a Quick Report, 4D uses process variables with those names to keep track of the values of each of the columns (counting from left to right).

So if you declare a variable:

C_Longint(C1)

and then try to display text in column 1, you will be surprised to see a
number there instead.

You need to be careful with your variable naming because of this, but the advantage is that you can make use of this feature in your Quick Reports. So if you want column 5 to contain the sum of columns 1 and 2, you can just put a formula in column 5 that adds C1 and C2.