Results 1 to 10 of 10

Thread: Help with formula

  1. #1

    Thread Starter
    New Member
    Join Date
    Jul 2006
    Posts
    6

    Help with formula

    Im using CR 10 and VB 6.0
    problem: cant get report of ticket no 3. I get by default 1st and hav to navigate from CRviewer.


    My code

    Private Sub Form_Load()
    Dim Appl As New CRAXDRT.Application
    Dim Report As New CRAXDRT.Report
    Set Report = Appl.OpenReport("d:\BusTkt.rpt")

    CRViewer1.ReportSource = Report
    CRViewer1.SearchByFormula "{Bus_Ticket.Ticket_Number} = '3'"
    CRViewer1.ViewReport
    End Sub

  2. #2
    Just Married shakti5385's Avatar
    Join Date
    Mar 2006
    Location
    Udaipur,Rajasthan(INDIA)
    Posts
    3,747

    Re: Help with formula


    Are you not getting the report of ticket number 3 or you are not getting the 2 or 1 also.
    Read the crystal report tutorial at my signature post 1, 2 and 3 where I give some example related to the formulas in the CR.


  3. #3
    Fanatic Member
    Join Date
    Jul 2006
    Location
    nasik,india
    Posts
    909

    Re: Help with formula

    if Bus_Ticket.Ticket_Number is of number type then do not use '
    WHETHER YOU SUCCEED OR FAIL IS NOT AS IMPORTANT AS WHETHER YOU TRIED YOUR BEST

  4. #4
    Just Married shakti5385's Avatar
    Join Date
    Mar 2006
    Location
    Udaipur,Rajasthan(INDIA)
    Posts
    3,747

    Thumbs up Re: Help with formula

    Check the option in the file menu if the save data with report is true then remove it.

  5. #5

    Thread Starter
    New Member
    Join Date
    Jul 2006
    Posts
    6

    Re: Help with formula

    are u guys sure that we can use selection formula with CRviewer.

    I know we can use it in cr 8.8 but not sure if we can use in CR10.

    I m getting all the records but i want the report of a selected record.

  6. #6
    Just Married shakti5385's Avatar
    Join Date
    Mar 2006
    Location
    Udaipur,Rajasthan(INDIA)
    Posts
    3,747

    Re: Help with formula


    Have you tried for the seletion formula , it will also work there, have you try for it!
    Just add the crystal report tutorial at my signature and see how to use the selection forumula with different time.


  7. #7

    Thread Starter
    New Member
    Join Date
    Jul 2006
    Posts
    6

    Re: Help with formula

    but when i type . after CRviewer1 i dont get selection formula option.

  8. #8
    Just Married shakti5385's Avatar
    Join Date
    Mar 2006
    Location
    Udaipur,Rajasthan(INDIA)
    Posts
    3,747

    Re: Help with formula

    VB Code:
    1. CRViewer1.SearchByFormula

    Use this but it is better then if you use the crystal report control instead of the crviewer, so using this you get some more property and able to use the multiple report at a time

  9. #9

    Thread Starter
    New Member
    Join Date
    Jul 2006
    Posts
    6

    Re: Help with formula

    i hav CR10 which doesnt hav CRYSTAL REPORT CONTROL ONLY HAS VIEWER.

  10. #10
    New Member
    Join Date
    Oct 2006
    Location
    US
    Posts
    2

    Re: Help with formula

    anil_295 says....
    but when i type . after CRviewer1 i dont get selection formula option......

    I'm new to CR lateste versions, but just a thought.

    Shouldn’t "SearchByFormula" be collection of Report object-in your case Report- rather than of CRViewer

    try looking for Report.DataDefinition.RecordSelectionFormula

    I'm not sure this will work, but just trying to throw an idea...

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