Solved

Highlighting every other line in Report Writer

  • 14 November 2023
  • 4 replies
  • 45 views

Userlevel 3
Badge

Group,

I started this on a tread that was marked completed, so afraid that it won’t be seen.  That original post had some great information, but I need a bit more. 

The report that I am working on is GL633500 from out of the box (I believe).

I duplicated a section to create a new highlighted area, but it didn’t move it directly under the original section.  How can I move it so that the new one is right below the original section? 

The red line row is the original section, the blue is the duplicate section.

 

The visible expression I attempted to use to highlight every other section, but it didn’t work.  So that is one area I could use some help with. Is there something we need to add to the filters in order to use like LineNbr in that expression?

Below is a screenshot of the report.  This is why I choose PeriodID.

This is what the report looks like when it is run:

 

Second question I have is with the visible expression on the original section.  There is already an expression listed there.  What would the best way to write it? (I am still very new to writing code).

 

Thank you in advance for any and all pointers!

icon

Best answer by miguel80 15 November 2023, 02:13

View original

4 replies

Userlevel 4
Badge +1

Hi!

What I have done is:

  1. Create a second details section.
  2. Color the second one grey (for example) and the first one leave it as it is.
  3. Create a variable called “Background” on the detail section that changes form 0 to 1 when the variable is “0” and from 1 to 0 when the variable is “1”.  IIF($Background=1,0,1)
  4. Create a visibility condition where the first detail section is visible when $Background=0 and the second one when $Background=1

Does this make sense to you?

Also, for the visibility question try adding “AND $Background= 1” (or 0).

If you don’t know how to create variables then go to the details section and select the “Variables property”:

Create a new variable called “Background” with the following ValueExpr  =Assign('$Background',IIF($Background=1,0,1))

 I hope this works for you

Userlevel 7
Badge +8

instead of creating two detail section you can simply check odd/even LineCounter and set the desired color on them

Userlevel 3
Badge

@aaghaei ,

Where is the LineCounter located?  I have not seen that in Report Writer.

Thank you!

Userlevel 3
Badge

@miguel80 ,

Your directions did assist in completing the task I was wanting.  

Thank you for your help!

Reply


About Acumatica ERP system
Acumatica Cloud ERP provides the best business management solution for transforming your company to thrive in the new digital economy. Built on a future-proof platform with open architecture for rapid integrations, scalability, and ease of use, Acumatica delivers unparalleled value to small and midmarket organizations. Connected Business. Delivered.
© 2008 — 2024  Acumatica, Inc. All rights reserved