Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Equivalent function of DrillOnDetail in RDC 10
Message
De
28/04/2004 23:07:50
Rene Lovino
Bigfoot Global Solutions, Inc
Cebu, Philippines
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Crystal Reports
Titre:
Equivalent function of DrillOnDetail in RDC 10
Divers
Thread ID:
00899199
Message ID:
00899199
Vues:
74
Hi All,

We have a existing Crystal Report Application using Automation Server.
On our Crystal Application we create a function than can drillown to another report using the return value of the in the DrillOnDetail event. The code is similar to this:

Public oCRApp As New CRPEAuto.Application
Public WithEvents oCRReport As CRPEAuto.Report
Public oCRView As View
Public oCREventInfo As CRPEAuto.EventInfo
Public WithEvents oCRWinEvents As Window

Private Sub oCRWinEvents_DrillOnDetail(ByVal FieldValues As Variant, ByVal SelectedFieldIndex As Long, useDefault As Boolean, ByVal ReportName As Variant)

Dim t As CRPEAuto.FieldValue
Dim i As Long
Dim lnCtr As Long
Dim lcDocNo As String
Dim lcLineItem As String
Dim lcDescript As String
Dim lcModule As String
Dim lcTrsType As String
Dim lcObjNo As String
Dim lcAcctID As String
Dim lcBatcNo As String
Dim lcPeriod As String
Dim lcPrdTitle As String
Dim lvDrillValue As Variant
Dim lcDrillName As String
Dim lbGLDrill As Boolean
Dim lnAnswer As Long

i = SelectedFieldIndex
If i >= 0 Then
lcDocNo = ""
lcLineItem = ""
lcDescript = ""
lcModule = gcModule
lvDrillValue = FieldValues(i).Value
lcDrillName = VBA.LCase(FieldValues(i).Name)

If gcModule = "AR" Or gcModule = "SO" Or gcModule = "GL" Or gcModule = "AP" Or gcModule = "PO" Then
If gcModule = "GL" Then
If VBA.InStrRev(lcDrillName, "cacctid") > 0 Then
lbGLDrill = False
ElseIf VBA.InStrRev(lcDrillName, "cobjno") > 0 Then
lbGLDrill = False
ElseIf InStrRev(lcDrillName, "fml_ctrsdesc") > 0 Then
'Drill from non-gl journal entries to transaction report
lcDescript = "TRS_RPT"
lbGLDrill = True
ElseIf InStrRev(lcDrillName, "fml_ndrill") > 0 Then
'Only allow drill amount fields like Fml_nDrill...
lbGLDrill = True
Else
Exit Sub
End If
End If


For lnCtr = 0 To UBound(FieldValues, 1)
Set t = FieldValues(lnCtr)
Select Case gcModule
Case "AR"
If InStrRev(t.Name, "cinvno") > 0 Then
lcDocNo = t.Value
ElseIf InStrRev(t.Name, "clineitem") > 0 Then
lcLineItem = t.Value
ElseIf InStrRev(t.Name, "cdescript") > 0 Then
lcDescript = t.Value
End If
Case "GL"
If lbGLDrill Then
If VBA.InStrRev(t.Name, "ctrstype") > 0 Then
lcTrsType = VBA.Trim(t.Value)
If lcTrsType = "" Then
lcTrsType = "BATC"
End If
ElseIf VBA.InStrRev(t.Name, "ctrsno") > 0 Then
lcDocNo = t.Value
ElseIf VBA.InStrRev(t.Name, "cobjno") > 0 Then
lcObjNo = VBA.Trim(t.Value)
ElseIf VBA.InStrRev(t.Name, "csource") > 0 Then
lcModule = VBA.Trim(t.Value)
ElseIf VBA.InStrRev(t.Name, "cacctid") > 0 Then
lcAcctID = VBA.Trim(t.Value)
ElseIf VBA.InStrRev(t.Name, "cperiod") > 0 Then
lcPeriod = VBA.Trim(t.Value)
ElseIf VBA.InStrRev(t.Name, "cbatcno") > 0 Then
lcBatcNo = t.Value
End If
End If
End Select
Next lnCtr
End If

Call oVFP.Drill(lcDrillName, lvDrillValue, lcModule, lcDocNo, lcLineItem, gcAppName, lcDescript, _
lcObjNo, lcTrsType, lcPeriod) ' This function will call another report using the value of the variables to filter the record

End If
End Sub

In RDC we have code this in the "DblClicked" event but we cannot get the value of some of the fields that does not dispaly in the report. What I mean is that we some fields in the report that does not show but we have use it for reference.
My question is: How I can convert the following code in RDC since the DrillOnDetail event in RDC is not yet activated:
For lnCtr = 0 To UBound(FieldValues, 1)
.....
....
Next lnCtr

TIA,

Rene
Répondre
Fil
Voir

Click here to load this message in the networking platform