Results 1 to 3 of 3

Thread: [RESOLVED] [2005] Changing format of a Parameter Field in Crystal Report

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Aug 2006
    Location
    UK
    Posts
    96

    Resolved [RESOLVED] [2005] Changing format of a Parameter Field in Crystal Report

    Hi

    I have logged this on the Crystal Forum but I'm not getting any answers there so thought I'd try this one!

    I'm trying to set up a report (through Visual Studio 2005) that has a parameter field that is a year e.g. 2004, with hardcoded values. I've tried setting it up as a Number so that I can manipulate it as a number in the Record Selection Formula e.g. 2004 + 1. The problem I'm having is that the Parameter Field Editor converts 2004 to 2,004.00!

    Is there any way of forcing the format to be 2004?

    Thanks.

  2. #2
    Frenzied Member bmahler's Avatar
    Join Date
    Oct 2005
    Location
    Somewhere just west of the Atlantic
    Posts
    1,568

    Re: [2005] Changing format of a Parameter Field in Crystal Report

    Why not pass in the date parameter when generating the report instead of hardcoding it.

    Otherwise, if you ar using a number you can set a custom format to remove the comma and decimal places like so...


    Set the decimals to 1
    the rounding to 1 and uncheck the thousands seperator and you number should be 2004
    Boooya
    • Visual Studio 2008 Professional
    • Don't forget to use [CODE]your code here[/CODE] when posting code
    • Don't forget to rate helpful posts!
    • If you're question was answered please mark your thread [Resolved]


    Code Contributions:
    PHP
    PHP Image Gallery v1.0PHP Image Gallery v2.0
    VB 2005
    Find Computers on a networkSimple License EncryptionSQL Server Database Access dllUse Reflection to Return Crystal ReportDocumentSilently Print PDFGeneric Xml Serailizer


    Useful Links: (more to come)
    MSDN (The first and foremost)MSDN Design Guidelines API Reference • Inno Setup CompilerInno Setup PreprocessorISTool - Fairly easy to use GUI for creating inno setup projects • Connection StringsNAnt -Automated BuildsCruise Control .NET - Frontend for automated builds

  3. #3

    Thread Starter
    Lively Member
    Join Date
    Aug 2006
    Location
    UK
    Posts
    96

    Re: [2005] Changing format of a Parameter Field in Crystal Report

    Thanks, that's working great now!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width