[Epicor 10] BAQ Report Designer - Require Filter

For those interested, I was able to make it work with this code:


private void BAQReportForm_BeforeToolClick(object sender, Ice.Lib.Framework.BeforeToolClickEventArgs args)
{

     EpiTextBox filter = (EpiTextBox)csm.GetNativeControlReference("8e5353ac-5d15-4e68-969f-4f2abc9c8831");

     if ( args.Tool.Key == "PrintPreviewTool" || args.Tool.Key == "PrintClientTool" || args.Tool.Key == "PrintServerTool" )
     {

          if( filter.Text == "All Selected" )

               throw new UIException("Please Select a Job to Filter");

     }

}

2 Likes

Hey All,


I have designed an SSRS report using Epicor's BAQ Report Designer and it uses the filter tab to get the specific job to view. However, if users don't filter and they just select Print Preview, it will try to run all of the jobs in our system.


Is there any way to require the filter tab?

I'd like to know that, too, for that reason. One of the guys fed the printer two reams of paper printing all the BOMs before he brought it to me.

You could use an option field instead and make the user manually enter the job number, and then change the SSRS report to add a parameter and filter. Your users wouldn't have a lookup, though. And I guess the query would take longer to run. Tradeoffs are a pain.

Joe

On Tue, Mar 1, 2016 at 12:59 PM, aaron_willett@... [vantage] <vantage@yahoogroups.com> wrote:

Â
<div>
  
  
  <p></p><p><span>Hey All,</span></p><p><span><br></span></p><p><span>I have designed an SSRS report using Epicor&#39;s BAQ Report Designer and it uses the filter tab to get the specific job to view. However, if users don&#39;t filter and they just select Print Preview, it will try to run all of the jobs in our system.</span></p><p><span><br></span></p><p><span>Is there any way to <em>require</em> the filter tab?</span></p><p></p>

</div>
 


<div style="color:#fff;min-height:0;"></div>

You could do a customization but other than that.... No

On Tuesday, March 1, 2016, Joe Douglas Trent jdtrent@... [vantage] <vantage@yahoogroups.com> wrote:

Â
<div>
  
  
  <p></p><div dir="ltr">I&#39;d like to know that, too, for that reason. One of the guys fed the printer two reams of paper printing all the BOMs before he brought it to me.<div><br></div><div>You could use an option field instead and make the user manually enter the job number, and then change the SSRS report to add a parameter and filter. Your users wouldn&#39;t have a lookup, though. And I guess the query would take longer to run. Tradeoffs are a pain.</div><div><br></div><div>Joe</div></div><div class="ygrps-yiv-1517594463gmail_extra"><br><div class="ygrps-yiv-1517594463gmail_quote">On Tue, Mar 1, 2016 at 12:59 PM, <a rel="nofollow">aaron_willett@...</a> [vantage] <span dir="ltr">&lt;<a rel="nofollow">vantage@yahoogroups.com</a>&gt;</span> wrote:<br><blockquote class="ygrps-yiv-1517594463gmail_quote" style="border-left:1px #ccc solid;">

Â
<div>
  
  
  <p></p><p><span>Hey All,</span></p><p><span><br></span></p><p><span>I have designed an SSRS report using Epicor&#39;s BAQ Report Designer and it uses the filter tab to get the specific job to view. However, if users don&#39;t filter and they just select Print Preview, it will try to run all of the jobs in our system.</span></p><p><span><br></span></p><p><span>Is there any way to <em>require</em> the filter tab?</span></p><p></p>

</div>
 


<div style="color:#fff;min-height:0;"></div>

</div>
 


<div style="color:#fff;min-height:0;"></div>


--

Jose C Gomez
Software Engineer


T: 904.469.1524 mobile

Quis custodiet ipsos custodes?

Jose,


I'm trying to write a customization to prevent the user from print previewing and this is what I have so far, but I'm not sure how to make the application stop the print preview process.


private void BAQReportForm_BeforeToolClick(object sender, Ice.Lib.Framework.BeforeToolClickEventArgs args)
 {
       EpiTextBox filter = (EpiTextBox)csm.GetNativeControlReference("8e5353ac-5d15-4e68-969f-4f2abc9c8831");
       MessageBox.Show(filter.Text);
       if ((filter.Text == "All Selected"))
       {
             MessageBox.Show("ABORT!");
       }
 }


Any thoughts?