Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: VB9.0 CrystalReports
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 19:40pm
barjun895
Edited 18-Apr-10 21:15pm
v2
Rate this: bad
good
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.
  Permalink  
Rate this: bad
good
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
            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.
  Permalink  
v2
Comments
bdpatel at 17-Feb-12 3:59am
   
which version of crystal report are you using
shaijuvjohn at 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
0 Mathew Soji 309
1 BillWoodruff 300
2 Afzaal Ahmad Zeeshan 252
3 DamithSL 225
4 Maciej Los 215
0 OriginalGriff 6,249
1 Sergey Alexandrovich Kryukov 5,853
2 DamithSL 5,183
3 Manas Bhardwaj 4,673
4 Maciej Los 3,865


Advertise | Privacy | Mobile
Web02 | 2.8.1411019.1 | Last Updated 25 Oct 2011
Copyright © CodeProject, 1999-2014
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