在页面编号中表达罗马数字

时间:2012-12-16 23:35:39

标签: reporting-services

  

可能重复:
  SSRS page numbers in page footer

这是我的表达方式。

=Iif(Globals!PageNumber = "1", "i " ,nothing 
     & Iif(Globals!PageNumber = "2", "ii " ,nothing 
     & Iif(Globals!PageNumber = "3", "iii " ,nothing 
     & Iif(Globals!PageNumber = "4", "iv " ,nothing 
     & Iif(Globals!PageNumber = "5", "v " ,nothing 
     & Iif(Globals!PageNumber = "6", "vi " ,nothing 
     & Iif(Globals!PageNumber = "7", "vii " ,nothing 
     & Iif(Globals!PageNumber = "8", "ix " ,nothing 
     & Iif(Globals!PageNumber = "9", "ix " ,nothing 
     & Iif(Globals!PageNumber = "10", "x " ,Globals!PageNumber 
     OrElse Iif(Globals!PageNumber >=11, Globals!PageNumber,Globals!PageNumber)))))))))))

然而,在第10页之后,我想将所有页面作为正常的全局页码进行dsiplay,即1,2,3,4,5,6,7,8,9,10。这可能吗?上面的表达似乎循环。

1 个答案:

答案 0 :(得分:0)

我认为switch statement应该让这更容易:

switch(Globals!PageNumber = 1, "i",
       Globals!PageNumber = 2, "ii",
       ...
       Globals!PageNumber > 10, Globals!PageNumber)