change font report by user

Stimulsoft Reports.NET discussion
Post Reply
s_mokhtari
Posts: 13
Joined: Fri Nov 27, 2009 6:32 am
Location: iran

change font report by user

Post 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:
Alex K.
Posts: 6488
Joined: Thu Jul 29, 2010 2:37 am

change font report by user

Post 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.
s_mokhtari
Posts: 13
Joined: Fri Nov 27, 2009 6:32 am
Location: iran

change font report by user

Post 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:
Alex K.
Posts: 6488
Joined: Thu Jul 29, 2010 2:37 am

change font report by user

Post by Alex K. »

Hello,

You can use

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

Thank you.
s_mokhtari
Posts: 13
Joined: Fri Nov 27, 2009 6:32 am
Location: iran

change font report by user

Post by s_mokhtari »

hello
very very gooooooooood
thank a lot of for help me
:byebye: :byebye:
Alex K.
Posts: 6488
Joined: Thu Jul 29, 2010 2:37 am

change font report by user

Post by Alex K. »

Hello,

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

Thank you.
Post Reply