Crystal reports Crystal报告中的字符串数组中未显示值
我在Crystal report中有一个公式字段,如下所示Crystal reports Crystal报告中的字符串数组中未显示值,crystal-reports,Crystal Reports,我在Crystal report中有一个公式字段,如下所示 global numberVar detailLine ; global stringVar array SummaryArun ; WhilePrintingRecords ; Redim Preserve SummaryArun [3] ; SummaryArun[1] :="Litres Of Liquid"; SummaryArun[2] :="Litres Of Alcohol"; SummaryArun[3] := "
global numberVar detailLine ;
global stringVar array SummaryArun ;
WhilePrintingRecords ;
Redim Preserve SummaryArun [3] ;
SummaryArun[1] :="Litres Of Liquid";
SummaryArun[2] :="Litres Of Alcohol";
SummaryArun[3] := "Percentage Strength";
global stringVar array SummaryArun ;
Redim Preserve SummaryArun [3] ;
SummaryArun[3];
我得到这个公式字段的输出为“百分比强度”,但当我声明另一个公式字段时,如下所示
global numberVar detailLine ;
global stringVar array SummaryArun ;
WhilePrintingRecords ;
Redim Preserve SummaryArun [3] ;
SummaryArun[1] :="Litres Of Liquid";
SummaryArun[2] :="Litres Of Alcohol";
SummaryArun[3] := "Percentage Strength";
global stringVar array SummaryArun ;
Redim Preserve SummaryArun [3] ;
SummaryArun[3];
我在这个领域没有任何进展
根据我将其作为gloabl数组处理,我们需要将第二个公式字段值的值作为“百分比强度”
如何在另一个公式字段中获取数组值?更改第一个公式:
//{@formula_one}
// unless you are using this formula in the second pass (i.e. with summary fields)
// whileprintingrecords is unnecessary; it should always be the first entry if you are going
// to use it
WhilePrintingRecords ;
global numberVar detailLine ;
global stringVar array SummaryArun ;
// you don't need to add the Preserve option unless you are trying to keep existing values
// this doesn't appear to be the case here
Redim SummaryArun [3] ;
SummaryArun[1] := "Litres Of Liquid";
SummaryArun[2] := "Litres Of Alcohol";
SummaryArun[3] := "Percentage Strength";
更改第二个公式:
//{@Percentage Strength}
// if you are declaring your array WhilePrintingRecords (as you have done in the other formula)
// then you will need to do so when you *use* the variable
WhilePrintingRecords;
global stringVar array SummaryArun;
// you aren't changing the size of the array, so this line isn't necessary
//Redim Preserve SummaryArun [3] ;
SummaryArun[3];