MESCIUS.ActiveReports Assembly / GrapeCity.ActiveReports Namespace / SectionReport Class / LocateCredentials Event
Example

In This Topic
LocateCredentials Event (SectionReport)
In This Topic
Occurs when the report needs to obtain data source credentials from the calling application.
Syntax
'Declaration
 
Public Event LocateCredentials As LocateCredentialsEventHandler
 
Example
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";
	}
};
See Also