Skip to main content
Solved

How to apply Modulus operator in report designer?


Forum|alt.badge.img

Hello Community,
I have a code line that I am trying to apply in report designer too but haven’t been able to. The Code is:
[SOLine.LineNbr]-1) Mod 8 + 1
How can I apply the same code in my report designer for a field?

Best answer by Naveen Boga

Hi @harshita53  I just checked the below formula and it is working as expected and not showing like 1 of 8, 1 of 8, 3 of 8, 3 of 8. Can you re-check and confirm

 

=[SOLine.LineNbr]-1) % 8 + 1

View original
Did this topic help you find an answer to your question?

3 replies

lauraj46
Captain II
Forum|alt.badge.img+8
  • Captain II
  • 568 replies
  • December 7, 2023

Hi @harshita53 ,

In Report Designer the modulus operator is %, as in:

=[SOLine.LineNbr]-1) % 8 + 1

​​​​​​


Forum|alt.badge.img
  • Author
  • Varsity I
  • 24 replies
  • December 7, 2023
lauraj46 wrote:

Hi @harshita53 ,

In Report Designer the modulus operator is %, as in:

=[SOLine.LineNbr]-1) % 8 + 1

​​​​​​

Hey @lauraj46 , I tried your suggested syntax & now my report is skipping the even numbers. So for example if i have 8 items it displays 1 of 8, 1 of 8, 3 of 8, 3 of 8 .. & so on instead of 1 of 8, 2 of 8, 3 of 8, 4 of 8...


Naveen Boga
Captain II
Forum|alt.badge.img+19
  • Captain II
  • 3393 replies
  • Answer
  • December 7, 2023

Hi @harshita53  I just checked the below formula and it is working as expected and not showing like 1 of 8, 1 of 8, 3 of 8, 3 of 8. Can you re-check and confirm

 

=[SOLine.LineNbr]-1) % 8 + 1


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings