Solved

Equivalent function to DrillOnDetail() event in RDC.

Posted on 2004-04-28
6
370 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
Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

 

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

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

I hate sub reports and always consider them the last resort in any reporting solution.  The negative effect on performance and maintainability is just not worth the easy ride they give the report writer.  Nine times out of ten reporting requirements…
Hot fix for .Net Crystal Reports 10.2.3600.0 to fix problems with sub reports running on 64 bit operating systems ISSUE: Reports which contain subreports fail with error "Missing Parameter Value" DEPLOYMENT SERVER OS: Windows 2008 with 64 bi…
This Micro Tutorial will give you a basic overview how to record your screen with Microsoft Expression Encoder. This program is still free and open for the public to download. This will be demonstrated using Microsoft Expression Encoder 4.
Established in 1997, Technology Architects has become one of the most reputable technology solutions companies in the country. TA have been providing businesses with cost effective state-of-the-art solutions and unparalleled service that is designed…

813 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

12 Experts available now in Live!

Get 1:1 Help Now