|
-
April 25th, 2009, 05:27 AM
#1
basic syntax what does it mean
Dim Report As New CrystalReport36
Dim strselectionformula As String
Dim vReconDate As Date
Private Sub Form_Load()
vReconDate = CDate(Daily_Route_Recon.MaskEdBox1(0).Text)
Report.ReportTitle = Daily_Route_Recon.MaskEdBox1(0).Text
Report.DiscardSavedData
strselectionformula = " {DailyRouteReconciliation.RECONDATE} =#" & vReconDate & "#"
Report.RecordSelectionFormula = strselectionformula
Screen.MousePointer = vbHourglass
CRViewer1.ReportSource = Report
CRViewer1.ViewReport
Screen.MousePointer = vbDefault
End Sub
Private Sub Form_Resize()
CRViewer1.Top = 0
CRViewer1.Left = 0
CRViewer1.Height = ScaleHeight
CRViewer1.Width = ScaleWidth
End Sub
this is the result.....
"BASIC SYSNTAX IS NOT SUPPORTED IN GROUP OR RECORD SELECTION FORMULA"
any suggestions ?
thnks
cyrus
-
April 25th, 2009, 06:20 PM
#2
Re: basic syntax what does it mean
It means that you can set 2 kind of formulaes syntax in CR : CR syntax or VB syntax
Then, You have to supply the formula using CR syntax
There are several ways to do it, here's one :
Code:
'Variables already declared as integer
MyM = Month(vReconDate)
MyD = Day(vReconDate)
MyY = Year(vReconDate)
strselectionformula = "{DailyRouteReconciliation.RECONDATE} =Date(" & Format(MyY) & "," & Format(MyM) & "," & Format(MyD) & ")"
Or set the CR report to use VB syntax and use VB syntax
Last edited by jggtz; April 26th, 2009 at 12:58 AM.
-
April 29th, 2009, 03:32 PM
#3
Re: basic syntax what does it mean
how can i set CR to VB syntax
-
April 29th, 2009, 11:58 PM
#4
Re: basic syntax what does it mean
You didn't say CR version, but in CR 10 you can set Formula Language in
Menu/File/Options/Reporting/Formula Language
Could be Crystal syntax or Basic syntax
-
May 5th, 2009, 10:12 AM
#5
Re: basic syntax what does it mean
No matter how you set the formula languge, the record selection and group selection formulae must be in Crsytal Syntax. Basic syntax is not supported for these two formulae.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|