单击Crystal Report字段时打开Windows窗体 [英] Open the windows form when click on crystal report field

查看:112
本文介绍了单击Crystal Report字段时打开Windows窗体的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好,
我创建了一个Windows应用程序,其中包含一个报告,该报告提供了一个帐户的期初余额.但是现在我想在我单击带有报告记录的报告字段以进行更新时打开Windows窗体.
谢谢...

[edit]不要大喊大叫.使用所有大写字母被认为是在互联网上大喊大叫,并且粗鲁(使用所有小写字母被认为是幼稚的).如果要认真对待,请使用大写字母. -OriginalGriff [/edit]

Hello,
I have created an windows application which contains a report which gives the opening balance of an account.But now i want to open the windows form when i click on report field with the clicked record to update.
Thank you...

[edit]DON''T SHOUT. Using all capitals is considered shouting on the internet, and rude (using all lower case is considered childish). Use proper capitalisation if you want to be taken seriously. - OriginalGriff[/edit]

推荐答案

我已经在thatraja提供的链接中张贴了此答案. 如何通过单击Crystal Report中的超链接来打开Winform

通过添加以下代码,它与我完美协作:

I already posted this answer in the link provided by thatraja. How to open winform by clicking hyperlink in crystal report

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



e.ObjectInfo.Name将返回IFieldObject名称,而e.ObjectInfo.Text将返回其文本.

感谢thetraja提交了链接.



Where e.ObjectInfo.Name will return the IFieldObject name, and e.ObjectInfo.Text will return it''s text.

Thanks thetraja for submitting the link.


AFAIK这是不可能的.

但是您可以在运行时使用Crystal Report中的超链接字段打开网页.

我的一个项目(地图应用程序),当我单击超链接字段(纬度/经度值)时,我在asp.net页面中加载(打开)具有某些设置(例如缩放按钮,滑块,比例尺等)的地图)在水晶报表中.

因此,您可以尝试使用带有Template列的DataGridView.因此,您可以在按钮(DataGridView的模板列)单击中调用另一个Windows窗体.但是您也可以打印出来.仅供参考通过选择列和行 [如何通过单击Crystal Report中的超链接来打开Winform ? [ ^ ]
我从来没有尝试过.但是,如果尝试成功,请在此处回复此内容.
AFAIK It''s impossible.

But you can open webpage using hyperlink fields in crystal report at run time.

One of my project(Map application), I''m loading(opening) map in asp.net page with some settings(such as zoom button, slider, scale, etc.,) when I click hyperlink fields(lat/lon values) in crystal reports.

So you may try DataGridView with Template columns. So you can call another windows form in button(template column of DataGridView) click. But you can print that too. FYI DataGridView Printing by Selecting Columns and Rows[^]

BTW I found our fellow CPians answer just now. How to open winform by clicking hyperlink in crystal report?[^]
I never tried this. But please reply here about this one if success after your try.


这篇关于单击Crystal Report字段时打开Windows窗体的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