Pass a parameter to a BAQ report

Maybe I never sent it or I addressed it wrong but my response hasn't shown up from yesterday. So if my original ever shows up excuse any duplication.

What you are describing is pretty much what my directions show how to do. The user will click on the button, the current record information is written to an xml file, the BAQ report is launched, during the BAQ report's form load event the XML file is read. The values read are loaded into the BAQ report's dataview. If you have an option input control say for the job number you can populate this for the user so they do not need to enter it. For many of my reports I disable the control so the user just see the job number but can not make any changes. If you want you can hide the control which tends to be the way existing report look. All this happens without the user doing anything other than clicking the button.

You do a simple customization on both the calling programs (i.e. Job Entry) and in the BAQ Report program. The directions are fairly detailed but does assume some comfort with customization.

I do this in 9 but the approach should work pretty much the same in 8 other than changing the code to VB. I vaguely remember doing it for the first time in 8. It is pretty plain vanilla code so if you are not familiar with C# a little Google should be all that is needed to convert it to VB.

The file is located on the Vantage yahoo Group page under File/Epicor 9 Crystal reports. If you have trouble locating the file let me know and I will email it to you.

Jim Kinneman
Senior Consultant
Encompass Solutions, Inc

--- In vantage@yahoogroups.com, effgroups@... wrote:
>
> I have a similar issue.
> I placed a button to job pick list report on the job entry and would like the report to come up with the job selected in the filter.
> Is there a way to do this??
> Ephraim Feldman
>
> -----Original Message-----
> From: "jckinneman" <jckinneman@...>
> Sender: vantage@yahoogroups.com
> Date: Thu, 22 Jul 2010 18:04:28
> To: <vantage@yahoogroups.com>
> Reply-To: vantage@yahoogroups.com
> Subject: [Vantage] Re: Pass a parameter to a BAQ report
>
> I have some directions on handling this under Files/Epicor 9 Crystal Reports. The example is showing how to pass over record selection information but can be easily modified to handle passing information into the report.
>
> Jim Kinneman
> Senior Consultant
> Encompass Solutions Inc
>
> --- In vantage@yahoogroups.com, "Jason Moyer" <jmmoyer@> wrote:
> >
> > Does any now how you can pass a parameter to a BAQ report from custom button click?
> >
>
>
>
>
>
> [Non-text portions of this message have been removed]
>
Does any now how you can pass a parameter to a BAQ report from custom button click?
I just did this the other day. You have to write out the parameters to an xml
file and then customize your BAQ report to read the file. I used the SessionID
as the file name since that will always be unique for the session that is
running. I pass two parameters, Character01 and Character02.

My code in the calling program is:

 Private Sub btnEpiCustom21_Click(ByVal Sender As Object, ByVal Args As
System.EventArgs) Handles btnEpiCustom21.Click
  '// ** Place Event Handling Code Here **
Â
  Dim Session as Epicor.mfg.core.session = UD105Form.Session
  Dim etbCustID as EpiTextBox =
CType(csm.GetNativeControlReference("8785cd60-e9ee-4189-a311-31e8ea6096db"),
EpiTextBox)
  Dim etbQuoteNum as EpiTextBox =
CType(csm.GetNativeControlReference("40805ee3-3b11-4dfd-a5d9-3e456289c29c"),
EpiTextBox)
  Dim ReportName as String = Session.SessionID & ".xml"
  Dim Table as DataTable = New DataTable()
  Table.TableName = "ReportParam"
  Table.Columns.Add(New DataColumn("Character01", GetType(String)))
  Table.Columns.Add(New DataColumn("Character02", GetType(String)))
  Dim Row as DataRow = Table.NewRow()
  Row("Character01") = etbCustID.Text
  Row("Character02") = etbQuoteNum.Text
  Table.Rows.Add(Row)
  If (File.Exists(ReportName)) Then File.Delete(ReportName)
  Table.WriteXml(ReportName)
  ProcessCaller.LaunchForm(oTrans, "UDWinQuo")
 Â
 End Sub
Â
The BAQ Report Custom Code looks like this:

Private Sub BAQReportForm_Load(ByVal sender As object, ByVal args As EventArgs)
Handles BAQReportForm.Load
'//
'// Add Event Handler Code
'//
Dim Session as Epicor.Mfg.Core.Session = BAQReportForm.Session
Dim SessionID as String = Session.SessionID
Dim SourceFile as String = SessionID + ".xml"
Dim ds As DataSet = New DataSet()
Try
IF(File.Exists(SourceFile)) Then
ds.ReadXml(SourceFile)
File.Delete(SourceFile)
Dim TableName as String = "ReportParam"
Dim edvReport as EpiDataView = oTrans.EpiDataViews(TableName)
Dim FieldName as String= String.Empty
For each i as Object in ds.Tables(TableName).Columns
FieldName = i.ToString()
If(edvReport.DataView.Table.Columns.Contains(FieldName)) Then
edvReport.DataView(edvReport.Row)(FieldName) =
ds.Tables(TableName).Rows(0)(FieldName)
End If
Next
End If
oTrans.NotifyAll()
Catch e as Exception
ExceptionBox.Show(e)
End Try
End Sub
Â
Steven G.



________________________________
From: Jason Moyer <jmmoyer@...>
To: vantage@yahoogroups.com
Sent: Wed, July 21, 2010 2:50:52 PM
Subject: [Vantage] Pass a parameter to a BAQ report

