Question

Trunc function? [Very Urgent Please]

Rating8.2Very Good

Hi:
    I want to use the trunc function of oracle8i in Recordselectionformula of Crystal report 8.5 but i m getting the error that "the remaining text does not appear to be the part of the formula", given bellow is the code, so please try to solve it.

Regards,
Shiraz

--------------------------------------------------

Private Sub Form_Load()
On Error GoTo err
Dim Formu As String
Dim Report As Crystal_Product_date
Set Report = New Crystal_Product_date


   For i = 1 To Report.Database.Tables.Count
     Report.Database.Tables(i).SetLogOnInfo "CALTEX", "CALTEX", "system", "manager"
 
   Next i


Formu = "trunc({DEMAND.DATE})>='20-FEB-2003' AND trunc({DEMAND.DATE})<='20-MAR-2003' AND {DEMAND.CUS_ID}={CUSTOMER.CUS_ID} AND {CUSTOMER.CUS_ID}={DIVISION.CUS_ID} AND {DEMAND_RATE.PCODE}={SERVICE.PCODE} AND {SERVICE.PF_ID}={PRODUCT_FAMILY.PF_ID} AND {DEMAND.SERVICE_TYPEID}='ss'"

MsgBox Formu
Report.RecordSelectionFormula = Formu
CRViewer1.ReportSource = Report
CRViewer1.ViewReport
err:
   MsgBox err.Description
End Sub

  1. Display Last Record of a table tied to detail records
    I have a report where I need to display the last co…
  2. Displaying a summary field from a subreport in a …
    I have three running total fields Program Complied…
  3. Report Options
    I write reports off a Sql Database linking a few m…
  4. Report prints top margin on some PC's ?
    Hi. I have a report that prints on 1" x 2…
  5. time conversion
    I have a time stored as the system time (288…

Solution

Access this solution immediately by signing up as a member of CrystalReportsExperts.com--it’s quick, easy, and secure. We will return you to this solution, unlocked, when you’re done.

About this Solution

Sign up Now to View This Solution
Zone
general
Tags
Participating Experts
2
Solution Grade
A

Replies

 
by: mlmcc

All comments and solutions are available to Premium Service Members only. Sign up to view the solution to this question. Already a member? Log in to view this solution.

 
by:

All comments and solutions are available to Premium Service Members only. Sign up to view the solution to this question. Already a member? Log in to view this solution.

Log In

Forgot your password?Sign up

Stay Connected

Top Experts

  1. mlmcc

    343,774

    Wizard

    0 points yesterday

    Profile
  2. James0628

    76,896

    Master

    0 points yesterday

    Profile
  3. LinInDenver

    4,800

    0 points yesterday

    Profile
  4. peter57r

    4,000

    0 points yesterday

    Profile
  5. 13598

    3,520

    0 points yesterday

    Profile
  6. PCIIain

    1,700

    0 points yesterday

    Profile
  7. RickIsWright

    400

    0 points yesterday

    Profile
  8. Dan3D

    300

    0 points yesterday

    Profile

BrowseAre you an Expert?