Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > ActiveX COM > Report Control
  New Posts New Posts RSS Feed - Report Hyperlink Behavior
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Report Hyperlink Behavior

 Post Reply Post Reply
Author
Message
jpcoffeyXXX View Drop Down
Groupie
Groupie


Joined: 16 August 2005
Location: United States
Status: Offline
Points: 31
Post Options Post Options   Thanks (0) Thanks(0)   Quote jpcoffeyXXX Quote  Post ReplyReply Direct Link To This Post Topic: Report Hyperlink Behavior
    Posted: 28 December 2011 at 3:12pm
What happened to the default behavior of the report control hyperlinks?  In the past, the report control would show a blue hyperlink that would show a hand cursor when the mouse was hovered over the hyperlink.  Now the report control just shows plain text for the hyperlink with no hand when hovered.  I have tried the  HyperlinkStyle and HyperlinkHoverStyle objects in the Report PaintManager objects with no success.  The links show up as plain text.  Even in the CodeJock sample applications there are no hyperlinks that work as you would expect a hyperlink to look and work, i.e. blue text with a hand cursor when hovered over.  They are altogether gone.

If CJ wants us to use Markup exclusively, it should let us know more directly.  I have received no such instruction.  Can somebody provide some guidance on this?  Thank you.

Sincerely,

John P. Coffey
VB 6 Service Pack 6
WindowsXP Service Pack 3
CodeJock Controls 15.2.1


Back to Top
SuperMario View Drop Down
Admin Group
Admin Group
Avatar

Joined: 14 February 2004
Status: Offline
Points: 18057
Post Options Post Options   Thanks (0) Thanks(0)   Quote SuperMario Quote  Post ReplyReply Direct Link To This Post Posted: 09 January 2012 at 9:58am
Thanks, will be fixed in the next release.
Back to Top
jpcoffeyXXX View Drop Down
Groupie
Groupie


Joined: 16 August 2005
Location: United States
Status: Offline
Points: 31
Post Options Post Options   Thanks (0) Thanks(0)   Quote jpcoffeyXXX Quote  Post ReplyReply Direct Link To This Post Posted: 10 January 2012 at 10:07am
Oleg, can I request some assistance on the markup to serve as a temporary replacement until the code gets fixed?   I am using the following Markup and it is not working.  The mouse turns into a hand as the cursor hovers over the hyperlink on the report, but the procedure never fires.  Can you tell me what I am doing wrong?  Thank you.

Sincerely,

John
 Private Sub GridLoad()
With rptControl
.EnableMarkup = True
.MarkupContext.SetHandler Me
.MarkupContext.SetMethod Me, "TempReportHyperClick"
End With

Set rptRecord = rptControl.Records.Add()
Set rptItem = rptRecord.AddItem("My Link")
rptItem.Caption = "<TextBlock><Hyperlink Click='TempReportHyperClick'>" & "My Link" & "</Hyperlink></TextBlock>"
Set rtpItem = Nothing: set rptRecord = Nothing
End Sub

Private Sub TempReportHyperClick(oSender As Object, oArgs As Object)
MsgBox "TempReportHyperClick Fires!"
End Sub



Back to Top
nicoleta@nexusm View Drop Down
Newbie
Newbie
Avatar

Joined: 20 June 2009
Status: Offline
Points: 2
Post Options Post Options   Thanks (0) Thanks(0)   Quote nicoleta@nexusm Quote  Post ReplyReply Direct Link To This Post Posted: 04 April 2012 at 3:26am
I want to have a link through markup in a ReportRecordItem in a ReportControl and to fire an event when I click that link.
I have the following code in the Load event of the form. 
	public void Hyperlink_Click(object Sender, object Args)
        {
            MessageBox.Show("Clicked");
        }

        private void Form1_Load(object sender, EventArgs e)
        {
            try
            {
                axReportControl1.PaintManager.FixedRowHeight = false;
                axReportControl1.EnableMarkup = true;
                axReportControl1.MarkupContext.SetHandler(this);
                axReportControl1.MarkupContext.SetMethod(this, "Hyperlink_Click");
                
                axReportControl1.Columns.Add(0, "ColumnName", 100, true);
                var rec = axReportControl1.Records.Add();
                var item = rec.AddItem("My link");
                item.Caption = "<TextBlock><Hyperlink Click='Hyperlink_Click'>Click this</Hyperlink><LineBreak/> newline link </TextBlock>";
                item.CreateEditOptions();
                item.EditOptions.EditControlStyle = XTPReportEditStyle.xtpEditStyleMultiline;
		axReportControl1.Populate();
            }
            catch (Exception exc)
            {
                MessageBox.Show(exc.ToString());
            }
        }

On the line of code "axReportControl1.MarkupContext.SetHandler(this);" the following exception occurs: 
  System.InvalidCastException: Specified cast is not valid.
   at System.Runtime.InteropServices.Marshal.GetIDispatchForObjectNative(Object o, Boolean onlyInContext)
   at System.Runtime.InteropServices.Marshal.GetIDispatchForObject(Object o)
   at System.Runtime.InteropServices.DispatchWrapper..ctor(Object obj)
   at System.RuntimeType.WrapArgsForInvokeCall(Object[] aArgs, Int32[] aWrapperTypes)
   at System.RuntimeType.ForwardCallToInvokeMember(String memberName, BindingFlags flags, Object target, Int32[] aWrapperTypes, MessageData& msgData)
   at XtremeReportControl.MarkupContext.SetHandler(Object Handler)
   at WindowsFormsApplication1.Form1.Form1_Load(Object sender, EventArgs e)

Coding details: C# language, Visual Studio 2010, .net framework 4.0, version of Codejock dll: 15.2.0.0.

Thank for your support.




Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.172 seconds.