Â
Does any now how you can pass a parameter to a BAQ report from custom button
click?







[Non-text portions of this message have been removed]
I have some directions on handling this under Files/Epicor 9 Crystal Reports. The example is showing how to pass over record selection information but can be easily modified to handle passing information into the report.

Jim Kinneman
Senior Consultant
Encompass Solutions Inc

--- In vantage@yahoogroups.com, "Jason Moyer" <jmmoyer@...> wrote:
>
> Does any now how you can pass a parameter to a BAQ report from custom button click?
>
I have a similar issue.
I placed a button to job pick list report on the job entry and would like the report to come up with the job selected in the filter.
Is there a way to do this??
Ephraim Feldman

-----Original Message-----
From: "jckinneman" <jckinneman@...>
Sender: vantage@yahoogroups.com
Date: Thu, 22 Jul 2010 18:04:28
To: <vantage@yahoogroups.com>
Reply-To: vantage@yahoogroups.com
Subject: [Vantage] Re: Pass a parameter to a BAQ report

I have some directions on handling this under Files/Epicor 9 Crystal Reports. The example is showing how to pass over record selection information but can be easily modified to handle passing information into the report.

Jim Kinneman
Senior Consultant
Encompass Solutions Inc

--- In vantage@yahoogroups.com, "Jason Moyer" <jmmoyer@...> wrote:
>
> Does any now how you can pass a parameter to a BAQ report from custom button click?
>





[Non-text portions of this message have been removed]
This can be done in 9.05 if I remember correctly. This cannot be done
in version 8.03.xxx.



Tim Dines

ERP Analyst

Steel Parts Manufacturing, Inc.

801 Berryman Pike

Tipton, IN 46072

765-675-5201



From: vantage@yahoogroups.com [mailto:vantage@yahoogroups.com] On Behalf
Of effgroups@...
Sent: Friday, July 23, 2010 3:02 PM
To: vantage@yahoogroups.com
Subject: Re: [Vantage] Re: Pass a parameter to a BAQ report





I have a similar issue.
I placed a button to job pick list report on the job entry and would
like the report to come up with the job selected in the filter.
Is there a way to do this??
Ephraim Feldman

-----Original Message-----
From: "jckinneman" <jckinneman@... <mailto:jckinneman%40yahoo.com>
>
Sender: vantage@yahoogroups.com <mailto:vantage%40yahoogroups.com>
Date: Thu, 22 Jul 2010 18:04:28
To: <vantage@yahoogroups.com <mailto:vantage%40yahoogroups.com> >
Reply-To: vantage@yahoogroups.com <mailto:vantage%40yahoogroups.com>
Subject: [Vantage] Re: Pass a parameter to a BAQ report

I have some directions on handling this under Files/Epicor 9 Crystal
Reports. The example is showing how to pass over record selection
information but can be easily modified to handle passing information
into the report.

Jim Kinneman
Senior Consultant
Encompass Solutions Inc

--- In vantage@yahoogroups.com <mailto:vantage%40yahoogroups.com> ,
"Jason Moyer" <jmmoyer@...> wrote:
>
> Does any now how you can pass a parameter to a BAQ report from custom
button click?
>

[Non-text portions of this message have been removed]





[Non-text portions of this message have been removed]
We have version 9.04.
Does it work there?
Ephraim Feldman

-----Original Message-----
From: "Dines, Tim" <tdines@...>
Sender: vantage@yahoogroups.com
Date: Fri, 23 Jul 2010 15:29:37
To: <vantage@yahoogroups.com>
Reply-To: vantage@yahoogroups.com
Subject: RE: [Vantage] Re: Pass a parameter to a BAQ report

This can be done in 9.05 if I remember correctly. This cannot be done
in version 8.03.xxx.



Tim Dines

ERP Analyst

Steel Parts Manufacturing, Inc.

801 Berryman Pike

Tipton, IN 46072

765-675-5201



From: vantage@yahoogroups.com [mailto:vantage@yahoogroups.com] On Behalf
Of effgroups@...
Sent: Friday, July 23, 2010 3:02 PM
To: vantage@yahoogroups.com
Subject: Re: [Vantage] Re: Pass a parameter to a BAQ report





I have a similar issue.
I placed a button to job pick list report on the job entry and would
like the report to come up with the job selected in the filter.
Is there a way to do this??
Ephraim Feldman

-----Original Message-----
From: "jckinneman" <jckinneman@... <mailto:jckinneman%40yahoo.com>
>
Sender: vantage@yahoogroups.com <mailto:vantage%40yahoogroups.com>
Date: Thu, 22 Jul 2010 18:04:28
To: <vantage@yahoogroups.com <mailto:vantage%40yahoogroups.com> >
Reply-To: vantage@yahoogroups.com <mailto:vantage%40yahoogroups.com>
Subject: [Vantage] Re: Pass a parameter to a BAQ report

I have some directions on handling this under Files/Epicor 9 Crystal
Reports. The example is showing how to pass over record selection
information but can be easily modified to handle passing information
into the report.

Jim Kinneman
Senior Consultant
Encompass Solutions Inc

--- In vantage@yahoogroups.com <mailto:vantage%40yahoogroups.com> ,
"Jason Moyer" <jmmoyer@...> wrote:
>
> Does any now how you can pass a parameter to a BAQ report from custom
button click?
>

[Non-text portions of this message have been removed]





[Non-text portions of this message have been removed]




[Non-text portions of this message have been removed]