07-23-2013 01:47 PM
In 7.5.x, I could open a Crystal Report for the current record from a detail view with a little javascript (written from a C# Snippet). For example:
this.btnPrintOrder.OnClientClick = "if (ShowReport) { ShowReport('Sales Orderales Order', 'SALESORDER', Sage.Data.EntityContextStore.EntityId); } else { alert('ShowReport function not defined.'); }";
This worked because of a control included in base.master:
Page.Header.Controls.Add(new Sage.SalesLogix.Client.Reports.Helper.ReportsControl());
However, in version 8 this control no longer exists and the javascript code no longer works. So far I have yet to find an equivalent method and I don't see anything included in the base.master that suggests an equivalent. Does anyone know of one?
07-23-2013 02:59 PM
07-23-2013 03:06 PM
07-24-2013 06:29 AM
You're always the one who answers first. I don't know why I don't just e-mail you before posting. Thanks, Raul.
07-24-2013 08:21 AM - edited 07-24-2013 08:22 AM
It worked. I did have to add that script to base.master, and then changed my button javascript to:
var rs = Sage.Services.getService('ReportingService');if (rs) {rs.showReportByName('[family:name]');} else {alert('Reporting service not found.');}
where [family:name] (no square brackets) is the family and name of the report to launch. The current record determines the table name and id with that function, so that's actually pretty easy.
07-24-2013 09:38 AM