CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 4 of 4
  1. #1
    Join Date
    Jun 2012
    Posts
    6

    Monthly report in VB6 using Crystal reports 9

    Hello to all.. im wondering how can i generate a more accurate monthly report in VB6 using crystal reports 9, what i have done so far is a basic monthly report (which is sorted of course by months). however, what i want to do now is not only it is sorted by months but also by its status. here is my code so far, im using SQL Server 2000..

    strsql = "{ADMmemodetails.memoappdate} in DateTime (" & yr & ", " & m & ", " & dey & ", 00, 00, 00) to DateTime (" & Trim(yr2) & ", " & Trim(m2) & ", " & Trim(dey2) & ",00, 00, 00)"

    Set miReport = miCRApp.OpenReport(App.Path & "\reports\rptmonthlyADM.rpt")
    Call GenMonthlyAnn

    Sub GenMonthlyAnn()

    With miReport
    .RecordSelectionFormula = strsql
    End With


    With frmrptview.crviewer
    .ReportSource = miReport
    .ViewReport
    .Zoom "90"
    .Visible = True
    End With

    Set miCRApp = Nothing
    Set miReport = Nothing
    frmrptview.Show

    End Sub


    this is only sorted by months, how can i sort it also by status?

    thanks in advance.. need your advices and tips here..

  2. #2
    Join Date
    Jul 2008
    Location
    WV
    Posts
    5,362

    Re: Monthly report in VB6 using Crystal reports 9

    No idea, that strsql does not look like any sql statement I have ever saw but then Crystal has always been weird.

    In the report engine I use it would be

    Code:
    Select * from Table Order By MemoAppDate, Status
    Always use [code][/code] tags when posting code.

  3. #3
    Join Date
    Jun 2012
    Posts
    6

    Re: Monthly report in VB6 using Crystal reports 9

    what engine are you using datamiser? yeah crystal is weird as for the code it uses,..

  4. #4
    Join Date
    Jul 2008
    Location
    WV
    Posts
    5,362

    Re: Monthly report in VB6 using Crystal reports 9

    I use Active Reports, it supports VB code, ADO DAO or RDO recordsets, pretty much works like a form object with the addition of settings for report headers, footers, groups and detail.

    It is very easy to use if you know your way around VB. I started using it back in VB5 after struggling with Crystal for a while. Big improvement over Crystal but it carries a hefty price tag.
    Always use [code][/code] tags when posting code.

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

Featured