Results 1 to 5 of 5

Thread: Reporting with Data Reports

  1. #1

    Thread Starter
    New Member
    Join Date
    Oct 2002
    Location
    Mumbai
    Posts
    1

    Reporting with Data Reports

    I'm using VB's data report writer for building up my reports.I have few problesms while working with them

    1) The refresh data is never displayed in the report .Only when i close the application and again execute the report,the latest changes are visible.In short whatever changes I do through my data entry programme in the application,I cannot see them subsequently through my report.How do I overcome this problem?

    2) I cannot pass the form parameters to the Report .What's the way to send them and retrieve in the report?

    Regards
    Martin Sequeira

  2. #2
    Junior Member Lordak's Avatar
    Join Date
    Oct 2001
    Location
    Zaragoza (Spain)
    Posts
    27

    1) refreshing

    About refreshing, you have to keep in mind that the datareport's internal recordset fills on datareports load, so if you make any changes in the data it will not be visible until you 'recharge' the recordset that is used as source for the report.
    In order to see the 'fresh' data in your datareport, you'll have to refresh THE SOURCE from the data comes just before display the datareport.


    2) What are you trying to say?
    Last edited by Lordak; Oct 28th, 2002 at 11:49 AM.

  3. #3
    Fanatic Member eimroda's Avatar
    Join Date
    Jul 2000
    Location
    Philippines
    Posts
    642
    Suppose your DataSource is de1 specifically Command1:
    VB Code:
    1. If de1.rsCommand1.State = adStateOpen then de1.rsCommand1.Close
    2.   de1.Command1 'or de1.rsCommand1.Open
    3.   DataReport1.Show

    Please tell me if it works...
    On Error GoTo Hell

    Hell:
    Kill Me


    Food For Thought:

    - Do not judge a book... if you're not a judge!


  4. #4
    Hyperactive Member
    Join Date
    Mar 2001
    Location
    Calgary
    Posts
    273
    There are some posibility that you save the data, this hapend when you create the report. I think that you need to discharge the data in order to refresh a new report. There is some information on the crystal help menu "for developer' take a look on this "discharge data", ok Amigo

    Hasta la vista
    mannyso

  5. #5
    New Member
    Join Date
    Oct 2002
    Location
    Jefferson City, MO
    Posts
    5
    Martin,

    Following is the code that I use to refresh (and print) a calendar data report after users have specified parameters for the report:
    ------
    Private Sub Command1_Click()
    deCalendar.rscmdCalendarList.Open
    deCalendar.rscmdCalendarList.Requery
    rptCalendar.Refresh
    rptCalendar.PrintReport
    deCalendar.rscmdCalendarList.Close
    End Sub
    ------
    deCalendar is the data environment
    rptCalendar is the data report
    cmdCalendarList is a data member of deCalendar
    rscmdCaledarList is a record set property of deCalendar

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