Results 1 to 8 of 8

Thread: multiple recordset in data report

  1. #1

    Thread Starter
    Frenzied Member
    Join Date
    May 2003
    Location
    Sydney
    Posts
    1,123

    multiple recordset in data report

    i am working on a project with oracle database and vb data reports. i have figured out the connections, dynamic sql and the like and am ready to create a report and thats where i'm stuck.

    i have to use four recordsets coz 3 recordsets differ with the change in row of the first recordset. i need to put that in a single data report.

    my question here is how do i connect multiple recordsets to a single data report page?

  2. #2

    Thread Starter
    Frenzied Member
    Join Date
    May 2003
    Location
    Sydney
    Posts
    1,123

    Re: multiple recordset in data report

    and also, i need to change the layout of the paper to landscape. seems it is not very flexible with that.

  3. #3

    Thread Starter
    Frenzied Member
    Join Date
    May 2003
    Location
    Sydney
    Posts
    1,123

    Re: multiple recordset in data report

    about half a day gone and still no reply to my post. well, i, at least, solved the second part.... or so i think. i will be using crystal reports, as soon as i get my cd....

    so far, i have no idea on how to work out the multiple recordsets as yet. hope crystal reports helps me out with that....

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

    Re: multiple recordset in data report

    Would you care to elaborate? Your problem is not clear to me...
    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

  5. #5

    Thread Starter
    Frenzied Member
    Join Date
    May 2003
    Location
    Sydney
    Posts
    1,123

    Re: multiple recordset in data report

    this is my first query that is in recordset called oraRS
    VB Code:
    1. mySQL = "select agent_id, flight_time, flight_date, sector_pair, flight_no from vofsc t1, rf t2, res t3 " & _
    2.             "where flight_date = '" & inDate & "' and " & _
    3.             "sector_pair = nvl('" & inSector & "', sector_pair) " & _
    4.             "and flight_status <> 'XX' " & _
    5.             "and t2.reservation_status = 'HK' " & _
    6.             "and t1.unid = t2.unid and t2.pnr_no = t3.pnr_no " & _
    7.             "group by agent_id, flight_time, flight_date, sector_pair, flight_no " & _
    8.             "order by flight_date"

    here are the other 3 sqls that are in gRS1, gRS2 and gRS3, respectively
    VB Code:
    1. 'gRS1
    2. mySQL = "select count(decode(nationality,'FOR', passenger_no)) for_pax, " & _
    3.             "count(decode(nationality, 'IND', passenger_no, 'NEP', passenger_no)) nep_pax, " & _
    4.             "count(decode(nvl(nationality, 'A'), 'A', passenger_no)) ntba_pax " & _
    5.             "from rp where pnr_no in (select t1.pnr_no from rf t1, res t2 where unid in " & _
    6.             "(select unid from vofsc where flight_date = '" & sDate & "' " & _
    7.             " and sector_pair = '" & oraRS.Fields(3).Value & "' and flight_status <> 'XX' " & _
    8.             "and flight_no = " & Val(oraRS.Fields(4).Value) & _
    9.             " and t1.pnr_no = t2.pnr_no and t2.agent_id = '" & oraRS.Fields(0).Value & "' " & _
    10.             "and t1.reservation_status in ('HK','KL','KK','RR')) " & _
    11.             "and passenger_status = 'OK')"

    VB Code:
    1. 'gRS2
    2. mySQL = "select ttl_date, ttl_time, user_id from rf t1, res t2 where unid in " & _
    3.             "(select unid from vofsc where flight_date = '" & sDate & "' " & _
    4.             "and sector_pair = '" & oraRS.Fields(3).Value & "' and flight_status <> 'XX' " & _
    5.             "and flight_no = " & Val(oraRS.Fields(4).Value) & _
    6.             " and t1.pnr_no = t2.pnr_no and t2.agent_id = '" & oraRS.Fields(0).Value & "' " & _
    7.             "and t1.reservation_status in ('HK','KL','KK','RR'))"

    VB Code:
    1. 'gRS3
    2. mySQL = "SELECT ALL COUNT(DECODE(NATIONALITY, 'FOR', TICKET_NO)) for_tkt, " & _
    3.             "COUNT(DECODE(NATIONALITY, 'IND', TICKET_NO, 'NEP', TICKET_NO)) nep_tkt, " & _
    4.             "COUNT(DECODE(NVL(NATIONALITY, 'A'), 'A', TICKET_NO)) ntba_tkt " & _
    5.             "FROM VFI WHERE UNID IN (SELECT UNID FROM VOFSC WHERE FLIGHT_DATE = '" & sDate & "' " & _
    6.             "AND SECTOR_PAIR = '" & oraRS.Fields(3).Value & "' AND FLIGHT_NO = " & Val(oraRS.Fields(4).Value) & _
    7.             " AND FLIGHT_TIME = '" & oraRS.Fields(1).Value & "' " & _
    8.             "AND SECTOR_STATUS = 'HK' " & _
    9.             "AND RESERVATION_STATUS = 'OK' AND PASSENGER_STATUS = 'OK' " & _
    10.             "AND AGENT_ID = '" & oraRS.Fields(0).Value & "')"

    and here is the attachment of the data report i need to fill up with these 4 recordsets.
    Attached Files Attached Files

  6. #6

    Thread Starter
    Frenzied Member
    Join Date
    May 2003
    Location
    Sydney
    Posts
    1,123

    Re: multiple recordset in data report

    ok, the landscape part is done. anybody has a view on how to do this? if it can be done. anybody know a good tut for CR?

    help....

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

    Re: multiple recordset in data report

    I have searched a number of times, but I've never found an free online tutorital for Crystal.

    All of the Crystal tutorials/training is cost based.

    If anyone has found something, it would be very helpful to a lot of people to post the link.

  8. #8
    PowerPoster
    Join Date
    Oct 2002
    Location
    British Columbia
    Posts
    9,758

    Re: multiple recordset in data report

    I find Crystal is easy to use. It contains Wizards to help get someone started and the help file is pretty good.

    There is no way to use multiple recordsets in Data Reports.

    Crystal is much more powerful and does have the ability to use multiple recordsets. It allows more control over formatting, user formulas, user defined functions, sub-reports etc..

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