Solved

Equivalent function to DrillOnDetail() event in RDC.

Posted on 2004-04-28
6
368 Views
Last Modified: 2007-12-19
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
0
Comment
Question by:renelovino
  • 3
  • 3
6 Comments
 
LVL 100

Expert Comment

by:mlmcc
ID: 10951379
Is there any particular reason you migrated to the RDC?  As far as I know, the Print Engine method is available in CR9 and 10.

mlmcc
0
 

Author Comment

by:renelovino
ID: 10955216
The main reason why we migrated to RDC because we want to upgrade our report from crystal 8.5 to Crystal 10.
The Automation Server is not supported by Crystal 10 that's why we need to migrate to RDC.


Rene
0
 
LVL 100

Expert Comment

by:mlmcc
ID: 10955406
I haven't paid much attention to CR10 yet since we still use 8 so was unaware it was dropped.  The last I had heard from Crystal was that it would be around for some time.

Let me look through my code at work.  I don't have a database here or the RDC.
If my memory is correct there is either a drilldown event or property you can use.

mlmcc
0
How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

 

Author Comment

by:renelovino
ID: 11104005
Hi mlmcc,

Thank you very much for your time of answering my question. And I appreciate it, but unfortunately until now I have no solution of my problem. We have directly as this to business objects technical support.



Rene
0
 
LVL 100

Accepted Solution

by:
mlmcc earned 250 total points
ID: 11140054
Do you still need help?

If not what do you wish to do with this question?

mlmcc
0
 

Author Comment

by:renelovino
ID: 11258280
Hi All,

I have already get a work around for this issue. To work around this you need to put the the fields in the report but set the font size to white so that it will not dispaly in the report. May be other's have the same problem with this and i think they can use this technique.

By the way, since mlmcc is always there to help i will give the point to mlmcc.
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

There have always been a lot of questions related to when Crystal Reports evaluates report components (such as formulas, summaries, cross-tabs, charts, to name a few examples). Crystal Reports uses a two-pass reporting process to provide greater …
Hello everyone, Hope you find this as helpful as we did. We have on the company I work for an application built in Delphi V with Crystal Reports 8. We all know that Crystal & Delphi can be temperamental sometimes and the worst thing is, nearly…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.
This video explains how to create simple products associated to Magento configurable product and offers fast way of their generation with Store Manager for Magento tool.

705 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now