Way to pass parameters to BAQ report from button push?

Try this. There might be a prettier way, but I've gotten this to work on other forms.

Form with button assign what values you want passed to an array...

Dim inVal As String() = {panel.ActiveRow.Cells(0).Value.ToString, panel.ActiveRow.Cells(1).Value.ToString, panel.ActiveRow.Cells(2).Value.ToString}
                                    Dim opts As LaunchFormOptions = New LaunchFormOptions()
                                    opts.ValueIn = inVal
                                    ProcessCaller.LaunchForm(oTrans, "Epicor.Mfg.UI.StartProductionActivityEntry", opts)

Then on the form you are passing the values to, break apart the array.

Private Sub StartProdForm_Load(ByVal sender As Object, ByVal args As EventArgs)
      ' Add Event Handler Code
      If Not (StartProdForm.LaunchFormOptions Is Nothing) Then
         If Not (StartProdForm.LaunchFormOptions.ValueIn Is Nothing) Then
            Dim edvStart As EpiDataView = CType(oTrans.EpiDataViews("Start"), EpiDataView)
            Dim lst As New System.Collections.Generic.List(Of String)
            For Each value As String In StartProdForm.LaunchFormOptions.ValueIn
               lst.Add(value)
            Next
            edvStart.dataView(edvStart.Row)("JobNum") = lst.Item(0).ToString
            edvStart.dataView(edvStart.Row)("AssemblySeq") = lst.Item(1).ToString
            edvStart.dataView(edvStart.Row)("OprSeq") = lst.Item(2).ToString
            oTrans.NotifyAll()
         End If
      End If
   End Sub

You'll have to modify Dim edvStart As EpiDataView = CType(oTrans.EpiDataViews("Start"), EpiDataView) to suit your needs.

Hope it helps,

-Ted




________________________________
From: pbparker <scrumbus@...>
To: vantage@yahoogroups.com
Sent: Thursday, September 6, 2012 5:21 PM
Subject: [Vantage] Way to pass parameters to BAQ report from button push?

I've read all the archives, and it looks like mostly noone has been able to do this, but just wanted to confirm that there isn't a way with a button push to pass parameters then to a BAQ Report with code correct?

However, there are options on the BAQ I'd like to populate, like Job number, etc. Is there still no way to do this?

In my button code I'm basically calling the following code to execute my BAQ report - which works, but I'm trying to avoid having everyone type in content which is on the screen they're on.

Dim opts As LaunchFormOptions = New LaunchFormOptions()
opts.IsModal = False
ProcessCaller.LaunchForm(oTrans, "UD1016", opts)



------------------------------------

Useful links for the Yahoo!Groups Vantage Board are: ( Note:Â You must have already linked your email address to a yahoo id to enable access. )
(1) To access the Files Section of our Yahoo!Group for Report Builder and Crystal Reports and other 'goodies', please goto: http://groups.yahoo.com/group/vantage/files/.%c2%a0
(2) To search through old msg's goto: http://groups.yahoo.com/group/vantage/messages
(3) To view links to Vendors that provide Vantage services goto: http://groups.yahoo.com/group/vantage/linksYahoo! Groups Links



[Non-text portions of this message have been removed]
I've read all the archives, and it looks like mostly noone has been able to do this, but just wanted to confirm that there isn't a way with a button push to pass parameters then to a BAQ Report with code correct?

However, there are options on the BAQ I'd like to populate, like Job number, etc. Is there still no way to do this?

In my button code I'm basically calling the following code to execute my BAQ report - which works, but I'm trying to avoid having everyone type in content which is on the screen they're on.

Dim opts As LaunchFormOptions = New LaunchFormOptions()
opts.IsModal = False
ProcessCaller.LaunchForm(oTrans, "UD1016", opts)
I've had mixed success with using LaunchFormOptions directly from the parent form to the BAQReportForm.

When all else fails... here is a thread that uses an intermediate table to pass the parameters:
http://tech.groups.yahoo.com/group/vantage/message/80054



--- In vantage@yahoogroups.com, "pbparker" <scrumbus@...> wrote:
>
> I've read all the archives, and it looks like mostly noone has been able to do this, but just wanted to confirm that there isn't a way with a button push to pass parameters then to a BAQ Report with code correct?
>
> However, there are options on the BAQ I'd like to populate, like Job number, etc. Is there still no way to do this?
>
> In my button code I'm basically calling the following code to execute my BAQ report - which works, but I'm trying to avoid having everyone type in content which is on the screen they're on.
>
> Dim opts As LaunchFormOptions = New LaunchFormOptions()
> opts.IsModal = False
> ProcessCaller.LaunchForm(oTrans, "UD1016", opts)
>
Jose and I actually covered this at Insights. You can do it, but not using
LFO. Well, maybe you can use LFO, but I've never taken the time to find a
way.

In a nutshell you need to call the BO for the report directly. In this case
with it being a BAQ report, I believe the BO is called 'DynamicReport'. In
a nutshell, you just:

- Instantiate the BO.
- Get your report dataset via GetByID
- Set whatever options/sorts/etc you want in the dataset. The fields are
named pretty intuitively, shouldn't be hard to find what you want.
- Set the print settings
- Submit the job to the system agent.

The print settings are probably the only tricky part as there are a ton and
they are VERY specific. If you get them wrong you just get an invisible
failure. Your best bet is to just run a trace when you're running the
report normally to get the settings, exact method names and such.

Apologies for not being more specific, I'm just going off the top of my
head. Give it a shot and let us know if you have any trouble and I'll fetch
some more detailed info.

*John Driggers*
**
*Chief Data Wrangler*
*
*
*I have an Epicor blog <http://usdoingstuff.com/>. How useful is that?*
*
*:: 904.404.9233
:: waffqle@...
:: http://www.usdoingstuff.com <http://www.usdoingstuff.com/>

*

*



On Thu, Sep 6, 2012 at 5:54 PM, b_ordway <cooner_55421@...> wrote:

> **
>
>
> I've had mixed success with using LaunchFormOptions directly from the
> parent form to the BAQReportForm.
>
> When all else fails... here is a thread that uses an intermediate table to
> pass the parameters:
> http://tech.groups.yahoo.com/group/vantage/message/80054
>
>
> --- In vantage@yahoogroups.com, "pbparker" <scrumbus@...> wrote:
> >
> > I've read all the archives, and it looks like mostly noone has been able
> to do this, but just wanted to confirm that there isn't a way with a button
> push to pass parameters then to a BAQ Report with code correct?
> >
> > However, there are options on the BAQ I'd like to populate, like Job
> number, etc. Is there still no way to do this?
> >
> > In my button code I'm basically calling the following code to execute my
> BAQ report - which works, but I'm trying to avoid having everyone type in
> content which is on the screen they're on.
> >
> > Dim opts As LaunchFormOptions = New LaunchFormOptions()
> > opts.IsModal = False
> > ProcessCaller.LaunchForm(oTrans, "UD1016", opts)
> >
>
>
>


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