BAQ Report

Dear Experts, We have created one SSRS report using BAQ Report Designer and added one filter (Job Number) refer to below screen

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:

image

would become:

image

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.

Actually we want all filters value in customization script.

What about referencing the grid object that has the selected filter items displayed?

@Hari_Dutt

The following code will build a string of the values in the ‘GL Account’ column of the Baq Report filter

private void baseToolbarsManager_ToolClick(object sender, Infragistics.Win.UltraWinToolbars.ToolClickEventArgs args)
	{
	//EpiMessageBox.Show(args.Tool.Key);
	switch(args.Tool.Key){
		case "PrintPreviewTool":
			
			// GUID 1ebf2c58-8e74-493a-a494-2637d6912176-1
			// EpiUltraGrid
			string myString = "";
			EpiUltraGrid eug =  (EpiUltraGrid)csm.GetNativeControlReference("1ebf2c58-8e74-493a-a494-2637d6912176-1");
			Infragistics.Win.UltraWinGrid.UltraGridRow[] filteredRows = eug.Rows.GetFilteredInNonGroupByRows();

			for(int i=0; i < filteredRows.Length;i++){
				myString = myString + eug.Rows[filteredRows[i].Index].Cells["GLaccount"].Value + "~";
				}
			EpiMessageBox.Show(myString);
			break;
		}
	}

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?