Link to home
Start Free TrialLog in
Avatar of hetturki
hetturki

asked on

Urgent : Macro subsitution

hi
how can I do the following

example:
   i am using quick report , the are 20 QrDbtext (  QrDbtext1,QrDbtext2,QrDbtext3 ........QrDbtext31 )  on the quick report that represented the days in the month ,
I want if the day of the month in FRIDAY i want to change the color or QrDbtext?  ...

like this
ex:
MMon := 11;
Days := 30;
for k := 1 to Days do
begin
   xdate := IntToStr(k)+'/'+IntToStr(mmon)+'/'+'2006';
   IF DayOfTheWeek(StrToDate(xdate)) = 5 then
        Qreport1.QrDbText.... .Color := clSilver;
end;
 
best regards
Avatar of atul_parmar
atul_parmar
Flag of India image

var
  dd, mm, yy : word;
  dt : tdate;
  i : integer;
begin
  mm := 11;
  dd := 30;
  yy := 2006;
  for i := 1 to dd do
  begin
    dd := EncodeDate(yy, mm, dd);
    if DayOfTheWeek(StrToDate(xdate)) = 5 then
        // set the color e.g. Qreport1.QrDbText.font.color := clSilver
  end;
end;
Avatar of hetturki
hetturki

ASKER

Sorry ! I think you dont understand my quetion
I need the following

 Qreport1.QrDbText1.color := clSilver;
 Qreport1.QrDbText2.color := clSilver;
..
..
...
...
 Qreport1.QrDbText20.color := clSilver;

i want do this with one statement

ASKER CERTIFIED SOLUTION
Avatar of atul_parmar
atul_parmar
Flag of India image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Forced accept.

Computer101
EE Admin