Symptom
- In the SAP Crystal Reports Designer, records from an Alert are displayed:
- Is there an API in the Crystal reports SDK for VS .NET that will do this?
Environment
- Crystal Reports for Visual Studio 2010
- Visual Studio 2010
- Crystal Reports 2008
- Visual Studio 2008
Resolution
- There is no specific API
- The following code will display the record(s) by getting the formula for the Alert and setting it as the ViewTimeSelectionFormula of the viewer
protected void Page_Load(object sender, EventArgs e)
{
CrystalDecisions.CrystalReports.Engine.ReportDocument rpt = new CrystalDecisions.CrystalReports.Engine.ReportDocument();
rpt.Load(Request.PhysicalApplicationPath + "Crystalreport.rpt");
ISCDReportClientDocument rcd = rpt.ReportClientDocument;
Alerts alerts;
Alert alert;
alerts = rcd.ReportSource.GetTriggeredAlerts(new RequestContext());
alert = alerts[0];
string alertcondition = alert.ConditionFilter.FreeEditingText.ToString();
CrystalReportViewer1.ReportSource = rcd.ReportSource;
CrystalReportViewer1.ViewTimeSelectionFormula = alertcondition;
}
Keywords
CR2010 2010 CR4VS2010 CR4VS VS2010 NET2010 Crystal Reports for .NET Framework 4.0 crforvs 13 visual studio trigger , KBA , BI-DEV-NET-SDK , .NET SDK / COM SDK , Problem
Product
Crystal Reports 2008 V1 ; SAP Crystal Reports, developer version for Microsoft Visual Studio