2025 Apr 14 5:32 PM - edited 2025 Apr 14 5:33 PM
Please I need to know if Crystal Reports in ASP.NET WebForms support DoubleClickPage event to do a Drill-down feature.
I use it in my WinForms App. to open another report based on current report object info in page line.
private void CrystalReportViewer_DoubleClickPage(object sender, PageMouseEventArgs e)
{
int drillbrn = 0, drilltyp = 0, drillnum = 0;
if (e.ObjectInfos != null)
{
if (e.ObjectInfos.HasName("tdtbrn1"))
{
foreach (ObjectInfo oi in e.ObjectInfos)
{
if (oi.Name == "tdtbrn1")
drillbrn = oi.Text.AsInt32();
if (oi.Name == "tdttyp1")
drilltyp = oi.Text.AsInt32();
if (oi.Name == "tdtnum1")
drillnum = oi.Text.AsInt32();
}
ReportDocument2.FileName = ReportsPath + "AccJV.rpt";
ReportDocument2.RecordSelectionFormula = "{AccTransHed.thd_brn} = " + drillbrn + " and {AccTransHed.thd_typ} = " + drilltyp + " and {AccTransHed.thd_num} = " + drillnum;
ReportDocument2.Execute(showAsDialog: true); // open another report dialog
ReportDocument2.Close();
}
}
}I try to ask ChatGPT for any resources. but don't find anything.
https://chatgpt.com/share/67fd36b2-eb7c-8010-9518-f4f947b1dc0d
Can you please tell me how to do DoublePageClick event or alternate in ASP.NET WebForms CrystalReportVIewer.
Request clarification before answering.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You may be able to use a single-click by setting a dynamic hyperlink property:
ido_millet_0-1744765816994.png
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Glad it worked for you.
Re: "how to turn off hyperlink in WinForms (Windows) and allow it in ASP.NET Web?"
The simplest option is to use 2 different rpt file.
An alternative is to use a function from a UFL (User Function Library) to identify an environment variable, read a registry entry or an ini file setting, get the machine name, etc. Ken Hamady maintains a listing of 3rd-party UFLs here. Several of them provide functions for some/all these use cases.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
The only Events available in the WEB viewer are these":
DonWilliams_0-1744731450715.png
I've asked R&D about making these types of events available in the WEB viewer and the problem is the view of the report is EPF based, it's an image of each page. There isn't an easy way to allow the browser and the viewer to talk to each other.
What you can do though it add a subreport to the main report so if you want another report link the subreport to the new report, you can then simply drill down.
Use RAS to add subreports in code.
See this page for the Reference material:
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I don't actually use DrillDown, But I open external report based on e.ObjectInfos parameters after double click on Row. for example opening Statement of Account report based on current selection account from Balances Report see following video please to describe my scenario: https://youtu.be/e_f8ntBeI-w
As I noted, DEV can't add any more events due to limitations in the Viewer and permissions etc. As a work around add a blank subreport in the section required, then use the DrillDownSubreport event to redirect your app to open a new report in a new tab based on your logic. Asking them for an enhancement request will take time if they agree to do it or if it's possible...
Using Java to do this should work though, I recall a while ago this was the solution but I don't recall how to now...
The Desktop Viewer does have a Double Click row Event but that's not going to help you....
Thanks for your reply dear, Please I need to know from you. If i use DrillDownSubreport event can I get e.ObjectInfos in that Section? or for example get row data or row cell values? as example I have a row that consist of transaction Branch and Number. when user double click on this row (DrillDownSubreport you mentioned) the another report will shown based on that Branch and Number.
Hi again, I try really hard to make things work. I found a hack solution. to inject an element i.e. Drill1 inside CrystalReport document. then use it from iframe by JQuery and make a callback to the server to allow use this drill-down parameters and after callback is complete open external report with specified row information. in this video I show it Open External Journal Entry from Statement of Account line. https://youtu.be/2eiSKF-Y4z0 Am sorry if my English is not good. But I try to explain how to hack a DoublePageClick function in ASP.NET Web. It will be really helpful if this event is supported by javascript side in Crystal Reports Web.
| User | Count |
|---|---|
| 14 | |
| 8 | |
| 6 | |
| 6 | |
| 3 | |
| 3 | |
| 3 | |
| 2 | |
| 2 | |
| 2 |