ReportHacker
Programmer
Hi,
I have some database fields that may or may not have data, and I
have two columns with 10 rows in the detail section of the report (20 spots).
The database fields look like: {pxdcr_data.Press1}, {pxdcr_data.Press2},
up to 20 of these. I would like to generate 20 formulas ("@OutPress1",
"@OutPress2", etc..) for each "spot" in the detail. With any situation where
there may be no data for "{pxdcr_data.Press1}", but there is data for
"{pxdcr_data.Press2}", I would like to put the data from"{pxdcr_data.Press2}"
into spot #1. So basically-there isn't any spaces of displayed data in the 10 rows
(or columns) in the detail.
I would like to try a Basic syntax of something like this (this would be
in the 1st spot):
Dim i As Number
Dim x As Number
Dim name As String
x=1 'Set this to the Pressure xducer value (spot) to be displayed
For i=1 to 20
name = "{pxdcr_data.Press" & i & "}"
IF IsNull(name) = False Then
IF i = x Then
formula=name
End If
End IF
Note: the database fields are single precision data (numerics), with default = Null
So I would place this same formula in each of the 20 spots (formulas)
and change the value of x (noted above) corresponding to the formula number(or spot) like: @OutPress1, @OutPress2, etc...
Question: What am I doing wrong ???? What is a better solution ????
I thank you for your help on this one ..
Sincerely,
Karl H.
I have some database fields that may or may not have data, and I
have two columns with 10 rows in the detail section of the report (20 spots).
The database fields look like: {pxdcr_data.Press1}, {pxdcr_data.Press2},
up to 20 of these. I would like to generate 20 formulas ("@OutPress1",
"@OutPress2", etc..) for each "spot" in the detail. With any situation where
there may be no data for "{pxdcr_data.Press1}", but there is data for
"{pxdcr_data.Press2}", I would like to put the data from"{pxdcr_data.Press2}"
into spot #1. So basically-there isn't any spaces of displayed data in the 10 rows
(or columns) in the detail.
I would like to try a Basic syntax of something like this (this would be
in the 1st spot):
Dim i As Number
Dim x As Number
Dim name As String
x=1 'Set this to the Pressure xducer value (spot) to be displayed
For i=1 to 20
name = "{pxdcr_data.Press" & i & "}"
IF IsNull(name) = False Then
IF i = x Then
formula=name
End If
End IF
Note: the database fields are single precision data (numerics), with default = Null
So I would place this same formula in each of the 20 spots (formulas)
and change the value of x (noted above) corresponding to the formula number(or spot) like: @OutPress1, @OutPress2, etc...
Question: What am I doing wrong ???? What is a better solution ????
I thank you for your help on this one ..
Sincerely,
Karl H.