Results 1 to 11 of 11

Thread: Display the number of records in Crystal Report 9

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Apr 2005
    Posts
    105

    Display the number of records in Crystal Report 9

    Hi All,

    Is there any idea to display the number of records in Crystal Report 9 (CRViewer91).

    In crystal Repot 6, it is shown in the tool bar by default.

    But in Crystl Repot 9 there is no such faciltiy.

    Can anybody suggest a solution to display in the umber of record in report or in tool bar for Crystal Report 9.

    Wit regards,

    Nasreen
    Last edited by nasreen; Mar 5th, 2007 at 03:44 AM.

  2. #2
    Ex-Super Mod RobDog888's Avatar
    Join Date
    Apr 2001
    Location
    LA, Calif. Raiders #1 AKA:Gangsta Yoda™
    Posts
    60,709

    Re: Display number of records in Crystal Report 9

    Its been a while but you can create a running sum formula and add it to your report.
    VB/Office Guru™ (AKA: Gangsta Yoda®)
    I dont answer coding questions via PM. Please post a thread in the appropriate forum.

    Microsoft MVP 2006-2011
    Office Development FAQ (C#, VB.NET, VB 6, VBA)
    Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
    If a post has helped you then Please Rate it!
    Reps & Rating PostsVS.NET on Vista Multiple .NET Framework Versions Office Primary Interop AssembliesVB/Office Guru™ Word SpellChecker™.NETVB/Office Guru™ Word SpellChecker™ VB6VB.NET Attributes Ex.Outlook Global Address ListAPI Viewer utility.NET API Viewer Utility
    System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6

  3. #3
    Just Married shakti5385's Avatar
    Join Date
    Mar 2006
    Location
    Udaipur,Rajasthan(INDIA)
    Posts
    3,747

    Re: Display the number of records in Crystal Report 9

    Read Crystal report tutorial at my signature, See the last Post.

  4. #4

    Thread Starter
    Lively Member
    Join Date
    Apr 2005
    Posts
    105

    Re: Display the number of records in Crystal Report 9

    Hi shakti5385,

    Can u pls give me the link to the Crystal report tutorial at your signature

    With regards,
    Nasreen

  5. #5
    Just Married shakti5385's Avatar
    Join Date
    Mar 2006
    Location
    Udaipur,Rajasthan(INDIA)
    Posts
    3,747

    Re: Display the number of records in Crystal Report 9


  6. #6

    Thread Starter
    Lively Member
    Join Date
    Apr 2005
    Posts
    105

    Re: Display the number of records in Crystal Report 9

    Hi shakti5385

    Thanks for your prompt reply

    Here I use Crystal Repot 9 (CRViewer91) in VB6

    I can't see a property or method as .RecordsPrinted under Crystal repot 9

    Here is my exact VB code

    VB Code:
    1. Private Sub CmdPrnt_Click()
    2.  
    3. Dim CrystApp As CRAXDRT.Application
    4. Dim CrystRpt As CRAXDRT.Report
    5. Dim MyFrmDtlRpt As New FrmRptViewr 'Form with CRViewer91 to view the report
    6. Set CrystApp = New CRAXDRT.Application
    7. Set CrystRpt = CrystApp.OpenReport("Reports\EBLStlRpt.rpt")
    8.  
    9. CrystRpt.DiscardSavedData
    10.  
    11. MyFrmDtlRpt.CRViewer91.ReportSource = CrystRpt
    12. MyFrmDtlRpt.CRViewer91.Refresh
    13. MyFrmDtlRpt.CRViewer91.ViewReport
    14.  
    15. MyFrmDtlRpt.Show
    16.  
    17. Set CrystApp = Nothing
    18. Set CrystRpt = Nothing
    19.  
    20. End Sub

    How can I display the number of records in my this report.

    With regards,

    Nasreen

  7. #7

    Thread Starter
    Lively Member
    Join Date
    Apr 2005
    Posts
    105

    Re: Display number of records in Crystal Report 9

    Hi Mr. RobDog888

    Your rpelay

    Quote Originally Posted by RobDog888
    Its been a while but you can create a running sum formula and add it to your report.

    Can u pls describe me how can I run the sum formula as you think. Which field I can use for sum. ?

    With regards,
    Nasreen

  8. #8
    Just Married shakti5385's Avatar
    Join Date
    Mar 2006
    Location
    Udaipur,Rajasthan(INDIA)
    Posts
    3,747

    Re: Display the number of records in Crystal Report 9

    Crystal report control has a .RecordPrinted Property you can pass the value of this property using the parameter in the crystal report.
    http://vbforums.com/showpost.php?p=2647344&postcount=3

  9. #9

    Thread Starter
    Lively Member
    Join Date
    Apr 2005
    Posts
    105

    Re: Display the number of records in Crystal Report 9

    Hi shakti5385

    Thanks,

    But your idea is only applicable for Crystal Report OCX control, which is no longer available all new features of crystal report 8 and onwards

    Even the Seaget crystal report team doesn't suggest to use this control more after the release of Crystal Report 8. They suggest to use The Report Designer Component (RDC) as a better method.

    And we cannot open a report designed in Crystal Report 9 using .Action method of this Crystal Reprot OCX control. If we try, a run time error Unable to load report. will come.

    Overall, if we use this OCX control for a reprot designed in Crystal Report 6, the number of records will be displayed on the tool bar of the report by default, the case already I indicated in my first question.

    But as I think your this idea is not applicable for crystal report 9, especially for (RDC) method.

    So if you have an idea which is alo applicable for crystal report 9, pls help in this regards.

    With regards,
    Nasreen

  10. #10
    Ex-Super Mod RobDog888's Avatar
    Join Date
    Apr 2001
    Location
    LA, Calif. Raiders #1 AKA:Gangsta Yoda™
    Posts
    60,709

    Re: Display number of records in Crystal Report 9

    Quote Originally Posted by nasreen
    Hi Mr. RobDog888

    Your rpelay




    Can u pls describe me how can I run the sum formula as you think. Which field I can use for sum. ?

    With regards,
    Nasreen
    Inside CR you can select the menu item to Add a field to your report. In htat window is the various types of fields to add. A formula field is one of them. Click create new.
    VB/Office Guru™ (AKA: Gangsta Yoda®)
    I dont answer coding questions via PM. Please post a thread in the appropriate forum.

    Microsoft MVP 2006-2011
    Office Development FAQ (C#, VB.NET, VB 6, VBA)
    Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
    If a post has helped you then Please Rate it!
    Reps & Rating PostsVS.NET on Vista Multiple .NET Framework Versions Office Primary Interop AssembliesVB/Office Guru™ Word SpellChecker™.NETVB/Office Guru™ Word SpellChecker™ VB6VB.NET Attributes Ex.Outlook Global Address ListAPI Viewer utility.NET API Viewer Utility
    System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6

  11. #11
    Just Married shakti5385's Avatar
    Join Date
    Mar 2006
    Location
    Udaipur,Rajasthan(INDIA)
    Posts
    3,747

    Re: Display the number of records in Crystal Report 9

    Ok that’s fine
    If you do not want t use the OCX control then best idea is that you can use parameter in the crystal report, using the parameter you can pass the value of the total printed record (you can get them from the SQL query).

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