How to programmically change all fonts in Crystal Reports using VS2005

Post Author: KonRi
CA Forum: .NET
I want to change all fonts in my rpt files from Arial to Tahoma. I have:
ReportDocument report;
raport.Load(fInfos[i].FullName);
if (report.IsLoaded)    ChangeFont(report, path);
...        private void ChangeFont(ReportDocument oReport, string path)        {            foreach (CrystalDecisions.CrystalReports.Engine.Section crSection in oReport.ReportDefinition.Sections)            {                                foreach (CrystalDecisions.CrystalReports.Engine.ReportObject crObject in crSection.ReportObjects)                {                    FontStyle fStyle = FontStyle.Regular;                    if (crObject.Kind == ReportObjectKind.TextObject)                    {                                                CrystalDecisions.CrystalReports.Engine.TextObject text = (CrystalDecisions.CrystalReports.Engine.TextObject)crObject;                        if(text!=null)                        {                            if (text.Font.Bold)                                fStyle = fStyle | FontStyle.Bold;                            if (text.Font.Italic)                                fStyle = fStyle | FontStyle.Italic;                            if (text.Font.Underline)                                fStyle = fStyle | FontStyle.Underline;                            if (text.Font.Strikeout)                                fStyle = fStyle | FontStyle.Strikeout;                            text.ApplyFont(new Font("Tahoma", text.Font.Size,fStyle));                                                    }                    }                                        else if (crObject.Kind == ReportObjectKind.FieldObject)                    {                       ... the same                    }                    else if (crObject.Kind == ReportObjectKind.FieldHeadingObject)                    {                        ... the same                    }                                        else if (crObject.Kind == ReportObjectKind.SubreportObject)                    {                        CrystalDecisions.CrystalReports.Engine.SubreportObject crSubReport = (CrystalDecisions.CrystalReports.Engine.SubreportObject)crObject;                        ReportDocument crSubDoc = crSubReport.OpenSubreport(crSubReport.SubreportName);                        ChangeFont(crSubDoc,path);                    }                }            }            if (!oReport.IsSubreport)                oReport.SaveAs(path);        }
This works fine but when TextObject has Embedded Fields those Fields aren't change and still have Arial font.My question is: how to change font in whole rpt file, including Embedded Fields?? RegardsKonRi

Is there any update on this ? I am facing the same problem.
Thanks

