Skip to Content
avatar image
Former Member

Returning multiple records for a numeric parameter.

I am using a formula to display multiple records for a numeric parameter. I've found several formulas by searching that work just fine unless the parameter is left blank, my report allows for this so that all records for which the parameter is being used. In that case, I get the message that the "Parameter has no value." Any ideas on how to account for the null parameter?

The formulas below both have the same result; they work unless the parameter is left blank.

NumberVar AcctPmtr;
StringVar Display;
For AcctPmtr := 1 To Count({?Account}) Do (
Display := Display + ToText({?Account}[AcctPmtr],0,"") + ", ");
Left(Display, Len(Display)-2);

________

WhilePrintingRecords;
Local NumberVar Array InputNum := {?Account};
Local StringVar str := "";
Local NumberVar strLen := Count (InputNum);
Local NumberVar i;
For i := 1 to strLen
Step + 1
Do (str := str +', '+ ToText(InputNum[i],0,''));
str [3 to Length(str)]

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Mar 27, 2017 at 08:10 AM

    Try something like

    Local NumberVar Array InputNum:=0;

    if hasvaue( {?Account}) then InputNum;={?Account};

    Ian

    Add comment
    10|10000 characters needed characters exceeded