I am trying to create a customization which will allow my users to generate a file on demand. The file will be created by a BAQ and I would like to have them run the BAQ Export Process to generate the required file. Basically I just want to auto populate the BAQ Export Process screen so the user does not need to enter all of the settings. Not being a coder I was able to find a couple of links which showed how to utilize the Form Event Wizard and the EpiViewNotification EventType to set these fields for the ProcedureParam table. The code I have is:
private void edvProcedureParam_EpiViewNotification(EpiDataView view, EpiNotifyArgs args)
{
// ** Argument Properties and Uses **
// view.dataView[args.Row]["FieldName"]
// args.Row, args.Column, args.Sender, args.NotifyType
// NotifyType.Initialize, NotifyType.AddRow, NotifyType.DeleteRow, NotifyType.InitLastView, NotifyType.InitAndResetTreeNodes
if (args.NotifyType == EpiTransaction.NotifyType.AddRow)
{
if (args.Row > -1)
{
view.dataView[args.Row]["QueryID"]="Company-QueryName";
view.dataView[args.Row]["ExportFormat"]="CSV";
view.dataView[args.Row]["ExportFilename"]=@"\\server\path\filename";
view.dataView[args.Row]["TextDelim"]=@"'";
view.dataView[args.Row]["OutputLabels"]="TRUE";
}
}
}
This code, however, doesn’t seem to do anything. No errors are thrown, but the BAQ Export Process screen just opens with no data auto populated. Any help anyone can lend would be much appreciated.