Page 1 of 1

change font report by user

Posted: Wed Sep 15, 2010 8:56 am
by s_mokhtari
hi
i change font report and size font
when user select fon from dropdownlist font report chang

Code: Select all

StiStyle  d = new StiStyle("zar");
d.Font.FontFamily.Name = "zar";  
this code have error
thanks:emb:

change font report by user

Posted: Thu Sep 16, 2010 3:13 am
by Alex K.
Hello,

Use the following code:

Code: Select all

Stimulsoft.Report.StiStyle StyleZar = new Stimulsoft.Report.StiStyle();
StyleZar.Name = "Zar";
StyleZar.Border = new Stimulsoft.Base.Drawing.StiBorder(Stimulsoft.Base.Drawing.StiBorderSides.None, System.Drawing.Color.Black, 1,
         Stimulsoft.Base.Drawing.StiPenStyle.Solid, false, 4, new Stimulsoft.Base.Drawing.StiSolidBrush(System.Drawing.Color.Black));
StyleZar.Brush = new Stimulsoft.Base.Drawing.StiSolidBrush(System.Drawing.Color.Transparent);
StyleZar.Font = new System.Drawing.Font("Tahoma", 10F, System.Drawing.FontStyle.Bold);
StyleZar.TextBrush = new Stimulsoft.Base.Drawing.StiSolidBrush(System.Drawing.Color.Black);

Styles.Clear();
Styles.AddRange(new Stimulsoft.Report.StiBaseStyle[] {StyleZar});

Text1.ComponentStyle = "Zar";
Thank you.

change font report by user

Posted: Thu Sep 16, 2010 7:54 am
by s_mokhtari
hello
this your code have error

Code: Select all

Styles.Clear();
Styles.AddRange(new Stimulsoft.Report.StiBaseStyle[] {StyleZar});

Text1.ComponentStyle = "Zar";
this code in report dont correctly
i want change font header and size font
and font header with font databind different
thank a lot of
:feelgood:

change font report by user

Posted: Thu Sep 16, 2010 8:27 am
by Alex K.
Hello,

You can use

Text1.Font = new System.Drawing.Font("Arial", 8F);

Thank you.

change font report by user

Posted: Thu Sep 16, 2010 9:03 am
by s_mokhtari
hello
very very gooooooooood
thank a lot of for help me
:byebye: :byebye:

change font report by user

Posted: Thu Sep 16, 2010 9:08 am
by Alex K.
Hello,

We are always glad to help you!
Let us know if you need any additional help.

Thank you.