Hello a2z, and welcome,
Assuming this is a text report, then you can fill in the blanks in two ways:
In the Field Properties, you can define blank rows to be completed with the value of the previous record.
If you want to replace null values with 0, the easiest way is to define, in the Table window, a calculated field:
Hope this helps,
I'm all the time having to produce fixed length files for interfacing between systems which require a certain lenth string filled with either spaces or zeros and left or right justified.... blah....blah....blah. So, I created a FILL user-defined function and I'd like to share it in hopes that it will help you out; especially, if you do it quite often.
Create a new user-defined function and define as follows:
1. Name: Fill
Fill(s,n,c,j) - Returns a string the <2>length of n</2> that contains the <1>string s</1> and filling the remaining character length with the <3>character c</3> with a <4>justification of j (R or L)</4>.[/CODE]
NOTE: The <> and </> tags in the description are used to tell Monarch which words to bold when defining your parameters in the calculated field's formula section.
3. In the Forms section, click the add button.
4. On the parameters tab, add the following parameters:
Name Type Test Value
s Character 4567
n Numeric 8
c Character 0
j Character R
5. Select Character as the return type
6. On the Formula tab, add the following code
7. To test, go back to the Parameters tab and click Test. You should get the result 00004567
8. Click OK.
9. In the Categories section, select String
10. Click OK and you're done.
The 1st parameter (s) is the passing field value.
The 2nd parameter (n) is the length of the returning string
The 3rd parameter (c) is the character you wish to fill remaining spaces with
The 4th parameter (j) is the justification of the returning string (L or R).
For right justified, zero filled that's 10 characters in length:
For left justified, space filled that's 20 characters in length:
Hope this helps.