Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

The carriage return doesn't seem to work??

Status
Not open for further replies.

majordog

Programmer
Jul 8, 2002
222
CA
Hi All,
Below is the code within a formula - All the "CO" etc.. display but nothing past that when I run the report - There are no syntax errors when I do the check but still, those values do not display - Can anybody tell me what is incorrect about this structure?
IF {Emission_Results.Compound_Number} = 1 THEN
"CO"+ Chr(13) + ToText({Emission_Results.prezeromr}) +
Chr(13) + ToText({Emission_Results.prespanmr}) +
Chr(13) + ToText({Emission_Results.samplemr}) +
Chr(13) + ToText({Emission_Results.ambientmr}) +
Chr(13) + ToText({Emission_Results.postzeromr}) +
Chr(13) + ToText({Emission_Results.postspanmr})
ELSE IF {Emission_Results.Compound_Number} = 2 THEN
"CO2" +
Chr(13) + ToText({Emission_Results.prezeromr}) +
Chr(13) + ToText({Emission_Results.prespanmr}) +
Chr(13) + ToText({Emission_Results.samplemr}) +
Chr(13) + ToText({Emission_Results.ambientmr}) +
Chr(13) + ToText({Emission_Results.postzeromr}) +
Chr(13) + ToText({Emission_Results.postspanmr})
ELSE IF {Emission_Results.Compound_Number} = 3 THEN
"NOX" +
Chr(13) + ToText({Emission_Results.prezeromr}) +
Chr(13) + ToText({Emission_Results.prespanmr}) +
Chr(13) + ToText({Emission_Results.samplemr}) +
Chr(13) + ToText({Emission_Results.ambientmr}) +
Chr(13) + ToText({Emission_Results.postzeromr}) +
Chr(13) + ToText({Emission_Results.postspanmr})
ELSE IF {Emission_Results.Compound_Number} = 4 THEN
"THC" +
Chr(13) + ToText({Emission_Results.prezeromr}) +
Chr(13) + ToText({Emission_Results.prespanmr}) +
Chr(13) + ToText({Emission_Results.samplemr}) +
Chr(13) + ToText({Emission_Results.ambientmr}) +
Chr(13) + ToText({Emission_Results.postzeromr}) +
Chr(13) + ToText({Emission_Results.postspanmr})
ELSE IF {Emission_Results.Compound_Number} = 5 THEN
"NO" +
Chr(13) + ToText({Emission_Results.prezeromr}) +
Chr(13) + ToText({Emission_Results.prespanmr}) +
Chr(13) + ToText({Emission_Results.samplemr}) +
Chr(13) + ToText({Emission_Results.ambientmr}) +
Chr(13) + ToText({Emission_Results.postzeromr}) +
Chr(13) + ToText({Emission_Results.postspanmr})

 
Hi !

Check that you have "Can Grow" checked under "Format Field" for your formula field.

/Goran
 
Some extra formula advice you didn't ask for:
Since it's redundent, assign the information to a variable.


stringvar info:=
Chr(13) + ToText({Emission_Results.prezeromr}) +
Chr(13) + ToText({Emission_Results.prespanmr}) +
Chr(13) + ToText({Emission_Results.samplemr}) +
Chr(13) + ToText({Emission_Results.ambientmr}) +
Chr(13) + ToText({Emission_Results.postzeromr}) +
Chr(13) + ToText({Emission_Results.postspanmr}) ;

IF {Emission_Results.Compound_Number} = 1 THEN
"CO"+ info
ELSE
IF {Emission_Results.Compound_Number} = 2 THEN
"CO2" +info
ELSE
IF {Emission_Results.Compound_Number} = 3 THEN
"NOX" +info
ELSE
IF {Emission_Results.Compound_Number} = 4 THEN
"THC" + info
ELSE
IF {Emission_Results.Compound_Number} = 5 THEN
"NO" + info
Mike
 
thanks - the formula is within a cross tab report and is in a column header - My problem fell in-line with your conclusion - I hadn't actually made the field size large enough.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top