.NETGURU
Changing fonts and sizes
Messages   Related Types
This message was discovered on ASPFriends.com 'ngfx-crystal' list.


Jim Toth
My users would like to be able to customize fonts and sizes in the reports
that I bundle with my program. Is this level of customization (@ runtime)
available in the VStudio.NET version of Crystal Reports?

Reply to this message...
 
    
Johnson, Peter
I know how you can do this on a small-scale basis. Create parameter fields
for as many fonts & sizes that you need to customize individually. Then, for
each control that is to use the custom fonts, give its font fields formulae
that specify the font name & size.

If you have a lot to customize, this approach would still be possible, but
hard to manage & maintain.

HTH,
Peter

[Original message clipped]


**********************************************
This e-mail and any attachments may be confidential or legally privileged.
If you received this message in error or are not the intended recipient, you
should destroy the e-mail message and any attachments or copies, and you are
prohibited from retaining, distributing disclosing or using any information
contained herein. Please inform us of the erroneous delivery by return
e-mail. Thank you for your cooperation.
**********************************************

ec03/04

Reply to this message...
 
    
Sanja Frketich
You can also change fonts via ReportDocument object model. You can change
font for Text and Field object.

Here is code that may help you:

where:

oRpt = new ReportDocument ();

        protected void btnFont_Click_1 (object sender,
System.EventArgs e)
        {
            Sections sections = oRpt.ReportDefinition.Sections;
            Section section =
sections[lstSections.SelectedIndex];
                                
            ReportObject reportObject =
section.ReportObjects[cboName.SelectedIndex];
            
            if (txtKind.Text.StartsWith ("Field Object"))
            {
                FieldObject fieldObject = (FieldObject)
reportObject;
                
                FontDialog fieldFont = new FontDialog();

                if (fieldFont.ShowDialog
()==DialogResult.OK)
                    try
                    {    
    
fieldObject.ApplyFont(fieldFont.Font);
                    }
                    catch(EngineException Ex)
                    {    
                        MessageBox.Show
(Ex.Message,"SCREngineException Error" );
                    }
                    catch (Exception Ex)
                    {    
                        MessageBox.Show
(Ex.Message,"Exception Error");
                    }
            }
            else if (txtKind.Text == "Text Object")
            {
                TextObject textObject = (TextObject)
reportObject;
                                
                FontDialog fieldFont = new FontDialog();

                if (fieldFont.ShowDialog
()==DialogResult.OK)
                    try
                    {    
    
textObject.ApplyFont(fieldFont.Font);
                    }
                    catch(EngineException Ex)
                    {    
                        MessageBox.Show
(Ex.Message,"SCREngineException Error" );
                    }
                    catch (Exception Ex)
                    {    
                        MessageBox.Show
(Ex.Message,"Exception Error");
                    }
            }
                

        }

Thanks,
Sanja

-----Original Message-----
From: Johnson, Peter [mailto:Click here to reveal e-mail address]
Sent: Tuesday, July 02, 2002 6:36 AM
To: ngfx-crystal
Subject: [ngfx-crystal] RE: Changing fonts and sizes

I know how you can do this on a small-scale basis. Create parameter fields
for as many fonts & sizes that you need to customize individually. Then, for
each control that is to use the custom fonts, give its font fields formulae
that specify the font name & size.

If you have a lot to customize, this approach would still be possible, but
hard to manage & maintain.

HTH,
Peter

[Original message clipped]


**********************************************
This e-mail and any attachments may be confidential or legally privileged.
If you received this message in error or are not the intended recipient, you
should destroy the e-mail message and any attachments or copies, and you are
prohibited from retaining, distributing disclosing or using any information
contained herein. Please inform us of the erroneous delivery by return
e-mail. Thank you for your cooperation.
**********************************************

ec03/04

| [ngfx-crystal] member Click here to reveal e-mail address = YOUR ID
| http://www.aspfriends.com/aspfriends/ngfx-crystal.asp = JOIN/QUIT

Reply to this message...
 
    
pablo Albano
Does anyone know how to apply different fonts or styles in the same textbox object?

I need to make a report that presents a paragraph in the textbox. And this paragraph needs to have at least words in bold and italics.

--------------------------------
From: pablo Albano
Reply to this message...
 
 
System.EventArgs
System.Windows.Forms.DialogResult
System.Windows.Forms.FontDialog
System.Windows.Forms.MessageBox




ExamGuru IT Solutions - .Net Guru is owned and operated by ExamGuru, Inc., the man behind .Net Guru. If you're in the market for bespoke software or software consultancy, why not get him and his highly trained team to help? - www.examguru.net/ITCertification
Ad


Need Dot Net Interview Questions?
Ask ExamGuru, Inc. for advice and help on Passing .Net Interviews
.Net Projects
Best-of-breed application framework for .NET projects, developed by ExamGuru, Inc. and ExamGuru IT
Free .net Help
Commission ExamGuru, Inc. and his team for your next bespoke software project
FogBUGZ
The only bug tracking system carefully crafted with one goal in mind: helping teams create great software.
Awesome Tools
If you don't know about these, you're missing out... IT Certification Questions
IT Interview Questions
Free Oracle 10g Training
MCSE Boortcamp
Cisco Study Guides
Cheap Study Guides
Exact Questions
Dot Net Interview Questions
Oracle OCP
Cheap Travel
Designer Perfumes - Wholesale Prices
Free Programming Tutorials
 
ExamGuru IT Solutions - .Net Guru is owned and operated by ExamGuru, Inc., the man behind .Net Guru. If you're in the market for bespoke software or software consultancy, why not get him and his highly trained team to help? - www.examguru.net/ITCertification
 Copyright © ExamGuru, Inc. 2001-2006
Contact Us - Terms of Use - Privacy Policy - www.dot-net-guru.com - www.examguru.net - www.oraclesource.net - www.itinterviews.net - www.examguru.net/ITCertification