Results 1 to 9 of 9

Thread: How to Generate the Report at Runtime

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Jul 2005
    Posts
    127

    How to Generate the Report at Runtime

    Hi,
    Can someone help me about how can i generate the report at run time.



    Cheers

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

    Re: How to Generate the Report at Runtime

    What type of reports are you wanting info on? Crystal Reports, Access Reports, or the Data Environment?
    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
    I'm about to be a PowerPoster! Hack's Avatar
    Join Date
    Aug 2001
    Location
    Searching for mendhak
    Posts
    58,333

    Re: How to Generate the Report at Runtime

    Quote Originally Posted by M.Zafar Iqbal
    Hi,
    Can someone help me about how can i generate the report at run time.



    Cheers
    What are you using for a front end? VB6? VB.NET? C#? What, if any, database are you using?

  4. #4

    Thread Starter
    Lively Member
    Join Date
    Jul 2005
    Posts
    127

    Re: How to Generate the Report at Runtime

    i am using

    vb6 + Crystal Reports

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

    Re: How to Generate the Report at Runtime

    What verision of Crystal?

  6. #6

    Thread Starter
    Lively Member
    Join Date
    Jul 2005
    Posts
    127

    Re: How to Generate the Report at Runtime

    Vb6
    crystal report v8.0
    and
    Sql Server 2000
    Last edited by M.Zafar Iqbal; Feb 20th, 2006 at 11:17 AM.

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

    Re: How to Generate the Report at Runtime

    I have an example in my signature - "VB6/Crystal Reports Ex."
    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

  8. #8

    Thread Starter
    Lively Member
    Join Date
    Jul 2005
    Posts
    127

    Re: How to Generate the Report at Runtime

    i didn't found ?
    can u plz send the link ?

  9. #9

    Thread Starter
    Lively Member
    Join Date
    Jul 2005
    Posts
    127

    Re: How to Generate the Report at Runtime

    Hi,
    after i found it
    you have placed this code there


    Dim oApp As CRAXDRT.Application
    Dim oReport As CRAXDRT.Report
    Dim oRs As ADODB.Recordset
    Dim sSQL As String

    sSQL = "SELECT * FROM Table1"
    Set oRs = New ADODB.Recordset
    Set oRs = oCnn.Execute(sSQL)
    Set oApp = New CRAXDRT.Application
    Set oReport = oApp.OpenReport(App.Path & "\MyReport.rpt", 1)
    oReport.Database.SetDataSource oRs, 3, 1
    crvMyCRViewer.ReportSource = oReport
    crvMyCRViewer.ViewReport

    you passed the recordset to the report
    is there a way to pass the date using loop
    in other words can i pass the fields to report at runtime.


    Cheers

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