Click here to Skip to main content
15,881,852 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Hi all,
User views a Crystal report. He wants to open a particular translation form for correction at the same time. How can he do it?
please suggest me ,how can i implement this issue. Looks like a hyperlink that opens winform.
Posted
Updated 18-Apr-10 20:15pm
v2

I've never thought to do this, but I do have some forms that host the CrystalReportViewer control and I think it can be done.

The control raises an event, ClickPage, which has a CrystalDecisions.Windows.Forms.PageMouseEventArgs parameter. This has a property, ObjectInfo, which carries information about "the selected object," presumably, the object that the user clicked. If the user clicked on a link, it should be possible to convert it and extract meaningful information. You can then use this information to open translation form X.

I have not used links embedded in reports, so I may be wrong. Still.... Try encoding your information in the link's URL field. Create a pseudo protocol, and then a field indicating the form to open, say, trans:SPA. When ClickPage intercepts the click, if the object is a link and the link has a URL that starts with trans: you can open the requested translation form. Otherwise, treat it as a normal URL.

Let me know if this works, I can see a few nice uses for this.
 
Share this answer
 
I know it's a little bit late, but you can't believe how long I spent looking for such a solution, most of the other related posts mentioned that it's "NOT POSSIBLE", so thanks a lot Gregory for posting this.

It worked perfectly with me, by adding the following code:

VB
Private Sub CRV_ClickPage(ByVal sender As System.Object, ByVal e As CrystalDecisions.Windows.Forms.PageMouseEventArgs) Handles CRV.ClickPage
        If e.ObjectInfo.Name = "vouCode" Then
            Dim frmToLoad As New Services
            frmToLoad.LoadOrders(e.ObjectInfo.Text)
            frmToLoad.Show()
        End If
    End Sub


Where e.ObjectInfo.Name will return the IFieldObject name, and e.ObjectInfo.Text will return it's text.
 
Share this answer
 
v2
Comments
[no name] 17-Feb-12 3:59am    
which version of crystal report are you using
shaijuvjohn 26-Mar-12 2:52am    
Hi i am trying to do the same in C# 2008 and crystal reports 10.5. I have added a CRV and the above said event - ClickPage doesn't found. Is it available in c# or vs2008. I am waiting for your reply.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900