Results 1 to 6 of 6

Thread: Crystal Report Problem

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Aug 2006
    Posts
    146

    Crystal Report Problem

    I AM USING CR 8.0 WITH VB 6.0
    I HAVE A TABLE IN THE DATA BASE FROM WHICH I FILL THE FIELDS IN THE REPORT TILL NOW I WAS HAVING A SINGLE SET OF RECORD IN THAT TABLE BUT NOW I AM HAVING MORE THAN ONE SET OF RECORDS
    WHAT I WANT IS THAT IF I HAVE 2 RECORDS IN THE TABLE THEN THE REPORT MUST SHOW 2 PAGES IN PREVIEW


    TILL NOW I WAS USING THE FOLLOWING CODE FOR AT THE LOAD OF THE FORM THAT CONTAINED CRYSTAL VIEWER

    VB Code:
    1. Private Sub Form_Load()
    2.  
    3. Dim oapp As CRAXDRT.Application
    4. Dim rpt As CRAXDRT.Report
    5. Set oapp = New CRAXDRT.Application
    6. Set rpt = oapp.OpenReport(App.Path & "\tax invoice.rpt", 1)
    7. rpt.RecordSelectionFormula = "{DATA2.inv}='" & val(new1("INV")) & "'"
    8. rpt.RecordSelectionFormula = "{kapil.article}='" & val(new1("anum")) & "'"
    9. cr1.ReportSource = rpt
    10.  
    11.  
    12. cr1.ViewReport
    13.  
    14. End Sub

    PLZ TELL ME HOW TO DO THAT
    Using VB.NET 2003/.NET 1.1

    If you found a post useful then please Rate it!
    Please mark you thread resolved using the Thread Tools above

  2. #2
    I'm about to be a PowerPoster! Hack's Avatar
    Join Date
    Aug 2001
    Location
    Searching for mendhak
    Posts
    58,333

    Re: Crystal Report Problem

    Moved to Reporting Section

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

    Re: Crystal Report Problem

    You will need to modify your RecordSelectionFormula to be able to include both or multiple records that fit your criteria.
    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

  4. #4

    Thread Starter
    Addicted Member
    Join Date
    Aug 2006
    Posts
    146

    Re: Crystal Report Problem

    sir, can u just give me a simple example of how to insert multiple records in a single reports
    plz help
    Using VB.NET 2003/.NET 1.1

    If you found a post useful then please Rate it!
    Please mark you thread resolved using the Thread Tools above

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

    Re: Crystal Report Problem

    I have an example in my signature for VB6/CR/ADO.
    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

  6. #6

    Thread Starter
    Addicted Member
    Join Date
    Aug 2006
    Posts
    146

    Re: Crystal Report Problem

    VB Code:
    1. oReport.Database.SetDataSource oRs, 3, 1

    sir plz can u just explain this line
    what is data base
    ors is recordsource ?
    oreport is a report
    Using VB.NET 2003/.NET 1.1

    If you found a post useful then please Rate it!
    Please mark you thread resolved using the Thread Tools above

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