Welcome! Log In Create A New Profile

Advanced

Re: Change Font for a row / column in a report table

Posted by sivakrith 
Re: Change Font for a row / column in a report table
April 20, 2020 05:22AM
Hello,

We need to print a report from a Windev Table. The report consists of a few columns like

Col1 Col2 ....
G Name 1
A Name 2
G Name 3
G Name 4
A Name 5


Now I need to make 'BOLD' of Col2 if Col1 value is 'G'. If Col1 is 'A' no change in style of Col 2.

Any idea to do it?

Happiness Always
BKR Sivaprakash
Re: Change Font for a row / column in a report table
April 20, 2020 07:36PM
Hi
You tried to access the cell and apply the property "..Font Bold = True" ?
Re: Change Font for a row / column in a report table
April 21, 2020 05:13AM
EliasRC

I don't want every row of that column to get changed. Need to change only few rows of a column, based on a value on another column.

If it's a table, we could loop through all rows and set the required font, size, color etc., like

For i = 1 to TableCount(Table1)
IF Table1.COL_1 = "G" THEN
Table1.COL_2..FontBold = True
END
End


How to do the same in a report? Any idea?

Happiness Always
BKR Sivaprakash
Re: Change Font for a row / column in a report table
April 21, 2020 05:49PM
sivakrith

I would make a report from a table. In "Before printing BODY" I would put the value, if it is necessary to interact I would use data arrays with the properties to apply according to the conditions given before printing:

Values is Structure
Col_1 is string
Col_2 is string
Bold is boolean
END
arrValues is array of Values
...
IF arrValues[1].col_1 = "G" THEN
arrValues[x].Bold = True
END

//Before printing BODY
IF STC_BOLD = True THEN
STC_COL_1..FontBold = True
ELSE
STC_COL_1..FontBold = False
END


I have a similar example I made, email me if you need it.

I hope it helps you

Cheers

--
ercnet.elias@gmail.com
Elias Ramos CantĂș
Author:

Your Email:


Subject:


Spam prevention:
Please, enter the code that you see below in the input field. This is for blocking bots that try to post this form automatically. If the code is hard to read, then just try to guess it right. If you enter the wrong code, a new image is created and you get another chance to enter it right.
Message: