Results 1 to 7 of 7

Thread: crystal report and query and .........

  1. #1

    Thread Starter
    Member
    Join Date
    May 2002
    Location
    USA
    Posts
    59

    crystal report and query and .........

    hello,

    i have 2 easy proplems :
    1)
    how to do a query and put the result in a report (crystal report)
    i have used this cose:
    a = "select * from t1 where id ='1' order by no"
    Data1.RecordSource = (a)
    Data1.Refresh
    r1.ReportFileName = "E:\a.rpt"
    r1.DataFiles(0) = "E:\a.mdb"
    r1.Destination = crptToWindow
    r1.Action = 1

    2)
    how to show the report in the same frame ??
    not to open crystal report frame.

    inrepoll
    in arsene we trust ..

  2. #2
    Addicted Member cutamacious's Avatar
    Join Date
    May 2001
    Location
    INDIA >> Andhra Pradesh >> Hyderabad
    Posts
    185

    Re: crystal report and query and .........

    Originally posted by interpoll
    hello,

    i have 2 easy proplems :
    1)
    how to do a query and put the result in a report (crystal report)
    i have used this cose:
    a = "select * from t1 where id ='1' order by no"
    Data1.RecordSource = (a)
    Data1.Refresh
    r1.ReportFileName = "E:\a.rpt"
    r1.DataFiles(0) = "E:\a.mdb"
    r1.Destination = crptToWindow
    r1.Action = 1

    2)
    how to show the report in the same frame ??
    not to open crystal report frame.

    inrepoll
    To Same Frame: I think this is only possible if u r using Crystal Reports ver 8.0 prior to that every time it opens a new window. I've tried displaying in same frame in prior versions but ended up opening a new window.

    Qury: Well what happened when u used that code
    Cute Member

  3. #3
    Hyperactive Member buddu's Avatar
    Join Date
    Jul 2001
    Location
    India
    Posts
    446
    for first problem u can use
    crystalreprot1.Selection formula ="{t1.id}="& yourvalue

    for problem 2 :
    as cutamacious posted.
    prasad

  4. #4

    Thread Starter
    Member
    Join Date
    May 2002
    Location
    USA
    Posts
    59

    can u explain more

    when i tried the report show all the recordsets

    and i want to show the query recordsets

    interpoll

    can input the full code??
    in arsene we trust ..

  5. #5
    Hyperactive Member buddu's Avatar
    Join Date
    Jul 2001
    Location
    India
    Posts
    446
    CrystalReport1.SelectionFormula This statement is filters the Records according to u r condition.
    U must add the Table name and Filednames like
    {Tablename.Fieldname}= your conditon value

    it will work like Where Tablename.fieldname=yourvalue

    Order by u need to set into report itself.

    if not understand come to hotmail online [email protected]
    prasad

  6. #6

    Thread Starter
    Member
    Join Date
    May 2002
    Location
    USA
    Posts
    59

    ur not online

    i have add u in my massenger and wait

    interpoll
    in arsene we trust ..

  7. #7
    Hyperactive Member buddu's Avatar
    Join Date
    Jul 2001
    Location
    India
    Posts
    446
    have you cleared your doubt?
    prasad

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