LocateCredentials Event (SectionReport)
Occurs when the report needs to obtain data source credentials from the calling application.
public event LocateCredentialsEventHandler LocateCredentials
'Declaration
Public Event LocateCredentials As LocateCredentialsEventHandler
var sectionReport = new GrapeCity.ActiveReports.SectionReport();
sectionReport.LoadLayout(reportFilePath);
sectionReport.Document.Printer.PrinterName = String.Empty;
sectionReport.LocateCredentials += (s, args) =>
{
if (args.Name == "MyDB")
{
args.UserName = "guest";
args.Password = "12345";
}
};