Click here to Skip to main content
13,147,591 members (29,678 online)
Rate this:
Please Sign up or sign in to vote.
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 18-Apr-10 18:40pm
Updated 18-Apr-10 20:15pm
Rate this: bad
Please Sign up or sign in to vote.

Solution 1

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.
Rate this: bad
Please Sign up or sign in to vote.

Solution 2

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:

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
        End If
    End Sub

Where e.ObjectInfo.Name will return the IFieldObject name, and e.ObjectInfo.Text will return it's text.
bdpatel 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)

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy |
Web04 | 2.8.170915.1 | Last Updated 25 Oct 2011
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100