Results 1 to 6 of 6

Thread: problem with datareport

  1. #1

    Thread Starter
    Lively Member creek16's Avatar
    Join Date
    Mar 2009
    Posts
    107

    problem with datareport

    hi everyone

    well i made a form that has textboxes, its more on curiculum vitae. .

    what i want is when i click print button it will display the current record on the data report, but when i use this code
    Code:
    datareport1.show
    it shows the first record and u have to click the next to find the record you what to print

    anyone knows the code for when i click the print button it will display the current record im browsing into the datareport and not the first button

    thanks in advance guys
    Last edited by creek16; Mar 24th, 2009 at 08:22 AM.
    Discovery consists in seeing what everybody else has seen and thinking what nobody else has thought.
    - Albert Szent-Gy-rgi

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

    Re: problem with datareport

    Moved To Reporting

  3. #3
    PowerPoster
    Join Date
    Sep 2005
    Location
    Modesto, Ca.
    Posts
    5,513

    Re: problem with datareport

    It depends on how you set the datasource for your report. Your datasource should contain only the record you want to print.

  4. #4

    Thread Starter
    Lively Member creek16's Avatar
    Join Date
    Mar 2009
    Posts
    107

    Re: problem with datareport

    yeah

    there are lot of records

    lets say record 1, 2, 3, 4, 5 now im currently browsing record 3, wat i want is when i press print button it will show the datareport displaying record 3 not record 1.
    Discovery consists in seeing what everybody else has seen and thinking what nobody else has thought.
    - Albert Szent-Gy-rgi

  5. #5
    Software Carpenter dee-u's Avatar
    Join Date
    Feb 2005
    Location
    Pinas
    Posts
    11,127

    Re: problem with datareport

    Have you looked into this?
    Regards,


    As a gesture of gratitude please consider rating helpful posts. c",)

    Some stuffs: Mouse Hotkey | Compress file using SQL Server! | WPF - Rounded Combobox | WPF - Notify Icon and Balloon | NetVerser - a WPF chatting system

  6. #6
    PowerPoster
    Join Date
    Sep 2005
    Location
    Modesto, Ca.
    Posts
    5,513

    Re: problem with datareport

    Code:
    Dim rsR as new ADODB.Recordset
    
    rsr.Open "Select * from yourtable where yourfieldname='" & selectedrecord & "'",conYourconnection
    
    With DataReport1
        set .Datasource = rsR
        .Datamember = rsR.Datamember
        .Show
    End With

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