Similar Messages

  • HT2509 How can I change a font recognition, whenever I use 'Palbo Let' it defaults to 'Lucinda Grande'?

    How can I change a font recognition, whenever I use 'Palbo Let' it defaults to 'Lucinda Grande'?

    I have a copy of what I did if that's what you mean.  And it's funny because it happened again.  I was just randomly messaging someone and a picture popped up with the Aa key and the color slide on the right edge .  Normally if I hit the pictures my pictures come up small on the bottom of Messenger and then I can send them or do other things.  But when it happened yesterday  I don't know if I hit a combination of keys or how I did it but I did but a large picture came up that I took of Facebook (both times were pics of f/b) and instead of the normal Airdrop, then Facebook, Messenger, Mail, Twitter and the More button  and under that the copy, slideshow, print, etc.  I get the Aa and the color thing.  Can someone be hacking me.  Can it be an error.

  • How to pass BigDecimal as currecny to Crystal Reports using JRC 11

    Im using JRC to load and view crystal reports.ie loading crystal reports that are created (not by me) using Crystal Reports v 10. My work is just load those rpt files using JRC thick client.
    rpt files are bound to .mdb (MS Access) database and DB is password protected.  One of the table in database has currency data type. I'm creating a POJO class to implement the table structure. To match with Currency type, Im using BigDecimal type in my pojo class. when i open the .rpt file in crystal report designer, it shows with default currency symbol (i.e $ and  £) But the when i load the same report via JRC, It doesnot show the symbol at all.
    When I change this to String and pass symbol, it is coming up properly. But in some places, the reports use sum function of 2 curency fields. So in this case, string cannot be used.
    Any help would be appreciated.
    Thanks.

    Sorry. I did not get your point directly.
    So I'd recommend not directly relying on internal handling of BigDecimal. You can still report off the value.
    So you are telling me not to use BigDecimal? If not what should I use? Please be bit more explanative.
    Thanks.

  • How to set DbConnections when scheduling a crystal report using Crystal Reports Server Java SDK?

    Post Author: Manjula
    CA Forum: JAVA
    Hi,
    Trying to schedule a report using Crystal Reports Server Java SDK. Want to pass DBConnections from API, though passing DBConnections, the report is not being scheduled and says "Failed to retrieve data from the database.Details:[Database Vendor Code:6550].
    Would be thankful if someone could answer my point as applicable.
    Here is the code attached.
    ISDKList dbLogons = oReport.getReportLogons();int dbLogonSize = dbLogons.size();
    for(int i=0; i<dbLogonSize; ++i) {
    IReportLogon dbLogon = (IReportLogon)dbLogons.get(i);
    dbLogon.setDatabaseName("DBname");
    dbLogon.setUserName("usrname");
    dbLogon.setPassword("pwd");
    Thanks in advance.

    Post Author: Manjula
    CA Forum: JAVA
    Ted,
    Thank you for your valuable information.
    First, tried scheduling on Central Management Console and then with the java code.It worked fine, but here is another question for you.
    On the Console, a report exists with ServerName and UserName harcoded and when trying to set ServerName and UserName from the java code, its throwing exception. Where as Password is not set on Console, am able to set password from java.
    And DatabaseName is not set on Console (non editable), unable to set the same from java too. Why is it so?
    So, my question is - though ServerName,DatabaseName,UserName,Password exists on the Console report, can't I override those parameters from java?
    Would be greatful if you answer my question and provide me some guidance.
    Thanks in advance.

  • How can I change all the fonts at once on labels I downloaded from Avery?

    How can I change all the fonts at once on labels I downloaded from Avery?

    select all (Edit > Select All), then open the font panel by selecting the menu item "Format > Font Show Fonts".  Now select the font you want.
    I could only find Templates from Avery for Pages.  I think my suggestion in still good but want you to know you posted this question in the forum for Numbers.

  • How does one change the font size for folders and/or file lists in the Bookmarks Library?

    How does one change the font size for folders and/or file lists in the '''Bookmarks''' Library?
    Since the upgrade to version 9.0.1 of Firefox, the Bookmarks feature changes are confusing me. They seem to be confusing themselves as well. The list of bookmarks has changed. The font size is so small that my aging eyes cannot read it without fogging the screen with my breath. Some folders are out of alphabetical order (where I know they were previously good), and some are missing altogether (folders to which I frequently add references).
    As for missing or deranged files or folders, was there something that I should have done or now need to do to recover those after the upgrade (or before)?
    With regard to font size,
    1. there is no “Edit Bookmarks” or like option to edit the list in this version
    2. the “zoom” option in the “view” list of functions is greyed out when in “Show All Bookmarks” window
    3. expanding the browser window has no effect on font size
    4. “Preferences” settings for font size has no effect in that window either, including advanced settings
    5. “Help” offers none that I can find.
    Can any of you Help?!?

    Maybe this extension helps:
    *Theme Font & Size Changer: https://addons.mozilla.org/firefox/addon/theme-font-size-changer/

  • How do I change the font size of a document when I PRINT?

    How to I change the font size of a document when I print it?

    To specifically and fully answer your question, no, you absolutely cannot change the “font size” as a function of print.
    First of all, there isn't a single “font size” associated with a PDF file (and we assume you are referring to a PDF file since this is an Acrobat forum).
    Secondly, PDF is a final form file format meaning that the content is static in terms of location, size, etc. on the page. To change the point size of any particular text, you really need to go back to the source document and make the changes there.
              - Dov

  • How do I change the fonts on the main page.My fonts have recently changed without my doing anything. They are like 6 point instead of the 12 I am used to. Email font is now huge. Is this an ATT/Yahoo problem or Firefox. Safari fonts seem to be o.k.

    How do I change the fonts on the home page? They recently shrank from 12 to very tiny..(6 pt?). I did nothing to change them, but after the event tried to change them using "preferences-Fonts"which had no effect. ATT seems to have made a change in their email. The fonts in the email are now huge (18 pt?). This could be an ATT/Yahoo problem with Mac, although Safari seems to be working o. k.

    Jim, extensions are also add-ons. Add-ons include extensions, themes and plugins.
    Whenever you have a problem with Firefox, whatever it is, you need to make sure it's not coming from one of your installed add-ons, be it an extension, a theme or a plugin. To do that easily and cleanly, run Firefox in [http://support.mozilla.com/en-US/kb/Safe+Mode safe mode] and select ''Disable all add-ons''. If the problem disappears, you know it's from an add-on. Disable them all in normal mode, and enable them one at a time until you find the source of the problem. See [http://support.mozilla.com/en-US/kb/Troubleshooting+extensions+and+themes this article] for information about troubleshooting extensions and theme. You can troubleshoot plugins the same way.
    If you want support for one of your add-ons, you'll need to contact its author.

  • How do I change the font color for numbering in a matching question slide?

    I have a grey image on a question slide, but the numbering for the answers in a matching question is defaulting to grey so learners can't see to match up.  How can I change the font color of these choices?  Thanks.

    You probably edited the master slide without changing the theme colors? Check the Object Style for Answers in the Object Style Manager. The numbering takes the same color as the answer text.
    All depends on the Theme colors palette that you are using. Normally Question answers use the darkest tint of the fourth color. I started blogging about color management, but description of the use of Theme colors will be published later.
    Colorful 2015 with Adobe Captivate - Captivate blog

  • How do you change the font of everything?

    How do you change the font of all text?

    You cannot. Only you can adjust the size the default font.
    You can only have font options in Notes.

  • How can you change the font size in the application and system headers?

    How can you change the font size in the application and system headers?  I searched the system and finder prefs to no avail.  Changing the screen density is not a good option.
    Thanks

    I downloaded Tinkertool.  Found the font section and increased the size of most selections.  The only thing that changed that I can see is the window label.  The apple line, bookmarks line, the tool bar in safari are all the same---font size of about 4.  Found the finder "show view options" but that didn't seem to change anything either.  I'll keep working.  Restarted all apps after changes as well.

  • How do you change the font in WPC Link List Header ...

    Does any one know how/where to change the font in Web Page Composer on the Link List Header?  I am using the Link List header delivered with the product. 
    It looks like it is pulling arial font but we are adding content in a different font in the paragraphs and want the fonts to be the same.  Is there something I can change in the theme?
    thanks
    Angie.

    You need to go to the
    Content Adminstration/KM Content/etc/wpceditor/css/runtime  and look in the sdn_general.css file.  The controls are all there.  You can rename or create a new style sheet as this will modify all WPC sites.

  • How do I change the font style

    How do I change the font style?

    You almost certainly do not; Acrobat is not a word processor. Font styles, when they can be changed at all, are often a different font (bold, italic) or separate graphics (underline).
    Where do you want to change them? There are an amazing number of places in Acrobat to enter text.

  • How can i change the fonts in notes in ios7

    how can i change the fonts in notes in ios7

    Well as far as I am concern Meg can keep it.  I am glad she like these really ridiculous colors and not be able to make changes.  Especially when the changes were so major. Plus all of apples wonderful locations to find answers besides community boards.  I am starting to rethink apple products with these type of releases. Who ever heard of yellow colors for e-mail addresses.  This app is terrible I will be looking for something that is easier for people that have color blindness issues. So far as I can see the changes that IOS 7 made are not well thought out and made changes just because they could without options is refi lupus and not user friendly.  Enjoy Meg because so far I don't. 

  • How can I change all of (or more than one) speaker note to a voice at once?

    Hello... 
       I have a lot of speaker notes that I need to apply a specific voice to.  How do I apply the same voice to all of the speaker notes in the whole project at once?  Or at least more than one?  Any help would be appreciated.  Thank you!   I am working with Captivate 6.

    Hi Vikram,
      Thanks. That tip definitely helps!  You just have to be careful when you use the CNTRL button and not highlight the name of the slide as you try to highlight the voices.  If you do that, then the drop down box becomes “unclickable”.  Unfortunately, when using the control button, it is sometimes impossible not to highlight the name of the slide as well.
    Ryan
    Von: VikramGaur [email protected]
    Gesendet: Donnerstag, 20. September 2012 16:25
    An: Scharfer, Ryan
    Betreff: How can I change all of (or more than one) speaker note to a voice at once?
    Re: How can I change all of (or more than one) speaker note to a voice at once?
    created by VikramGaur<http://forums.adobe.com/people/VikramGaur> in Adobe Captivate - View the full discussion<http://forums.adobe.com/message/4713463#4713463

Maybe you are looking for