CodeGuru Forums -
CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic Newsletters VB Forums Developer.com


Newest CodeGuru.com Articles:

  • Installing SQL Server 2008
  • Writing UDFs for Firebird Embedded SQL Server
  • [Updated] Shutdown Manager
  • Building Windows Azure Cloud Service Applications with Azure Storage and the Azure SDK

  • Search CodeGuru:
     



    Go Back   CodeGuru Forums > Visual Basic Programming > Crystal Reports
    FAQ Members List Calendar Search Today's Posts Mark Forums Read

    Reply
     
    Thread Tools Search this Thread Rate Thread Display Modes
      #1    
    Old December 20th, 2004, 03:25 PM
    pallavijyo pallavijyo is offline
    Junior Member
     
    Join Date: Dec 2004
    Posts: 12
    pallavijyo is an unknown quantity at this point (<10)
    Increment the serial number

    I need to display the serial no in crystal reports 8.5
    i wrote this formula

    WhilePrintingRecords;
    NumberVar mycounter:=0;

    mycounter := mycounter + 1;

    but still it displays 1 for each record.....i want it

    1
    2
    3
    4
    5
    6
    so on
    Reply With Quote
      #2    
    Old December 20th, 2004, 10:09 PM
    springsoft springsoft is offline
    Member
     
    Join Date: Oct 2004
    Location: Adelaide, South Australia
    Posts: 125
    springsoft is an unknown quantity at this point (<10)
    Re: Increment the serial number

    I'd use a RunningTotal.....
    Menu - Insert
    Menu - Field Object
    Select RunningTotal from list of available types in Field Explorer dialog.
    "Create Running Total Field" dialog should display.
    Name it.
    Select a field which occurs in each line of the details section or group that you want to count on, and put it into the Field to Summarize box.
    Make the Type of Summary a Count.
    Leave the rest of the options alone.
    Click OK and then place the field on your report, in the repeated detail line or group.
    Run it and you should see your counter increment for each element.

    That's the basics. Then you can mess with these to do lots of cool stuff.

    dave
    Reply With Quote
      #3    
    Old December 21st, 2004, 12:51 AM
    Madhi Madhi is offline
    Senior Member
     
    Join Date: Jul 2004
    Location: Chennai, India
    Posts: 1,064
    Madhi will become famous soon enough (50+)
    Re: Increment the serial number

    Hi, try this
    Code:
    NumberVar mycounter
    WhilePrintingRecords;
    mycounter := mycounter + 1;
    Madhivanan
    Reply With Quote
      #4    
    Old December 21st, 2004, 02:44 PM
    pallavijyo pallavijyo is offline
    Junior Member
     
    Join Date: Dec 2004
    Posts: 12
    pallavijyo is an unknown quantity at this point (<10)
    Re: Increment the serial number

    Thks Dave ths was indeed helpful
    Reply With Quote
    Reply

    Bookmarks
    Go Back   CodeGuru Forums > Visual Basic Programming > Crystal Reports


    Thread Tools Search this Thread
    Search this Thread:

    Advanced Search
    Display Modes Rate This Thread
    Rate This Thread:

    Posting Rules
    You may not post new threads
    You may not post replies
    You may not post attachments
    You may not edit your posts

    BB code is On
    Smilies are On
    [IMG] code is On
    HTML code is Off
    Forum Jump


    All times are GMT -5. The time now is 08:12 PM.



    Acceptable Use Policy

    internet.comMediabistrojusttechjobs.comGraphics.com

    WebMediaBrands Corporate Info


    Advertise | Newsletters | Feedback | Submit News

    Legal Notices | Licensing | Permissions | Privacy Policy


    Powered by vBulletin® Version 3.7.3
    Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
    Copyright WebMediaBrands Inc. 2002-2009