During testing the report we have selected one job number 000208. Could you please let me know how to get this value on Print Preview button click event in customization script editor ? (refer to below screen)
What are you trying to achieve? You want the Job Num that was selected on the Filter Page to be added to the tool tip when you hover the Print Preview button, so that:
would become:
Not sure what you’d want if multiple jobs were selected. If it is only ever going to be one Job, just make that an Option, not a Filter.
How to prevent the report from Print Preview if condition do not match?
private void BAQReportForm_BeforeToolClick(object sender, Ice.Lib.Framework.BeforeToolClickEventArgs args)
{
switch(args.Tool.Key)
{
case “PrintPreviewTool”:
EpiUltraGrid objGrid = (EpiUltraGrid)csm.GetNativeControlReference(“6843359e-0af7-4967-b88c-6b6cba7ea776-1”);
Infragistics.Win.UltraWinGrid.UltraGridRow[] objRows = objGrid.Rows.GetFilteredInNonGroupByRows();
if(objRows.Length == 0)
{
EpiMessageBox.Show(“You must select at least one Job Number !!”);
return;
}
else
{
if(objRows.Length > 1)
{
EpiMessageBox.Show(“You will not select more than one Job Number !!”);
return;
}
}
break;
}
}
Sounds like you want to disable the Print icons (Print, Preview, and Send email) when the filter row count <> 1.
Need to hook into a function that is called when the row count of the Filter Grid is changed. If after the change the count == 1, then enable the tool bar icons, else disable them.
If it will always be exactly one, why not have them enter it in an Option instead of a Filter?